diff --git a/sku.0/sys.server/compiled/game/script/gm/cmd.java b/sku.0/sys.server/compiled/game/script/gm/cmd.java old mode 100644 new mode 100755 index e37c2d44d..c57f9e0a3 --- a/sku.0/sys.server/compiled/game/script/gm/cmd.java +++ b/sku.0/sys.server/compiled/game/script/gm/cmd.java @@ -48,6 +48,12 @@ public class cmd extends script.base_script } public int cmdGetPlayerId(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 10) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (params == null || params.equalsIgnoreCase("")) { sendSystemMessageTestingOnly(self, "[Syntax] /getPlayerId "); @@ -64,10 +70,18 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "getPlayerId: The system was unable to find a player named '" + name + "'"); } - return SCRIPT_CONTINUE; + + } + return SCRIPT_CONTINUE; } public int cmdAiIgnore(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException - { + { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { obj_id ship = getPilotedShip(self); if (hasObjVar(self, "gm")) { @@ -90,10 +104,17 @@ public class cmd extends script.base_script } sendSystemMessageTestingOnly(self, "aiIgnore[ON]: AI will no longer aggro you or fight back."); } + } return SCRIPT_CONTINUE; } public int cmdForceCommand(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 10) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target) || !isPlayer(target) || params == null || params.equalsIgnoreCase("")) { sendSystemMessageTestingOnly(self, "[Syntax] /forceCommand -target (with lookat target)"); @@ -122,10 +143,17 @@ public class cmd extends script.base_script } cmdParams.trim(); sendSystemMessageTestingOnly(self, "/forceCommand: attempting to queue command: '" + cmd + " " + cmdParams + "' for (" + target + ")" + getName(target)); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdMoney(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 10) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { dictionary d = gm.parseTarget(params, target, "CREDITS"); if (d == null) { @@ -194,6 +222,7 @@ public class cmd extends script.base_script } } showMoneySyntax(self); + } return SCRIPT_CONTINUE; } public void showMoneySyntax(obj_id self) throws InterruptedException @@ -203,11 +232,24 @@ public class cmd extends script.base_script } public int cmdBroadcast(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { queueCommand(self, (-351572629), target, params, COMMAND_PRIORITY_DEFAULT); + } return SCRIPT_CONTINUE; } public int cmdBroadcastPlanet(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (params != null && !params.equalsIgnoreCase("")) { sendSystemMessagePlanetTestingOnly(params); @@ -217,10 +259,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "[Syntax] /broadcastPlanet "); return SCRIPT_CONTINUE; } + } return SCRIPT_CONTINUE; } public int cmdBroadcastGalaxy(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (params != null && !params.equalsIgnoreCase("")) { sendSystemMessageGalaxyTestingOnly(params); @@ -230,10 +279,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "[Syntax] /broadcastGalaxy "); return SCRIPT_CONTINUE; } + } return SCRIPT_CONTINUE; } public int cmdBroadcastArea(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 10) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { final float MAX_RANGE = 256.0f; final String KEYWORD_RANGE = "-range:"; float range = 0f; @@ -280,6 +336,7 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(players[i], message); } } + } return SCRIPT_CONTINUE; } public dictionary parseRange(String params) throws InterruptedException @@ -320,6 +377,12 @@ public class cmd extends script.base_script } public int cmdKill(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target) || !isMob(target)) { sendSystemMessageTestingOnly(self, "/kill: you must have a valid creature target to use this command"); @@ -345,10 +408,17 @@ public class cmd extends script.base_script setPosture(target, POSTURE_INCAPACITATED); } } + } return SCRIPT_CONTINUE; } public int cmdKillPlayer(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target) || !isPlayer(target) || isDead(target)) { sendSystemMessageTestingOnly(self, "/killPlayer: you must have a valid, alive player target to use this command"); @@ -365,10 +435,17 @@ public class cmd extends script.base_script } setPosture(target, POSTURE_INCAPACITATED); pclib.coupDeGrace(target, target, true, true); + } return SCRIPT_CONTINUE; } public int cmdFreezePlayer(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (params.indexOf(gm.KEYWORD_ID) > -1) { dictionary ret = gm.parseObjId(params); @@ -386,10 +463,17 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "[Syntax] /freezePlayer [-target]|[-id:]"); } + } return SCRIPT_CONTINUE; } public int cmdUnfreezePlayer(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (params.indexOf(gm.KEYWORD_ID) > -1) { dictionary ret = gm.parseObjId(params); @@ -407,6 +491,7 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "[Syntax] /unfreezePlayer [-target]|[-id:]"); } + } return SCRIPT_CONTINUE; } public int cmdShowFactionInformation(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException @@ -445,6 +530,12 @@ public class cmd extends script.base_script } public int cmdSetFaction(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -604,10 +695,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "/setFaction: displaying " + utils.getStringName(target) + "'s updated faction information!"); queueCommand(self, (-532090019), target, "", COMMAND_PRIORITY_DEFAULT); } + } return SCRIPT_CONTINUE; } public int cmdSetFactionStanding(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -687,6 +785,7 @@ public class cmd extends script.base_script } sendSystemMessageTestingOnly(self, "/setFactionStanding: displaying " + utils.getStringName(target) + "'s updated faction information!"); queueCommand(self, (-532090019), target, "", COMMAND_PRIORITY_DEFAULT); + } return SCRIPT_CONTINUE; } public int cmdGetRank(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException @@ -702,6 +801,12 @@ public class cmd extends script.base_script } public int cmdSetRank(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (utils.hasScriptVar(self, "setRank.pid")) { int oldpid = utils.getIntScriptVar(self, "setRank.pid"); @@ -770,10 +875,17 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "The system was unable to update (" + target + ") " + getName(target) + "'s rank updated to (" + newrank + ") " + getString(new string_id("faction_recruiter", factions.getRankName(newrank, faction)))); } + } return SCRIPT_CONTINUE; } public int cmdGrantSkill(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -795,10 +907,17 @@ public class cmd extends script.base_script prompt += "Please choose an option:"; int pid = sui.listbox(self, self, prompt, sui.OK_CANCEL, "GM GRANT SKILL", gm.ROADMAP_SKILL_OPTIONS, "handleGmGrantSkillOptions", true, false); utils.setScriptVar(self, "gmGrantSkill.target", target); + } return SCRIPT_CONTINUE; } public int cmdRevokeSkill(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -836,7 +955,8 @@ public class cmd extends script.base_script revokeSkill(target, params); sendSystemMessageTestingOnly(self, "You revoke " + params + " from (" + target + ") " + utils.getStringName(target)); CustomerServiceLog("Skill", "CSR: (" + self + ") " + getName(self) + " has revoked skill '" + params + "' from (" + target + ") " + utils.getStringName(target)); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public void listSkills(obj_id self, String[] skills) throws InterruptedException { @@ -933,6 +1053,12 @@ public class cmd extends script.base_script } public int cmdSetSpeed(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -985,10 +1111,17 @@ public class cmd extends script.base_script } float newSpeed = getMovementPercent(target); sendSystemMessageTestingOnly(self, "(" + target + ") " + utils.getStringName(target) + "'s new speed multiplier = " + newSpeed); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdSetName(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -1007,10 +1140,17 @@ public class cmd extends script.base_script return SCRIPT_CONTINUE; } setName(target, params); + } return SCRIPT_CONTINUE; } public int cmdSetFirstName(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -1062,10 +1202,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "/setFirstName: system disallowed name change..."); } } + } return SCRIPT_CONTINUE; } public int cmdSetLastName(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -1111,10 +1258,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "/setLastName: system disallowed name change..."); } } + } return SCRIPT_CONTINUE; } public int cmdGrantBadge(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 10) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -1160,10 +1314,17 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "/grantBadge: you are UNABLE to grant badge " + badgeName + " to (" + target + ")" + utils.getStringName(target)); } + } return SCRIPT_CONTINUE; } public int cmdRevokeBadge(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -1206,6 +1367,7 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "/revokeBadge: you are UNABLE to revoke badge #" + idx + " from (" + target + ")" + utils.getStringName(target)); } + } return SCRIPT_CONTINUE; } public int cmdShowExperience(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException @@ -1239,6 +1401,12 @@ public class cmd extends script.base_script } public int cmdSetExperience(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -1332,6 +1500,7 @@ public class cmd extends script.base_script xp.grantUnmodifiedExperience(target, xp_type, amt, "cmdSetExperienceResult", resultData); } } + } return SCRIPT_CONTINUE; } public void showSetExperienceSyntax(obj_id self) throws InterruptedException @@ -1341,6 +1510,12 @@ public class cmd extends script.base_script } public int cmdFindObject(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { obj_id objToFind = utils.stringToObjId(params); if (!isIdValid(objToFind)) { @@ -1352,10 +1527,17 @@ public class cmd extends script.base_script gm.attachHandlerScript(self); findObjectAnywhere(objToFind, self); } + } return SCRIPT_CONTINUE; } public int cmdFindObjectByTemplate(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { java.util.StringTokenizer st = new java.util.StringTokenizer(params); if (st.countTokens() != 1) { @@ -1368,10 +1550,17 @@ public class cmd extends script.base_script gm.attachHandlerScript(self); findObjectAnywhereByTemplate(templateName, self); } + } return SCRIPT_CONTINUE; } public int cmdFindPlayer(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { java.util.StringTokenizer st = new java.util.StringTokenizer(params); if (st.countTokens() != 1) { @@ -1384,13 +1573,21 @@ public class cmd extends script.base_script gm.attachHandlerScript(self); findPlayerAnywhereByPartialName(partialName, self); } + } return SCRIPT_CONTINUE; } public int cmdFindWarden(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { sendConsoleMessage(self, "Searching for wardens"); gm.attachHandlerScript(self); findWardenAnywhere(self); + } return SCRIPT_CONTINUE; } public int cmdFindCreature(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException @@ -1411,6 +1608,12 @@ public class cmd extends script.base_script } public int cmdWipeItems(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = self; @@ -1433,10 +1636,17 @@ public class cmd extends script.base_script utils.setScriptVar(self, gm.SCRIPTVAR_WIPEITEMS_TARGET, target); gm.attachHandlerScript(self); } + } return SCRIPT_CONTINUE; } public int cmdAdjustLotCount(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { target = getLookAtTarget(self); @@ -1464,10 +1674,17 @@ public class cmd extends script.base_script int lots = getAccountNumLots(getPlayerObject(target)); sendSystemMessageTestingOnly(self, "Lot count adjusted on " + target + " by " + amount + ". New lot count is " + lots); } + } return SCRIPT_CONTINUE; } public int cmdEditBankAccount(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { LOG("LOG_CHANNEL", "cmdEditBankAccount"); java.util.StringTokenizer st = new java.util.StringTokenizer(params); if (st.countTokens() != 2) @@ -1517,10 +1734,17 @@ public class cmd extends script.base_script } } } + } return SCRIPT_CONTINUE; } public int cmdSetHue(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { boolean parseTarget = false; if (!isIdValid(target)) { @@ -1637,6 +1861,7 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "/setHue: attempting to hue " + target + "'s " + varIdxPath + " to " + palIdx); ri.setValue(palIdx); } + } return SCRIPT_CONTINUE; } public void showSetHueSyntax(obj_id self) throws InterruptedException @@ -1646,6 +1871,12 @@ public class cmd extends script.base_script } public int cmdGoto(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { dictionary d = new dictionary(); if (params == null || params.equalsIgnoreCase("")) { @@ -1671,6 +1902,7 @@ public class cmd extends script.base_script locateObject(obj, "onObjectLocateResponseForCmdGoto", d); } } + } return SCRIPT_CONTINUE; } public int onObjectLocateResponseForCmdGoto(obj_id self, dictionary params) throws InterruptedException @@ -1684,6 +1916,12 @@ public class cmd extends script.base_script } public int cmdSetPlayerState(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target) || !isPlayer(target) || params == null || params.equalsIgnoreCase("")) { sendSystemMessageTestingOnly(self, "[Syntax] /setPlayerState -target (with lookat target)"); @@ -1700,10 +1938,17 @@ public class cmd extends script.base_script } gm.attachHandlerScript(self); gm.showSetPlayerStateUI(target); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdUnCityBan(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { if (params.indexOf(gm.KEYWORD_ID) > -1) @@ -1762,9 +2007,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "[Error] /unCityBan: You were not able to unban " + getFirstName(target) + " from " + cityGetName(cityID)); return SCRIPT_CONTINUE; } + } + return SCRIPT_CONTINUE; } public int cmdInvulnerable(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { obj_id ship = getPilotedShip(self); if (hasObjVar(self, "invulnerable")) { @@ -1786,10 +2039,17 @@ public class cmd extends script.base_script } sendSystemMessageTestingOnly(self, "Invulnerability[ON]: You are now invulnerable."); } + } return SCRIPT_CONTINUE; } public int cmdSetTef(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target)) { sendSystemMessageTestingOnly(self, "[Error] /setTEF: You must target a declared member of a PVP faction to use this command"); @@ -1828,10 +2088,17 @@ public class cmd extends script.base_script } pvpSetPersonalEnemyFlag(self, target); sendSystemMessageTestingOnly(self, "A temporary enemy flag has been set against your current target (OID: " + target + ")"); + } return SCRIPT_CONTINUE; } public int cmdInitializeComponent(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { LOG("LOG_CHANNEL", "cmdInitializeComponent -- " + params); if (!isIdValid(target)) { @@ -1925,10 +2192,17 @@ public class cmd extends script.base_script } CustomerServiceLog("loot", "CSR: %TU has created %TT at level " + level + " and at rarity bonus " + bonus, self, target); sendSystemMessageTestingOnly(self, "Component initialization complete."); + } return SCRIPT_CONTINUE; } public int cmdGmWeapon(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { trace.log("Weapons", "gm.cmdGmWeapon -->> " + params, self, trace.TL_WARNING); if (params == null || params.length() < 1) { @@ -2065,10 +2339,17 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "format: /cmdGmWeapon (params) OR /cmdGmWeapon ? for help"); } + } return SCRIPT_CONTINUE; } public int cmdGMFsVillage(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { trace.log(fs_dyn_village.LOG_CHAN, "gm.cmdGMFsVillage -->> " + params, self, trace.TL_WARNING); if (params == null || params.length() < 1) { @@ -2430,10 +2711,17 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "Format: /gmFsVillage (params) /gmFsVillage ? for help"); } + } return SCRIPT_CONTINUE; } public int cmdGMForceRank(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { LOG("force_rank", "gm.cmdGMForceRank -- " + params); if (params == null || params.length() < 1) { @@ -2788,6 +3076,7 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "format: /gmForceRank /gmForceRank ? for help"); } + } return SCRIPT_CONTINUE; } public int msgGotIntResponse(obj_id self, dictionary params) throws InterruptedException @@ -2941,6 +3230,12 @@ public class cmd extends script.base_script } public int msgActivatePhase(obj_id self, dictionary params) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!utils.hasScriptVar(self, "gm.cmd.fs_village.wantPhase")) { return SCRIPT_CONTINUE; @@ -2970,7 +3265,8 @@ public class cmd extends script.base_script fs_dyn_village.setNextPhaseAuth(target, phase); fs_dyn_village.pushAndInitPhase(target); sendSystemMessageGalaxyOob("If you are currently on a Force Sensititivy training quest, you should log out now and log back in at this time. The village phase has been changed and you will not be able to complete your current quest at this time."); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int msgGotIdResponse(obj_id self, dictionary params) throws InterruptedException { @@ -3110,6 +3406,12 @@ public class cmd extends script.base_script } public int cmdHasVeteranReward(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!("true").equalsIgnoreCase(getConfigSetting("GameServer", "enableVeteranRewards"))) { return SCRIPT_CONTINUE; @@ -3138,10 +3440,17 @@ public class cmd extends script.base_script sendSystemMessage(self, veteran_deprecated.SID_MILESTONE_OUT_OF_RANGE); } } + } return SCRIPT_CONTINUE; } public int cmdSetVeteranReward(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!("true").equalsIgnoreCase(getConfigSetting("GameServer", "enableVeteranRewards"))) { return SCRIPT_CONTINUE; @@ -3165,10 +3474,17 @@ public class cmd extends script.base_script sendSystemMessage(self, veteran_deprecated.SID_MILESTONE_OUT_OF_RANGE); } } + } return SCRIPT_CONTINUE; } public int cmdClearVeteranReward(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!("true").equalsIgnoreCase(getConfigSetting("GameServer", "enableVeteranRewards"))) { return SCRIPT_CONTINUE; @@ -3192,10 +3508,17 @@ public class cmd extends script.base_script sendSystemMessage(self, veteran_deprecated.SID_MILESTONE_OUT_OF_RANGE); } } + } return SCRIPT_CONTINUE; } public int cmdOverrideActiveMonths(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!("true").equalsIgnoreCase(getConfigSetting("GameServer", "enableVeteranRewards"))) { return SCRIPT_CONTINUE; @@ -3225,6 +3548,7 @@ public class cmd extends script.base_script sendSystemMessage(self, veteran_deprecated.SID_OK); } } + } return SCRIPT_CONTINUE; } public int parseMilestone(String params) throws InterruptedException @@ -3247,6 +3571,12 @@ public class cmd extends script.base_script } public int cmdResetJedi(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target) || !isPlayer(target) || params == null || params.equalsIgnoreCase("")) { sendSystemMessageTestingOnly(self, "[Syntax] /resetJedi -target (with lookat target)"); @@ -3262,10 +3592,17 @@ public class cmd extends script.base_script return SCRIPT_CONTINUE; } gm.cmdResetJedi(target); + } return SCRIPT_CONTINUE; } public int cmdDeactivateQuest(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target) || !isPlayer(target) || params == null || params.equalsIgnoreCase("")) { sendSystemMessageTestingOnly(self, "[syntax] /deactivateQuest "); @@ -3284,10 +3621,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "failed to find quest " + params); } } + } return SCRIPT_CONTINUE; } public int cmdActivateQuest(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target) || !isPlayer(target) || params == null || params.equalsIgnoreCase("")) { sendSystemMessageTestingOnly(self, "[syntax] /activateQuest "); @@ -3306,10 +3650,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "failed to find quest " + params); } } + } return SCRIPT_CONTINUE; } public int cmdListActiveQuests(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target) || !isPlayer(target)) { sendSystemMessageTestingOnly(self, "[syntax] /listActiveQuests"); @@ -3360,10 +3711,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "no active quests"); } } + } return SCRIPT_CONTINUE; } public int cmdClearCompletedQuest(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { LOG("newquests", "received /clearCompletedQuest"); if (!isIdValid(target) || !isPlayer(target) || params == null || params.equalsIgnoreCase("")) { @@ -3385,10 +3743,17 @@ public class cmd extends script.base_script LOG("newquests", "failed to clear quest " + params + " for player " + target); } } + } return SCRIPT_CONTINUE; } public int cmdCompleteQuest(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target) || !isPlayer(target) || params == null || params.equalsIgnoreCase("")) { sendSystemMessageTestingOnly(self, "[syntax] /deactivateQuest "); @@ -3407,10 +3772,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "failed to find quest " + params); } } + } return SCRIPT_CONTINUE; } public int cmdListCompletedQuests(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isIdValid(target) || !isPlayer(target)) { sendSystemMessageTestingOnly(self, "[syntax] /listActiveQuests"); @@ -3461,10 +3833,17 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "no complete quests"); } } + } return SCRIPT_CONTINUE; } public int cmdGrantPadawanTrialsEligibility(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { String[] fs_skills = { "force_title_jedi_novice", @@ -3513,6 +3892,7 @@ public class cmd extends script.base_script } String str_msg = "You have been granted eligibility for the Jedi Padawan trials." + " This included being given the required skills and flags that mark eligibility."; sendSystemMessage(self, str_msg, ""); + } return SCRIPT_CONTINUE; } public int cmdGetGameTime(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException @@ -3522,6 +3902,12 @@ public class cmd extends script.base_script } public int gmJediState(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (params == null || params.length() < 1) { sendSystemMessageTestingOnly(self, "format: /gmJediState /gmJediState ? for help"); @@ -3593,10 +3979,17 @@ public class cmd extends script.base_script return SCRIPT_CONTINUE; } sendSystemMessageTestingOnly(self, "format: /gmJediState /gmJediState ? for help"); + } return SCRIPT_CONTINUE; } public int cmdSetGroupXPBonus(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isGod(self)) { return SCRIPT_CONTINUE; @@ -3634,10 +4027,17 @@ public class cmd extends script.base_script } } sendSystemMessageTestingOnly(self, "Test group XP bonus set to " + bonus); + } return SCRIPT_CONTINUE; } public int cmdCreateStaticItem(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (params == null || params.length() < 1) { sendSystemMessageTestingOnly(self, "format: /CreateStaticItem "); @@ -3716,10 +4116,17 @@ public class cmd extends script.base_script CustomerServiceLog("loot", "CSR: (" + getFirstName(self) + ")(" + self + ") tried to create a static item but the Item Name was bad (" + itemName + ")"); } } + } return SCRIPT_CONTINUE; } public int cmdDumpTargetInformation(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { sendSystemMessageTestingOnly(self, "targetis " + params); if (!isIdValid(target)) { @@ -3758,10 +4165,17 @@ public class cmd extends script.base_script { sendConsoleMessage(self, strTest); } + } return SCRIPT_CONTINUE; } public int cmdDumpObjectInformation(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { java.util.StringTokenizer st = new java.util.StringTokenizer(params); obj_id oid = obj_id.NULL_ID; String filename = null; @@ -3798,22 +4212,43 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "[Syntax] /dumpObjectInformation [filename]"); } + } return SCRIPT_CONTINUE; } public int cmdNpeGotoMedicalBay(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { sendSystemMessageTestingOnly(self, "Sending you to a medical bay instance"); sendPlayerToTutorial(self); + } return SCRIPT_CONTINUE; } public int cmdNpeGotoMilleniumFalcon(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { sendSystemMessageTestingOnly(self, "Sending you to a millenium falcon instance"); npe.movePlayerFromHangarToFalcon(self); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdNpeGotoTansariiStation(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { java.util.StringTokenizer st = new java.util.StringTokenizer(params); int instanceId = 0; if (st.hasMoreTokens()) @@ -3827,10 +4262,17 @@ public class cmd extends script.base_script } utils.setScriptVar(self, npe.SCRIPT_VAR_INSTANCE_OVERRIDE, instanceId); npe.movePlayerFromFalconToSharedStation(self); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdNpeGotoStationGamma(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { java.util.StringTokenizer st = new java.util.StringTokenizer(params); int instanceId = 0; if (st.hasMoreTokens()) @@ -3844,16 +4286,30 @@ public class cmd extends script.base_script } utils.setScriptVar(self, npe.SCRIPT_VAR_INSTANCE_OVERRIDE, instanceId); npe.movePlayerFromOrdMantellSpaceToOrdMantellDungeon(self); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdStartRestussStageTwo(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { attachScript(self, "systems.cw_data.cluster_wide_response_manager"); getClusterWideData("event", "restuss_event", true, self); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdCompleteRestussStageOne(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { obj_id[] objects = getAllObjectsWithObjVar(getLocation(self), 200.0f, "element"); if (objects == null || objects.length == 0) { @@ -3907,10 +4363,17 @@ public class cmd extends script.base_script continue; } } + } return SCRIPT_CONTINUE; } public int cmdGmShowQuest(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { StringTokenizer st = new java.util.StringTokenizer(params); String playerOid = ""; String logFile = ""; @@ -3959,10 +4422,17 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "[Syntax] /gmshowquest "); } + } return SCRIPT_CONTINUE; } public int cmdGmClearQuest(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { StringTokenizer st = new java.util.StringTokenizer(params); String playerOid = ""; String questVar = ""; @@ -3991,10 +4461,17 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "[Syntax] /gmclearquest "); } + } return SCRIPT_CONTINUE; } public int cmdGmRegrantQuest(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { StringTokenizer st = new java.util.StringTokenizer(params); String playerOid = ""; String questVar = ""; @@ -4023,10 +4500,17 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "[Syntax] /gmregrantquest "); } + } return SCRIPT_CONTINUE; } public int cmdSetInstanceAuthorized(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isGod(self)) { return SCRIPT_CONTINUE; @@ -4039,10 +4523,17 @@ public class cmd extends script.base_script } utils.setScriptVar(self, gm.INSTANCE_AUTH, 1); sendSystemMessageTestingOnly(self, "You are now overriding private instance authorization checks"); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdCombatDataRecord(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isGod(self)) { return SCRIPT_CONTINUE; @@ -4061,10 +4552,17 @@ public class cmd extends script.base_script message += "Use /combatDataStop to stop recording combat data."; } sendSystemMessage(self, message, ""); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdCombatDataClear(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isGod(self)) { return SCRIPT_CONTINUE; @@ -4079,19 +4577,33 @@ public class cmd extends script.base_script { sendSystemMessage(self, new string_id("target_dummy", "placement_no_combat_data")); } + } return SCRIPT_CONTINUE; } public int cmdCombatDataReport(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isGod(self)) { return SCRIPT_CONTINUE; } target_dummy.reportCombatData(self, self); - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdCombatDataStop(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { if (!isGod(self)) { return SCRIPT_CONTINUE; @@ -4105,10 +4617,17 @@ public class cmd extends script.base_script { sendSystemMessage(self, "Not currently recording combat data.", ""); } - return SCRIPT_CONTINUE; + } + return SCRIPT_CONTINUE; } public int cmdCsDumpTarget(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { + if (getGodLevel(self) < 40) + { + sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); + } + else + { StringTokenizer st = new java.util.StringTokenizer(params); String strObjectOid = ""; if (st.hasMoreTokens()) @@ -4143,6 +4662,7 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "you must have a valid target to use this command."); } } + } return SCRIPT_CONTINUE; } public void createDumpFile(obj_id self, obj_id targetObject) throws InterruptedException @@ -4170,7 +4690,7 @@ public class cmd extends script.base_script } public int cmdSetGalaxyMessage(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { - if (getGodLevel(self) < 10) + if (getGodLevel(self) < 40) { sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); } @@ -4226,7 +4746,7 @@ public class cmd extends script.base_script } public int cmdSetWardenGalaxyMessage(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { - if (getGodLevel(self) < 10) + if (getGodLevel(self) < 40) { sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); }