Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21013/scripts/wolfpack/commands
Modified Files:
info.py cast.py
Log Message:
added weight support without "stone".
Index: info.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands/info.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** info.py 22 Jan 2004 20:42:54 -0000 1.17
--- info.py 31 Jan 2004 01:33:18 -0000 1.18
***************
*** 10,13 ****
--- 10,14 ----
import wolfpack
import string
+ import math
import wolfpack.gumps
from wolfpack.gumps import *
***************
*** 101,105 ****
gump.addText( 50, 140, "ID: "+hex( model ), 0x834 )
gump.addText( 50, 160, "Position: "+str( pos.x )+","+str( pos.y )+","+str( pos.z ), 0x834 )
! gump.addText( 50, 180, "Weight: "+str( tile['weight'] ), 0x834 )
gump.addText( 50, 200, "Height: "+str( tile['height'] ), 0x834 )
--- 102,106 ----
gump.addText( 50, 140, "ID: "+hex( model ), 0x834 )
gump.addText( 50, 160, "Position: "+str( pos.x )+","+str( pos.y )+","+str( pos.z ), 0x834 )
! gump.addText( 50, 180, "Weight: "+str( math.ceil( tile['weight'] * 100 ) / 100 ), 0x834 )
gump.addText( 50, 200, "Height: "+str( tile['height'] ), 0x834 )
***************
*** 569,573 ****
gump.addInputField( 200, 240, 200, 16, 0x834, 7, str( item.amount ) )
gump.addText( 50, 260, "Weight:", 0x834 )
! gump.addInputField( 200, 260, 200, 16, 0x834, 8, str( item.weight ) )
gump.addText( 50, 280, "Layer:", 0x834 )
gump.addInputField( 200, 280, 200, 16, 0x834, 9, str( item.layer ) )
--- 570,574 ----
gump.addInputField( 200, 240, 200, 16, 0x834, 7, str( item.amount ) )
gump.addText( 50, 260, "Weight:", 0x834 )
! gump.addInputField( 200, 260, 200, 16, 0x834, 8, str( math.ceil( item.weight * 100 ) / 100 ) )
gump.addText( 50, 280, "Layer:", 0x834 )
gump.addInputField( 200, 280, 200, 16, 0x834, 9, str( item.layer ) )
***************
*** 701,705 ****
item.amount = int( hex2dec( textentries[ key ] ) )
elif key == 8:
! item.weight = int( hex2dec( textentries[ key ] ) )
elif key == 9:
item.layer = int( hex2dec( textentries[ key ] ) )
--- 702,706 ----
item.amount = int( hex2dec( textentries[ key ] ) )
elif key == 8:
! item.weight = math.ceil( float( textentries[ key ] ) * 100 ) / 100
elif key == 9:
item.layer = int( hex2dec( textentries[ key ] ) )
Index: cast.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands/cast.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cast.py 22 Jan 2004 20:41:23 -0000 1.2
--- cast.py 31 Jan 2004 01:33:18 -0000 1.3
***************
*** 16,19 ****
--- 16,20 ----
except:
socket.sysmessage( "Usage: cast <spell-id>" )
+
castSpell( socket.player, args, 1 )
|