diff --git a/scripts/commands/giveitem.py b/scripts/commands/giveitem.py new file mode 100644 index 00000000..8279dc05 --- /dev/null +++ b/scripts/commands/giveitem.py @@ -0,0 +1,24 @@ +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + + if actor.getClient() and actor.getClient().isGM() == False: + return + + if not commandString.startswith('object/tangible') and not commandString.startswith('object/weapon'): + return + + object = core.objectService.createObject(commandString, actor.getPlanet()) + + if not object: + return + + inventory = actor.getSlottedObject('inventory') + + if inventory: + inventory.add(object) + + return \ No newline at end of file