[wpdev-commits] xmlscripts/scripts/tools pickaxe.py,1.5,1.6
Brought to you by:
rip,
thiagocorrea
|
From: <dr...@us...> - 2004-01-16 21:14:23
|
Update of /cvsroot/wpdev/xmlscripts/scripts/tools In directory sc8-pr-cvs1:/tmp/cvs-serv6444/scripts/tools Modified Files: pickaxe.py Log Message: Skills should now work, I disabled the anti macro stuff for now, because that is what was breaking it... Mining now works too. Index: pickaxe.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/tools/pickaxe.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pickaxe.py 3 Oct 2003 16:21:11 -0000 1.5 --- pickaxe.py 16 Jan 2004 21:14:20 -0000 1.6 *************** *** 16,42 **** def onUse( char, tool ): ! #Already digging ? ! if char.hastag( 'is_mining' ) and ( char.gettag( 'is_mining' ) > servertime() ): ! char.socket.clilocmessage( 503029, "", GRAY, NORMAL ) # You are already digging. ! return OK ! ! # Can't mine on horses ! if char.itemonlayer( LAYER_MOUNT ): ! char.socket.clilocmessage( 501864, "", RED, NORMAL ) # You can't mine while riding. ! return OK ! ! # Who is tool owner ? ! if tool.getoutmostchar() != char: ! char.socket.clilocmessage( 500364, "", RED, NORMAL ) # You can't use that, it belongs to someone else ! return OK ! ! # Is that mining tool ? ! if isminingtool(tool): ! char.socket.clilocmessage( 503033, "", YELLOW, NORMAL ) # Where do you wish to dig? ! char.socket.attachtarget( "skills.mining.response", [tool] ) ! else: ! char.socket.clilocmessage( 500735, "", RED, NORMAL ) # Don't play with things you don't know about. :) ! return OK ! ! return OK --- 16,42 ---- def onUse( char, tool ): ! #Already digging ? ! if char.hastag( 'is_mining' ) and ( char.gettag( 'is_mining' ) > servertime() ): ! char.socket.clilocmessage( 503029, "", GRAY, NORMAL ) # You are already digging. ! return OK ! ! # Can't mine on horses ! if char.itemonlayer( LAYER_MOUNT ): ! char.socket.clilocmessage( 501864, "", RED, NORMAL ) # You can't mine while riding. ! return OK ! ! # Who is tool owner ? ! if tool.getoutmostchar() != char: ! char.socket.clilocmessage( 500364, "", RED, NORMAL ) # You can't use that, it belongs to someone else ! return OK ! ! # Is that mining tool ? ! if isminingtool(tool): ! char.socket.clilocmessage( 503033, "", YELLOW, NORMAL ) # Where do you wish to dig? ! char.socket.attachtarget( "skills.mining.response", [ tool ] ) ! else: ! char.socket.clilocmessage( 500735, "", RED, NORMAL ) # Don't play with things you don't know about. :) ! return OK ! ! return OK |