diff --git a/scripts/commands/adjustLotCount.py b/scripts/commands/adjustLotCount.py new file mode 100644 index 00000000..4d20f4c7 --- /dev/null +++ b/scripts/commands/adjustLotCount.py @@ -0,0 +1,15 @@ +import sys + +def run(core, actor, target, commandString): + commandArgs = commandString.split(' ') + arg1 = commandArgs[0] + + if target is None: + target = actor + + if target: + playerObject = target.getSlottedObject('ghost') + playerObject.setLotsRemaining(playerObject.getLotsRemaining() + int(arg1)) + print(playerObject.getLotsRemaining()) + actor.sendSystemMessage('GM: Adjust Lot Count: Completed Successfully for ' + target.getFirstName(), 0) + return \ No newline at end of file diff --git a/scripts/commands/broadcastGalaxy.py b/scripts/commands/broadcastGalaxy.py new file mode 100644 index 00000000..04a1ae09 --- /dev/null +++ b/scripts/commands/broadcastGalaxy.py @@ -0,0 +1,12 @@ + +from services.sui import SUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.chatService.broadcastGalaxy(commandString) + return \ No newline at end of file diff --git a/scripts/commands/broadcastPlanet.py b/scripts/commands/broadcastPlanet.py new file mode 100644 index 00000000..cb2956d2 --- /dev/null +++ b/scripts/commands/broadcastPlanet.py @@ -0,0 +1,11 @@ +from services.sui import SUIWindow +from services.sui.SUIWindow import Trigger +from java.util import Vector +import sys + +def setup(): + return + +def run(core, actor, target, commandString): + core.chatService.broadcastPlanet(commandString, actor.getPlanet()) + return \ No newline at end of file diff --git a/scripts/commands/credits.py b/scripts/commands/credits.py new file mode 100644 index 00000000..11d28a36 --- /dev/null +++ b/scripts/commands/credits.py @@ -0,0 +1,20 @@ +import sys + + + +def run(core, actor, target, commandString): + commandArgs = commandString.split(' ') + arg1 = commandArgs[0] + playerObject = actor.getSlottedObject('ghost') + + if actor: + actor.setCashCredits(actor.getCashCredits() + int(arg1)) + actor.sendSystemMessage(actor.getFirstName() + ' has removed ' + arg1 + ' credits from Project SWG\'s bank.', 0) + + if actor and target: + target.setCashCredits(target.getCashCredits() + int(arg1)) + target.sendSystemMessage('You have recieved ' + arg1 + ' credits from ' + actor.getFirstName(), 0) + actor.sendSystemMessage('You have transferred ' + arg1 + ' credits to ' + target.getFirstName(), 0) + + + return \ No newline at end of file diff --git a/scripts/commands/invulnerable.py b/scripts/commands/invulnerable.py new file mode 100644 index 00000000..90aab004 --- /dev/null +++ b/scripts/commands/invulnerable.py @@ -0,0 +1,33 @@ +import sys +from resources.datatables import Options + +def run(core, actor, target, commandString): + commandArgs = commandString.split(' ') + command = commandArgs[0] + + + if command == 'invisible': + if (actor.isInStealth()): + actor.setInStealth(False) + actor.setRadarVisible(True) + actor.sendSystemMessage('GM Command Successfull: You are no longer Invisible.', 0) + + else: + actor.setInStealth(True) + actor.setRadarVisible(False) + actor.sendSystemMessage('GM Command Successfull: You are now Invisible.', 0) + + if actor.getOptionsBitmask() == 128: + actor.setOptionsBitmask(Options.NONE) + actor.sendSystemMessage('GM Command Successfull: You are now Invulnerable.', 0) + + + elif actor.getOptionsBitmask() == 0: + actor.setOptionsBitmask(Options.ATTACKABLE) + print(actor.getOptionsBitmask()) + + actor.sendSystemMessage('GM Command Successfull: You are no longer Invulnerable.', 0) + + return + + \ No newline at end of file diff --git a/scripts/commands/setRank.py b/scripts/commands/setRank.py new file mode 100644 index 00000000..afdc5b16 --- /dev/null +++ b/scripts/commands/setRank.py @@ -0,0 +1,41 @@ +import sys +from resources.datatables import GcwRank +from services.gcw import GCWService + +def run(core, actor, target, commandString): + commandArgs = commandString.split(' ') + arg1 = commandArgs[0] + if len(commandArgs) > 1: + arg2 = commandArgs[1] + + if target is None: + target = actor + + if target.getFaction() == 'rebel' or 'imperial' and arg1 == 'up': + playerObject = target.getSlottedObject('ghost') + playerObject.setCurrentRank(int(arg2)) + newrank = playerObject.getCurrentRank() + core.scriptService.callScript("scripts/collections/", "gcwrank_" + target.getFaction(), "handleRankUp", core, target, newrank) + actor.sendSystemMessage('GM: Set Rank: Completed Successfully', 0) + if target.getFaction() == 'rebel' or 'imperial' and arg1 == 'down': + playerObject = target.getSlottedObject('ghost') + playerObject.setCurrentRank(int(arg2)) + newrank = playerObject.getCurrentRank() + core.scriptService.callScript("scripts/collections/", "gcwrank_" + target.getFaction(), "handleRankDown", target, newrank) + actor.sendSystemMessage('GM: Set Rank: Completed Successfully', 0) + +# if target.getFaction() == 'imperial' and arg1 == 'up': +# if arg1 == 'up': +# playerObject = actor.getSlottedObject('ghost') +# playerObject.setCurrentRank(int(arg2)) +# newrank = playerObject.getCurrentRank() +# core.scriptService.callScript("scripts/collections/", "gcwrank_" + target.getFaction(), "handleRankUp", core, target, newrank) +# actor.sendSystemMessage('GM: Set Rank: Completed Successfully', 0) +# if target.getFaction() == 'imperial' and arg1 == 'down': +# playerObject = actor.getSlottedObject('ghost') +# playerObject.setCurrentRank(int(arg2)) +# newrank = playerObject.getCurrentRank() +# core.scriptService.callScript("scripts/collections/", "gcwrank_" + target.getFaction(), "handleRankDown", target, newrank) +# actor.sendSystemMessage('GM: Set Rank: Completed Successfully', 0) + + return \ No newline at end of file