Update of /cvsroot/wpdev/xmlscripts/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10570
Modified Files:
bankermenu.py
Added Files:
trainmenu.py
Log Message:
Reimplemented context menus
--- NEW FILE: trainmenu.py ---
#################################################################
# ) (\_ # WOLFPACK 13.0.0 Scripts #
# (( _/{ "-; # Created by: Correa #
# )).-' {{ ;'` # Revised by: #
# ( ( ;._ \\ ctr # Last Modification: #
#################################################################
#
# This is just a sample implementation, still needs to be filled in properly
#
def onContextMenuCheckVisible( char, target, tag ):
if ( target.skill[tag] >= 300 ):
return 1 # visible
else:
return 0 # not visible
def onContextMenuCheckEnabled( char, target, tag ):
if ( char.skill[tag] >= 300 ):
return 0 # disabled
else:
return 1 #enabled
Index: bankermenu.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/bankermenu.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** bankermenu.py 15 Mar 2003 05:20:36 -0000 1.3
--- bankermenu.py 28 Jan 2004 02:21:34 -0000 1.4
***************
*** 1,4 ****
--- 1,17 ----
+ #################################################################
+ # ) (\_ # WOLFPACK 13.0.0 Scripts #
+ # (( _/{ "-; # Created by: codex #
+ # )).-' {{ ;'` # Revised by: Correa #
+ # ( ( ;._ \\ ctr # Last Modification: check for dead/criminal #
+ #################################################################
+
+
def onContextEntry( char, target, tag ):
if( tag == 1 ):
+ if ( char.isdead() ):
+ return 1
+ if ( char.iscriminal() ):
+ target.say( 500378 ) # Thou art a criminal and cannot access thy bank box.
+ return 1
bank = char.getbankbox()
if bank:
|