[wpdev-commits] xmlscripts/scripts/tools pickaxe.py,1.4,1.5
Brought to you by:
rip,
thiagocorrea
|
From: <co...@us...> - 2003-10-03 16:21:16
|
Update of /cvsroot/wpdev/xmlscripts/scripts/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv18209/scripts/tools
Modified Files:
pickaxe.py
Log Message:
little work on global skill checking and mining
Index: pickaxe.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/tools/pickaxe.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pickaxe.py 30 Sep 2003 16:41:30 -0000 1.4
--- pickaxe.py 3 Oct 2003 16:21:11 -0000 1.5
***************
*** 17,31 ****
def onUse( char, tool ):
#Already digging ?
! if char.hastag( 'is_mining' ) and char.gettag( 'is_mining' ) > servertime():
! char.socket.clilocmessage( 503029, "", YELLOW, NORMAL ) # You are already digging.
# Can't mine on horses
if char.itemonlayer( LAYER_MOUNT ):
! char.socket.clilocmessage( 501864, "", YELLOW, NORMAL ) # You can't mine while riding.
return OK
# Who is tool owner ?
if tool.getoutmostchar() != char:
! char.socket.clilocmessage( 500364, "", YELLOW, NORMAL ) # You can't use that, it belongs to someone else
return OK
--- 17,32 ----
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
***************
*** 35,39 ****
char.socket.attachtarget( "skills.mining.response", [tool] )
else:
! char.socket.clilocmessage( 500735, "", YELLOW, NORMAL ) # Don't play with things you don't know about. :)
return OK
--- 36,40 ----
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
|