From 29c3777595efb21623d409ef9fe7481f07bcc78f Mon Sep 17 00:00:00 2001 From: Zing Date: Wed, 13 Aug 2014 20:01:51 -0700 Subject: [PATCH] Added /createCreature command --- scripts/commands/createCreature.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/commands/createCreature.py diff --git a/scripts/commands/createCreature.py b/scripts/commands/createCreature.py new file mode 100644 index 00000000..e8adeeec --- /dev/null +++ b/scripts/commands/createCreature.py @@ -0,0 +1,21 @@ +import sys + +def run(core, actor, target, commandString): + + commandArgs = commandString.split(' ') + arg1 = commandArgs[0] + if len(commandArgs) > 1: + arg2 = commandArgs[1] + + if len(commandArgs) > 1: + pos = actor.getWorldPosition() + core.spawnService.spawnCreature(arg1, actor.getPlanet().getName(), 0, pos.x, pos.y, pos.z, 1, 0, 1, 0, int(arg2)) + actor.sendSystemMessage(' \\#FE2EF7 [GM] \\#FFFFFF createCreature: Command completed successfully.' , 0) + return + + else: + actor.sendSystemMessage(' \\#FE2EF7 [GM] \\#FFFFFF createCreature: Invalid Syntax. Syntax is: /createcreature .', 0) + return + + + return \ No newline at end of file