fixed giveitem

This commit is contained in:
xbang21
2013-11-06 20:07:13 -05:00
parent 5e9afa5b37
commit 658d8cb424
+15 -3
View File
@@ -4,6 +4,18 @@ def setup():
return
def run(core, actor, target, commandString):
core.playerService.giveExperience(actor, 25000)
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