[wpdev-commits] xmlscripts/scripts bandages.py,1.10,1.11
Brought to you by:
rip,
thiagocorrea
From: spddmn <xxx...@us...> - 2004-09-03 17:07:59
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24392 Modified Files: bandages.py Log Message: i hope this fixes the bugs i made Index: bandages.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/bandages.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** bandages.py 2 Sep 2004 18:17:57 -0000 1.10 --- bandages.py 3 Sep 2004 17:07:50 -0000 1.11 *************** *** 9,13 **** # Bandages have to be in backpack if item.getoutmostchar() != char: ! char.socket.clilocmessage(500295) return 1 --- 9,14 ---- # Bandages have to be in backpack if item.getoutmostchar() != char: ! char.socket.clilocmessage(500294) ! # you cannot use that return 1 *************** *** 20,23 **** --- 21,25 ---- if item.id == 0xe21 or item.id == 0xee9: char.socket.clilocmessage(500948) + #who will you use on char.socket.attachtarget('bandages.bandage_response', [item.serial]) *************** *** 35,39 **** if (target.item and target.item.getoutmostchar() and target.item.getoutmostchar() != char) or not char.canreach(target.pos, 5): ! char.socket.sysmessage("You can't reach that.") return --- 37,41 ---- if (target.item and target.item.getoutmostchar() and target.item.getoutmostchar() != char) or not char.canreach(target.pos, 5): ! char.socket.clilocmessage(500312) return *************** *** 67,80 **** if not char.gm and not char.canreach( target, 2 ): ! char.socket.clilocmessage(500313) return 0 if target.id != 0x2006: ! char.socket.clilocmessage(500971) return 0 # Check Owner if not target.owner or not target.owner.dead: ! char.socket.clilocmessage(500971) return 0 --- 69,85 ---- if not char.gm and not char.canreach( target, 2 ): ! char.socket.clilocmessage(500312) ! # cannot reach return 0 if target.id != 0x2006: ! char.socket.clilocmessage(500970) ! #bandages cannot be used on that return 0 # Check Owner if not target.owner or not target.owner.dead: ! char.socket.clilocmessage(500970) ! #bandages cannot be used on that return 0 *************** *** 92,100 **** # Already at full health ! if not target.poison and target.health >= target.maxhitpoints: if target == char: ! char.socket.clilocmessage(1061289) else: ! char.socket.clilocmessage(500956) return 0 --- 97,105 ---- # Already at full health ! if not target.poison > -1 and target.health >= target.maxhitpoints: if target == char: ! char.socket.clilocmessage(1061288) else: ! char.socket.clilocmessage(500955) return 0 *************** *** 102,105 **** --- 107,113 ---- def bandage_response( char, args, target ): + # char is healer + # target is pointer to healing target + corpse = None *************** *** 118,130 **** if corpse and ( char.skill[ HEALING ] < 800 or char.skill[ ANATOMY ] < 800 ): ! char.socket.clilocmessage(1002086) return if target.char and target.char.dead and ( char.skill[ HEALING ] < 800 or char.skill[ ANATOMY ] < 800 ): ! char.socket.clilocmessage(1002086) return ! if target.char and target.char.poison and ( char.skill[ HEALING ] < 600 or char.skill[ ANATOMY ] < 600 ): ! char.socket.clilocmessage(1002086) return --- 126,138 ---- if corpse and ( char.skill[ HEALING ] < 800 or char.skill[ ANATOMY ] < 800 ): ! char.socket.sysmessage("1") return if target.char and target.char.dead and ( char.skill[ HEALING ] < 800 or char.skill[ ANATOMY ] < 800 ): ! char.socket.sysmessage("You are not skilled enough for that.") return ! if target.char and target.poison > -1 and ( char.skill[ HEALING ] < 600 or char.skill[ ANATOMY ] < 600 ): ! char.socket.sysmessage("You are not skilled enough for that.") return *************** *** 147,151 **** # SkillCheck (0% to 80%) ! if not corpse and not target.char.dead and not target.char.poison: success = char.checkskill( HEALING, 0, 800 ) elif corpse or target.char.dead: --- 155,159 ---- # SkillCheck (0% to 80%) ! if not corpse and not target.char.dead and not target.char.poison > -1: success = char.checkskill( HEALING, 0, 800 ) elif corpse or target.char.dead: *************** *** 169,176 **** if target.char.dead: target.char.socket.sysmessage( char.name + ' begins applying a bandage to you.' ) ! char.addtimer( random.randint( 2500, 5000 ), 'bandages.bandage_timer', [ 2, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage elif char == target.char: char.socket.sysmessage( 'You start applying bandages on yourself' ) ! char.addtimer( random.randint( 1500, 2500 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage else: char.socket.sysmessage( 'You start applying bandages on %s' % target.char.name ) --- 177,187 ---- if target.char.dead: target.char.socket.sysmessage( char.name + ' begins applying a bandage to you.' ) ! char.addtimer( random.randint( 5000, 10000 ), 'bandages.bandage_timer', [ 2, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage elif char == target.char: char.socket.sysmessage( 'You start applying bandages on yourself' ) ! if target.char.poison > -1: ! char.addtimer( random.randint( 4000, 7000 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage ! else: ! char.addtimer( random.randint( 3000, 6000 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage else: char.socket.sysmessage( 'You start applying bandages on %s' % target.char.name ) *************** *** 178,182 **** target.char.socket.sysmessage( char.name + ' begins applying a bandage to you.' ) char.turnto( target.char ) ! char.addtimer( random.randint( 1500, 2500 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage char.socket.settag( 'using_bandages', 1 ) --- 189,196 ---- target.char.socket.sysmessage( char.name + ' begins applying a bandage to you.' ) char.turnto( target.char ) ! if target.char.poison > -1: ! char.addtimer( random.randint( 3000, 4000 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage ! else: ! char.addtimer( random.randint( 1500, 3000 ), 'bandages.bandage_timer', [ 0, success, target.char.serial, baseid ] ) # It takes 5 seconds to bandage char.socket.settag( 'using_bandages', 1 ) *************** *** 200,204 **** if not success: ! char.socket.clilocmessage(500967) return --- 214,218 ---- if not success: ! char.socket.clilocmessage(500966) return *************** *** 219,223 **** target.delete() ! char.socket.clilocmessage(500966) else: char.socket.sysmessage( 'You can''t help them anymore' ) --- 233,237 ---- target.delete() ! char.socket.clilocmessage(500965) else: char.socket.sysmessage( 'You can''t help them anymore' ) *************** *** 233,237 **** if target.dead: if not success: ! char.socket.clilocmessage(500967) return --- 247,251 ---- if target.dead: if not success: ! char.socket.clilocmessage(500966) return *************** *** 239,246 **** target.update() ! char.socket.clilocmessage(500966) ! elif target.poison: if not success: ! char.socket.sysmessage( 'You fail to cure the target.' ) char.socket.clilocmessage(1010060) return --- 253,260 ---- target.update() ! char.socket.clilocmessage(500965) ! elif target.poison > -1: if not success: ! #char.socket.sysmessage( 'You fail to cure the target.' ) char.socket.clilocmessage(1010060) return *************** *** 248,259 **** target.poison=-1 target.update() ! ! char.socket.sysmessage( 'You successfully cured ' + target.name ) else: if not success: ! if target != char: ! char.socket.clilocmessage(500969) ! else: ! char.socket.clilocmessage(500969) return --- 262,273 ---- target.poison=-1 target.update() ! if target <> char: ! target.socket.clilocmessage(1010059) ! target.soundeffect( 0x57,0 ) ! char.socket.clilocmessage(1010058) ! char.soundeffect( 0x57,0 ) else: if not success: ! char.socket.clilocmessage(500968) return *************** *** 274,282 **** target.health = min( target.maxhitpoints, target.health + amount ) target.updatehealth() ! ! if char == target: ! char.socket.clilocmessage(500970) ! else: ! char.socket.clilocmessage(500970) # Create bloody bandages --- 288,295 ---- target.health = min( target.maxhitpoints, target.health + amount ) target.updatehealth() ! char.soundeffect( 0x57 ) ! if target <> char: ! target.soundeffect( 0x57 ) ! char.socket.clilocmessage(500969) # Create bloody bandages |