Update of /cvsroot/wpdev/xmlscripts/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32003
Modified Files:
archery_butte.py check.py commands.py potionkeg.py
Log Message:
*shrug* kinda pointless, but I was looking through scripts to see what I've forgotten to do anyways...
I should finish the potionkeg script... assuming it will let me.
Index: commands.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** commands.py 19 Feb 2003 21:14:47 -0000 1.4
--- commands.py 9 Jul 2004 10:30:25 -0000 1.5
***************
*** 13,17 ****
testpacket( socket, command, argstring )
! return 1
def testpacket( socket, command, argstring ):
--- 13,17 ----
testpacket( socket, command, argstring )
! return True
def testpacket( socket, command, argstring ):
Index: check.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/check.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** check.py 26 May 2004 13:07:19 -0000 1.6
--- check.py 9 Jul 2004 10:30:25 -0000 1.7
***************
*** 22,26 ****
tooltip.add( 1060738, str( target.gettag( "value") ) )
tooltip.send ( sender )
! return 1
def onUse( char, item ):
--- 22,26 ----
tooltip.add( 1060738, str( target.gettag( "value") ) )
tooltip.send ( sender )
! return True
def onUse( char, item ):
***************
*** 40,42 ****
char.socket.sendcontainer( bankbox )
item.delete()
! return 1
--- 40,42 ----
char.socket.sendcontainer( bankbox )
item.delete()
! return True
Index: archery_butte.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/archery_butte.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** archery_butte.py 26 May 2004 13:07:19 -0000 1.8
--- archery_butte.py 9 Jul 2004 10:30:25 -0000 1.9
***************
*** 35,39 ****
if( not boltCount and not arrowCount ):
char.message( "The butte is empty." )
! return 1
if( arrowCount ):
--- 35,39 ----
if( not boltCount and not arrowCount ):
char.message( "The butte is empty." )
! return True
if( arrowCount ):
***************
*** 80,89 ****
if( char.distanceto( item ) > 10 or char.distanceto( item ) < 5 ):
char.message( "You are either too near or far to shoot." )
! return 1
# Sanity checks for the line-of-fire
if( ( item.id == 0x100b and ( char.pos.x != item.pos.x or char.pos.y <= item.pos.y ) ) or ( item.id == 0x100a and ( char.pos.y != item.pos.y or char.pos.x <= item.pos.x ) ) ):
char.message( "You can't shoot from here." )
! return 1
# TODO: Check line of sight
--- 80,89 ----
if( char.distanceto( item ) > 10 or char.distanceto( item ) < 5 ):
char.message( "You are either too near or far to shoot." )
! return True
# Sanity checks for the line-of-fire
if( ( item.id == 0x100b and ( char.pos.x != item.pos.x or char.pos.y <= item.pos.y ) ) or ( item.id == 0x100a and ( char.pos.y != item.pos.y or char.pos.x <= item.pos.x ) ) ):
char.message( "You can't shoot from here." )
! return True
# TODO: Check line of sight
***************
*** 102,116 ****
if( ( weaponskill(char, char.getweapon()) != ARCHERY ) or ( ammo == -1 ) ):
char.message( "You only can use crossbows and bows on this butte." )
! return 1
# If we've already learned all we can > cancel.
if( char.skill[ ARCHERY ] >= 300 ):
char.message( "You can learn much from a dummy but you have already learned it all." )
! return 1
# Use ammo (if 0 was used = no ammo)
if( not char.useresource( 1, ammo ) ):
char.message( "You are out of ammunition." )
! return 1
# Display the char-action
--- 102,116 ----
if( ( weaponskill(char, char.getweapon()) != ARCHERY ) or ( ammo == -1 ) ):
char.message( "You only can use crossbows and bows on this butte." )
! return True
# If we've already learned all we can > cancel.
if( char.skill[ ARCHERY ] >= 300 ):
char.message( "You can learn much from a dummy but you have already learned it all." )
! return True
# Use ammo (if 0 was used = no ammo)
if( not char.useresource( 1, ammo ) ):
char.message( "You are out of ammunition." )
! return True
# Display the char-action
***************
*** 147,151 ****
item.settag( "bolt_count", item.gettag( "bolt_count" ) + 1 )
! return 1
def ammoType( char ):
--- 147,151 ----
item.settag( "bolt_count", item.gettag( "bolt_count" ) + 1 )
! return True
def ammoType( char ):
Index: potionkeg.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/potionkeg.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** potionkeg.py 18 May 2004 08:28:12 -0000 1.6
--- potionkeg.py 9 Jul 2004 10:30:25 -0000 1.7
***************
*** 19,23 ****
def onDropOnItem(potionkeg, potion):
if ('potionkeg' not in potionkeg.events) or ('potions' not in potion.events):
! return 0
char = potion.container
--- 19,23 ----
def onDropOnItem(potionkeg, potion):
if ('potionkeg' not in potionkeg.events) or ('potions' not in potion.events):
! return False
char = potion.container
***************
*** 26,30 ****
if not potion.hastag('potiontype') or not potionkeg.hastag('kegfill'):
socket.sysmessage("Only potions may be added to a potion keg!")
! return 0
char.say("Test")
--- 26,30 ----
if not potion.hastag('potiontype') or not potionkeg.hastag('kegfill'):
socket.sysmessage("Only potions may be added to a potion keg!")
! return False
char.say("Test")
***************
*** 41,53 ****
potionkeg.settag('kegfill', kegfill)
potion.delete()
! return 1
else:
# The keg will not hold any more!
socket.clilocmessage(502233)
! return 1
else:
# You decide that it would be a bad idea to mix different types of potions.
socket.clilocmessage(502236)
! return 1
else:
potionkeg.settag( 'potiontype', potion.gettag('potiontype') )
--- 41,53 ----
potionkeg.settag('kegfill', kegfill)
potion.delete()
! return True
else:
# The keg will not hold any more!
socket.clilocmessage(502233)
! return True
else:
# You decide that it would be a bad idea to mix different types of potions.
socket.clilocmessage(502236)
! return True
else:
potionkeg.settag( 'potiontype', potion.gettag('potiontype') )
***************
*** 55,63 ****
potionkeg.name = potions[ potion.gettag('potiontype') ][ KEG_NAME ]
consumePotion( char, potion, 1 )
! return 1
else:
! return 0
"""
! return 1
### End Filling ###
--- 55,63 ----
potionkeg.name = potions[ potion.gettag('potiontype') ][ KEG_NAME ]
consumePotion( char, potion, 1 )
! return True
else:
! return False
"""
! return True
### End Filling ###
***************
*** 95,103 ****
potionkeg.deltag('potiontype')
! return 1
def checkkegstatus(char, potionkeg, potiontype):
if potionkeg.name != potions[ potiontype ][ KEG_NAME ]:
potionkeg.name = potions[ potiontype ][ KEG_NAME ]
! return 1
--- 95,103 ----
potionkeg.deltag('potiontype')
! return True
def checkkegstatus(char, potionkeg, potiontype):
if potionkeg.name != potions[ potiontype ][ KEG_NAME ]:
potionkeg.name = potions[ potiontype ][ KEG_NAME ]
! return True
|