fixed giveitem

This commit is contained in:
xbang21
2014-03-17 20:40:15 -04:00
parent d4e05ff84c
commit b28da5bcd0
+24
View File
@@ -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