Update of /cvsroot/wpdev/xmlscripts/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12942
Modified Files:
door.py potions.py wool.py
Log Message:
Updates for timers.
Explosion potions _should_ be a little faster now...
Index: door.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/door.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** door.py 25 Aug 2004 17:03:05 -0000 1.16
--- door.py 2 Sep 2004 00:44:26 -0000 1.17
***************
*** 244,248 ****
# Add an autoclose tempeffect
! item.addtimer(CLOSEDOOR_DELAY, "door.autoclose", [ opencount ], 1)
# Refresh a House if we opened it
--- 244,248 ----
# Add an autoclose tempeffect
! item.addtimer( CLOSEDOOR_DELAY, "door.autoclose", [ opencount ], True )
# Refresh a House if we opened it
***************
*** 325,329 ****
if blocked == 1:
! item.addtimer(CLOSEDOOR_DELAY, "door.autoclose", [ int(item.gettag('opencount')) ], 1)
else:
# Find the door definition for this item
--- 325,329 ----
if blocked == 1:
! item.addtimer( CLOSEDOOR_DELAY, "door.autoclose", [ int(item.gettag('opencount')) ], True )
else:
# Find the door definition for this item
Index: potions.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/potions.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** potions.py 25 Aug 2004 17:03:05 -0000 1.44
--- potions.py 2 Sep 2004 00:44:27 -0000 1.45
***************
*** 158,164 ****
# Explosion Potion Function
! def potionexplosion(args):
char = wolfpack.findchar(args[0])
- potion = wolfpack.finditem(args[1])
counter = args[2]
bonus = args[3]
--- 158,163 ----
# Explosion Potion Function
! def potionexplosion( potion, args ):
char = wolfpack.findchar(args[0])
counter = args[2]
bonus = args[3]
***************
*** 166,174 ****
bonus = 1
if counter > 0:
! wolfpack.addtimer(1000, "potions.potioncountdown", [char.serial, potion.serial, counter, bonus] )
return
else:
potion.soundeffect(0x307) # Boom!
! potion.effect( explosions[randint(0,2)], 20, 10)
potionregion( [char, potion, bonus] )
potion.delete()
--- 165,173 ----
bonus = 1
if counter > 0:
! potion.addtimer( 1000, "potions.potioncountdown", [char.serial, counter, bonus] )
return
else:
potion.soundeffect(0x307) # Boom!
! potion.effect( explosions[randint( 0, 2 )], 20, 10 )
potionregion( [char, potion, bonus] )
potion.delete()
***************
*** 176,184 ****
# Explosion Potion Function
! def potioncountdown( time, args ):
! char = wolfpack.findchar(args[0])
! potion = wolfpack.finditem(args[1])
! counter = args[2]
! bonus = args[3]
if potion:
if not bonus:
--- 175,181 ----
# Explosion Potion Function
! def potioncountdown( potion, args ):
! counter = args[1]
! bonus = args[2]
if potion:
if not bonus:
***************
*** 189,193 ****
potion.say("%u" % (counter - 1))
counter -= 1
! potionexplosion([char.serial, potion.serial, counter, bonus])
return
--- 186,190 ----
potion.say("%u" % (counter - 1))
counter -= 1
! potion.addtimer( 0, "potions.potionexplosion", [ args[0], counter, bonus ] )
return
***************
*** 250,259 ****
if chainbomb.baseid in explodables:
chainbomb.settag('exploding', 'true')
! wolfpack.addtimer(randint(1000, 2250), "potions.potioncountdown", [char.serial, chainbomb.serial, 0, chainbomb.amount] )
chainbomb = chainregion.next
# Potion Kegs
elif (chainbomb.hastag('kegfill') and chainbomb.hastag('potiontype')) and ( chainbomb.gettag('potiontype') in [11, 12, 13] and chainbomb.gettag('kegfill') >= 1 ):
chainbomb.settag('exploding', 'true')
! wolfpack.addtimer(randint(1000, 2250), "potions.potioncountdown", [char.serial, chainbomb.serial, 11, chainbomb.gettag('kegfill') ] )
chainbomb = chainregion.next
else:
--- 247,256 ----
if chainbomb.baseid in explodables:
chainbomb.settag('exploding', 'true')
! chainbomb.addtimer( randint(1000, 2250), "potions.potioncountdown", [char.serial, 0, chainbomb.amount] )
chainbomb = chainregion.next
# Potion Kegs
elif (chainbomb.hastag('kegfill') and chainbomb.hastag('potiontype')) and ( chainbomb.gettag('potiontype') in [11, 12, 13] and chainbomb.gettag('kegfill') >= 1 ):
chainbomb.settag('exploding', 'true')
! chainbomb.addtimer( randint(1000, 2250), "potions.potioncountdown", [char.serial, 11, chainbomb.gettag('kegfill') ] )
chainbomb = chainregion.next
else:
***************
*** 285,293 ****
if chainbomb.baseid in explodables:
chainbomb.settag('exploding', 'true')
! wolfpack.addtimer(randint(1000, 2250), "potions.potioncountdown", [char.serial, chainbomb.serial, 0, chainbomb.amount] )
chainbomb = chainregion.next
elif ( chainbomb.hastag('kegfill') and chainbomb.hastag('potiontype') ) and ( chainbomb.gettag('potiontype') in [11, 12, 13] and chainbomb.gettag('kegfill') >= 1 ):
chainbomb.settag('exploding', 'true')
! wolfpack.addtimer(randint(1000, 2250), "potions.potioncountdown", [char.serial, chainbomb.serial, 11, chainbomb.gettag('kegfill') ] )
chainbomb = chainregion.next
else:
--- 282,290 ----
if chainbomb.baseid in explodables:
chainbomb.settag('exploding', 'true')
! chainbomb.addtimer( randint(1000, 2250), "potions.potioncountdown", [char.serial, 0, chainbomb.amount] )
chainbomb = chainregion.next
elif ( chainbomb.hastag('kegfill') and chainbomb.hastag('potiontype') ) and ( chainbomb.gettag('potiontype') in [11, 12, 13] and chainbomb.gettag('kegfill') >= 1 ):
chainbomb.settag('exploding', 'true')
! chainbomb.addtimer( randint(1000, 2250), "potions.potioncountdown", [char.serial, 11, chainbomb.gettag('kegfill') ] )
chainbomb = chainregion.next
else:
***************
*** 525,529 ****
char.updatestats()
! char.addtimer(AGILITY_TIME, "magic.utilities.statmodifier_expire", [1, bonus], 1, 1, "magic_statmodifier_1", "magic.utilities.statmodifier_dispel")
char.action( ANIM_FIDGET3 )
--- 522,526 ----
char.updatestats()
! char.addtimer( AGILITY_TIME, "magic.utilities.statmodifier_expire", [1, bonus], 1, 1, "magic_statmodifier_1", "magic.utilities.statmodifier_dispel" )
char.action( ANIM_FIDGET3 )
***************
*** 572,576 ****
char.updatestats()
! char.addtimer(STRENGTH_TIME, "magic.utilities.statmodifier_expire", [0, bonus], 1, 1, "magic_statmodifier_0", "magic.utilities.statmodifier_dispel")
char.action( ANIM_FIDGET3 )
--- 569,573 ----
char.updatestats()
! char.addtimer( STRENGTH_TIME, "magic.utilities.statmodifier_expire", [0, bonus], 1, 1, "magic_statmodifier_0", "magic.utilities.statmodifier_dispel" )
char.action( ANIM_FIDGET3 )
Index: wool.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wool.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** wool.py 11 Jul 2004 02:47:25 -0000 1.9
--- wool.py 2 Sep 2004 00:44:27 -0000 1.10
***************
*** 70,74 ****
wheel = wolfpack.finditem( target.item.serial )
processtime = 5000 # 5 Seconds
! wolfpack.addtimer( processtime, "wool.ProcessTimer", [char, wheel, color] )
elif target.item.id in animids:
--- 70,74 ----
wheel = wolfpack.finditem( target.item.serial )
processtime = 5000 # 5 Seconds
! char.addtimer( processtime, "wool.ProcessTimer", [wheel, color] )
elif target.item.id in animids:
***************
*** 82,89 ****
return True
! def ProcessTimer( time, args ):
! char = args[0]
! wheel = args[1]
! color = args[2]
GetYarn( char, wheel, color )
return True
--- 82,88 ----
return True
! def ProcessTimer( char, args ):
! wheel = args[0]
! color = args[1]
GetYarn( char, wheel, color )
return True
|