Files
NGECore2/scripts/commands/imagedesign.py
T
Waverunner bb85682bd6 Bug Fixes: Issue #215 + #235 & Minor improvements.
(BugFix) Officer group buff's will now check ranges
(BugFix) Group buffs applied when a player joins a group as long as they
are within range
(BugFix) /inspire will now take a command string for target
(BugFix) /imagedesign will now take a command string for target
2014-03-27 11:23:15 -04:00

33 lines
1.1 KiB
Python

from protocol.swg.objectControllerObjects import ImageDesignStartMessage
from protocol.swg import ObjControllerMessage
import sys
def setup():
return
def run(core, actor, target, commandString):
if target is None and commandString is None:
design = ImageDesignStartMessage(actor.getObjectId(), actor.getObjectId(), target.getObjectId())
obj = ObjControllerMessage(11, design)
actor.getClient().getSession().write(obj.serialize())
return
else:
if target is None and commandString is not None:
target = core.chatService.getObjectByFirstName(commandString)
if target is None:
return
if target.getGroupId() == actor.getGroupId():
tDesign = ImageDesignStartMessage(target.getObjectId(), actor.getObjectId(), target.getObjectId())
tObj = ObjControllerMessage(11, tDesign)
target.getClient().getSession().write(tObj.serialize())
design = ImageDesignStartMessage(actor.getObjectId(), actor.getObjectId(), target.getObjectId())
obj = ObjControllerMessage(11, design)
actor.getClient().getSession().write(obj.serialize())
return
return
return