Update of /cvsroot/wpdev/xmlscripts/scripts/skills
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31477/skills
Modified Files:
__init__.py lumberjacking.py
Log Message:
New documentation and a long overdue wolfpack.consts cleanup
Index: __init__.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/__init__.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** __init__.py 27 Jun 2004 11:48:29 -0000 1.14
--- __init__.py 2 Jul 2004 13:40:46 -0000 1.15
***************
*** 106,110 ****
tagname = args[1]
self.deltag( tagname )
! return OK
def antimacrocheck( char, skillid, object ):
--- 106,110 ----
tagname = args[1]
self.deltag( tagname )
! return True
def antimacrocheck( char, skillid, object ):
***************
*** 115,127 ****
object.settag( tagname, str( int( count + 1 ) ) )
if count <= ANTIMACROALLOWANCE:
! return OK
elif count > ANTIMACROALLOWANCE + 1:
! return OOPS
else:
object.addtimer( ANTIMACRODELAY, "skills.cleartag", [char, tagname] )
! return OOPS
else:
object.settag( tagname, "1" )
! return OK
--- 115,127 ----
object.settag( tagname, str( int( count + 1 ) ) )
if count <= ANTIMACROALLOWANCE:
! return True
elif count > ANTIMACROALLOWANCE + 1:
! return False
else:
object.addtimer( ANTIMACRODELAY, "skills.cleartag", [char, tagname] )
! return False
else:
object.settag( tagname, "1" )
! return True
Index: lumberjacking.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/lumberjacking.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** lumberjacking.py 18 May 2004 02:47:31 -0000 1.12
--- lumberjacking.py 2 Jul 2004 13:40:46 -0000 1.13
***************
*** 34,42 ****
if not socket:
! return OOPS
if socket.hastag('is_lumberjacking') and ( socket.gettag( 'is_lumberjacking' ) > servertime() ):
socket.clilocmessage( 500119, "", GRAY )
! return OOPS
else:
socket.deltag('is_lumberjacking')
--- 34,42 ----
if not socket:
! return False
if socket.hastag('is_lumberjacking') and ( socket.gettag( 'is_lumberjacking' ) > servertime() ):
socket.clilocmessage( 500119, "", GRAY )
! return False
else:
socket.deltag('is_lumberjacking')
***************
*** 46,50 ****
# That is too far away
socket.clilocmessage( 500446, "", GRAY )
! return OK
#Player also can't lumberjack when riding, polymorphed and dead.
--- 46,50 ----
# That is too far away
socket.clilocmessage( 500446, "", GRAY )
! return True
#Player also can't lumberjack when riding, polymorphed and dead.
***************
*** 52,56 ****
# You can't use this while on a mount!
char.socket.clilocmessage( 1049627, "", GRAY )
! return OOPS
##########
--- 52,56 ----
# You can't use this while on a mount!
char.socket.clilocmessage( 1049627, "", GRAY )
! return False
##########
***************
*** 75,79 ****
if not veingem.hastag( 'resname' ) or not veingem.hastag( 'resourcecount' ):
! return OOPS
elif veingem.hastag( 'resname' ):
--- 75,79 ----
if not veingem.hastag( 'resname' ) or not veingem.hastag( 'resourcecount' ):
! return False
elif veingem.hastag( 'resname' ):
***************
*** 83,87 ****
hack_logs( char, target, tool, veingem )
! return OK
def createwoodgem( target, pos ):
--- 83,87 ----
hack_logs( char, target, tool, veingem )
! return True
def createwoodgem( target, pos ):
***************
*** 118,122 ****
if char.pos.map != pos.map or char.pos.distance( pos ) > chopdistance:
socket.deltag( 'is_lumberjacking' )
! return OOPS
# Turn to our lumberjacking position
--- 118,122 ----
if char.pos.map != pos.map or char.pos.distance( pos ) > chopdistance:
socket.deltag( 'is_lumberjacking' )
! return False
# Turn to our lumberjacking position
***************
*** 129,133 ****
char.action( 0xd )
char.soundeffect( 0x13e )
! return OK
# HACK LOGS
--- 129,133 ----
char.action( 0xd )
char.soundeffect( 0x13e )
! return True
# HACK LOGS
***************
*** 144,148 ****
if resourcecount <= 0:
socket.clilocmessage( 500488, '', GRAY )
! return OOPS
# Turn to our lumberjacking position
--- 144,148 ----
if resourcecount <= 0:
socket.clilocmessage( 500488, '', GRAY )
! return False
# Turn to our lumberjacking position
***************
*** 198,209 ****
socket.sysmessage("You have moved too far away to gather any wood.")
socket.deltag( 'is_lumberjacking' )
! return OOPS
if not resource.hastag( 'resourcecount' ):
! return OOPS
if int( resource.gettag( 'resourcecount' ) ) <= 0:
char.socket.clilocmessage( 500488, '', GRAY )
! return OOPS
reqskill = woodtable[ resname ][ REQSKILL ]
--- 198,209 ----
socket.sysmessage("You have moved too far away to gather any wood.")
socket.deltag( 'is_lumberjacking' )
! return False
if not resource.hastag( 'resourcecount' ):
! return False
if int( resource.gettag( 'resourcecount' ) ) <= 0:
char.socket.clilocmessage( 500488, '', GRAY )
! return False
reqskill = woodtable[ resname ][ REQSKILL ]
***************
*** 212,216 ****
if char.skill[ LUMBERJACKING ] < reqskill:
char.socket.clilocmessage( 500298 ) # You are not skilled enough...
! return OOPS
else:
# Skill Check against LUMBERJACKING
--- 212,216 ----
if char.skill[ LUMBERJACKING ] < reqskill:
char.socket.clilocmessage( 500298 ) # You are not skilled enough...
! return False
else:
# Skill Check against LUMBERJACKING
***************
*** 218,222 ****
char.socket.clilocmessage( 500495 ) # You hack at the tree for a while but fail to produce...
success = 0
! return OOPS
elif chance >= randint(1, 100):
char.socket.clilocmessage( 500498 ) # You put some logs into your backpack
--- 218,222 ----
char.socket.clilocmessage( 500495 ) # You hack at the tree for a while but fail to produce...
success = 0
! return False
elif chance >= randint(1, 100):
char.socket.clilocmessage( 500498 ) # You put some logs into your backpack
***************
*** 234,238 ****
char.socket.clilocmessage( 500495 ) # You hack at the tree for a while but fail to produce...
success = 0
! return OOPS
if success == 1:
--- 234,238 ----
char.socket.clilocmessage( 500495 ) # You hack at the tree for a while but fail to produce...
success = 0
! return False
if success == 1:
***************
*** 240,244 ****
backpack = char.getbackpack()
if not backpack:
! return OOPS
# Create an item in my pack (logs to be specific)
resourceitem = wolfpack.additem( "1bdd" )
--- 240,244 ----
backpack = char.getbackpack()
if not backpack:
! return False
# Create an item in my pack (logs to be specific)
resourceitem = wolfpack.additem( "1bdd" )
***************
*** 257,261 ****
resource.settag( 'resource_empty', 'true' )
wolfpack.addtimer( woodrespawndelay, "skills.lumberjacking.respawnvein", [ resource ], 1 )
! return OK
def respawnvein( time, args ):
--- 257,261 ----
resource.settag( 'resource_empty', 'true' )
wolfpack.addtimer( woodrespawndelay, "skills.lumberjacking.respawnvein", [ resource ], 1 )
! return True
def respawnvein( time, args ):
***************
*** 264,269 ****
vein.settag( 'resourcecount', int( woodspawnamount ) )
vein.deltag( 'resource_empty' )
! return OK
else:
! return OOPS
--- 264,269 ----
vein.settag( 'resourcecount', int( woodspawnamount ) )
vein.deltag( 'resource_empty' )
! return True
else:
! return False
|