[wpdev-commits] xmlscripts/scripts/skills tailoring.py,1.9,1.10
Brought to you by:
rip,
thiagocorrea
From: Incanus <inc...@us...> - 2004-10-20 00:36:02
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14329/scripts/skills Modified Files: tailoring.py Log Message: fixed remaining uses of tailoring tool not resend to client Index: tailoring.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/tailoring.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tailoring.py 13 Oct 2004 18:45:42 -0000 1.9 --- tailoring.py 20 Oct 2004 00:35:53 -0000 1.10 *************** *** 1,7 **** ################################################################# ! # ) (\_ # WOLFPACK 13.0.0 Scripts # ! # (( _/{ "-; # Created by: DarkStorm # ! # )).-' {{ ;'` # Revised by: # ! # ( ( ;._ \\ ctr # Last Modification: Created # ################################################################# --- 1,7 ---- ################################################################# ! # ) (\_ # WOLFPACK 13.0.0 Scripts # ! # (( _/{ "-; # Created by: Darkstorm # ! # )).-' {{ ;'` # Revised by: # ! # ( ( ;._ \\ ctr # Last Modification: Created # ################################################################# *************** *** 17,21 **** # Leather types used by tailoring. LEATHERS = [ ! ['Leather', TAILORING, 0, ['leather_cut', 'leather_hides'], 0x0, 'leather'], ['Spined Leather', TAILORING, 650, ['spined_leather_cut', 'spined_leather_hides'], 0x283, 'spined_leather'], ['Horned Leather', TAILORING, 800, ['horned_leather_cut', 'horned_leather_hides'], 0x227, 'horned_leather'], --- 17,21 ---- # Leather types used by tailoring. LEATHERS = [ ! ['Leather', TAILORING, 0, ['leather_cut', 'leather_hides'], 0x0, 'leather'], ['Spined Leather', TAILORING, 650, ['spined_leather_cut', 'spined_leather_hides'], 0x283, 'spined_leather'], ['Horned Leather', TAILORING, 800, ['horned_leather_cut', 'horned_leather_hides'], 0x227, 'horned_leather'], *************** *** 26,37 **** # Check if the character is using the right tool # ! def checktool(char, item, wearout = 0): if not item: ! return 0 # Has to be in our posession if item.getoutmostchar() != char: char.socket.clilocmessage(500364) ! return 0 # We do not allow "invulnerable" tools. --- 26,37 ---- # Check if the character is using the right tool # ! def checktool(char, item, wearout = False): if not item: ! return False # Has to be in our posession if item.getoutmostchar() != char: char.socket.clilocmessage(500364) ! return False # We do not allow "invulnerable" tools. *************** *** 39,43 **** char.socket.clilocmessage(1044038) item.delete() ! return 0 if wearout: --- 39,43 ---- char.socket.clilocmessage(1044038) item.delete() ! return False if wearout: *************** *** 46,54 **** char.socket.clilocmessage(1044038) item.delete() ! return 0 else: item.settag('remaining_uses', uses - 1) ! ! return 1 # --- 46,54 ---- char.socket.clilocmessage(1044038) item.delete() ! return False else: item.settag('remaining_uses', uses - 1) ! item.resendtooltip() ! return True # *************** *** 57,66 **** def onUse(char, item): if not checktool(char, item): ! return 1 menu = findmenu('TAILORING') if menu: menu.send(char, [item.serial]) ! return 1 # --- 57,66 ---- def onUse(char, item): if not checktool(char, item): ! return True menu = findmenu('TAILORING') if menu: menu.send(char, [item.serial]) ! return True # *************** *** 78,82 **** # Only works if this item requires blacksmithing if not self.skills.has_key(TAILORING): ! return 0 minskill = self.skills[TAILORING][0] --- 78,82 ---- # Only works if this item requires blacksmithing if not self.skills.has_key(TAILORING): ! return False minskill = self.skills[TAILORING][0] *************** *** 114,118 **** # Reduce the uses remain count ! checktool(player, wolfpack.finditem(arguments[0]), 1) # --- 114,118 ---- # Reduce the uses remain count ! checktool(player, wolfpack.finditem(arguments[0]), True) # *************** *** 123,127 **** if not checktool(player, wolfpack.finditem(arguments[0])): ! return 0 return CraftItemAction.make(self, player, arguments, nodelay) --- 123,127 ---- if not checktool(player, wolfpack.finditem(arguments[0])): ! return False return CraftItemAction.make(self, player, arguments, nodelay) *************** *** 219,223 **** def getsubmaterial1used(self, player, arguments): if not player.hastag('tailoring_leather'): ! return 0 else: material = int(player.gettag('tailoring_leather')) --- 219,223 ---- def getsubmaterial1used(self, player, arguments): if not player.hastag('tailoring_leather'): ! return False else: material = int(player.gettag('tailoring_leather')) *************** *** 225,229 **** return material else: ! return 0 # --- 225,229 ---- return material else: ! return False # |