3.1 Config Updates Continued

This commit is contained in:
AconiteGodOfSWG
2021-03-30 03:02:28 -04:00
parent 355796dd48
commit dc9e2432ac
94 changed files with 338 additions and 311 deletions
@@ -30,10 +30,7 @@ public class ai extends script.base_script
public static final string_id SID_GAVE_RECRUIT_ITEM = new string_id("collection", "gave_recruit_item");
public static final string_id SID_NPC_MEATLUMP_SPEAK = new string_id("collection", "npc_meatlump_speak");
public static final string_id SID_NO_RECRUIT_REB_IMP = new string_id("collection", "no_recruit_reb_imp");
public static final boolean AI_TRIGGER_VOLUMES_DISABLED = utils.checkConfigFlag("GameServer", "disableAITriggerVolumes");
public static final boolean AI_COMBAT_DISABLED = utils.checkConfigFlag("GameServer", "disableAICombat");
public static final boolean AI_LOITER_DISABLED = utils.checkConfigFlag("GameServer", "disableAILoitering");
public static final boolean AI_SCRIPTS_DISABLED = utils.checkConfigFlag("GameServer", "disableAI");
private static final boolean AI_LOITER_DISABLED = utils.checkConfigFlag("GameServer", "disableAILoitering");
public void initializeScript() throws InterruptedException
{
@@ -2,6 +2,7 @@ package script.ai;
import script.library.ai_lib;
import script.library.attrib;
import script.library.utils;
import script.obj_id;
public class hunter extends script.base_script
@@ -10,11 +11,13 @@ public class hunter extends script.base_script
{
}
public static final String ALERT_VOLUME_NAME = "alertTriggerVolume";
private static final boolean AI_TRIGGER_VOLUMES_DISABLED = utils.checkConfigFlag("GameServer", "disableAITriggerVolumes");
public int OnAttach(obj_id self) throws InterruptedException
{
setAttributeInterested(self, attrib.HERBIVORE);
setAttributeInterested(self, attrib.CARNIVORE);
if (!ai.AI_TRIGGER_VOLUMES_DISABLED)
if (!AI_TRIGGER_VOLUMES_DISABLED)
{
createTriggerVolume(ALERT_VOLUME_NAME, ai_lib.aiGetApproachTriggerRange(self), true);
}
@@ -2,6 +2,7 @@ package script.ai;
import script.library.ai_lib;
import script.library.attrib;
import script.library.utils;
import script.obj_id;
public class monster extends script.base_script
@@ -10,10 +11,12 @@ public class monster extends script.base_script
{
}
public static final String ALERT_VOLUME_NAME = "alertTriggerVolume";
private static final boolean AI_TRIGGER_VOLUMES_DISABLED = utils.checkConfigFlag("GameServer", "disableAITriggerVolumes");
public int OnAttach(obj_id self) throws InterruptedException
{
setAttributeInterested(self, attrib.NPC);
if (!ai.AI_TRIGGER_VOLUMES_DISABLED)
if (!AI_TRIGGER_VOLUMES_DISABLED)
{
createTriggerVolume(ALERT_VOLUME_NAME, ai_lib.aiGetApproachTriggerRange(self), true);
}
@@ -3,6 +3,7 @@ package script.ai;
import script.library.ai_lib;
import script.library.attrib;
import script.library.factions;
import script.library.utils;
import script.obj_id;
public class soldier extends script.base_script
@@ -12,6 +13,8 @@ public class soldier extends script.base_script
}
public static final String ACTION_ALERT = "alert";
public static final String ACTION_THREATEN = "threaten";
private static final boolean AI_TRIGGER_VOLUMES_DISABLED = utils.checkConfigFlag("GameServer", "disableAITriggerVolumes");
public int OnAttach(obj_id self) throws InterruptedException
{
if (!hasObjVar(self, "ai.diction"))
@@ -22,7 +25,7 @@ public class soldier extends script.base_script
setAttributeInterested(self, attrib.THUG);
setAttributeInterested(self, attrib.HERBIVORE);
setAttributeInterested(self, attrib.CARNIVORE);
if (!ai.AI_TRIGGER_VOLUMES_DISABLED)
if (!AI_TRIGGER_VOLUMES_DISABLED)
{
createTriggerVolume(ai_lib.ALERT_VOLUME_NAME, ai_lib.aiGetApproachTriggerRange(self), true);
}
@@ -124,7 +127,6 @@ public class soldier extends script.base_script
{
if (newBehavior >= BEHAVIOR_THREATEN && newBehavior < BEHAVIOR_ATTACK)
{
doAgitateBehavior(self, newBehavior);
return SCRIPT_OVERRIDE;
}
return SCRIPT_CONTINUE;
@@ -136,15 +138,4 @@ public class soldier extends script.base_script
}
return SCRIPT_CONTINUE;
}
public void doAgitateBehavior(obj_id npc, int behavior) throws InterruptedException
{
if (isInvulnerable(npc))
{
return;
}
if (ai.AI_COMBAT_DISABLED)
{
return;
}
}
}
@@ -17,9 +17,12 @@ public class townperson extends script.base_script
public static final String ACTION_THREATEN = "threaten";
public static final int CONVO_LENGTH = 300;
public static final String CREATURE_TABLE = "datatables/mob/creatures.iff";
private static final boolean AI_TRIGGER_VOLUMES_DISABLED = utils.checkConfigFlag("GameServer", "disableAITriggerVolumes");
private static final boolean AI_COMBAT_DISABLED = utils.checkConfigFlag("GameServer", "disableAICombat");
public int OnAttach(obj_id self) throws InterruptedException
{
if (!ai.AI_TRIGGER_VOLUMES_DISABLED)
if (!AI_TRIGGER_VOLUMES_DISABLED)
{
createTriggerVolume(SOCIAL_VOLUME, SOCIAL_RANGE, false);
}
@@ -53,7 +56,7 @@ public class townperson extends script.base_script
public int OnAddedToWorld(obj_id self) throws InterruptedException
{
utils.removeScriptVar(self, "ai.speaking");
if (!ai.AI_TRIGGER_VOLUMES_DISABLED)
if (!AI_TRIGGER_VOLUMES_DISABLED)
{
createTriggerVolume(SOCIAL_VOLUME, SOCIAL_RANGE, false);
}
@@ -237,12 +240,8 @@ public class townperson extends script.base_script
}
if (newBehavior >= BEHAVIOR_ALERT && newBehavior < BEHAVIOR_ATTACK)
{
doAgitateBehavior(self, newBehavior);
return SCRIPT_OVERRIDE;
}
else
{
}
return SCRIPT_CONTINUE;
}
else if (newBehavior == BEHAVIOR_CALM)
@@ -260,14 +259,6 @@ public class townperson extends script.base_script
}
return SCRIPT_CONTINUE;
}
public void doAgitateBehavior(obj_id npc, int behavior) throws InterruptedException
{
if (isInvulnerable(npc))
{
return;
}
return;
}
public int OnTargeted(obj_id self, obj_id attacker) throws InterruptedException
{
if (isInvulnerable(self))
@@ -321,7 +312,7 @@ public class townperson extends script.base_script
}
public int OnSawAttack(obj_id self, obj_id defender, obj_id[] attackers) throws InterruptedException
{
if (ai.AI_COMBAT_DISABLED)
if (AI_COMBAT_DISABLED)
{
setWantSawAttackTriggers(self, false);
return SCRIPT_OVERRIDE;
@@ -17,6 +17,8 @@ public class tusken_raider extends script.base_script
public static final String ACTION_ALERT = "alert";
public static final String ACTION_THREATEN = "threaten";
public static final String CREATURE_TABLE = "datatables/mob/creatures.iff";
private static final boolean AI_TRIGGER_VOLUMES_DISABLED = utils.checkConfigFlag("GameServer", "disableAITriggerVolumes");
public void initializeScript() throws InterruptedException
{
obj_id self = getSelf();
@@ -49,7 +51,7 @@ public class tusken_raider extends script.base_script
public int OnAiTetherComplete(obj_id self) throws InterruptedException
{
LOGC(aiLoggingEnabled(self), "debug_ai", "tusken_raider::OnAiTetherComplete() self(" + self + ":" + getName(self) + ")");
if (!ai.AI_TRIGGER_VOLUMES_DISABLED)
if (!AI_TRIGGER_VOLUMES_DISABLED)
{
createTriggerVolume(SOCIAL_VOLUME, SOCIAL_RANGE, false);
}
@@ -13,7 +13,7 @@ public class guard_spawner extends script.base_script
{
}
public static final String guardTable = "datatables/npc/guard_spawner/guard.iff";
public static final boolean EMPIRE_DAY_RUNNING = utils.checkConfigFlag("GameServer", "empireday_ceremony");
private static final boolean EMPIRE_DAY_RUNNING = events.isEventActive(events.EMPIRE_DAY);
public int OnAttach(obj_id self) throws InterruptedException
{
@@ -12,6 +12,8 @@ public class crackdown_cantina extends script.base_script
{
}
public static String CONVO = "npc_reaction/imperial_crackdown_cantina";
private static final int CHANCE_OF_TROUBLE = utils.getIntConfigSetting("EventTeam", "crackdownTroubleChance", 20);
public int OnAttach(obj_id self) throws InterruptedException
{
obj_id foyer = getCellId(self, "foyer1");
@@ -53,8 +55,8 @@ public class crackdown_cantina extends script.base_script
}
else
{
int chanceOfTrouble = utils.getIntConfigSetting("EventTeam", "crackdownTroubleChance", 20);
if (rand(1, 100) < chanceOfTrouble)
if (rand(1, 100) < CHANCE_OF_TROUBLE)
{
messageTo(self, "createTrouble", null, 15, false);
}
@@ -14,6 +14,7 @@ public class interior_buildout extends script.base_script
public interior_buildout()
{
}
private static final boolean LIVE_SPACE_SERVER_MODE_OFF = utils.checkConfigFlag("ScriptFlags", "liveSpaceServerModeOff");
public int OnInitialize(obj_id self) throws InterruptedException
{
@@ -82,7 +83,7 @@ public class interior_buildout extends script.base_script
utils.setScriptVar(self, strLocationList[intI] + "Cells", objCells);
}
}
if (space_flags.LIVE_SPACE_SERVER_MODE_OFF)
if (LIVE_SPACE_SERVER_MODE_OFF)
{
obj_id objTest = createObject(strTemplates[intI], tr, objCell);
if (!strObjVars[intI].equals(""))
@@ -23,7 +23,7 @@ public class boba_fett extends script.base_script
}
public boolean boba_fett_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.DEATH_WATCH_DUNGEON_ENABLED;
return !events.isEventActive(events.DEATH_WATCH);
}
public boolean boba_fett_condition_hasCompletedQuestOne(obj_id player, obj_id npc) throws InterruptedException
{
@@ -75,7 +75,7 @@ public class corvette_bronell_neutral_assassin extends script.base_script
}
public boolean corvette_bronell_neutral_assassin_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.CORVETTE_NEUTRAL_DUNGEON_ENABLED;
return !events.isEventActive(events.CORVETTE_NEUTRAL);
}
public boolean corvette_bronell_neutral_assassin_condition_onDifferentCorvetteQuest(obj_id player, obj_id npc) throws InterruptedException
{
@@ -75,7 +75,7 @@ public class corvette_bruce_neutral_destroy extends script.base_script
}
public boolean corvette_bruce_neutral_destroy_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.CORVETTE_NEUTRAL_DUNGEON_ENABLED;
return !events.isEventActive(events.CORVETTE_NEUTRAL);
}
public boolean corvette_bruce_neutral_destroy_condition_onDifferentCorvetteQuest(obj_id player, obj_id npc) throws InterruptedException
{
@@ -80,7 +80,7 @@ public class corvette_colonel_imperial1 extends script.base_script
}
public boolean corvette_colonel_imperial1_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.CORVETTE_IMPERIAL_DUNGEON_ENABLED;
return !events.isEventActive(events.CORVETTE_IMPERIAL);
}
public boolean corvette_colonel_imperial1_condition_onDifferentCorvetteQuest(obj_id player, obj_id npc) throws InterruptedException
{
@@ -80,7 +80,7 @@ public class corvette_crowley_rebel1 extends script.base_script
}
public boolean corvette_crowley_rebel1_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.CORVETTE_REBEL_DUNGEON_ENABLED;
return !events.isEventActive(events.CORVETTE_REBEL);
}
public boolean corvette_crowley_rebel1_condition_onDifferentCorvetteQuest(obj_id player, obj_id npc) throws InterruptedException
{
@@ -15,16 +15,12 @@ public class corvette_imperial_pilot extends script.base_script
}
public boolean corvette_imperial_pilot_condition_hasImperialTicket(obj_id player, obj_id npc) throws InterruptedException
{
if (!instance.CORVETTE_IMPERIAL_DUNGEON_ENABLED)
if (!events.isEventActive(events.CORVETTE_IMPERIAL))
{
return false;
}
obj_id[] tickets = space_dungeon.findValidDungeonTickets(player, npc);
if (tickets != null && tickets.length > 0)
{
return true;
}
return false;
return tickets != null && tickets.length > 0;
}
public boolean corvette_imperial_pilot_condition_tooManyInGroup(obj_id player, obj_id npc) throws InterruptedException
{
@@ -34,10 +30,7 @@ public class corvette_imperial_pilot extends script.base_script
if (isIdValid(groupObj))
{
int numGroupMembers = getGroupSize(groupObj);
if (numGroupMembers > 10)
{
return true;
}
return numGroupMembers > 10;
}
}
return false;
@@ -74,12 +67,10 @@ public class corvette_imperial_pilot extends script.base_script
public void corvette_imperial_pilot_action_sendToDungeon(obj_id player, obj_id npc) throws InterruptedException
{
space_dungeon.selectDungeonTicket(npc, player);
return;
}
public void corvette_imperial_pilot_action_facePlayer(obj_id player, obj_id npc) throws InterruptedException
{
faceTo(npc, player);
return;
}
public void corvette_imperial_pilot_action_itp_kaja_signal(obj_id player, obj_id npc) throws InterruptedException
{
@@ -15,16 +15,12 @@ public class corvette_neutral_pilot extends script.base_script
}
public boolean corvette_neutral_pilot_condition_hasNeutralTicket(obj_id player, obj_id npc) throws InterruptedException
{
if (!instance.CORVETTE_NEUTRAL_DUNGEON_ENABLED)
if (!events.isEventActive(events.CORVETTE_NEUTRAL))
{
return false;
}
obj_id[] tickets = space_dungeon.findValidDungeonTickets(player, npc);
if (tickets != null && tickets.length > 0)
{
return true;
}
return false;
return tickets != null && tickets.length > 0;
}
public boolean corvette_neutral_pilot_condition_tooManyInGroup(obj_id player, obj_id npc) throws InterruptedException
{
@@ -34,10 +30,7 @@ public class corvette_neutral_pilot extends script.base_script
if (isIdValid(groupObj))
{
int numGroupMembers = getGroupSize(groupObj);
if (numGroupMembers > 10)
{
return true;
}
return numGroupMembers > 10;
}
}
return false;
@@ -48,12 +41,10 @@ public class corvette_neutral_pilot extends script.base_script
public void corvette_neutral_pilot_action_sendToDungeon(obj_id player, obj_id npc) throws InterruptedException
{
space_dungeon.selectDungeonTicket(npc, player);
return;
}
public void corvette_neutral_pilot_action_facePlayer(obj_id player, obj_id npc) throws InterruptedException
{
faceTo(npc, player);
return;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
@@ -48,11 +48,7 @@ public class corvette_pashna_rebel1 extends script.base_script
public boolean corvette_pashna_rebel1_condition_notRebel(obj_id player, obj_id npc) throws InterruptedException
{
String playerFaction = factions.getFaction(player);
if (playerFaction == null || !playerFaction.equals("Rebel"))
{
return true;
}
return false;
return playerFaction == null || !playerFaction.equals("Rebel");
}
public boolean corvette_pashna_rebel1_condition_hasTravelTicket(obj_id player, obj_id npc) throws InterruptedException
{
@@ -80,16 +76,13 @@ public class corvette_pashna_rebel1 extends script.base_script
}
public boolean corvette_pashna_rebel1_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.CORVETTE_REBEL_DUNGEON_ENABLED;
return !events.isEventActive(events.CORVETTE_REBEL);
}
public boolean corvette_pashna_rebel1_condition_onDifferentCorvetteQuest(obj_id player, obj_id npc) throws InterruptedException
{
if (hasObjVar(player, "corl_corvette"))
{
if (!hasObjVar(player, "corl_corvette.rebel_assassin"))
{
return true;
}
return !hasObjVar(player, "corl_corvette.rebel_assassin");
}
return false;
}
@@ -103,27 +96,21 @@ public class corvette_pashna_rebel1 extends script.base_script
if (isIdValid(playerInv))
{
int free_space = getVolumeFree(playerInv);
if (free_space > 0)
{
return true;
}
return free_space > 0;
}
return false;
}
public void corvette_pashna_rebel1_action_heardLocation1(obj_id player, obj_id npc) throws InterruptedException
{
utils.setScriptVar(player, "corl_corvette.heardLocation1", 1);
return;
}
public void corvette_pashna_rebel1_action_heardLocation2(obj_id player, obj_id npc) throws InterruptedException
{
utils.setScriptVar(player, "corl_corvette.heardLocation2", 1);
return;
}
public void corvette_pashna_rebel1_action_heardLocation3(obj_id player, obj_id npc) throws InterruptedException
{
utils.setScriptVar(player, "corl_corvette.heardLocation3", 1);
return;
}
public void corvette_pashna_rebel1_action_acceptsQuest(obj_id player, obj_id npc) throws InterruptedException
{
@@ -133,7 +120,6 @@ public class corvette_pashna_rebel1 extends script.base_script
}
String custLogMsg = "*Corvette Ground Quest: Player %TU has started the rebel assassin quest.";
CustomerServiceLog("DUNGEON_CorellianCorvette", custLogMsg, player);
return;
}
public void corvette_pashna_rebel1_action_clearLocations(obj_id player, obj_id npc) throws InterruptedException
{
@@ -149,7 +135,6 @@ public class corvette_pashna_rebel1 extends script.base_script
{
utils.removeScriptVar(player, "corl_corvette.heardLocation3");
}
return;
}
public void corvette_pashna_rebel1_action_giveTicket(obj_id player, obj_id npc) throws InterruptedException
{
@@ -166,7 +151,6 @@ public class corvette_pashna_rebel1 extends script.base_script
String custLogMsg = "*Corvette Ground Quest: Player %TU finished the rebel assassin quest and received a rebel corvette ticket.";
CustomerServiceLog("DUNGEON_CorellianCorvette", custLogMsg, player);
}
return;
}
public void corvette_pashna_rebel1_action_takeObject2(obj_id player, obj_id npc) throws InterruptedException
{
@@ -184,7 +168,6 @@ public class corvette_pashna_rebel1 extends script.base_script
}
}
}
return;
}
public void corvette_pashna_rebel1_action_takeObject3(obj_id player, obj_id npc) throws InterruptedException
{
@@ -202,7 +185,6 @@ public class corvette_pashna_rebel1 extends script.base_script
}
}
}
return;
}
public void corvette_pashna_rebel1_action_removeTicket(obj_id player, obj_id npc) throws InterruptedException
{
@@ -221,7 +203,6 @@ public class corvette_pashna_rebel1 extends script.base_script
}
}
}
return;
}
public void corvette_pashna_rebel1_action_quitCorvetteQuest(obj_id player, obj_id npc) throws InterruptedException
{
@@ -265,12 +246,10 @@ public class corvette_pashna_rebel1 extends script.base_script
}
}
}
return;
}
public void corvette_pashna_rebel1_action_facePlayer(obj_id player, obj_id npc) throws InterruptedException
{
faceTo(npc, player);
return;
}
public void corvette_pashna_rebel1_action_giveCorvetteReward(obj_id player, obj_id npc) throws InterruptedException
{
@@ -281,7 +260,6 @@ public class corvette_pashna_rebel1 extends script.base_script
removeObjVar(player, "corvette.rebel_assassin.finished");
CustomerServiceLog("DUNGEON_CorellianCorvette", "*Corvette Reward: Player %TU has been given an AV-21 schematic.", player);
}
return;
}
public int corvette_pashna_rebel1_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException
{
@@ -15,16 +15,12 @@ public class corvette_rebel_pilot extends script.base_script
}
public boolean corvette_rebel_pilot_condition_hasRebelTicket(obj_id player, obj_id npc) throws InterruptedException
{
if (!instance.CORVETTE_REBEL_DUNGEON_ENABLED)
if (!events.isEventActive(events.CORVETTE_REBEL))
{
return false;
}
obj_id[] tickets = space_dungeon.findValidDungeonTickets(player, npc);
if (tickets != null && tickets.length > 0)
{
return true;
}
return false;
return tickets != null && tickets.length > 0;
}
public boolean corvette_rebel_pilot_condition_tooManyInGroup(obj_id player, obj_id npc) throws InterruptedException
{
@@ -34,10 +30,7 @@ public class corvette_rebel_pilot extends script.base_script
if (isIdValid(groupObj))
{
int numGroupMembers = getGroupSize(groupObj);
if (numGroupMembers > 10)
{
return true;
}
return numGroupMembers > 10;
}
}
return false;
@@ -73,12 +66,10 @@ public class corvette_rebel_pilot extends script.base_script
public void corvette_rebel_pilot_action_sendToDungeon(obj_id player, obj_id npc) throws InterruptedException
{
space_dungeon.selectDungeonTicket(npc, player);
return;
}
public void corvette_rebel_pilot_action_facePlayer(obj_id player, obj_id npc) throws InterruptedException
{
faceTo(npc, player);
return;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
@@ -80,16 +80,13 @@ public class corvette_sabol_imperial1 extends script.base_script
}
public boolean corvette_sabol_imperial1_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.CORVETTE_IMPERIAL_DUNGEON_ENABLED;
return !events.isEventActive(events.CORVETTE_IMPERIAL);
}
public boolean corvette_sabol_imperial1_condition_onDifferentCorvetteQuest(obj_id player, obj_id npc) throws InterruptedException
{
if (hasObjVar(player, "corl_corvette"))
{
if (!hasObjVar(player, "corl_corvette.imperial_assassin"))
{
return true;
}
return !hasObjVar(player, "corl_corvette.imperial_assassin");
}
return false;
}
@@ -80,16 +80,13 @@ public class corvette_tallon_rebel1 extends script.base_script
}
public boolean corvette_tallon_rebel1_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.CORVETTE_REBEL_DUNGEON_ENABLED;
return !events.isEventActive(events.CORVETTE_REBEL);
}
public boolean corvette_tallon_rebel1_condition_onDifferentCorvetteQuest(obj_id player, obj_id npc) throws InterruptedException
{
if (hasObjVar(player, "corl_corvette"))
{
if (!hasObjVar(player, "corl_corvette.rebel_rescue"))
{
return true;
}
return !hasObjVar(player, "corl_corvette.rebel_rescue");
}
return false;
}
@@ -84,7 +84,7 @@ public class corvette_velso_imperial_destroy extends script.base_script
}
public boolean corvette_velso_imperial_destroy_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.CORVETTE_IMPERIAL_DUNGEON_ENABLED;
return !events.isEventActive(events.CORVETTE_IMPERIAL);
}
public boolean corvette_velso_imperial_destroy_condition_onDifferentCorvetteQuest(obj_id player, obj_id npc) throws InterruptedException
{
@@ -75,7 +75,7 @@ public class corvette_yondalla_neutral_rescue extends script.base_script
}
public boolean corvette_yondalla_neutral_rescue_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.CORVETTE_NEUTRAL_DUNGEON_ENABLED;
return !events.isEventActive(events.CORVETTE_NEUTRAL);
}
public boolean corvette_yondalla_neutral_rescue_condition_onDifferentCorvetteQuest(obj_id player, obj_id npc) throws InterruptedException
{
@@ -40,7 +40,7 @@ public class death_watch_imperial_herald extends script.base_script
}
public boolean death_watch_imperial_herald_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.DEATH_WATCH_DUNGEON_ENABLED;
return !events.isEventActive(events.DEATH_WATCH);
}
public boolean death_watch_imperial_herald_condition_QuestComplete(obj_id player, obj_id npc) throws InterruptedException
{
@@ -1,10 +1,7 @@
package script.conversation;
import script.library.ai_lib;
import script.library.chat;
import script.library.factions;
import script.library.*;
import script.*;
import script.library.instance;
public class death_watch_rebel_herald extends script.base_script
{
@@ -72,7 +69,7 @@ public class death_watch_rebel_herald extends script.base_script
}
public boolean death_watch_rebel_herald_condition_dungeonInactive(obj_id player, obj_id npc) throws InterruptedException
{
return !instance.DEATH_WATCH_DUNGEON_ENABLED;
return !events.isEventActive(events.DEATH_WATCH);
}
public void death_watch_rebel_herald_action_RescueandReward(obj_id player, obj_id npc) throws InterruptedException
{
@@ -12,10 +12,10 @@ public class holiday_controller extends script.base_script
{
}
public static final boolean GALACTIC_MOON_FESTIVAL_ENABLED = events.isEventActive(events.GALACTIC_MOON_FESTIVAL);
public static final boolean LIFEDAY_ENABLED = events.isEventActive(events.LIFEDAY);
public static final boolean EWOK_FESTIVAL_OF_LOVE_ENABLED = events.isEventActive(events.EWOK_FESTIVAL_OF_LOVE);
public static final boolean EMPIRE_DAY_ENABLED = events.isEventActive(events.EMPIRE_DAY);
private static final boolean GALACTIC_MOON_FESTIVAL_ENABLED = events.isEventActive(events.GALACTIC_MOON_FESTIVAL);
private static final boolean LIFEDAY_ENABLED = events.isEventActive(events.LIFEDAY);
private static final boolean EWOK_FESTIVAL_OF_LOVE_ENABLED = events.isEventActive(events.EWOK_FESTIVAL_OF_LOVE);
private static final boolean EMPIRE_DAY_ENABLED = events.isEventActive(events.EMPIRE_DAY);
public int OnInitialize(obj_id self) throws InterruptedException
{
@@ -4,6 +4,11 @@ import script.dictionary;
import script.library.fishing;
import script.obj_id;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.stream.Collectors;
public class master_object extends script.base_script {
public master_object()
@@ -39,11 +44,13 @@ public class master_object extends script.base_script {
if(!hasObjVar(self, OBJVAR_CONTROLLER_SETUP_TIME)) {
messageTo(self, "handleSetupMasterFishingObject", null, 20f, true);
}
// Update the leader board weekly, and force update if 7-days have passed since last update (in case of offline fails to trigger update)
// Reset the leaderboard period weekly and force update if 7-days have passed since last update (in case of offline fails to trigger update)
createWeeklyAlarmClock(self, "handleUpdateLeaderboards", null, DAY_OF_WEEK_THU, 19, 0,0);
if (!hasObjVar(self, OBJVAR_LEADERBOARD_UPDATE_TIME)) {
messageTo(self, "handleWeeklyUpdateLeaderboards", null, 20f, true);
}
// Update the current period board every 60 minutes
createHourlyAlarmClock(self, "handleUpdateCurrentPeriod", null, 0, 0);
if(getCalendarTime() > getIntObjVar(self, OBJVAR_LEADERBOARD_UPDATE_TIME) + 604800) {
messageTo(self, "handleWeeklyUpdateLeaderboards", null, 20f, true);
}
@@ -100,5 +107,38 @@ public class master_object extends script.base_script {
return SCRIPT_CONTINUE;
}
/*
* When fishing period starts:
* We're actively keeping track of who is in what position
*
*/
/**
* getCurrentLeadingFishingCities
* The total length of the best 25 non-collection fish caught during the Fishing Leaderboard period by the members/citizens
* of the guild/city are used to determine the guild/city Fishing Leaderboard score.
* @return dictionary containing cityId as key and a city's respective aggregate record of fish for the current period as the value
*/
public static dictionary getCurrentLeadingFishingCities() throws InterruptedException {
dictionary cityTotals = new dictionary();
float sizeAggregateCity = 0;
float size = 0;
String fishObjVar = fishing.OBJVAR_LARGEST_FISH_CAUGHT_THIS_PERIOD;
for (Integer city : getAllCityIds()) {
sizeAggregateCity = 0;
for (obj_id citizen : cityGetCitizenIds(city)) {
size = getFloatObjVar(citizen, fishObjVar);
if (size > 0) {
sizeAggregateCity += size;
}
}
if (sizeAggregateCity > 0) {
cityTotals.put(city, sizeAggregateCity);
}
}
return cityTotals;
}
}
@@ -12,6 +12,8 @@ public class cmd extends script.base_script
public cmd()
{
}
private static final boolean VETERAN_REWARDS_ENABLED = utils.checkConfigFlag("GameServer", "enableVeteranRewards");
public int cmdGetPlayerId(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
{
if (params == null || params.equalsIgnoreCase(""))
@@ -3070,7 +3072,7 @@ public class cmd extends script.base_script
if(!isGod(self)) {
return SCRIPT_CONTINUE;
}
if (!veteran_deprecated.VETERAN_REWARDS_ENABLED)
if (!VETERAN_REWARDS_ENABLED)
{
sendSystemMessageTestingOnly(self, "Veteran rewards are currently disabled.");
return SCRIPT_CONTINUE;
@@ -3106,7 +3108,7 @@ public class cmd extends script.base_script
if(!isGod(self)) {
return SCRIPT_CONTINUE;
}
if (!veteran_deprecated.VETERAN_REWARDS_ENABLED)
if (!VETERAN_REWARDS_ENABLED)
{
sendSystemMessageTestingOnly(self, "Veteran rewards are currently disabled.");
return SCRIPT_CONTINUE;
@@ -3137,7 +3139,7 @@ public class cmd extends script.base_script
if(!isGod(self)) {
return SCRIPT_CONTINUE;
}
if (!veteran_deprecated.VETERAN_REWARDS_ENABLED)
if (!VETERAN_REWARDS_ENABLED)
{
sendSystemMessageTestingOnly(self, "Veteran rewards are currently disabled.");
return SCRIPT_CONTINUE;
@@ -3168,7 +3170,7 @@ public class cmd extends script.base_script
if(!isGod(self)) {
return SCRIPT_CONTINUE;
}
if (!veteran_deprecated.VETERAN_REWARDS_ENABLED)
if (!VETERAN_REWARDS_ENABLED)
{
sendSystemMessageTestingOnly(self, "Veteran rewards are currently disabled.");
return SCRIPT_CONTINUE;
@@ -9,6 +9,8 @@ public class levelup_orb extends script.base_script
public levelup_orb()
{
}
private static final int XP_MULTIPLIER = utils.getIntConfigSetting("GameServer", "xpMultiplier", 0);
public int OnInitialize(obj_id self) throws InterruptedException
{
if (!hasScript(self, "item.special.nomove"))
@@ -72,10 +74,9 @@ public class levelup_orb extends script.base_script
int xpNeeded = dataTableGetInt("datatables/player/player_level.iff", currentLevel, "xp_required");
int prevNeeded = dataTableGetInt("datatables/player/player_level.iff", currentLevel - 1, "xp_required");
xpNeeded -= prevNeeded;
int xpMultiplier = utils.getIntConfigSetting("GameServer", "xpMultiplier");
if (xpMultiplier > 0)
if (XP_MULTIPLIER > 0)
{
xpNeeded = xpNeeded / xpMultiplier;
xpNeeded = xpNeeded / XP_MULTIPLIER;
xpNeeded += 1;
}
xp.grant(player, "combat_general", xpNeeded);
@@ -147,7 +147,6 @@ public class battlefield extends script.base_script
public static final String STRING_TRIG_BOUNDARY = "battlefield_boundary";
public static final String STRING_TRIG_OUTER_PERIMETER = "battlefield_outer_perimeter";
public static final String GAME_SCRIPT_PATH = "systems.battlefield.game_";
public static final boolean BATTLEFIELDS_DISABLED = utils.checkConfigFlag("GameServer", "disableBattlefields");
public static void createBattlefieldRegions(String area) throws InterruptedException
{
@@ -131,6 +131,7 @@ public class city extends script.base_script
public static final String OBJVAR_DERANK_EXEMPT = "city.derank_exempt";
public static final String CITIZEN_LIST_QUERIED = "cityhall.citizen_list_queried";
public static final String CITIZEN_LIST_DATA = "cityhall.citizen_list_data";
private static final boolean STRUCTURE_FEES_DISABLED = utils.checkConfigFlag("GameServer", "disableStructureFees");
public static int canBuildCityHere(obj_id player, location loc) throws InterruptedException
{
int[] all_cities = getAllCityIds();
@@ -1082,7 +1083,7 @@ public class city extends script.base_script
{
return 0;
}
if (player_structure.STRUCTURE_FEES_DISABLED)
if (STRUCTURE_FEES_DISABLED)
{
return 0;
}
@@ -40,6 +40,7 @@ public class create extends script.base_script
"maxMind",
"maxWillpower"
};
private static final boolean AI_SCRIPTS_DISABLED = utils.checkConfigFlag("GameServer", "disableAI");
public static obj_id staticObject(String objectName, location spawnLocation) throws InterruptedException
{
if (objectName == null)
@@ -811,7 +812,7 @@ public class create extends script.base_script
}
public static void attachCreatureScripts(obj_id creature, String scriptList, boolean withAi) throws InterruptedException
{
if (ai.AI_SCRIPTS_DISABLED)
if (AI_SCRIPTS_DISABLED)
{
return;
}
@@ -15,6 +15,11 @@ public class events extends script.base_script {
public static final String FOOLS_DAY = "foolsday";
public static final String LOST_SQUADRON = "lostsquadron";
public static final String ANNIVERSARY = "anniversary";
public static final String DEATH_WATCH = "death_watch";
public static final String CORVETTE_NEUTRAL = "corvette_neutral";
public static final String CORVETTE_REBEL = "corvette_rebel";
public static final String CORVETTE_IMPERIAL = "corvette_imperial";
public static final String GEONOSIAN = "geonosian";
private static final boolean EMPIRE_DAY_CONIFG = utils.checkConfigFlag("GameServer", "empireday_ceremony");
private static final boolean LIFEDAY_CONFIG = utils.checkConfigFlag("GameServer", "lifeday");
@@ -24,10 +29,14 @@ public class events extends script.base_script {
private static final boolean FORCE_FOOLS_DAY_CONFIG = utils.checkConfigFlag("GameServer", "forceFoolsDay");
private static final boolean LOST_SQUADRON_CONFIG = utils.checkConfigFlag("EventTeam", "lostSquadron");
private static final boolean ANNIVERSARY_CONFIG = utils.checkConfigFlag("EventTeam", "anniversary");
private static final boolean CORVETTE_REBEL_CONFIG = utils.checkConfigFlag("Dungeon", "Corellian_Corvette_Rebel");
private static final boolean CORVETTE_IMPERIAL_CONFIG = utils.checkConfigFlag("Dungeon", "Corellian_Corvette_Imperial");
private static final boolean CORVETTE_NEUTRAL_CONFIG = utils.checkConfigFlag("Dungeon", "Corellian_Corvette_Neutral");
private static final boolean DEATH_WATCH_CONFIG = utils.checkConfigFlag("Dungeon", "Death_Watch");
private static final boolean GEONOSIAN_CONFIG = utils.checkConfigFlag("Dungeon", "Geonosian");
/**
* Used to determine if an event is currently configured to run
* Used to determine if an event (or dungeon) is currently configured to run
* @param eventName the name of the event (uses constants above)
* @return true if it is active, false otherwise
*/
@@ -56,6 +65,21 @@ public class events extends script.base_script {
case ANNIVERSARY:
return ANNIVERSARY_CONFIG;
case DEATH_WATCH:
return DEATH_WATCH_CONFIG;
case GEONOSIAN:
return GEONOSIAN_CONFIG;
case CORVETTE_IMPERIAL:
return CORVETTE_IMPERIAL_CONFIG;
case CORVETTE_REBEL:
return CORVETTE_REBEL_CONFIG;
case CORVETTE_NEUTRAL:
return CORVETTE_NEUTRAL_CONFIG;
default:
WARNING("events.isEventActive() was called for event named "+eventName+" but no handling for that name is in the method so either the event name is wrong or handling here is missing.");
break;
@@ -254,10 +254,10 @@ public class gcw extends script.base_script
public static final String GCW_TUTORIAL_FLAG = "gcw_tutorial_flag.has_received_tutorial";
public static final String COLOR_REBELS = "\\" + colors_hex.COLOR_REBELS;
public static final String COLOR_IMPERIALS = "\\" + colors_hex.COLOR_IMPERIALS;
public static final float GCW_POINT_BONUS = utils.getFloatConfigSetting("GameServer", "gcwPointBonus", 1.0f);
public static final float GCW_TOKEN_BONUS = utils.getFloatConfigSetting("GameServer", "gcwTokenBonus", 1.0f);
public static final int GCW_CYCLE_INVASION_TIME = utils.getIntConfigSetting("GameServer", "gcwInvasionCycleTime", 3);
public static final int GCW_MAX_INVASION_CITY_RUNNING = utils.getIntConfigSetting("GameServer", "gcwInvasionCityMaximumRunning", 3);
private static final float GCW_POINT_BONUS = utils.getFloatConfigSetting("GameServer", "gcwPointBonus", 1.0f);
private static final float GCW_TOKEN_BONUS = utils.getFloatConfigSetting("GameServer", "gcwTokenBonus", 1.0f);
private static final int GCW_CYCLE_INVASION_TIME = utils.getIntConfigSetting("GameServer", "gcwInvasionCycleTime", 3);
private static final int GCW_MAX_INVASION_CITY_RUNNING = utils.getIntConfigSetting("GameServer", "gcwInvasionCityMaximumRunning", 3);
public static void assignScanInterests(obj_id npc) throws InterruptedException
{
@@ -2659,7 +2659,7 @@ public class gcw extends script.base_script
return utils.checkConfigFlag("GameServer", "gcwcity"+city);
}
else if (city.equalsIgnoreCase("dearic")) {
if(events.isEventActive(events.LIFEDAY)) {
if(events.isEventActive(events.LIFEDAY)) { // do not run city invasions in Dearic if Life Day is on
return false;
} else {
return utils.checkConfigFlag("GameServer", "gcwcity"+city);
@@ -155,6 +155,8 @@ public class groundquests extends script.base_script
public static final String objvarEntranceWaypoint = "entranceWaypoint";
public static final String objvarWaypointInActive = "waypointInactive";
public static final String timeObjVar = "playedTimeEnd";
private static final float GCW_TOKEN_BONUS = utils.getFloatConfigSetting("GameServer", "gcwTokenBonus", 1.0f);
public static String getStringDataEntry(String datatableName, int questId, int taskId, String columnName) throws InterruptedException
{
String result = null;
@@ -1088,7 +1090,7 @@ public class groundquests extends script.base_script
{
declared = true;
}
grantGcwRebRewardCount *= utils.getFloatConfigSetting("GameServer", "gcwTokenBonus", 1.0f);
grantGcwRebRewardCount *= GCW_TOKEN_BONUS;
if (declared && grantGcwSFRewardMultip != 0)
{
grantGcwRebRewardCount *= grantGcwSFRewardMultip;
@@ -1122,7 +1124,7 @@ public class groundquests extends script.base_script
{
declared = true;
}
grantGcwImpRewardCount *= utils.getFloatConfigSetting("GameServer", "gcwTokenBonus", 1.0f);
grantGcwImpRewardCount *= GCW_TOKEN_BONUS;
if (declared && grantGcwSFRewardMultip != 0)
{
grantGcwImpRewardCount *= grantGcwSFRewardMultip;
@@ -196,7 +196,7 @@ public class healing extends script.base_script
public static final string_id SID_DROID_REPAIR_DAMAGE_OTHER = new string_id("healing", "droid_repair_damage_other");
public static final String RESPONSE_TEXT = "datatables/healing/healing_response.iff";
public static final String PP_FILE_LOC = "healing_response";
public static final boolean CYBERNETIC_DEATH_EVENT = utils.checkConfigFlag("EventTeam", "enableCyberneticDeathEvent");
private static final boolean CYBERNETIC_DEATH_EVENT = utils.checkConfigFlag("EventTeam", "enableCyberneticDeathEvent");
public static final int[] COMBAT_STATES =
{
@@ -36,12 +36,6 @@ public class instance extends script.base_script
public static final int FAIL_INSTANCE_FEW_PLAYERS = 5;
public static final int FAIL_WARN_TOO_FEW = 6;
public static final string_id SID_UNDER_FIVE_MINUTE_WARNING = new string_id("instance", "five_minute_warning");
public static final boolean CORVETTE_REBEL_DUNGEON_ENABLED = utils.checkConfigFlag("Dungeon", "Corellian_Corvette_Rebel");
public static final boolean CORVETTE_IMPERIAL_DUNGEON_ENABLED = utils.checkConfigFlag("Dungeon", "Corellian_Corvette_Imperial");
public static final boolean CORVETTE_NEUTRAL_DUNGEON_ENABLED = utils.checkConfigFlag("Dungeon", "Corellian_Corvette_Neutral");
public static final boolean DEATH_WATCH_DUNGEON_ENABLED = utils.checkConfigFlag("Dungeon", "Death_Watch");
public static final boolean GEONOSIAN_BUNKER_ENABLED = utils.checkConfigFlag("Dungeon", "Geonosian");
public static final float HEROIC_TOKEN_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "heroicTokenBonus", 1.0f);
public static void registerInstance(obj_id instance_id) throws InterruptedException
{
@@ -107,16 +107,16 @@ public class loot extends script.base_script
private static final String CHEST_BASE = "rare_loot_chest_quality_";
private static final String RLS_EFFECT = "appearance/pt_rare_chest.prt";
private static final String RLS_SOUND = "sound/rare_loot_chest.snd";
public static final boolean RLS_DISABLED = utils.checkConfigFlag("GameServer", "rlsDisabled");
public static final boolean RLS_MACROS_DISABLED = utils.checkConfigFlag("GameServer", "rlsDropChanceDisableMacros");
public static final int RLS_DROP_CHANCE = utils.getIntConfigSetting("GameServer", "rlsDropChance", 1);
public static final int RLS_RARE_CHOICE_CHANCE = utils.getIntConfigSetting("GameServer", "rlsRareDropChance", 70);
public static final int RLS_EXCEPTIONAL_CHOICE_CHANCE = utils.getIntConfigSetting("GameServer", "rlsExceptionalDropChance", 25);
public static final int RLS_LEGENDARY_CHOICE_CHANCE = utils.getIntConfigSetting("GameServer", "rlsLegendaryDropChance", 5);
public static final int RLS_TIME_BETWEEN_AWARDS = utils.getIntConfigSetting("GameServer", "rlsMinTimeBetweenAwards", 900);
public static final int RLS_LOWER_LEVEL_BAND = utils.getIntConfigSetting("GameServer", "rlsMaxLevelsBelowPlayerLevel", 6);
public static final int RLS_UPPER_LEVEL_BAND = utils.getIntConfigSetting("GameServer", "rlsMaxLevelsAbovePlayerLevel", 6);
public static final int RLS_MIN_DIST_FROM_LAST_LOOT = utils.getIntConfigSetting("GameServer", "rlsMinDistanceFromLastLoot", 5);
private static final boolean RLS_DISABLED = utils.checkConfigFlag("GameServer", "rlsDisabled");
private static final boolean RLS_MACROS_DISABLED = utils.checkConfigFlag("GameServer", "rlsDropChanceDisableMacros");
private static final int RLS_DROP_CHANCE = utils.getIntConfigSetting("GameServer", "rlsDropChance", 1);
private static final int RLS_RARE_CHOICE_CHANCE = utils.getIntConfigSetting("GameServer", "rlsRareDropChance", 70);
private static final int RLS_EXCEPTIONAL_CHOICE_CHANCE = utils.getIntConfigSetting("GameServer", "rlsExceptionalDropChance", 25);
private static final int RLS_LEGENDARY_CHOICE_CHANCE = utils.getIntConfigSetting("GameServer", "rlsLegendaryDropChance", 5);
private static final int RLS_TIME_BETWEEN_AWARDS = utils.getIntConfigSetting("GameServer", "rlsMinTimeBetweenAwards", 900);
private static final int RLS_LOWER_LEVEL_BAND = utils.getIntConfigSetting("GameServer", "rlsMaxLevelsBelowPlayerLevel", 6);
private static final int RLS_UPPER_LEVEL_BAND = utils.getIntConfigSetting("GameServer", "rlsMaxLevelsAbovePlayerLevel", 6);
private static final int RLS_MIN_DIST_FROM_LAST_LOOT = utils.getIntConfigSetting("GameServer", "rlsMinDistanceFromLastLoot", 5);
public static final String OBJVAR_RLS_LAST_LOOT_TIME = "loot.rls.lastChestAwardTime";
public static final String OBJVAR_RLS_LAST_LOOT_LOCATION = "loot.rls.lastLootedLocation";
public static final String OBJVAR_RLS_LAST_LOOT_CHEST = "loot.rls.lastLootedChest";
@@ -33,7 +33,7 @@ public class missions extends script.base_script
public static final String DAILY_MISSION_OBJVAR = "missions.daily";
public static final String DAILY_MISSION_CLOCK_OBJVAR = "missions.dailyClock";
public static final string_id DAILY_REWARD_XP = new string_id("base_player", "prose_mission_xp_amount");
public static final int DAILY_XP_LIMIT = utils.getIntConfigSetting("Custom", "dailyMissionXpLimit", DAILY_MISSION_XP_REWARD_DEFAULT);
private static final int DAILY_XP_LIMIT = utils.getIntConfigSetting("Custom", "dailyMissionXpLimit", DAILY_MISSION_XP_REWARD_DEFAULT);
public static int getDailyMissionXpLimit() throws InterruptedException
{
@@ -166,11 +166,11 @@ public class npe extends script.base_script
}
public static int getMinInstancePopulation() throws InterruptedException
{
return utils.stringToInt(getConfigSetting("GameServer", "npeMinInstancePopulation")); // src set value, default is 20
return utils.getIntConfigSetting("GameServer", "npeMinInstancePopulation"); // src set value, default is 20
}
public static int getMaxInstancePopulation() throws InterruptedException
{
return utils.stringToInt(getConfigSetting("GameServer", "npeMaxInstancePopulation")); // src set value, default is 50
return utils.getIntConfigSetting("GameServer", "npeMaxInstancePopulation"); // src set value, default is 50
}
public static int getBestStationInstanceIndex(obj_id player, dictionary[] stations) throws InterruptedException
{
@@ -124,10 +124,10 @@ public class pgc_quests extends script.base_script
public static final int PGC_NUM_QUESTS_YOU_COMPLETED_HIGH_QUALITY_INDEX = 11;
public static final float PGC_MIN_MID_QUALITY_QUEST_WEIGHT = 15.0f;
public static final float PGC_MIN_HIGH_QUALITY_QUEST_WEIGHT = 30.0f;
public static final float CHRONICLES_XP_MODIFIER = utils.getFloatConfigSetting("GameServer", "chroniclesXpModifier", 1.0f);
public static final float CHRONICLES_CHRONCILER_SILVER_TOKEN_MODIFIER = utils.getFloatConfigSetting("GameServer", "chroniclesChroniclerSilverTokenNumModifier", 1.0f);
public static final float CHRONICLES_QUESTOR_SILVER_TOKEN_MODIFIER = utils.getFloatConfigSetting("GameServer", "chroniclesQuestorSilverTokenNumModifier", 1.0f);
public static final int CHRONICLES_GOLD_TOKEN_CHANCE_SETTING = utils.getIntConfigSetting("GameServer", "chroniclesGoldTokenChanceOverride", 5);
private static final float CHRONICLES_XP_MODIFIER = utils.getFloatConfigSetting("GameServer", "chroniclesXpModifier", 1.0f);
private static final float CHRONICLES_CHRONCILER_SILVER_TOKEN_MODIFIER = utils.getFloatConfigSetting("GameServer", "chroniclesChroniclerSilverTokenNumModifier", 1.0f);
private static final float CHRONICLES_QUESTOR_SILVER_TOKEN_MODIFIER = utils.getFloatConfigSetting("GameServer", "chroniclesQuestorSilverTokenNumModifier", 1.0f);
private static final int CHRONICLES_GOLD_TOKEN_CHANCE_SETTING = utils.getIntConfigSetting("GameServer", "chroniclesGoldTokenChanceOverride", 5);
public static boolean activateQuestHolocron(obj_id questHolocron, obj_id player) throws InterruptedException
{
@@ -225,10 +225,10 @@ public class player_structure extends script.base_script
public static final string_id SID_NO_CITY = new string_id("city/city", "no_city_during_packup");
public static final string_id SID_GENERIC_CITY_PACKUP_ERROR = new string_id("city/city", "city_packup_generic_fail");
public static final string_id SID_MAYOR_PROTECTED = new string_id("city/city", "city_packup_mayor_protected");
public static final boolean STRUCTURE_FEES_DISABLED = utils.checkConfigFlag("GameServer", "disableStructureFees");
public static final int STRUCTURE_MAINTENANCE_HEARTBEAT = utils.getIntConfigSetting("GameServer", "maintenanceHeartbeat", 1800);
public static final boolean ENABLE_ABANDONED_STRUCTURES_SYSTEM = utils.checkConfigFlag("GameServer", "enableAbandonedHousePackup");
public static final boolean ALLOW_PACKING_ABANDONED_STRUCTURES = utils.checkConfigFlag("GameServer", "allowPlayersToPackAbandonedStructures");
private static final boolean STRUCTURE_FEES_DISABLED = utils.checkConfigFlag("GameServer", "disableStructureFees");
private static final int STRUCTURE_MAINTENANCE_HEARTBEAT = utils.getIntConfigSetting("GameServer", "maintenanceHeartbeat", 1800);
private static final boolean ENABLE_ABANDONED_STRUCTURES_SYSTEM = utils.checkConfigFlag("GameServer", "enableAbandonedHousePackup");
private static final boolean ALLOW_PACKING_ABANDONED_STRUCTURES = utils.checkConfigFlag("GameServer", "allowPlayersToPackAbandonedStructures");
public static obj_id createPlayerStructure(String template, obj_id owner, location loc, int rotation, dictionary deed_info) throws InterruptedException
{
@@ -79,7 +79,7 @@ public class scheduled_drop extends script.base_script
"entertainer",
"crafter"
};
public static final boolean SYSTEM_ENABLED = utils.checkConfigFlag("Custom", "enableScheduledDropSystem");
private static final boolean SYSTEM_ENABLED = utils.checkConfigFlag("Custom", "enableScheduledDropSystem");
public static void testingSpam(obj_id self, String str) throws InterruptedException
{
@@ -64,7 +64,8 @@ public class space_combat extends script.base_script
public static final int NPC_DAMAGE_MULTIPLIER = 4;
public static final string_id SID_DISABLED = new string_id("space/space_interaction", "disabled");
public static final String SPACE_COLLECTIONS_LOOT_TABLE = "datatables/space_loot/space_collection_loot.iff";
public static final boolean GROUND_XP_IN_SPACE_DISABLED = utils.checkConfigFlag("GameServer", "disableGroundXpInSpace");
private static final boolean GROUND_XP_IN_SPACE_DISABLED = utils.checkConfigFlag("GameServer", "disableGroundXpInSpace");
private static final boolean LIVE_SPACE_SERVER_MODE_OFF = utils.checkConfigFlag("ScriptFlags", "liveSpaceServerModeOff");
public static void addToCombatDamage(obj_id objAttacker, obj_id objDefender, int intDamage) throws InterruptedException
{
@@ -1645,7 +1646,7 @@ public class space_combat extends script.base_script
public static obj_id getClosestSpaceStation(obj_id objShip) throws InterruptedException
{
obj_id objQuestManager;
if (space_flags.LIVE_SPACE_SERVER_MODE_OFF)
if (LIVE_SPACE_SERVER_MODE_OFF)
{
try
{
@@ -18,7 +18,6 @@ public class space_flags extends script.base_script
public static final String REBEL_NABOO = "nabooRebel";
public static final String REBEL_CORELLIA = "corelliaRebel";
public static final String SPACE_TRACK_FLAG = "spaceTrackFlagListName";
public static final boolean LIVE_SPACE_SERVER_MODE_OFF = utils.checkConfigFlag("ScriptFlags", "liveSpaceServerModeOff");
public static void setSpaceTrack(obj_id player, String spaceTrack) throws InterruptedException
{
@@ -25,7 +25,7 @@ public class space_transition extends script.base_script
public static final String SHIP_PILOT_SLOT_NAME = "ship_pilot";
public static final string_id SID_PVP_NOW_OVERT = new string_id("space/space_interaction", "pvp_now_overt");
public static final string_id SID_PVP_NOW_NEUTRAL = new string_id("space/space_interaction", "pvp_now_neutral");
public static final boolean SEND_TO_GROUND_ON_LOGOUT = utils.checkConfigFlag("ScriptFlags", "sendToGroundOnLogout");
//private static final boolean SEND_TO_GROUND_ON_LOGOUT = utils.checkConfigFlag("ScriptFlags", "sendToGroundOnLogout");
public static void handlePotentialSceneChange(obj_id player) throws InterruptedException
{
@@ -190,7 +190,7 @@ public class space_transition extends script.base_script
}
public static boolean shouldSendToGroundOnLogout() throws InterruptedException
{
return SEND_TO_GROUND_ON_LOGOUT;
return false;
}
public static void setLaunchInfo(obj_id player, obj_id ship, int startLocationIndex, location groundLoc) throws InterruptedException
{
@@ -12,11 +12,12 @@ public class spawning extends script.base_script
{
}
public static final boolean AREA_SPAWNERS_DISABLED = utils.checkConfigFlag("GameServer", "disableAreaSpawners");
public static final boolean GENERIC_SPAWNERS_DISABLED = utils.checkConfigFlag("GameServer", "disableGenericSpawner");
public static final boolean PATROL_SPAWNERS_DISABLED = utils.checkConfigFlag("GameServer", "disablePatrolSpawners");
public static final boolean FAST_SPAWN = utils.checkConfigFlag("GameServer", "fastSpawn");
public static final boolean SPAWNER_INITIAL_STATE_OFF = utils.checkConfigFlag("GameServer", "spawningInitialStateDefaultOff");
public static final String AREA_SPAWNERS = "areaSpawners";
public static final String GENERIC_SPAWNERS = "genericSpawners";
public static final String PATROL_SPAWNERS = "patrolSpawners";
private static final boolean AREA_SPAWNERS_DISABLED = utils.checkConfigFlag("GameServer", "disableAreaSpawners");
private static final boolean GENERIC_SPAWNERS_DISABLED = utils.checkConfigFlag("GameServer", "disableGenericSpawner");
private static final boolean PATROL_SPAWNERS_DISABLED = utils.checkConfigFlag("GameServer", "disablePatrolSpawners");
public static void activateSpawnerHack(obj_id objPlayer) throws InterruptedException
{
@@ -266,4 +267,19 @@ public class spawning extends script.base_script
return true;
}
public static boolean isSpawnerTypeDisabled(String spawnerType) {
switch (spawnerType) {
case AREA_SPAWNERS:
return AREA_SPAWNERS_DISABLED;
case PATROL_SPAWNERS:
return PATROL_SPAWNERS_DISABLED;
case GENERIC_SPAWNERS:
return GENERIC_SPAWNERS_DISABLED;
default:
WARNING("spawning.isSpawnerTypeDisabled() called with unknown spawner type: "+spawnerType);
return false;
}
}
}
@@ -67,7 +67,7 @@ public class travel extends script.base_script
public static final string_id SID_MUSTAFAR_UNAUTHORIZED = new string_id("travel", "mustafar_unauthorized");
public static final string_id SID_KASHYYYK_UNAUTHORIZED = new string_id("travel", "kashyyyk_unauthorized");
public static final int TRAVEL_BLOCK_ALLOW_LAUNCH = 1;
public static final boolean TRAVEL_SYSTEM_DISABLED = utils.checkConfigFlag("GameServer", "disableTravelSystem");
private static final boolean TRAVEL_SYSTEM_DISABLED = utils.checkConfigFlag("GameServer", "disableTravelSystem");
public static boolean initializeStarport(obj_id structure, String travel_point, int travel_cost, boolean civic) throws InterruptedException
{
@@ -1395,4 +1395,7 @@ public class travel extends script.base_script
utils.removeScriptVar(player, "travelBlock");
}
}
public static boolean isTravelSystemDisabled() {
return TRAVEL_SYSTEM_DISABLED;
}
}
@@ -140,7 +140,7 @@ public class vendor_lib extends script.base_script
public static final string_id SID_GREETER_PACK_UP_SUCCESS = new string_id("player_structure", "greeter_packup_success");
public static final string_id SID_GREETER_PACK_UP_FAILURE = new string_id("player_structure", "greeter_packup_failure");
public static final string_id SID_MUST_BE_IN_VALID_LOCATION = new string_id("player_structure", "must_be_valid_location");
public static final boolean VENDOR_PACKUP_ALLOWED = utils.checkConfigFlag("GameServer", "allowPlayersToPackVendors");
private static final boolean VENDOR_PACKUP_ALLOWED = utils.checkConfigFlag("GameServer", "allowPlayersToPackVendors");
public static boolean payMaintenance(obj_id player, obj_id vendor, int amt) throws InterruptedException
{
@@ -97,9 +97,9 @@ public class veteran_deprecated extends script.base_script
public static final string_id SID_UNAVAILABLE_NEEDS_EXPANSION = new string_id(VETERAN_STRING_TABLE, "unavailable_needs_expansion");
public static final string_id SID_UNAVAILABLE_NOT_ENOUGH_MILESTONE = new string_id(VETERAN_STRING_TABLE, "unavailable_not_enough_milestone");
public static final string_id SID_UNKNOWN = new string_id(VETERAN_STRING_TABLE, "unknown");
public static final boolean VETERAN_REWARDS_ENABLED = utils.checkConfigFlag("GameServer", "enableVeteranRewards");
public static final boolean ONE_YEAR_ANNIV_ENABLED = utils.checkConfigFlag("GameServer", "enableOneYearAnniversary");
public static final boolean FLASH_SPEEDER_REWARD_ENABLED = utils.checkConfigFlag("GameServer", "flashSpeederReward");
private static final boolean VETERAN_REWARDS_ENABLED = utils.checkConfigFlag("GameServer", "enableVeteranRewards");
private static final boolean ONE_YEAR_ANNIV_ENABLED = utils.checkConfigFlag("GameServer", "enableOneYearAnniversary");
private static final boolean FLASH_SPEEDER_REWARD_ENABLED = utils.checkConfigFlag("GameServer", "flashSpeederReward");
public static void updateVeteranTime(obj_id player) throws InterruptedException
{
@@ -2,6 +2,7 @@ package script.npc.celebrity;
import script.library.ai_lib;
import script.library.create;
import script.library.events;
import script.library.instance;
import script.obj_id;
@@ -12,7 +13,7 @@ public class herald_spawner extends script.base_script
}
public int OnInitialize(obj_id self) throws InterruptedException
{
if(!instance.GEONOSIAN_BUNKER_ENABLED) {
if(!events.isEventActive(events.GEONOSIAN)) {
return SCRIPT_CONTINUE;
}
String spawn = getStringObjVar(self, "spawns");
@@ -285,8 +285,9 @@ public class base_player extends script.base_script
public static final String LOGNAME = "junk_log";
public static final int EXTRAORDINARY_WEALTH_LOGGING_THRESHOLD = 10000000;
public static final int PROFIT_LOGGING_THRESHOLD = 500000;
public static final boolean FORCE_SKIP_TUTORIAL = utils.checkConfigFlag("GameServer", "skipTutorial");
public static final boolean WALL_OF_MIST_DISABLED = utils.checkConfigFlag("GameServer", "fsWallOfMistDisabled");
private static final boolean FORCE_SKIP_TUTORIAL = utils.checkConfigFlag("GameServer", "skipTutorial");
private static final boolean WALL_OF_MIST_DISABLED = utils.checkConfigFlag("GameServer", "fsWallOfMistDisabled");
private static final boolean VETERAN_REWARDS_ENABLED = utils.checkConfigFlag("GameServer", "enableVeteranRewards");
public int OnCustomizeFinished(obj_id self, obj_id object, String params) throws InterruptedException
{
@@ -1380,7 +1381,7 @@ public class base_player extends script.base_script
String bldgName = getTemplateName(bldg);
if (bldgName.equals("object/building/general/bunker_allum_mine.iff"))
{
if (instance.DEATH_WATCH_DUNGEON_ENABLED)
if (!events.isEventActive(events.DEATH_WATCH))
{
CustomerServiceLog("DUNGEON_DeathWatchBunker", "*Death Watch Unauthorized Entry: %TU entered the death watch bunker while it was turned off.", self);
}
@@ -9559,7 +9560,7 @@ public class base_player extends script.base_script
}
public int cmdGetVeteranRewardTime(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
{
if (!veteran_deprecated.VETERAN_REWARDS_ENABLED)
if (!VETERAN_REWARDS_ENABLED)
{
return SCRIPT_CONTINUE;
}
@@ -9598,7 +9599,7 @@ public class base_player extends script.base_script
}
public int cmdListVeteranRewards(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
{
if (!veteran_deprecated.VETERAN_REWARDS_ENABLED)
if (!VETERAN_REWARDS_ENABLED)
{
return SCRIPT_CONTINUE;
}
@@ -9709,9 +9710,6 @@ public class base_player extends script.base_script
veteran_deprecated.cleanupPlayerData(self);
sendSystemMessage(self, veteran_deprecated.SID_REWARD_ERROR);
}
else
{
}
return SCRIPT_CONTINUE;
}
public int handleVeteranRewardConfirmed(obj_id self, dictionary params) throws InterruptedException
@@ -9758,7 +9756,7 @@ public class base_player extends script.base_script
}
public int cmdFlashSpeeder(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException
{
if (!veteran_deprecated.FLASH_SPEEDER_REWARD_ENABLED) {
if (!VETERAN_REWARDS_ENABLED) {
return SCRIPT_CONTINUE;
}
int sub_bits = getGameFeatureBits(self);
@@ -40,12 +40,12 @@ public class live_conversions extends script.base_script
public static final String UPDATE_COLLECTION_INCREMENT_AMOUNT = "increment_amount";
public static final String FORCE_RESPEC_OBJVAR = "configEnforcedRespecVersion";
public static final boolean FORCE_PROFESION_RESPEC = utils.checkConfigFlag("GameServer", "forceProfessionRespec");
public static final boolean GRANT_ESB_AWARDS = utils.checkConfigFlag("Custom", "grantEsbAnniversaryRewards");
public static final boolean GRANT_MAIL_OPT_IN_AWARDS = utils.checkConfigFlag("Custom", "grantMailOptInRewards");
public static final boolean GRANT_ELDER_BUFF = utils.checkConfigFlag("Custom", "grantElderBuff");
public static final int CU_REWARD_LEVEL = utils.getIntConfigSetting("GameServer", "combatUpgradeReward", 0);
public static final int CU_REWARD_AGE_REQUIRED = utils.getIntConfigSetting("GameServer", "combatUpgradeRewardAge", 365);
private static final boolean FORCE_PROFESION_RESPEC = utils.checkConfigFlag("GameServer", "forceProfessionRespec");
private static final boolean GRANT_ESB_AWARDS = utils.checkConfigFlag("Custom", "grantEsbAnniversaryRewards");
private static final boolean GRANT_MAIL_OPT_IN_AWARDS = utils.checkConfigFlag("Custom", "grantMailOptInRewards");
private static final boolean GRANT_ELDER_BUFF = utils.checkConfigFlag("Custom", "grantElderBuff");
private static final int CU_REWARD_LEVEL = utils.getIntConfigSetting("GameServer", "combatUpgradeReward", 0);
private static final int CU_REWARD_AGE_REQUIRED = utils.getIntConfigSetting("GameServer", "combatUpgradeRewardAge", 365);
public int OnAttach(obj_id self) throws InterruptedException
{
@@ -10,6 +10,8 @@ public class player_instance extends script.base_script
public player_instance()
{
}
private static final float HEROIC_TOKEN_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "heroicTokenBonus", 1.0f);
public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException
{
if (!isGod(self))
@@ -691,7 +693,7 @@ public class player_instance extends script.base_script
{
count = params.getInt("tokenCount");
}
count *= instance.HEROIC_TOKEN_MULTIPLIER;
count *= HEROIC_TOKEN_MULTIPLIER;
if (tokenIndex < 0 || tokenIndex >= trial.HEROIC_TOKENS.length)
{
sendSystemMessageTestingOnly(self, "DEBUG: handleAwardtoken sent with out of range tokenIndex.");
@@ -8,6 +8,8 @@ public class player_saga_quest extends script.base_script
public player_saga_quest()
{
}
private static final int CHRONICLES_GOLD_TOKEN_CHANCE_SETTING = utils.getIntConfigSetting("GameServer", "chroniclesGoldTokenChanceOverride", 5);
public int OnAttach(obj_id self) throws InterruptedException
{
messageTo(self, "handleChronicleProfessionGranted", null, 14, false);
@@ -968,7 +970,7 @@ public class player_saga_quest extends script.base_script
}
if (questWeight >= pgc_quests.PGC_MIN_MID_QUALITY_QUEST_WEIGHT)
{
int goldTokenChance = pgc_quests.CHRONICLES_GOLD_TOKEN_CHANCE_SETTING;
int goldTokenChance = CHRONICLES_GOLD_TOKEN_CHANCE_SETTING;
int goldTokenRoll = rand(1, 100);
if (goldTokenRoll <= goldTokenChance)
{
@@ -101,6 +101,6 @@ public class spawner_pirate_leader extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return spawning.AREA_SPAWNERS_DISABLED;
return spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
}
@@ -109,7 +109,7 @@ public class spawner_fan_faire extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return spawning.AREA_SPAWNERS_DISABLED;
return spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
public int OnDestroy(obj_id self) throws InterruptedException
{
@@ -13,6 +13,8 @@ public class interior_component extends script.base_script
public interior_component()
{
}
private static final boolean LIVE_SPACE_SERVER_MODE_OFF = utils.checkConfigFlag("ScriptFlags", "liveSpaceServerModeOff");
public int OnAttach(obj_id self) throws InterruptedException
{
LOG("space", "ONATTACH GOING OFF ON INTERIOR COMPONETNES");
@@ -54,7 +56,7 @@ public class interior_component extends script.base_script
else
{
LOG("space", "Component " + intSlot + " is not installed on " + objShip + " cleaning up interior piece");
if (space_flags.LIVE_SPACE_SERVER_MODE_OFF)
if (LIVE_SPACE_SERVER_MODE_OFF)
{
destroyObject(self);
}
@@ -10,6 +10,8 @@ public class ship_interior extends script.base_script
public ship_interior()
{
}
private static final boolean LIVE_SPACE_SERVER_MODE_OFF = utils.checkConfigFlag("ScriptFlags", "liveSpaceServerModeOff");
public int OnInitialize(obj_id self) throws InterruptedException
{
dictionary dctParams = new dictionary();
@@ -83,7 +85,7 @@ public class ship_interior extends script.base_script
utils.setScriptVar(self, strLocationList[intI] + "Cells", objCells);
}
}
if (space_flags.LIVE_SPACE_SERVER_MODE_OFF)
if (LIVE_SPACE_SERVER_MODE_OFF)
{
obj_id objTest = createObject(strTemplates[intI], tr, objCell);
if (!strObjVars[intI].equals(""))
@@ -13,6 +13,8 @@ public class battlefield_region extends script.base_script
public static final string_id SID_BATTLEFIELD_STATUS = new string_id("battlefield", "status");
public static final string_id SID_GAME_STATUS = new string_id("battlefield", "game_status");
public static final String VAR_TIME_WARNING_LEVEL = "battlefield.game.time_warning_level";
private static final boolean BATTLEFIELDS_DISABLED = utils.checkConfigFlag("GameServer", "disableBattlefields");
public int OnAttach(obj_id self) throws InterruptedException
{
LOG("LOG_CHANNEL", "battlefield_region::OnAttach");
@@ -24,7 +26,7 @@ public class battlefield_region extends script.base_script
messageTo(self, "msgInitializeRegion", null, 0.0f, true);
if (hasObjVar(self, battlefield.VAR_BATTLEFIELD))
{
if(battlefield.BATTLEFIELDS_DISABLED) {
if(BATTLEFIELDS_DISABLED) {
battlefield.endBattlefield(self, false);
return SCRIPT_CONTINUE;
}
@@ -62,6 +62,8 @@ public class player_pvp extends script.base_script
};
public static final String COLOR_REBELS = "\\" + colors_hex.COLOR_REBELS;
public static final String COLOR_IMPERIALS = "\\" + colors_hex.COLOR_IMPERIALS;
private static final float GCW_TOKEN_BONUS = utils.getFloatConfigSetting("GameServer", "gcwTokenBonus", 1.0f);
public void blog(obj_id controller, String text) throws InterruptedException
{
String battlefieldName = "none";
@@ -814,7 +816,7 @@ public class player_pvp extends script.base_script
tokens = 5;
}
}
tokens *= gcw.GCW_TOKEN_BONUS;
tokens *= GCW_TOKEN_BONUS;
if (canReceiveReward(self))
{
gcw._grantGcwPoints(null, self, gcwCredits, false, gcw.GCW_POINT_TYPE_GROUND_PVP_REGION, "");
@@ -37,8 +37,9 @@ public class pvp_battlefield extends script.base_script
public static final int BATTLEFIELD_MAXIMUM_TEAM_SIZE = 16;
public static final int BATTLEFIELD_PLAYER_KILL_VALUE = 10;
public static final int BATTLEFIELD_TERMINAL_CAPTURE_VALUE = 500;
public static final int BATTLEFIELD_MINIMUM_TEAM_SIZE_OVERRIDE = utils.getIntConfigSetting("GameServer", "BfMinimumTeamSize", BATTLEFIELD_MINIMUM_TEAM_SIZE);
public static final int BATTLEFIELD_MAXIMUM_TEAM_SIZE_OVERRIDE = utils.getIntConfigSetting("GameServer", "BfTeamSize", BATTLEFIELD_MAXIMUM_TEAM_SIZE);
private static final int BATTLEFIELD_MINIMUM_TEAM_SIZE_OVERRIDE = utils.getIntConfigSetting("GameServer", "BfMinimumTeamSize", BATTLEFIELD_MINIMUM_TEAM_SIZE);
private static final int BATTLEFIELD_MAXIMUM_TEAM_SIZE_OVERRIDE = utils.getIntConfigSetting("GameServer", "BfTeamSize", BATTLEFIELD_MAXIMUM_TEAM_SIZE);
public void doLogging(String section, String message) throws InterruptedException
{
}
@@ -7,21 +7,21 @@ import script.obj_id;
public class battle_controller extends script.base_script {
public static final boolean TATOOINE_ACTIVE = utils.checkConfigFlag("GameServer", "spaceGcwTatooineActive");
public static final boolean CORELLIA_ACTIVE = utils.checkConfigFlag("GameServer", "spaceGcwCorelliaActive");
public static final boolean DANTOOINE_ACTIVE = utils.checkConfigFlag("GameServer", "spaceGcwDantooineActive");
public static final boolean LOK_ACTIVE = utils.checkConfigFlag("GameServer", "spaceGcwLokActive");
public static final boolean NABOO_ACTIVE = utils.checkConfigFlag("GameServer", "spaceGcwNabooActive");
public static final int TATOOINE_DELAY = utils.getIntConfigSetting("GameServer", "spaceGcwTatooineDelay", 3);
public static final int CORELLIA_DELAY = utils.getIntConfigSetting("GameServer", "spaceGcwCorelliaDelay", 3);
public static final int DANTOOINE_DELAY = utils.getIntConfigSetting("GameServer", "spaceGcwDantooineDelay", 3);
public static final int LOK_DELAY = utils.getIntConfigSetting("GameServer", "spaceGcwLokDelay", 3);
public static final int NABOO_DELAY = utils.getIntConfigSetting("GameServer", "spaceGcwNabooDelay", 3);
public static final int TATOOINE_STAGGER = utils.getIntConfigSetting("GameServer", "spaceGcwTatooineStagger", 0);
public static final int CORELLIA_STAGGER = utils.getIntConfigSetting("GameServer", "spaceGcwCorelliaStagger", 2);
public static final int DANTOOINE_STAGGER = utils.getIntConfigSetting("GameServer", "spaceGcwDantooineStagger", 0);
public static final int LOK_STAGGER = utils.getIntConfigSetting("GameServer", "spaceGcwLokStagger", 2);
public static final int NABOO_STAGGER = utils.getIntConfigSetting("GameServer", "spaceGcwNabooStagger", 4);
private static final boolean TATOOINE_ACTIVE = utils.checkConfigFlag("GameServer", "spaceGcwTatooineActive");
private static final boolean CORELLIA_ACTIVE = utils.checkConfigFlag("GameServer", "spaceGcwCorelliaActive");
private static final boolean DANTOOINE_ACTIVE = utils.checkConfigFlag("GameServer", "spaceGcwDantooineActive");
private static final boolean LOK_ACTIVE = utils.checkConfigFlag("GameServer", "spaceGcwLokActive");
private static final boolean NABOO_ACTIVE = utils.checkConfigFlag("GameServer", "spaceGcwNabooActive");
private static final int TATOOINE_DELAY = utils.getIntConfigSetting("GameServer", "spaceGcwTatooineDelay", 3);
private static final int CORELLIA_DELAY = utils.getIntConfigSetting("GameServer", "spaceGcwCorelliaDelay", 3);
private static final int DANTOOINE_DELAY = utils.getIntConfigSetting("GameServer", "spaceGcwDantooineDelay", 3);
private static final int LOK_DELAY = utils.getIntConfigSetting("GameServer", "spaceGcwLokDelay", 3);
private static final int NABOO_DELAY = utils.getIntConfigSetting("GameServer", "spaceGcwNabooDelay", 3);
private static final int TATOOINE_STAGGER = utils.getIntConfigSetting("GameServer", "spaceGcwTatooineStagger", 0);
private static final int CORELLIA_STAGGER = utils.getIntConfigSetting("GameServer", "spaceGcwCorelliaStagger", 2);
private static final int DANTOOINE_STAGGER = utils.getIntConfigSetting("GameServer", "spaceGcwDantooineStagger", 0);
private static final int LOK_STAGGER = utils.getIntConfigSetting("GameServer", "spaceGcwLokStagger", 2);
private static final int NABOO_STAGGER = utils.getIntConfigSetting("GameServer", "spaceGcwNabooStagger", 4);
// Configuration Array:
// 1. Zone.
// 2. Initial Battle Type.
@@ -15,22 +15,22 @@ public class battle_spawner extends script.base_class {
public static final String REBEL_SHIP_TEMPLATE = "nebulon_frigate";
private static final String HERO_PILOT_DATA = "datatables/npc/space/space_gcw_hero.iff";
public static final double HERO_SPAWN_CHANCE = 0.20d; // 0.20d == 20% chance a hero will spawn
public static final int DEFAULT_POINT_AWARD = utils.getIntConfigSetting("GameServer", "spaceGcwPointAward", 2500);
public static final int DEFAULT_TOKEN_AWARD = utils.getIntConfigSetting("GameServer", "spaceGcwTokenAward", 25);
public static final float PVP_POINT_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwPvPPointModifier", 2.0f);
public static final float PVE_POINT_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwPvEPointModifier", 1.0f);
public static final float WIN_POINT_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwWinPointModifier", 2.0f);
public static final float LOSS_POINT_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwLossPointModifier", 1.0f);
public static final float PVP_TOKEN_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwPvPTokenModifier", 2.0f);
public static final float PVE_TOKEN_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwPvETokenModifier", 1.0f);
public static final float WIN_TOKEN_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwWinTokenModifier", 2.0f);
public static final float LOSS_TOKEN_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwLossTokenModifier", 1.0f);
public static final int POB_PLAYER_CEILING = utils.getIntConfigSetting("GameServer", "spaceGcwPobPlayerCeiling", 4);
public static final int GUNSHIP_PLAYER_CEILING = utils.getIntConfigSetting("GameServer", "spaceGcwGunshipPlayerCeiling", 10);
public static final float PREP_TIME = utils.getFloatConfigSetting("GameServer", "spaceGcwPrepatoryTime", 900.0f); // 15 mins in seconds
public static final float BATTLE_TIME = utils.getFloatConfigSetting("GameServer", "spaceGcwLengthOfBattle", 3600.0f); // 60 mins in seconds
public static final int MAX_SUPPORT_SHIPS = utils.getIntConfigSetting("GameServer", "spaceGcwMaxSupportShips", 30);
public static final int MAX_SUPPORT_SPAWNS = utils.getIntConfigSetting("GameServer", "spaceGcwTotalSupportSpawn", 60);
private static final int DEFAULT_POINT_AWARD = utils.getIntConfigSetting("GameServer", "spaceGcwPointAward", 2500);
private static final int DEFAULT_TOKEN_AWARD = utils.getIntConfigSetting("GameServer", "spaceGcwTokenAward", 25);
private static final float PVP_POINT_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwPvPPointModifier", 2.0f);
private static final float PVE_POINT_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwPvEPointModifier", 1.0f);
private static final float WIN_POINT_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwWinPointModifier", 2.0f);
private static final float LOSS_POINT_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwLossPointModifier", 1.0f);
private static final float PVP_TOKEN_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwPvPTokenModifier", 2.0f);
private static final float PVE_TOKEN_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwPvETokenModifier", 1.0f);
private static final float WIN_TOKEN_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwWinTokenModifier", 2.0f);
private static final float LOSS_TOKEN_MULTIPLIER = utils.getFloatConfigSetting("GameServer", "spaceGcwLossTokenModifier", 1.0f);
private static final int POB_PLAYER_CEILING = utils.getIntConfigSetting("GameServer", "spaceGcwPobPlayerCeiling", 4);
private static final int GUNSHIP_PLAYER_CEILING = utils.getIntConfigSetting("GameServer", "spaceGcwGunshipPlayerCeiling", 10);
private static final float PREP_TIME = utils.getFloatConfigSetting("GameServer", "spaceGcwPrepatoryTime", 900.0f); // 15 mins in seconds
private static final float BATTLE_TIME = utils.getFloatConfigSetting("GameServer", "spaceGcwLengthOfBattle", 3600.0f); // 60 mins in seconds
private static final int MAX_SUPPORT_SHIPS = utils.getIntConfigSetting("GameServer", "spaceGcwMaxSupportShips", 30);
private static final int MAX_SUPPORT_SPAWNS = utils.getIntConfigSetting("GameServer", "spaceGcwTotalSupportSpawn", 60);
public static final String[] IMPERIAL_SUPPORT_CRAFT = {
"tieaggressor_tier7",
@@ -224,6 +224,6 @@ public class base_spawner extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return !spawning.GENERIC_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.GENERIC_SPAWNERS);
}
}
@@ -35,6 +35,7 @@ public class spawn_base extends script.base_script
{
"tutorial"
};
private static final boolean FAST_SPAWN = utils.checkConfigFlag("GameServer", "fastSpawn");
/**
this function takes the obj_id of the player, and the obj_id of the master spawn object. It will eventually take a region object id, which will contain the necessary
@@ -474,7 +475,7 @@ public class spawn_base extends script.base_script
{
}
public boolean checkSpawnLogFailures() throws InterruptedException {
return spawning.FAST_SPAWN;
return FAST_SPAWN;
}
public boolean isSpawningAllowed(location locTest) throws InterruptedException
{
@@ -1,6 +1,7 @@
package script.systems.spawning;
import script.library.spawning;
import script.library.utils;
import script.obj_id;
public class spawn_master extends script.systems.spawning.spawn_base
@@ -8,6 +9,7 @@ public class spawn_master extends script.systems.spawning.spawn_base
public spawn_master()
{
}
private static final boolean SPAWNER_INITIAL_STATE_OFF = utils.checkConfigFlag("GameServer", "spawningInitialStateDefaultOff");
/**
Bootstrap function for trigger volume creation. This will be moved to OnInitialization once it comes online.
@@ -30,7 +32,7 @@ public class spawn_master extends script.systems.spawning.spawn_base
setObjVar(self, "intCurrentPlanetSpawnCount", 0);
setObjVar(self, "intMinSpawnDelay", SPAWN_PLAYER_DELAY_MIN);
setObjVar(self, "intMaxSpawnDelay", SPAWN_PLAYER_DELAY_MAX);
if (spawning.SPAWNER_INITIAL_STATE_OFF) {
if (SPAWNER_INITIAL_STATE_OFF) {
setObjVar(self, "boolSpawnerIsOn", false);
} else {
setObjVar(self, "boolSpawnerIsOn", true);
@@ -61,7 +63,7 @@ public class spawn_master extends script.systems.spawning.spawn_base
setObjVar(self, "intCurrentPlanetSpawnCount", 0);
setObjVar(self, "intMinSpawnDelay", SPAWN_PLAYER_DELAY_MIN);
setObjVar(self, "intMaxSpawnDelay", SPAWN_PLAYER_DELAY_MAX);
if (spawning.SPAWNER_INITIAL_STATE_OFF) {
if (SPAWNER_INITIAL_STATE_OFF) {
setObjVar(self, "boolSpawnerIsOn", false);
} else {
setObjVar(self, "boolSpawnerIsOn", true);
@@ -226,7 +226,7 @@ public class spawner_area extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return !spawning.AREA_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
public int OnDestroy(obj_id self) throws InterruptedException
{
@@ -370,7 +370,7 @@ public class spawner_patrol extends script.base_script
return SCRIPT_CONTINUE;
}
public boolean canSpawnByConfigSetting() throws InterruptedException {
return !spawning.PATROL_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
public int OnDestroy(obj_id self) throws InterruptedException
{
@@ -284,7 +284,7 @@ public class spawner_random extends script.base_script
return SCRIPT_CONTINUE;
}
public boolean canSpawnByConfigSetting() throws InterruptedException {
return !spawning.AREA_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
public int OnDestroy(obj_id self) throws InterruptedException
{
@@ -357,7 +357,7 @@ public class spawner_random_proxy extends script.base_script
return SCRIPT_CONTINUE;
}
public boolean canSpawnByConfigSetting() throws InterruptedException {
return !spawning.AREA_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
public int OnDestroy(obj_id self) throws InterruptedException
{
@@ -18,6 +18,8 @@ public class generic_turret_ai extends script.systems.combat.combat_base_old
public generic_turret_ai()
{
}
private static final boolean AI_COMBAT_DISABLED = utils.checkConfigFlag("GameServer", "disableAICombat");
public int OnAttach(obj_id self) throws InterruptedException
{
turret.activateTurret(self);
@@ -217,7 +219,7 @@ public class generic_turret_ai extends script.systems.combat.combat_base_old
}
public int OnSawAttack(obj_id self, obj_id defender, obj_id[] attackers) throws InterruptedException
{
if (ai.AI_COMBAT_DISABLED)
if (AI_COMBAT_DISABLED)
{
setWantSawAttackTriggers(self, false);
return SCRIPT_CONTINUE;
@@ -18,6 +18,8 @@ public class turret_ai extends script.systems.combat.combat_base_old
public turret_ai()
{
}
private static final boolean AI_COMBAT_DISABLED = utils.checkConfigFlag("GameServer", "disableAICombat");
public int OnAttach(obj_id self) throws InterruptedException
{
turret.activateTurret(self);
@@ -188,7 +190,7 @@ public class turret_ai extends script.systems.combat.combat_base_old
}
public int OnSawAttack(obj_id self, obj_id defender, obj_id[] attackers) throws InterruptedException
{
if (ai.AI_COMBAT_DISABLED)
if (AI_COMBAT_DISABLED)
{
setWantSawAttackTriggers(self, false);
return SCRIPT_CONTINUE;
@@ -21,6 +21,8 @@ public class gcw_supply_terminal extends script.base_script
"Operations Core",
"Reset"
};
private static final float GCW_TOKEN_BONUS = utils.getFloatConfigSetting("GameServer", "gcwTokenBonus", 1.0f);
public int OnInitialize(obj_id self) throws InterruptedException
{
if (!isIdValid(self) || !exists(self))
@@ -95,7 +97,7 @@ public class gcw_supply_terminal extends script.base_script
if (factions.isImperialorImperialHelper(player))
{
sendSystemMessage(player, "You have recived an Imperial Token for your effort", null);
float multiplier = gcw.GCW_TOKEN_BONUS;
float multiplier = GCW_TOKEN_BONUS;
int count = 1;
if (multiplier > 1)
{
@@ -120,7 +122,7 @@ public class gcw_supply_terminal extends script.base_script
if (factions.isRebelorRebelHelper(player))
{
sendSystemMessage(player, "You have recived an Rebel Token for your effort", null);
float multiplier = gcw.GCW_TOKEN_BONUS;
float multiplier = GCW_TOKEN_BONUS;
int count = 1;
if (multiplier > 1)
{
@@ -49,7 +49,7 @@ public class terminal_travel extends script.base_script
}
}
LOG("LOG_CHANNEL", "player ->" + player + " planet ->" + planet + " travel_point ->" + travel_point);
if(travel.TRAVEL_SYSTEM_DISABLED) {
if(travel.isTravelSystemDisabled()) {
sendSystemMessageTestingOnly(player, "The Travel System is currently unavailable. Please try again later.");
return SCRIPT_CONTINUE;
}
@@ -92,7 +92,7 @@ public class terminal_travel_instant extends script.base_script
debugLogging("//***// OnObjectMenuSelect: ", "////>>>> city name at player's location is: " + travel_point);
}
LOG("LOG_CHANNEL", "player ->" + player + " planet ->" + planet + " travel_point ->" + travel_point);
if(travel.TRAVEL_SYSTEM_DISABLED) {
if(travel.isTravelSystemDisabled()) {
sendSystemMessageTestingOnly(player, "The Travel System is currently unavailable. Please try again later.");
return SCRIPT_CONTINUE;
}
@@ -62,6 +62,6 @@ public class kazic_pendre_area_spawner extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return !spawning.AREA_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
}
@@ -44,6 +44,6 @@ public class u13_ponda_gungan_statue_spawner extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return !spawning.AREA_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
}
@@ -1,10 +1,7 @@
package script.theme_park.dungeon.death_watch_bunker;
import script.dictionary;
import script.library.ai_lib;
import script.library.create;
import script.library.instance;
import script.library.utils;
import script.library.*;
import script.location;
import script.obj_id;
import script.string_id;
@@ -32,7 +29,7 @@ public class craft_armorsmith_droid extends script.base_script
public int OnGiveItem(obj_id self, obj_id item, obj_id giver) throws InterruptedException
{
CustomerServiceLog("DUNGEON_DeathWatchBunker", "*Mandalorian Armor: Player %TU has put an item in the armorsmith droid");
if(!instance.DEATH_WATCH_DUNGEON_ENABLED) {
if(!events.isEventActive(events.DEATH_WATCH)) {
return SCRIPT_CONTINUE;
}
if (!hasSkill(giver, "class_munitions_phase4_master"))
@@ -1,10 +1,7 @@
package script.theme_park.dungeon.death_watch_bunker;
import script.dictionary;
import script.library.ai_lib;
import script.library.create;
import script.library.instance;
import script.library.utils;
import script.library.*;
import script.location;
import script.obj_id;
import script.string_id;
@@ -32,7 +29,7 @@ public class craft_droidengineer_droid extends script.base_script
public int OnGiveItem(obj_id self, obj_id item, obj_id giver) throws InterruptedException
{
CustomerServiceLog("DUNGEON_DeathWatchBunker", "*Mandalorian Armor: Player %TU has put an item in the droidengineer droid");
if(!instance.DEATH_WATCH_DUNGEON_ENABLED) {
if(!events.isEventActive(events.DEATH_WATCH)) {
return SCRIPT_CONTINUE;
}
if (!hasSkill(giver, "class_engineering_phase4_master"))
@@ -1,10 +1,7 @@
package script.theme_park.dungeon.death_watch_bunker;
import script.dictionary;
import script.library.ai_lib;
import script.library.create;
import script.library.instance;
import script.library.utils;
import script.library.*;
import script.location;
import script.obj_id;
import script.string_id;
@@ -33,7 +30,7 @@ public class craft_jetpack_droid extends script.base_script
public int OnGiveItem(obj_id self, obj_id item, obj_id giver) throws InterruptedException
{
CustomerServiceLog("DUNGEON_DeathWatchBunker", "*Mandalorian Armor: Player %TU has put an item in the jetpack droid");
if(!instance.DEATH_WATCH_DUNGEON_ENABLED) {
if(!events.isEventActive(events.DEATH_WATCH)) {
return SCRIPT_CONTINUE;
}
if (!hasSkill(giver, "class_engineering_phase1_master"))
@@ -1,10 +1,7 @@
package script.theme_park.dungeon.death_watch_bunker;
import script.dictionary;
import script.library.ai_lib;
import script.library.create;
import script.library.instance;
import script.library.utils;
import script.library.*;
import script.location;
import script.obj_id;
import script.string_id;
@@ -32,7 +29,7 @@ public class craft_tailor_droid extends script.base_script
public int OnGiveItem(obj_id self, obj_id item, obj_id giver) throws InterruptedException
{
CustomerServiceLog("DUNGEON_DeathWatchBunker", "*Mandalorian Armor: Player %TU has put an item in the tailor droid", giver);
if(!instance.DEATH_WATCH_DUNGEON_ENABLED) {
if(!events.isEventActive(events.DEATH_WATCH)) {
return SCRIPT_CONTINUE;
}
if (!hasSkill(giver, "class_domestics_phase4_master"))
@@ -1,6 +1,7 @@
package script.theme_park.dungeon.death_watch_bunker;
import script.dictionary;
import script.library.events;
import script.library.instance;
import script.obj_id;
import script.string_id;
@@ -20,7 +21,7 @@ public class leaving extends script.base_script
}
if (!hasObjVar(item, "gm"))
{
if(!instance.DEATH_WATCH_DUNGEON_ENABLED) {
if(!events.isEventActive(events.DEATH_WATCH)) {
string_id locked = new string_id(MSGS, "no_entry");
sendSystemMessage(item, locked);
return SCRIPT_OVERRIDE;
@@ -1,10 +1,7 @@
package script.theme_park.dungeon.death_watch_bunker;
import script.*;
import script.library.create;
import script.library.instance;
import script.library.permissions;
import script.library.utils;
import script.library.*;
public class loot_chest extends script.base_script
{
@@ -176,7 +173,7 @@ public class loot_chest extends script.base_script
}
public obj_id spawnLoot(obj_id self) throws InterruptedException
{
if(!instance.DEATH_WATCH_DUNGEON_ENABLED) {
if(!events.isEventActive(events.DEATH_WATCH)) {
return obj_id.NULL_ID;
}
String newLoot = pickNewLoot();
@@ -1,10 +1,7 @@
package script.theme_park.dungeon;
import script.dictionary;
import script.library.ai_lib;
import script.library.create;
import script.library.instance;
import script.library.utils;
import script.library.*;
import script.location;
import script.obj_id;
@@ -18,7 +15,7 @@ public class ep3_clone_relics_generic_spawner extends script.base_script
String name = getTemplateName(self);
if (name.equals("object/building/general/bunker_allum_mine.iff"))
{
if(!instance.DEATH_WATCH_DUNGEON_ENABLED) {
if(!events.isEventActive(events.DEATH_WATCH)) {
return SCRIPT_CONTINUE;
}
}
@@ -33,7 +30,7 @@ public class ep3_clone_relics_generic_spawner extends script.base_script
String name = getTemplateName(self);
if (name.equals("object/building/general/bunker_allum_mine.iff"))
{
if(!instance.DEATH_WATCH_DUNGEON_ENABLED) {
if(!events.isEventActive(events.DEATH_WATCH)) {
return SCRIPT_CONTINUE;
}
}
@@ -18,7 +18,7 @@ public class generic_spawner extends script.base_script
{
if (getTemplateName(self).equals("object/building/general/bunker_allum_mine.iff"))
{
if(!instance.DEATH_WATCH_DUNGEON_ENABLED) {
if(!events.isEventActive(events.DEATH_WATCH)) {
return SCRIPT_CONTINUE;
}
}
@@ -36,7 +36,7 @@ public class generic_spawner extends script.base_script
{
if (getTemplateName(self).equals("object/building/general/bunker_allum_mine.iff"))
{
if(!instance.DEATH_WATCH_DUNGEON_ENABLED) {
if(!events.isEventActive(events.DEATH_WATCH)) {
return SCRIPT_CONTINUE;
}
}
@@ -384,7 +384,7 @@ public class generic_spawner extends script.base_script
}
}
public boolean canSpawnByConfigSetting() throws InterruptedException {
return !spawning.GENERIC_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.GENERIC_SPAWNERS);
}
public int getRandomPlanetCreatureLevel(obj_id spawner, String npcType, location here) throws InterruptedException
{
@@ -1,6 +1,7 @@
package script.theme_park.dungeon.geonosian_madbio_bunker;
import script.dictionary;
import script.library.events;
import script.library.instance;
import script.obj_id;
import script.string_id;
@@ -20,7 +21,7 @@ public class leaving extends script.base_script
}
if (!hasObjVar(item, "gm"))
{
if (!instance.GEONOSIAN_BUNKER_ENABLED)
if (!events.isEventActive(events.GEONOSIAN))
{
string_id locked = new string_id(MSGS, "no_entry");
sendSystemMessage(item, locked);
@@ -150,6 +150,6 @@ public class bocctyyy_bet_spawner extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return !spawning.AREA_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
}
@@ -216,6 +216,6 @@ public class hracca_spawner extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return !spawning.AREA_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
}
@@ -86,6 +86,6 @@ public class rtp_han_solo_banners extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return !spawning.AREA_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
}
@@ -84,6 +84,6 @@ public class rtp_leia_crime_scene extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return !spawning.AREA_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
}
@@ -82,6 +82,6 @@ public class rtp_luke_plants extends script.base_script
}
public boolean canSpawnByConfigSetting() throws InterruptedException
{
return !spawning.AREA_SPAWNERS_DISABLED;
return !spawning.isSpawnerTypeDisabled(spawning.AREA_SPAWNERS);
}
}
@@ -3,6 +3,7 @@ package script.theme_park.warren;
import script.ai.ai;
import script.library.ai_lib;
import script.library.chat;
import script.library.utils;
import script.obj_id;
import script.string_id;
@@ -16,13 +17,14 @@ public class cell_guard extends script.base_script
public static final String AGGRO_VOLUME_NAME = "aggroVolume";
public static final String ACTION_ALERT = "alert";
public static final String ACTION_THREATEN = "threaten";
private static final boolean AI_TRIGGER_VOLUMES_DISABLED = utils.checkConfigFlag("GameServer", "disableAITriggerVolumes");
public int OnAttach(obj_id self) throws InterruptedException
{
if (!hasObjVar(self, "ai.diction"))
{
setObjVar(self, "ai.diction", "military");
}
if (!ai.AI_TRIGGER_VOLUMES_DISABLED)
if (!AI_TRIGGER_VOLUMES_DISABLED)
{
createTriggerVolume(ALERT_VOLUME_NAME, 15.0f, true);
createTriggerVolume(AGGRO_VOLUME_NAME, 8.0f, true);
@@ -38,7 +40,7 @@ public class cell_guard extends script.base_script
}
public int OnInitialize(obj_id self) throws InterruptedException
{
if (!ai.AI_TRIGGER_VOLUMES_DISABLED)
if (!AI_TRIGGER_VOLUMES_DISABLED)
{
createTriggerVolume(ALERT_VOLUME_NAME, 15.0f, true);
createTriggerVolume(AGGRO_VOLUME_NAME, 8.0f, true);
@@ -3,6 +3,7 @@ package script.theme_park.warren;
import script.ai.ai;
import script.library.ai_lib;
import script.library.chat;
import script.library.utils;
import script.obj_id;
import script.string_id;
@@ -15,9 +16,10 @@ public class doctor_knag extends script.base_script
public static final String ALERT_VOLUME_NAME = "alertTriggerVolume";
public static final String ACTION_ALERT = "alert";
public static final String ACTION_THREATEN = "threaten";
private static final boolean AI_TRIGGER_VOLUMES_DISABLED = utils.checkConfigFlag("GameServer", "disableAITriggerVolumes");
public int OnAttach(obj_id self) throws InterruptedException
{
if (!ai.AI_TRIGGER_VOLUMES_DISABLED)
if (!AI_TRIGGER_VOLUMES_DISABLED)
{
createTriggerVolume(ALERT_VOLUME_NAME, 15.0f, true);
}
@@ -17,13 +17,16 @@ public class trooper extends script.base_script
public static final String ALERT_VOLUME_NAME = "alertVolume";
public static final String ACTION_ALERT = "alert";
public static final String ACTION_THREATEN = "threaten";
private static final boolean AI_TRIGGER_VOLUMES_DISABLED = utils.checkConfigFlag("GameServer", "disableAITriggerVolumes");
private static final boolean AI_COMBAT_DISABLED = utils.checkConfigFlag("GameServer", "disableAICombat");
public int OnAttach(obj_id self) throws InterruptedException
{
if (!hasObjVar(self, "ai.diction"))
{
setObjVar(self, "ai.diction", "military");
}
if (!ai.AI_TRIGGER_VOLUMES_DISABLED)
if (!AI_TRIGGER_VOLUMES_DISABLED)
{
createTriggerVolume(ALERT_VOLUME_NAME, 15.0f, true);
}
@@ -81,7 +84,7 @@ public class trooper extends script.base_script
}
public int OnSawAttack(obj_id self, obj_id defender, obj_id[] attackers) throws InterruptedException
{
if (ai.AI_COMBAT_DISABLED)
if (AI_COMBAT_DISABLED)
{
setWantSawAttackTriggers(self, false);
return SCRIPT_OVERRIDE;