diff --git a/sku.0/sys.server/compiled/game/script/gm/cmd.java b/sku.0/sys.server/compiled/game/script/gm/cmd.java index 36b3d950c..590dc2e41 100755 --- a/sku.0/sys.server/compiled/game/script/gm/cmd.java +++ b/sku.0/sys.server/compiled/game/script/gm/cmd.java @@ -48,12 +48,6 @@ 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 "); @@ -66,22 +60,14 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "getPlayerId: player '" + name + "' has object id: " + playerId); } - else + else { 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")) { @@ -93,7 +79,7 @@ public class cmd extends script.base_script } sendSystemMessageTestingOnly(self, "aiIgnore[OFF]: AI will now aggro you as normal and fight back."); } - else + else { setObjVar(self, "gm", 1); if (isIdValid(ship)) @@ -104,17 +90,10 @@ 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)"); @@ -124,7 +103,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { sendSystemMessageTestingOnly(self, "[Syntax] /forceCommand -target (with lookat target)"); return SCRIPT_CONTINUE; @@ -143,8 +122,7 @@ 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 { @@ -157,7 +135,7 @@ public class cmd extends script.base_script else if (d.isEmpty()) { } - else + else { params = d.getString("params"); obj_id oid = d.getObjId("oid"); @@ -165,7 +143,7 @@ public class cmd extends script.base_script { target = oid; } - else + else { target = self; } @@ -197,7 +175,7 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "[CREDITS] Processing CASH update: (" + target + ")" + utils.getStringName(target) + " amt = " + sAmt); } - else + else { sendSystemMessageTestingOnly(self, "[CREDITS] System rejected the CASH update: (" + target + ")" + utils.getStringName(target) + " amt = " + sAmt); } @@ -209,7 +187,7 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "[CREDITS] Processing BANK update: (" + target + ")" + utils.getStringName(target) + " amt = " + sAmt); } - else + else { sendSystemMessageTestingOnly(self, "[CREDITS] System rejected the BANK update: (" + target + ")" + utils.getStringName(target) + " amt = " + sAmt); } @@ -237,7 +215,7 @@ public class cmd extends script.base_script { sendSystemMessagePlanetTestingOnly(params); } - else + else { sendSystemMessageTestingOnly(self, "[Syntax] /broadcastPlanet "); return SCRIPT_CONTINUE; @@ -251,7 +229,7 @@ public class cmd extends script.base_script { sendSystemMessageGalaxyTestingOnly(params); } - else + else { sendSystemMessageTestingOnly(self, "[Syntax] /broadcastGalaxy "); return SCRIPT_CONTINUE; @@ -260,12 +238,6 @@ public class cmd extends script.base_script } 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; @@ -288,7 +260,7 @@ public class cmd extends script.base_script return SCRIPT_CONTINUE; } } - else + else { sendSystemMessageTestingOnly(self, "[Syntax] /broadcastArea -range: "); sendSystemMessageTestingOnly(self, "[Example] /broadcastArea -range:100 Hello world!"); @@ -312,7 +284,6 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(players[i], message); } } - } return SCRIPT_CONTINUE; } public dictionary parseRange(String params) throws InterruptedException @@ -339,7 +310,7 @@ public class cmd extends script.base_script String sRange = arg.substring(KEYWORD_RANGE.length()); retRange = utils.stringToFloat(sRange); } - else + else { retString += arg + " "; } @@ -353,12 +324,6 @@ 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"); @@ -368,7 +333,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { sendSystemMessageTestingOnly(self, "[Syntax] /kill -target"); return SCRIPT_CONTINUE; @@ -377,24 +342,17 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "/kill: you must use /killPlayer to kill a player!"); } - else + else { if (!isIncapacitated(target)) { 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"); @@ -404,24 +362,17 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { sendSystemMessageTestingOnly(self, "[Syntax] /killPlayer -target"); return SCRIPT_CONTINUE; } 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); @@ -435,21 +386,14 @@ public class cmd extends script.base_script { setState(target, STATE_FROZEN, true); } - else + else { 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); @@ -463,11 +407,10 @@ public class cmd extends script.base_script { setState(target, STATE_FROZEN, false); } - else + else { sendSystemMessageTestingOnly(self, "[Syntax] /unfreezePlayer [-target]|[-id:]"); } - } return SCRIPT_CONTINUE; } public int cmdShowFactionInformation(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException @@ -480,7 +423,7 @@ public class cmd extends script.base_script { target = tmpTarget; } - else + else { target = self; } @@ -506,12 +449,6 @@ 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; @@ -520,7 +457,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { if (params.indexOf(gm.KEYWORD_ID) > -1) { @@ -530,14 +467,14 @@ public class cmd extends script.base_script { target = tmpTarget; } - else + else { sendSystemMessageTestingOnly(self, "/setFaction: Unable to parse a valid object id!"); return SCRIPT_CONTINUE; } params = d.getString("params"); } - else + else { target = self; } @@ -584,7 +521,7 @@ public class cmd extends script.base_script { clearFlags = clearFlags; } - else + else { if (arg.equalsIgnoreCase("imperial")) { @@ -594,7 +531,7 @@ public class cmd extends script.base_script { faction = "Rebel"; } - else + else { faction = arg; } @@ -614,14 +551,14 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "/setFaction: you must use '-adhoc' to set AIs to non-standard factions"); return SCRIPT_CONTINUE; } - else + else { sendSystemMessageTestingOnly(self, "/setFaction: attempting to update " + utils.getStringName(target) + "'s faction!"); factions.setFaction(target, faction); return SCRIPT_CONTINUE; } } - else + else { sendSystemMessageTestingOnly(self, "/setFaction: you may not set players to adhoc factions!"); return SCRIPT_CONTINUE; @@ -638,7 +575,7 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "/setFaction: assigning neutral status..."); pvpMakeNeutral(target); } - else + else { if (faction != null && !faction.equalsIgnoreCase("") && facNum != factions.AD_HOC_FACTION) { @@ -647,7 +584,7 @@ public class cmd extends script.base_script { pvpSetAlignedFaction(target, factionHashCode); } - else + else { sendSystemMessageTestingOnly(self, "/setFaction: unable to update " + utils.getStringName(target) + "'s faction to '" + faction + "'!"); return SCRIPT_CONTINUE; @@ -661,7 +598,7 @@ public class cmd extends script.base_script { pvpMakeOnLeave(target); } - else + else { pvpMakeCovert(target); } @@ -671,17 +608,10 @@ 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; @@ -690,7 +620,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { target = self; } @@ -745,14 +675,14 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "/setFactionStanding: you may not set standing to non-standard factions"); return SCRIPT_CONTINUE; } - else + else { if (mod != 0) { sendSystemMessageTestingOnly(self, "/setFactionStanding: modifying '" + faction + "' by " + amt); factions.addFactionStanding(target, faction, amt); } - else + else { sendSystemMessageTestingOnly(self, "/setFactionStanding: setting '" + faction + "' to " + amt); factions.setFactionStanding(target, faction, amt); @@ -761,7 +691,6 @@ 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 @@ -777,12 +706,6 @@ 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"); @@ -797,7 +720,7 @@ public class cmd extends script.base_script else if (d.isEmpty()) { } - else + else { params = d.getString("params"); obj_id oid = d.getObjId("oid"); @@ -805,7 +728,7 @@ public class cmd extends script.base_script { target = oid; } - else + else { target = self; } @@ -847,21 +770,14 @@ public class cmd extends script.base_script int urank = pvpGetCurrentGcwRank(target); sendSystemMessageTestingOnly(self, "(" + target + ") " + getName(target) + "'s rank updated to (" + urank + ") " + getString(new string_id("faction_recruiter", factions.getRankName(urank, faction)))); } - else + else { 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; @@ -870,7 +786,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { target = self; } @@ -883,17 +799,10 @@ 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; @@ -902,7 +811,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { target = self; } @@ -931,8 +840,7 @@ 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 { @@ -1029,12 +937,6 @@ 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; @@ -1043,7 +945,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { target = self; } @@ -1087,17 +989,10 @@ 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; @@ -1106,7 +1001,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { target = self; } @@ -1116,17 +1011,10 @@ 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; @@ -1135,7 +1023,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { target = self; } @@ -1167,28 +1055,21 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "/setFirstName: name NOT updated..."); } - else + else { if (setName(target, newname)) { sendSystemMessageTestingOnly(self, "/setFirstName: " + name + " will now be known as " + newname); } - else + else { 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; @@ -1197,7 +1078,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { target = self; } @@ -1223,28 +1104,21 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "/setLastName: name NOT updated..."); } - else + else { if (setName(target, newname)) { sendSystemMessageTestingOnly(self, "/setLastName: " + name + " will now be known as " + newname); } - else + else { 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; @@ -1253,7 +1127,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { target = self; } @@ -1273,7 +1147,7 @@ public class cmd extends script.base_script { badgeName = params; } - else + else { badgeName = getCollectionSlotName(idx); } @@ -1286,21 +1160,14 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "/grantBadge: you grant badge " + badgeName + " to (" + target + ")" + utils.getStringName(target)); } - else + else { 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; @@ -1309,7 +1176,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { target = self; } @@ -1339,11 +1206,10 @@ public class cmd extends script.base_script { sendSystemMessageTestingOnly(self, "/revokeBadge: you revoke badge #" + idx + " from (" + target + ")" + utils.getStringName(target)); } - else + else { 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 @@ -1377,12 +1243,6 @@ 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; @@ -1391,7 +1251,7 @@ public class cmd extends script.base_script { params = gm.removeKeyword(params, gm.KEYWORD_TARGET); } - else + else { target = self; } @@ -1459,7 +1319,7 @@ public class cmd extends script.base_script amt = -amt; } } - else + else { amt = utils.stringToInt(sAmt); if (amt == -1) @@ -1476,7 +1336,6 @@ 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 @@ -1486,84 +1345,56 @@ 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)) { sendSystemMessageTestingOnly(self, "[Syntax] /findObject objid"); } - else + else { sendSystemMessageTestingOnly(self, "Searching for object: " + objToFind); 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) { sendSystemMessageTestingOnly(self, "Format: findObjectByTemplate