From 658d8cb42497c0b86ec82653e7d4b02fed9c0ad2 Mon Sep 17 00:00:00 2001 From: xbang21 Date: Wed, 6 Nov 2013 20:07:13 -0500 Subject: [PATCH] fixed giveitem --- scripts/commands/giveitem.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/scripts/commands/giveitem.py b/scripts/commands/giveitem.py index 5f31cfe8..4815a4ab 100644 --- a/scripts/commands/giveitem.py +++ b/scripts/commands/giveitem.py @@ -4,6 +4,18 @@ def setup(): return def run(core, actor, target, commandString): - core.playerService.giveExperience(actor, 25000) - return - \ No newline at end of file + + 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