Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4758
Added Files:
dye.py sound.py
Log Message:
Usefull commands!
--- NEW FILE: dye.py ---
#===============================================================#
# ) (\_ | WOLFPACK 13.0.0 Scripts
# (( _/{ "-; | Created by: Dreoth
# )).-' {{ ;'` | Revised by:
# ( ( ;._ \\ ctr | Last Modification: Created
#===============================================================#
# .dye Command
#===============================================================#
import wolfpack
from wolfpack.utilities import *
def dye( socket, command, arguments ):
try:
color = int( hex2dec( str(arguments) ) )
socket.attachtarget( "wolfpack.commands.dye.response", [color] )
except:
socket.sysmessage( 'Usage: dye <color-id>' )
def response( char, args, target ):
if target.item:
color = args[0]
paint( char.socket, target.item, [color] )
else:
char.socket.sysmessage( 'That was not a valid object.', GRAY )
def paint( socket, item, args ):
item.color = hex(args[0])
item.update()
def onLoad():
wolfpack.registercommand( "dye", dye )
--- NEW FILE: sound.py ---
#===============================================================#
# ) (\_ | WOLFPACK 13.0.0 Scripts
# (( _/{ "-; | Created by: dreoth
# )).-' {{ ;'` | Revised by:
# ( ( ;._ \\ ctr | Last Modification: Created
#===============================================================#
# .sound Command #
#===============================================================#
import wolfpack
from wolfpack.utilities import *
def sound( socket, command, arguments ):
try:
sound = hex2dec( str(arguments) )
socket.player.soundeffect( sound )
except:
socket.sysmessage( 'Usage: sound <sound-id>' )
def onLoad():
wolfpack.registercommand( "sound", sound )
|