[wpdev-commits] xmlscripts/scripts potions.py,1.58,1.59
Brought to you by:
rip,
thiagocorrea
From: Richard M. <dr...@us...> - 2004-10-13 22:38:41
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25044 Modified Files: potions.py Log Message: Hope this works... Index: potions.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/potions.py,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** potions.py 10 Oct 2004 19:56:41 -0000 1.58 --- potions.py 13 Oct 2004 22:38:29 -0000 1.59 *************** *** 77,81 **** # char, potion, counter value if not item.hastag('exploding'): ! potionexplosion( item, [char, 4, item.amount] ) item.settag('exploding', 'true') socket.sysmessage( 'You should throw this now!', RED ) --- 77,81 ---- # char, potion, counter value if not item.hastag('exploding'): ! potionexplosion( item, [char.serial, 4, item.amount] ) item.settag('exploding', 'true') socket.sysmessage( 'You should throw this now!', RED ) *************** *** 162,165 **** --- 162,166 ---- # Explosion Potion Function def potionexplosion( potion, args ): + # args[0] == char.serial if args[1] > 0: potion.addtimer( 1000, "potions.potioncountdown", [args[0], args[1], args[2]] ) *************** *** 173,176 **** --- 174,178 ---- # Explosion Potion Function def potioncountdown( potion, args ): + # args[0] == char.serial counter = args[1] if potion: *************** *** 196,206 **** bomb.settag( 'exploding', char.serial ) if bomb.hastag( 'kegfill' ) and int( bomb.gettag( 'kegfill' ) ) >= 1: ! bomb.addtimer( randint( 1000, 2250 ), "potions.potioncountdown", [ char, 0, int( bomb.gettag( 'kegfill' ) ) ] ) else: ! bomb.addtimer( randint( 1000, 2250 ), "potions.potioncountdown", [ char, 0, bomb.amount ] ) return # Explosion Potion Function ! def potionregion( char, potion, bonus=0 ): if potion.gettag('potiontype') == 11: outradius = 1 --- 198,209 ---- bomb.settag( 'exploding', char.serial ) if bomb.hastag( 'kegfill' ) and int( bomb.gettag( 'kegfill' ) ) >= 1: ! bomb.addtimer( randint( 1000, 2250 ), "potions.potioncountdown", [ char.serial, 0, int( bomb.gettag( 'kegfill' ) ) ] ) else: ! bomb.addtimer( randint( 1000, 2250 ), "potions.potioncountdown", [ char.serial, 0, bomb.amount ] ) return # Explosion Potion Function ! def potionregion( charserial, potion, bonus=0 ): ! char = wolfpack.findchar( charserial ) if potion.gettag('potiontype') == 11: outradius = 1 *************** *** 410,414 **** if time.time() - elapsed > HEAL_POT_DELAY: socket.deltag('heal_pot_timer') ! else: socket.clilocmessage( 500235 ) # You must wait 10 seconds before using another healing potion. return False --- 413,417 ---- if time.time() - elapsed > HEAL_POT_DELAY: socket.deltag('heal_pot_timer') ! else: socket.clilocmessage( 500235 ) # You must wait 10 seconds before using another healing potion. return False *************** *** 503,507 **** # Compare elapsed = int( char.gettag( "dex_pot_timer" ) ) ! # Some bug occured if elapsed - time.time() > AGILITY_TIME: --- 506,510 ---- # Compare elapsed = int( char.gettag( "dex_pot_timer" ) ) ! # Some bug occured if elapsed - time.time() > AGILITY_TIME: *************** *** 553,557 **** # Compare elapsed = int( char.gettag( "str_pot_timer" ) ) ! if elapsed - time.time() > STRENGTH_TIME: char.deltag('str_pot_timer') --- 556,560 ---- # Compare elapsed = int( char.gettag( "str_pot_timer" ) ) ! if elapsed - time.time() > STRENGTH_TIME: char.deltag('str_pot_timer') *************** *** 559,563 **** socket.clilocmessage(502173) # You are already under a similar effect return False ! char.settag( "str_pot_timer", time.time() + STRENGTH_TIME ) --- 562,566 ---- socket.clilocmessage(502173) # You are already under a similar effect return False ! char.settag( "str_pot_timer", time.time() + STRENGTH_TIME ) |