Update of /cvsroot/wpdev/xmlscripts/scripts/commands
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11706/commands
Modified Files:
add.py bank.py dupe.py dye.py edit.py info.py
Log Message:
bugfixes
Index: edit.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/edit.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** edit.py 26 May 2004 13:07:21 -0000 1.2
--- edit.py 1 Oct 2004 16:34:10 -0000 1.3
***************
*** 19,43 ****
#
def response(player, arguments, response):
! if response.button == 0:
! return
! command = (response.button >> 28) & 0xC
! item = wolfpack.finditem((response.button & 0x3FFFFFFF) | 0x40000000)
! # Delete Item
! if command == 0x04:
! item.delete()
! # Bounce Item
! elif command == 0x08:
! if not tobackpack(item, player):
! item.update()
! # Show Info For Item
! elif command == 0x0C:
! iteminfo(player.socket, item)
! else:
! player.socket.sysmessage('Unknown command.')
#
--- 19,47 ----
#
def response(player, arguments, response):
! if response.button == 0:
! return
! command = (response.button >> 28) & 0xC
! item = wolfpack.finditem((response.button & 0x3FFFFFFF) | 0x40000000)
! # Delete Item
! if command == 0x04:
! player.log(LOG_MESSAGE, 'Deleting item 0x%x from character 0x%x.\n' % (item.serial, item.container.serial))
! item.delete()
! # Bounce Item
! elif command == 0x08:
! player.log(LOG_MESSAGE, 'Bouncing item 0x%x from character 0x%x.\n' % (item.serial, item.container.serial))
!
! if not tobackpack(item, player):
! item.update()
! # Show Info For Item
! elif command == 0x0C:
! player.log(LOG_MESSAGE, 'Showing info gump for item 0x%x from character 0x%x.\n' % (item.serial, item.container.serial))
! iteminfo(player.socket, item)
! else:
! player.socket.sysmessage('Unknown command.')
#
***************
*** 45,133 ****
#
def callback(player, arguments, target):
! if not target.char:
! return
! dialog = wolfpack.gumps.cGump()
! dialog.setCallback("commands.edit.response")
! items = []
! for layer in range(LAYER_RIGHTHAND, LAYER_TRADING+1):
! item = target.char.itemonlayer(layer)
! if item:
! items.append(item)
! pages = ceil(len(items) / 4.0)
! dialog.startPage(0)
! dialog.addResizeGump(35, 12, 9260, 460, 504)
! dialog.addGump(1, 12, 10421, 0)
! dialog.addGump(30, -1, 10420, 0)
! dialog.addResizeGump(66, 40, 9200, 405, 65)
! dialog.addText(108, 52, "Wolfpack Edit Command", 2100)
! dialog.addText(108, 72, "Please choose the item you wan't to view closely.", 2100)
! dialog.addTiledGump(90, 11, 164, 17, 10250, 0)
! dialog.addGump(474, 12, 10431, 0)
! dialog.addGump(439, -1, 10430, 0)
! dialog.addGump(14, 200, 10422, 0)
! dialog.addGump(468, 200, 10432, 0)
! dialog.addGump(249, 11, 10254, 0)
! dialog.addGump(74, 45, 10464, 0)
! dialog.addGump(435, 45, 10464, 0)
! dialog.addGump(461, 408, 10412, 0)
! dialog.addGump(-15, 408, 10402, 0)
! dialog.addTiledGump(281, 11, 158, 17, 10250, 0)
! dialog.addGump(265, 11, 10252, 0)
! for page in range(1, pages + 1):
! dialog.startPage(page)
! if page > 1:
! dialog.addPageButton(60, 467, 9909, 9911, page - 1)
! dialog.addText(88, 467, "Previous Page", 2100)
! if page < pages:
! dialog.addPageButton(448, 467, 9903, 9905, page + 1)
! dialog.addText(376, 468, "Next Page", 2100)
! yoffset = 0
! for i in range(0, 4):
! if (page - 1) * 4 + i >= len(items):
! break
! item = items[(page - 1) * 4 + i]
! dialog.addResizeGump(64, 108 + yoffset, 9200, 405, 82)
! dialog.addTilePic(92, 127 + yoffset, item.id)
! if LAYERNAMES.has_key(item.layer):
! layername = LAYERNAMES[item.layer]
! else:
! layername = 'Unknown'
! dialog.addText(164, 118 + yoffset, "Layer: %u (%s)" % (item.layer, layername), 2100)
! dialog.addText(164, 138 + yoffset, "Item Id: 0x%x" % item.id, 2100)
! if item.color == 0:
! textcolor = 2100
! else:
! textcolor = item.color - 1
! dialog.addText(164, 158 + yoffset, "Item Color: 0x%x" % item.color, textcolor)
! itemid = item.serial & 0x3FFFFFFF
! dialog.addText(348, 115 + yoffset, "Delete Item", 2100)
! dialog.addButton(428, 114 + yoffset, 9903, 9905, itemid | 0x40000000)
! dialog.addText(376, 139 + yoffset, "Bounce", 2100)
! dialog.addButton(428, 138 + yoffset, 9903, 9905, itemid | 0x80000000)
! dialog.addText(396, 163 + yoffset, "Info", 2100)
! dialog.addButton(428, 162 + yoffset, 9903, 9905, itemid | 0xC0000000)
! yoffset += 86
! dialog.send(player)
#
--- 49,137 ----
#
def callback(player, arguments, target):
! if not target.char:
! return
! dialog = wolfpack.gumps.cGump()
! dialog.setCallback("commands.edit.response")
! items = []
! for layer in range(LAYER_RIGHTHAND, LAYER_TRADING+1):
! item = target.char.itemonlayer(layer)
! if item:
! items.append(item)
! pages = ceil(len(items) / 4.0)
! dialog.startPage(0)
! dialog.addResizeGump(35, 12, 9260, 460, 504)
! dialog.addGump(1, 12, 10421, 0)
! dialog.addGump(30, -1, 10420, 0)
! dialog.addResizeGump(66, 40, 9200, 405, 65)
! dialog.addText(108, 52, "Wolfpack Edit Command", 2100)
! dialog.addText(108, 72, "Please choose the item you wan't to view closely.", 2100)
! dialog.addTiledGump(90, 11, 164, 17, 10250, 0)
! dialog.addGump(474, 12, 10431, 0)
! dialog.addGump(439, -1, 10430, 0)
! dialog.addGump(14, 200, 10422, 0)
! dialog.addGump(468, 200, 10432, 0)
! dialog.addGump(249, 11, 10254, 0)
! dialog.addGump(74, 45, 10464, 0)
! dialog.addGump(435, 45, 10464, 0)
! dialog.addGump(461, 408, 10412, 0)
! dialog.addGump(-15, 408, 10402, 0)
! dialog.addTiledGump(281, 11, 158, 17, 10250, 0)
! dialog.addGump(265, 11, 10252, 0)
! for page in range(1, pages + 1):
! dialog.startPage(page)
! if page > 1:
! dialog.addPageButton(60, 467, 9909, 9911, page - 1)
! dialog.addText(88, 467, "Previous Page", 2100)
! if page < pages:
! dialog.addPageButton(448, 467, 9903, 9905, page + 1)
! dialog.addText(376, 468, "Next Page", 2100)
! yoffset = 0
! for i in range(0, 4):
! if (page - 1) * 4 + i >= len(items):
! break
! item = items[(page - 1) * 4 + i]
! dialog.addResizeGump(64, 108 + yoffset, 9200, 405, 82)
! dialog.addTilePic(92, 127 + yoffset, item.id)
! if LAYERNAMES.has_key(item.layer):
! layername = LAYERNAMES[item.layer]
! else:
! layername = 'Unknown'
! dialog.addText(164, 118 + yoffset, "Layer: %u (%s)" % (item.layer, layername), 2100)
! dialog.addText(164, 138 + yoffset, "Item Id: 0x%x" % item.id, 2100)
! if item.color == 0:
! textcolor = 2100
! else:
! textcolor = item.color - 1
! dialog.addText(164, 158 + yoffset, "Item Color: 0x%x" % item.color, textcolor)
! itemid = item.serial & 0x3FFFFFFF
! dialog.addText(348, 115 + yoffset, "Delete Item", 2100)
! dialog.addButton(428, 114 + yoffset, 9903, 9905, itemid | 0x40000000)
! dialog.addText(376, 139 + yoffset, "Bounce", 2100)
! dialog.addButton(428, 138 + yoffset, 9903, 9905, itemid | 0x80000000)
! dialog.addText(396, 163 + yoffset, "Info", 2100)
! dialog.addButton(428, 162 + yoffset, 9903, 9905, itemid | 0xC0000000)
! yoffset += 86
! dialog.send(player)
#
***************
*** 135,140 ****
#
def edit(socket, command, arguments):
! socket.sysmessage('Please select an item or character you want to edit.')
! socket.attachtarget('commands.edit.callback', [])
#
--- 139,144 ----
#
def edit(socket, command, arguments):
! socket.sysmessage('Please select an item or character you want to edit.')
! socket.attachtarget('commands.edit.callback', [])
#
***************
*** 142,144 ****
#
def onLoad():
! wolfpack.registercommand('edit', edit)
--- 146,148 ----
#
def onLoad():
! wolfpack.registercommand('edit', edit)
Index: info.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/info.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** info.py 25 Sep 2004 20:53:18 -0000 1.24
--- info.py 1 Oct 2004 16:34:10 -0000 1.25
***************
*** 135,139 ****
gump = wolfpack.gumps.cGump()
gump.setCallback( "commands.info.charinfo_response" )
! gump.setArgs( [char] )
gump.startPage(0)
--- 135,139 ----
gump = wolfpack.gumps.cGump()
gump.setCallback( "commands.info.charinfo_response" )
! gump.setArgs( [char.serial] )
gump.startPage(0)
***************
*** 392,401 ****
# gump.addInputField( 284, 200, 200, 16, 0x834, 43, '' )
# 44
! gump.addText( 113, 240, "Poisoned:", 0x834 )
gump.addResizeGump( 280, 240, 0xBB8, 215, 20 )
! if char.hastag('poisoned'):
! gump.addInputField( 284, 200, 200, 16, 0x834, 44, unicode( char.gettag('poisoned') ) )
! else:
! gump.addInputField( 284, 200, 200, 16, 0x834, 44, '' )
# 45
#gump.addText( 113, 260, ":", 0x834 )
--- 392,398 ----
# gump.addInputField( 284, 200, 200, 16, 0x834, 43, '' )
# 44
! gump.addText( 113, 240, "Poison:", 0x834 )
gump.addResizeGump( 280, 240, 0xBB8, 215, 20 )
! gump.addInputField( 284, 240, 200, 16, 0x834, 44, unicode( char.poison ) )
# 45
#gump.addText( 113, 260, ":", 0x834 )
***************
*** 537,541 ****
def charinfo_response( player, args, choice ):
socket = player.socket
! char = args[0]
if choice.button == 0 or not char or not socket:
return True
--- 534,538 ----
def charinfo_response( player, args, choice ):
socket = player.socket
! char = wolfpack.findchar(args[0])
if choice.button == 0 or not char or not socket:
return True
***************
*** 545,601 ****
# socket.sysmessage( "You've burnt your fingers!" )
# return True
!
textentries = choice.text
keys = textentries.keys()
!
for key in keys:
if key == 1:
! char.name = textentries[ key ]
elif key == 2:
! char.title = textentries[ key ]
elif key == 3:
! char.id = int( hex2dec( textentries[ key ] ) )
elif key == 4:
! char.orgid = int( hex2dec( textentries[ key ] ) )
elif key == 5:
! char.skin = int( hex2dec( textentries[ key ] ) )
elif key == 6:
! char.orgskin = int( hex2dec( textentries[ key ] ) )
elif key == 7:
! char.fame = int( textentries[ key ] )
elif key == 8:
! char.karma = int( textentries[ key ] )
elif key == 9:
! char.kills = int( textentries[ key ] )
elif key == 10:
! char.deaths = int( textentries[ key ] )
elif key == 11:
! char.pos = ( textentries[ key ] )
elif key == 12:
! char.direction = int( textentries[ key ] )
elif key == 13:
! char.invulnerable = str2bool( textentries[ key ] )
elif key == 14:
! char.strength = int( textentries[ key ] )
elif key == 15:
! char.dexterity = int( textentries[ key ] )
elif key == 16:
! char.intelligence = int( textentries[ key ] )
elif key == 17:
! char.maxhitpoints = int( textentries[ key ] )
elif key == 18:
! char.hitpoints = int( textentries[ key ] )
elif key == 19:
! char.maxstamina = int( textentries[ key ] )
elif key == 20:
! char.stamina = int( textentries[ key ] )
elif key == 21:
! char.maxmana = int( textentries[ key ] )
elif key == 22:
! char.mana = int( textentries[ key ] )
elif key == 23:
! char.hidden = str2bool( textentries[ key ] )
elif key == 24:
! char.dead = str2bool( textentries[ key ] )
elif key == 25:
char.polymorph = str2bool( textentries[ key ] )
--- 542,663 ----
# socket.sysmessage( "You've burnt your fingers!" )
# return True
!
textentries = choice.text
keys = textentries.keys()
!
for key in keys:
if key == 1:
! if char.name != textentries[1]:
! player.log(LOG_MESSAGE, "Changing name of character 0x%x from '%s' to '%s'.\n" % ( char.serial, char.name, textentries[key] ) )
! char.name = textentries[ key ]
elif key == 2:
! value = textentries[2]
! if char.title != value:
! player.log(LOG_MESSAGE, "Changing title of character 0x%x from '%s' to '%s'.\n" % ( char.serial, char.title, textentries[key] ) )
! char.title = textentries[ key ]
elif key == 3:
! value = int(hex2dec(textentries[key]))
! if char.id != value:
! player.log(LOG_MESSAGE, "Changing id of character 0x%x from 0x%x to 0x%x.\n" % ( char.serial, char.id, value ) )
! char.id = int( hex2dec( textentries[ key ] ) )
elif key == 4:
! value = int(hex2dec(textentries[key]))
! if char.orgid != value:
! player.log(LOG_MESSAGE, "Changing orgid of character 0x%x from 0x%x to 0x%x.\n" % ( char.serial, char.orgid, value ) )
! char.orgid = int( hex2dec( textentries[ key ] ) )
elif key == 5:
! value = int(hex2dec(textentries[key]))
! if char.skin != value:
! player.log(LOG_MESSAGE, "Changing skin of character 0x%x from 0x%x to 0x%x.\n" % ( char.serial, char.skin, value ) )
! char.skin = int( hex2dec( textentries[ key ] ) )
elif key == 6:
! value = int(hex2dec(textentries[key]))
! if char.orgskin != value:
! player.log(LOG_MESSAGE, "Changing orgskin of character 0x%x from 0x%x to 0x%x.\n" % ( char.serial, char.orgskin, value ) )
! char.orgskin = int( hex2dec( textentries[ key ] ) )
elif key == 7:
! value = int(hex2dec(textentries[key]))
! if char.fame != value:
! player.log(LOG_MESSAGE, "Changing fame of character 0x%x from %u to %u.\n" % ( char.serial, char.fame, value ) )
! char.fame = int( textentries[ key ] )
elif key == 8:
! value = int(hex2dec(textentries[key]))
! if char.karma != value:
! player.log(LOG_MESSAGE, "Changing karma of character 0x%x from %u to %u.\n" % ( char.serial, char.karma, value ) )
! char.karma = int( textentries[ key ] )
elif key == 9:
! value = int(hex2dec(textentries[key]))
! if char.kills != value:
! player.log(LOG_MESSAGE, "Changing kills of character 0x%x from %u to %u.\n" % ( char.serial, char.kills, value ) )
! char.kills = int( textentries[ key ] )
elif key == 10:
! value = int(hex2dec(textentries[key]))
! if char.deaths != value:
! player.log(LOG_MESSAGE, "Changing deaths of character 0x%x from %u to %u.\n" % ( char.serial, char.deaths, value ) )
! char.deaths = int( textentries[ key ] )
elif key == 11:
! value = textentries[key]
! if str(char.pos) != value:
! player.log(LOG_MESSAGE, "Changing position of character 0x%x from %s to %s.\n" % ( char.serial, str(char.pos), value ) )
! char.pos = value
elif key == 12:
! value = int(hex2dec(textentries[key]))
! if char.direction != value:
! player.log(LOG_MESSAGE, "Changing direction of character 0x%x from %u to %u.\n" % ( char.serial, char.direction, value ) )
! char.direction = int( textentries[ key ] )
elif key == 13:
! value = str2bool(textentries[key])
! if char.invulnerable != value:
! player.log(LOG_MESSAGE, "Changing invulnerability of character 0x%x from %s to %s.\n" % ( char.serial, str(char.invulnerable), str(value) ) )
! char.invulnerable = value
elif key == 14:
! value = int(hex2dec(textentries[key]))
! if char.strength != value:
! player.log(LOG_MESSAGE, "Changing strength of character 0x%x from %u to %u.\n" % ( char.serial, char.strength, value ) )
! char.strength = int( textentries[ key ] )
elif key == 15:
! value = int(hex2dec(textentries[key]))
! if char.dexterity != value:
! player.log(LOG_MESSAGE, "Changing dexterity of character 0x%x from %u to %u.\n" % ( char.serial, char.dexterity, value ) )
! char.dexterity = value
elif key == 16:
! value = int(hex2dec(textentries[key]))
! if char.intelligence != value:
! player.log(LOG_MESSAGE, "Changing intelligence of character 0x%x from %u to %u.\n" % ( char.serial, char.intelligence, value ) )
! char.intelligence = value
elif key == 17:
! value = int(hex2dec(textentries[key]))
! if char.maxhitpoints != value:
! player.log(LOG_MESSAGE, "Changing maxhitpoints of character 0x%x from %u to %u.\n" % ( char.serial, char.maxhitpoints, value ) )
! char.maxhitpoints = value
elif key == 18:
! value = int(hex2dec(textentries[key]))
! if char.hitpoints != value:
! player.log(LOG_MESSAGE, "Changing hitpoints of character 0x%x from %u to %u.\n" % ( char.serial, char.hitpoints, value ) )
! char.hitpoints = value
elif key == 19:
! value = int(hex2dec(textentries[key]))
! if char.maxstamina != value:
! player.log(LOG_MESSAGE, "Changing maxstamina of character 0x%x from %u to %u.\n" % ( char.serial, char.maxstamina, value ) )
! char.maxstamina = value
elif key == 20:
! value = int(hex2dec(textentries[key]))
! if char.stamina != value:
! player.log(LOG_MESSAGE, "Changing stamina of character 0x%x from %u to %u.\n" % ( char.serial, char.stamina, value ) )
! char.stamina = value
elif key == 21:
! value = int(hex2dec(textentries[key]))
! if char.maxmana != value:
! player.log(LOG_MESSAGE, "Changing maxmana of character 0x%x from %u to %u.\n" % ( char.serial, char.maxmana, value ) )
! char.maxmana = value
elif key == 22:
! value = int(hex2dec(textentries[key]))
! if char.mana != value:
! player.log(LOG_MESSAGE, "Changing mana of character 0x%x from %u to %u.\n" % ( char.serial, char.mana, value ) )
! char.mana = value
elif key == 23:
! char.hidden = str2bool( textentries[ key ] )
elif key == 24:
! char.dead = str2bool( textentries[ key ] )
elif key == 25:
char.polymorph = str2bool( textentries[ key ] )
***************
*** 636,640 ****
elif key == 38:
if not char.npc:
! char.account.name = textentries[ key ]
else:
if ( textentries[ key ] ) == 'Null' or ( textentries[ key ] ) == 'None':
--- 698,703 ----
elif key == 38:
if not char.npc:
! #char.account.name = textentries[ key ]
! pass
else:
if ( textentries[ key ] ) == 'Null' or ( textentries[ key ] ) == 'None':
***************
*** 674,686 ****
# char.mindamage = int( textentries[ key ] )
elif key == 44:
! if not char.npc:
! if (textentries[ key ]) == '':
! if char.hastag( 'poisoned' ):
! char.deltag( 'poisoned' )
! else:
! char.settag( 'poisoned', int( textentries[ key ] ) )
! #elif char.npc:
! # if not textentries[ key ] == '':
! # char.maxdamage = int( textentries[ key ] )
elif key == 46:
if char.npc:
--- 737,743 ----
# char.mindamage = int( textentries[ key ] )
elif key == 44:
! #char.poison = int( textentries[ key ] )
! pass
!
elif key == 46:
if char.npc:
Index: add.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/add.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** add.py 23 Sep 2004 00:52:46 -0000 1.12
--- add.py 1 Oct 2004 16:34:10 -0000 1.13
***************
*** 1,5 ****
import wolfpack
! from wolfpack.consts import WPDT_NPC, WPDT_ITEM, WPDT_MULTI
from wolfpack import console
from system.makemenus import MakeItemAction, MakeMenu, MakeAction, findmenu
--- 1,5 ----
import wolfpack
! from wolfpack.consts import *
from wolfpack import console
from system.makemenus import MakeItemAction, MakeMenu, MakeAction, findmenu
***************
*** 17,20 ****
--- 17,22 ----
npc = wolfpack.addnpc(str(arguments[0]), target.pos)
npc.update()
+
+ player.log(LOG_MESSAGE, "Adds npc %s (0x%x) at %s.\n" % (str(arguments[0]), npc.serial, str(target.pos)))
#
***************
*** 36,39 ****
--- 38,43 ----
multi.moveto(target.pos)
multi.update()
+
+ player.log(LOG_MESSAGE, "Adds multi %s (0x%x) at %s.\n" % (str(arguments[0]), multi.serial, target.pos))
#
***************
*** 48,63 ****
item.decay = False
item.movable = 3
!
if target.item:
if target.item.type == 1:
target.item.additem(item, 1, 1, 0)
elif target.item.container:
target.item.container.additem(item, 1, 1, 0)
else:
item.moveto(target.item.pos)
elif target.char:
item.moveto(target.char.pos)
else:
item.moveto(target.pos)
item.update()
--- 52,92 ----
item.decay = False
item.movable = 3
!
if target.item:
if target.item.type == 1:
target.item.additem(item, 1, 1, 0)
+
+ if arguments[1]:
+ player.log(LOG_MESSAGE, "Adds static item %s (0x%x) into 0x%x.\n" % (str(arguments[0]), item.serial, target.item.serial))
+ else:
+ player.log(LOG_MESSAGE, "Adds item %s (0x%x) into 0x%x.\n" % (str(arguments[0]), item.serial, target.item.serial))
elif target.item.container:
target.item.container.additem(item, 1, 1, 0)
+
+ if arguments[1]:
+ player.log(LOG_MESSAGE, "Adds static item %s (0x%x) into 0x%x.\n" % (str(arguments[0]), item.serial, target.item.container.serial))
+ else:
+ player.log(LOG_MESSAGE, "Adds item %s (0x%x) into 0x%x.\n" % (str(arguments[0]), item.serial, target.item.container.serial))
else:
item.moveto(target.item.pos)
+
+ if arguments[1]:
+ player.log(LOG_MESSAGE, "Adds static item %s (0x%x) at %s.\n" % (str(arguments[0]), item.serial, str(target.item.pos)))
+ else:
+ player.log(LOG_MESSAGE, "Adds item %s (0x%x) at %s.\n" % (str(arguments[0]), item.serial, str(target.item.pos)))
elif target.char:
item.moveto(target.char.pos)
+
+ if arguments[1]:
+ player.log(LOG_MESSAGE, "Adds static item %s (0x%x) at %s.\n" % (str(arguments[0]), item.serial, str(target.char.pos)))
+ else:
+ player.log(LOG_MESSAGE, "Adds item %s (0x%x) at %s.\n" % (str(arguments[0]), item.serial, str(target.char.pos)))
else:
item.moveto(target.pos)
+
+ if arguments[1]:
+ player.log(LOG_MESSAGE, "Adds static item %s (0x%x) at %s.\n" % (str(arguments[0]), item.serial, str(target.pos)))
+ else:
+ player.log(LOG_MESSAGE, "Adds item %s (0x%x) at %s.\n" % (str(arguments[0]), item.serial, str(target.pos)))
item.update()
Index: dupe.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/dupe.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** dupe.py 23 Aug 2004 03:10:39 -0000 1.3
--- dupe.py 1 Oct 2004 16:34:10 -0000 1.4
***************
*** 21,24 ****
--- 21,26 ----
import wolfpack
from wolfpack.utilities import hex2dec
+ from wolfpack import console
+ from wolfpack.consts import *
def dupe(socket, command, arguments):
***************
*** 41,46 ****
return False
for i in range(0, args[0]):
! target.item.dupe().update()
def onLoad():
--- 43,53 ----
return False
+ #char.log(LOG_MESSAGE, "Duping item 0x%x.\n" % target.item.serial)
+
for i in range(0, args[0]):
! created = target.item.dupe()
! created.update()
!
! char.log(LOG_MESSAGE, "Duping item 0x%x. New serial is 0x%x.\n" % (target.item.serial, created.serial))
def onLoad():
Index: bank.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/bank.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** bank.py 26 May 2004 13:07:21 -0000 1.2
--- bank.py 1 Oct 2004 16:34:10 -0000 1.3
***************
*** 10,13 ****
--- 10,14 ----
import wolfpack
from wolfpack.utilities import hex2dec
+ from wolfpack.consts import *
def bank( socket, command, arguments ):
***************
*** 36,39 ****
--- 37,44 ----
return
+ if args[0] == LAYER_BANKBOX:
+ char.log(LOG_MESSAGE, "Opening bankbox (0x%x) of character 0x%x.\n" % (container.serial, target.char.serial))
+ else:
+ char.log(LOG_MESSAGE, "Opening container (0x%x) on layer %u of character 0x%x.\n" % (container.serial, args[0], target.char.serial))
char.socket.sendcontainer( container )
Index: dye.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/dye.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** dye.py 23 Aug 2004 03:10:39 -0000 1.5
--- dye.py 1 Oct 2004 16:34:10 -0000 1.6
***************
*** 17,20 ****
--- 17,21 ----
import wolfpack
from wolfpack.utilities import hex2dec
+ from wolfpack.consts import *
def dye( socket, command, arguments ):
***************
*** 28,40 ****
if target.item:
color = args[0]
target.item.color = hex(color)
target.item.update()
elif target.char:
skin = args[0]
if skin == 0:
skin = target.char.orgskin
! target.char.removefromview()
target.char.skin = hex(skin)
target.char.update()
else:
char.socket.sysmessage( 'That was not a valid object.', GRAY )
--- 29,46 ----
if target.item:
color = args[0]
+ oldcolor = target.item.color
target.item.color = hex(color)
target.item.update()
+
+ char.log(LOG_MESSAGE, "Redyes item 0x%x from color 0x%x to 0x%x.\n" % (target.item.serial, oldcolor, target.item.color))
elif target.char:
skin = args[0]
if skin == 0:
skin = target.char.orgskin
! oldskin = target.char.skin
target.char.skin = hex(skin)
target.char.update()
+
+ char.log(LOG_MESSAGE, "Redyes char 0x%x from skin 0x%x to 0x%x.\n" % (target.char.serial, oldskin, target.char.skin))
else:
char.socket.sysmessage( 'That was not a valid object.', GRAY )
|