From dc9e2432ace5b985f2808b2152c72af55f91f1be Mon Sep 17 00:00:00 2001 From: AconiteGodOfSWG Date: Tue, 30 Mar 2021 03:02:28 -0400 Subject: [PATCH] 3.1 Config Updates Continued --- .../compiled/game/script/ai/ai.java | 5 +-- .../compiled/game/script/ai/hunter.java | 5 ++- .../compiled/game/script/ai/monster.java | 5 ++- .../compiled/game/script/ai/soldier.java | 17 ++------ .../compiled/game/script/ai/townperson.java | 21 +++------- .../game/script/ai/tusken_raider.java | 4 +- .../game/script/city/guard_spawner.java | 2 +- .../imperial_crackdown/crackdown_cantina.java | 6 ++- .../content_tools/interior_buildout.java | 3 +- .../game/script/conversation/boba_fett.java | 2 +- .../corvette_bronell_neutral_assassin.java | 2 +- .../corvette_bruce_neutral_destroy.java | 2 +- .../corvette_colonel_imperial1.java | 2 +- .../conversation/corvette_crowley_rebel1.java | 2 +- .../conversation/corvette_imperial_pilot.java | 15 ++----- .../conversation/corvette_neutral_pilot.java | 15 ++----- .../conversation/corvette_pashna_rebel1.java | 30 ++----------- .../conversation/corvette_rebel_pilot.java | 15 ++----- .../corvette_sabol_imperial1.java | 7 +--- .../conversation/corvette_tallon_rebel1.java | 7 +--- .../corvette_velso_imperial_destroy.java | 2 +- .../corvette_yondalla_neutral_rescue.java | 2 +- .../death_watch_imperial_herald.java | 2 +- .../death_watch_rebel_herald.java | 7 +--- .../game/script/event/holiday_controller.java | 8 ++-- .../game/script/fishing/master_object.java | 42 ++++++++++++++++++- .../compiled/game/script/gm/cmd.java | 10 +++-- .../script/item/levelup_orb/levelup_orb.java | 7 ++-- .../game/script/library/battlefield.java | 1 - .../compiled/game/script/library/city.java | 3 +- .../compiled/game/script/library/create.java | 3 +- .../compiled/game/script/library/events.java | 28 ++++++++++++- .../compiled/game/script/library/gcw.java | 10 ++--- .../game/script/library/groundquests.java | 6 ++- .../compiled/game/script/library/healing.java | 2 +- .../game/script/library/instance.java | 6 --- .../compiled/game/script/library/loot.java | 20 ++++----- .../game/script/library/missions.java | 2 +- .../compiled/game/script/library/npe.java | 4 +- .../game/script/library/pgc_quests.java | 8 ++-- .../game/script/library/player_structure.java | 8 ++-- .../game/script/library/scheduled_drop.java | 2 +- .../game/script/library/space_combat.java | 5 ++- .../game/script/library/space_flags.java | 1 - .../game/script/library/space_transition.java | 4 +- .../game/script/library/spawning.java | 26 +++++++++--- .../compiled/game/script/library/travel.java | 5 ++- .../game/script/library/vendor_lib.java | 2 +- .../script/library/veteran_deprecated.java | 6 +-- .../script/npc/celebrity/herald_spawner.java | 3 +- .../game/script/player/base/base_player.java | 16 ++++--- .../game/script/player/live_conversions.java | 12 +++--- .../game/script/player/player_instance.java | 4 +- .../game/script/player/player_saga_quest.java | 4 +- .../spawner_pirate_leader.java | 2 +- .../pgc/fan_faire_demo/spawner_fan_faire.java | 2 +- .../space/crafting/interior_component.java | 4 +- .../game/script/space/ship/ship_interior.java | 4 +- .../battlefield/battlefield_region.java | 4 +- .../game/script/systems/gcw/player_pvp.java | 4 +- .../script/systems/gcw/pvp_battlefield.java | 5 ++- .../systems/gcw/space/battle_controller.java | 30 ++++++------- .../systems/gcw/space/battle_spawner.java | 32 +++++++------- .../systems/gcw/static_base/base_spawner.java | 2 +- .../script/systems/spawning/spawn_base.java | 3 +- .../script/systems/spawning/spawn_master.java | 6 ++- .../script/systems/spawning/spawner_area.java | 2 +- .../systems/spawning/spawner_patrol.java | 2 +- .../systems/spawning/spawner_random.java | 2 +- .../spawning/spawner_random_proxy.java | 2 +- .../systems/turret/generic_turret_ai.java | 4 +- .../game/script/systems/turret/turret_ai.java | 4 +- .../script/terminal/gcw_supply_terminal.java | 6 ++- .../game/script/terminal/terminal_travel.java | 2 +- .../terminal/terminal_travel_instant.java | 2 +- .../content/kazic_pendre_area_spawner.java | 2 +- .../u13_ponda_gungan_statue_spawner.java | 2 +- .../craft_armorsmith_droid.java | 7 +--- .../craft_droidengineer_droid.java | 7 +--- .../craft_jetpack_droid.java | 7 +--- .../craft_tailor_droid.java | 7 +--- .../dungeon/death_watch_bunker/leaving.java | 3 +- .../death_watch_bunker/loot_chest.java | 7 +--- .../ep3_clone_relics_generic_spawner.java | 9 ++-- .../theme_park/dungeon/generic_spawner.java | 6 +-- .../geonosian_madbio_bunker/leaving.java | 3 +- .../kashyyyk/bocctyyy_bet_spawner.java | 2 +- .../theme_park/kashyyyk/hracca_spawner.java | 2 +- .../rebel/rtp_han_solo_banners.java | 2 +- .../rebel/rtp_leia_crime_scene.java | 2 +- .../theme_park/rebel/rtp_luke_plants.java | 2 +- .../script/theme_park/warren/cell_guard.java | 6 ++- .../script/theme_park/warren/doctor_knag.java | 4 +- .../script/theme_park/warren/trooper.java | 7 +++- 94 files changed, 338 insertions(+), 311 deletions(-) diff --git a/sku.0/sys.server/compiled/game/script/ai/ai.java b/sku.0/sys.server/compiled/game/script/ai/ai.java index 9e1cf9478..fd8077138 100755 --- a/sku.0/sys.server/compiled/game/script/ai/ai.java +++ b/sku.0/sys.server/compiled/game/script/ai/ai.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/ai/hunter.java b/sku.0/sys.server/compiled/game/script/ai/hunter.java index 0fc1206a7..bdebd4a65 100755 --- a/sku.0/sys.server/compiled/game/script/ai/hunter.java +++ b/sku.0/sys.server/compiled/game/script/ai/hunter.java @@ -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); } diff --git a/sku.0/sys.server/compiled/game/script/ai/monster.java b/sku.0/sys.server/compiled/game/script/ai/monster.java index 1aa497069..81aa4c5b2 100755 --- a/sku.0/sys.server/compiled/game/script/ai/monster.java +++ b/sku.0/sys.server/compiled/game/script/ai/monster.java @@ -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); } diff --git a/sku.0/sys.server/compiled/game/script/ai/soldier.java b/sku.0/sys.server/compiled/game/script/ai/soldier.java index 84247a46d..3f616fdea 100755 --- a/sku.0/sys.server/compiled/game/script/ai/soldier.java +++ b/sku.0/sys.server/compiled/game/script/ai/soldier.java @@ -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; - } - } } diff --git a/sku.0/sys.server/compiled/game/script/ai/townperson.java b/sku.0/sys.server/compiled/game/script/ai/townperson.java index b7621ba22..3d577dbea 100755 --- a/sku.0/sys.server/compiled/game/script/ai/townperson.java +++ b/sku.0/sys.server/compiled/game/script/ai/townperson.java @@ -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; diff --git a/sku.0/sys.server/compiled/game/script/ai/tusken_raider.java b/sku.0/sys.server/compiled/game/script/ai/tusken_raider.java index 1e317d7b1..3ef9e71a4 100755 --- a/sku.0/sys.server/compiled/game/script/ai/tusken_raider.java +++ b/sku.0/sys.server/compiled/game/script/ai/tusken_raider.java @@ -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); } diff --git a/sku.0/sys.server/compiled/game/script/city/guard_spawner.java b/sku.0/sys.server/compiled/game/script/city/guard_spawner.java index 8bb444f83..375841f0b 100755 --- a/sku.0/sys.server/compiled/game/script/city/guard_spawner.java +++ b/sku.0/sys.server/compiled/game/script/city/guard_spawner.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/city/imperial_crackdown/crackdown_cantina.java b/sku.0/sys.server/compiled/game/script/city/imperial_crackdown/crackdown_cantina.java index 9a7004d28..b298c10eb 100755 --- a/sku.0/sys.server/compiled/game/script/city/imperial_crackdown/crackdown_cantina.java +++ b/sku.0/sys.server/compiled/game/script/city/imperial_crackdown/crackdown_cantina.java @@ -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); } diff --git a/sku.0/sys.server/compiled/game/script/content_tools/interior_buildout.java b/sku.0/sys.server/compiled/game/script/content_tools/interior_buildout.java index e94f2ae59..4ae2b4b2c 100755 --- a/sku.0/sys.server/compiled/game/script/content_tools/interior_buildout.java +++ b/sku.0/sys.server/compiled/game/script/content_tools/interior_buildout.java @@ -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("")) diff --git a/sku.0/sys.server/compiled/game/script/conversation/boba_fett.java b/sku.0/sys.server/compiled/game/script/conversation/boba_fett.java index 8b1ad4495..e87ebbabf 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/boba_fett.java +++ b/sku.0/sys.server/compiled/game/script/conversation/boba_fett.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_bronell_neutral_assassin.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_bronell_neutral_assassin.java index 42c601b1e..665488972 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_bronell_neutral_assassin.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_bronell_neutral_assassin.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_bruce_neutral_destroy.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_bruce_neutral_destroy.java index 53199fdc4..2d9d4f5d5 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_bruce_neutral_destroy.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_bruce_neutral_destroy.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_colonel_imperial1.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_colonel_imperial1.java index 205a4f1f6..9be6fbb3e 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_colonel_imperial1.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_colonel_imperial1.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_crowley_rebel1.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_crowley_rebel1.java index 87632616e..01fb000a6 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_crowley_rebel1.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_crowley_rebel1.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_imperial_pilot.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_imperial_pilot.java index e4d053313..6a26c2f7b 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_imperial_pilot.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_imperial_pilot.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_neutral_pilot.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_neutral_pilot.java index 064a9821f..2748c6996 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_neutral_pilot.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_neutral_pilot.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_pashna_rebel1.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_pashna_rebel1.java index c71d7d799..6336839af 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_pashna_rebel1.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_pashna_rebel1.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_rebel_pilot.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_rebel_pilot.java index a29a86ae1..9e54324d2 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_rebel_pilot.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_rebel_pilot.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_sabol_imperial1.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_sabol_imperial1.java index 8e9c929ce..afa74772f 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_sabol_imperial1.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_sabol_imperial1.java @@ -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; } diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_tallon_rebel1.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_tallon_rebel1.java index 61a3ffe08..6f658f3d4 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_tallon_rebel1.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_tallon_rebel1.java @@ -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; } diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_velso_imperial_destroy.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_velso_imperial_destroy.java index 9972134f8..cec426850 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_velso_imperial_destroy.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_velso_imperial_destroy.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/corvette_yondalla_neutral_rescue.java b/sku.0/sys.server/compiled/game/script/conversation/corvette_yondalla_neutral_rescue.java index abfef20a7..684fa8f65 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/corvette_yondalla_neutral_rescue.java +++ b/sku.0/sys.server/compiled/game/script/conversation/corvette_yondalla_neutral_rescue.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/death_watch_imperial_herald.java b/sku.0/sys.server/compiled/game/script/conversation/death_watch_imperial_herald.java index f688cd393..30e8ae0bb 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/death_watch_imperial_herald.java +++ b/sku.0/sys.server/compiled/game/script/conversation/death_watch_imperial_herald.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/conversation/death_watch_rebel_herald.java b/sku.0/sys.server/compiled/game/script/conversation/death_watch_rebel_herald.java index a2914bc82..d12071635 100755 --- a/sku.0/sys.server/compiled/game/script/conversation/death_watch_rebel_herald.java +++ b/sku.0/sys.server/compiled/game/script/conversation/death_watch_rebel_herald.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/event/holiday_controller.java b/sku.0/sys.server/compiled/game/script/event/holiday_controller.java index 95d834428..6be0470ce 100755 --- a/sku.0/sys.server/compiled/game/script/event/holiday_controller.java +++ b/sku.0/sys.server/compiled/game/script/event/holiday_controller.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/fishing/master_object.java b/sku.0/sys.server/compiled/game/script/fishing/master_object.java index 34cad52f1..70d64abec 100644 --- a/sku.0/sys.server/compiled/game/script/fishing/master_object.java +++ b/sku.0/sys.server/compiled/game/script/fishing/master_object.java @@ -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; + } + } 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 a03907549..861901d71 100755 --- a/sku.0/sys.server/compiled/game/script/gm/cmd.java +++ b/sku.0/sys.server/compiled/game/script/gm/cmd.java @@ -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; diff --git a/sku.0/sys.server/compiled/game/script/item/levelup_orb/levelup_orb.java b/sku.0/sys.server/compiled/game/script/item/levelup_orb/levelup_orb.java index 7e471da2d..5e9d9fd6f 100755 --- a/sku.0/sys.server/compiled/game/script/item/levelup_orb/levelup_orb.java +++ b/sku.0/sys.server/compiled/game/script/item/levelup_orb/levelup_orb.java @@ -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); diff --git a/sku.0/sys.server/compiled/game/script/library/battlefield.java b/sku.0/sys.server/compiled/game/script/library/battlefield.java index 4b1db61bf..3e3919391 100755 --- a/sku.0/sys.server/compiled/game/script/library/battlefield.java +++ b/sku.0/sys.server/compiled/game/script/library/battlefield.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/city.java b/sku.0/sys.server/compiled/game/script/library/city.java index 29fa88296..40daef4b2 100755 --- a/sku.0/sys.server/compiled/game/script/library/city.java +++ b/sku.0/sys.server/compiled/game/script/library/city.java @@ -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; } diff --git a/sku.0/sys.server/compiled/game/script/library/create.java b/sku.0/sys.server/compiled/game/script/library/create.java index 6793702aa..5ec8eb17a 100755 --- a/sku.0/sys.server/compiled/game/script/library/create.java +++ b/sku.0/sys.server/compiled/game/script/library/create.java @@ -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; } diff --git a/sku.0/sys.server/compiled/game/script/library/events.java b/sku.0/sys.server/compiled/game/script/library/events.java index f88be8f33..233ed97b5 100644 --- a/sku.0/sys.server/compiled/game/script/library/events.java +++ b/sku.0/sys.server/compiled/game/script/library/events.java @@ -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; diff --git a/sku.0/sys.server/compiled/game/script/library/gcw.java b/sku.0/sys.server/compiled/game/script/library/gcw.java index 0c5b87a29..b5b3bb8f4 100755 --- a/sku.0/sys.server/compiled/game/script/library/gcw.java +++ b/sku.0/sys.server/compiled/game/script/library/gcw.java @@ -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); diff --git a/sku.0/sys.server/compiled/game/script/library/groundquests.java b/sku.0/sys.server/compiled/game/script/library/groundquests.java index 2cfe42190..6c79aebc2 100755 --- a/sku.0/sys.server/compiled/game/script/library/groundquests.java +++ b/sku.0/sys.server/compiled/game/script/library/groundquests.java @@ -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; diff --git a/sku.0/sys.server/compiled/game/script/library/healing.java b/sku.0/sys.server/compiled/game/script/library/healing.java index 909d807e5..cce5f6d27 100755 --- a/sku.0/sys.server/compiled/game/script/library/healing.java +++ b/sku.0/sys.server/compiled/game/script/library/healing.java @@ -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 = { diff --git a/sku.0/sys.server/compiled/game/script/library/instance.java b/sku.0/sys.server/compiled/game/script/library/instance.java index a302dda38..6ec88b4c3 100755 --- a/sku.0/sys.server/compiled/game/script/library/instance.java +++ b/sku.0/sys.server/compiled/game/script/library/instance.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/loot.java b/sku.0/sys.server/compiled/game/script/library/loot.java index 83dd910f7..bf8287b32 100755 --- a/sku.0/sys.server/compiled/game/script/library/loot.java +++ b/sku.0/sys.server/compiled/game/script/library/loot.java @@ -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"; diff --git a/sku.0/sys.server/compiled/game/script/library/missions.java b/sku.0/sys.server/compiled/game/script/library/missions.java index d7c53e5b0..81ee854f6 100755 --- a/sku.0/sys.server/compiled/game/script/library/missions.java +++ b/sku.0/sys.server/compiled/game/script/library/missions.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/npe.java b/sku.0/sys.server/compiled/game/script/library/npe.java index 11596d0d9..f99f53673 100755 --- a/sku.0/sys.server/compiled/game/script/library/npe.java +++ b/sku.0/sys.server/compiled/game/script/library/npe.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/pgc_quests.java b/sku.0/sys.server/compiled/game/script/library/pgc_quests.java index b75ea814d..98ba4b83f 100755 --- a/sku.0/sys.server/compiled/game/script/library/pgc_quests.java +++ b/sku.0/sys.server/compiled/game/script/library/pgc_quests.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/player_structure.java b/sku.0/sys.server/compiled/game/script/library/player_structure.java index 76abede20..6280a61ba 100755 --- a/sku.0/sys.server/compiled/game/script/library/player_structure.java +++ b/sku.0/sys.server/compiled/game/script/library/player_structure.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/scheduled_drop.java b/sku.0/sys.server/compiled/game/script/library/scheduled_drop.java index 6ac1afb07..e6b313f31 100755 --- a/sku.0/sys.server/compiled/game/script/library/scheduled_drop.java +++ b/sku.0/sys.server/compiled/game/script/library/scheduled_drop.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/space_combat.java b/sku.0/sys.server/compiled/game/script/library/space_combat.java index 2c9101009..a57e442b6 100755 --- a/sku.0/sys.server/compiled/game/script/library/space_combat.java +++ b/sku.0/sys.server/compiled/game/script/library/space_combat.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/space_flags.java b/sku.0/sys.server/compiled/game/script/library/space_flags.java index 2e010d6f1..6ca572c14 100755 --- a/sku.0/sys.server/compiled/game/script/library/space_flags.java +++ b/sku.0/sys.server/compiled/game/script/library/space_flags.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/space_transition.java b/sku.0/sys.server/compiled/game/script/library/space_transition.java index f866ee9dc..f2b7f7d00 100755 --- a/sku.0/sys.server/compiled/game/script/library/space_transition.java +++ b/sku.0/sys.server/compiled/game/script/library/space_transition.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/spawning.java b/sku.0/sys.server/compiled/game/script/library/spawning.java index 0d821f7cf..6164269b0 100755 --- a/sku.0/sys.server/compiled/game/script/library/spawning.java +++ b/sku.0/sys.server/compiled/game/script/library/spawning.java @@ -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; + } + } + } diff --git a/sku.0/sys.server/compiled/game/script/library/travel.java b/sku.0/sys.server/compiled/game/script/library/travel.java index eab129190..51c4ce5af 100755 --- a/sku.0/sys.server/compiled/game/script/library/travel.java +++ b/sku.0/sys.server/compiled/game/script/library/travel.java @@ -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; + } } diff --git a/sku.0/sys.server/compiled/game/script/library/vendor_lib.java b/sku.0/sys.server/compiled/game/script/library/vendor_lib.java index 9ce06624e..16614693e 100755 --- a/sku.0/sys.server/compiled/game/script/library/vendor_lib.java +++ b/sku.0/sys.server/compiled/game/script/library/vendor_lib.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/library/veteran_deprecated.java b/sku.0/sys.server/compiled/game/script/library/veteran_deprecated.java index 7f41a11f7..7586a5344 100755 --- a/sku.0/sys.server/compiled/game/script/library/veteran_deprecated.java +++ b/sku.0/sys.server/compiled/game/script/library/veteran_deprecated.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/npc/celebrity/herald_spawner.java b/sku.0/sys.server/compiled/game/script/npc/celebrity/herald_spawner.java index 4b928578b..8b441e0dc 100755 --- a/sku.0/sys.server/compiled/game/script/npc/celebrity/herald_spawner.java +++ b/sku.0/sys.server/compiled/game/script/npc/celebrity/herald_spawner.java @@ -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"); diff --git a/sku.0/sys.server/compiled/game/script/player/base/base_player.java b/sku.0/sys.server/compiled/game/script/player/base/base_player.java index a2ab5c8b1..3ac5e08b6 100755 --- a/sku.0/sys.server/compiled/game/script/player/base/base_player.java +++ b/sku.0/sys.server/compiled/game/script/player/base/base_player.java @@ -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); diff --git a/sku.0/sys.server/compiled/game/script/player/live_conversions.java b/sku.0/sys.server/compiled/game/script/player/live_conversions.java index 4c0467f90..fd0c3de55 100755 --- a/sku.0/sys.server/compiled/game/script/player/live_conversions.java +++ b/sku.0/sys.server/compiled/game/script/player/live_conversions.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/player/player_instance.java b/sku.0/sys.server/compiled/game/script/player/player_instance.java index a2c75e1ce..d83a2770f 100755 --- a/sku.0/sys.server/compiled/game/script/player/player_instance.java +++ b/sku.0/sys.server/compiled/game/script/player/player_instance.java @@ -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."); diff --git a/sku.0/sys.server/compiled/game/script/player/player_saga_quest.java b/sku.0/sys.server/compiled/game/script/player/player_saga_quest.java index f2655f1e8..f986f84b2 100755 --- a/sku.0/sys.server/compiled/game/script/player/player_saga_quest.java +++ b/sku.0/sys.server/compiled/game/script/player/player_saga_quest.java @@ -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) { diff --git a/sku.0/sys.server/compiled/game/script/quest/hero_of_tatooine/spawner_pirate_leader.java b/sku.0/sys.server/compiled/game/script/quest/hero_of_tatooine/spawner_pirate_leader.java index ed749d845..1d1d6436a 100755 --- a/sku.0/sys.server/compiled/game/script/quest/hero_of_tatooine/spawner_pirate_leader.java +++ b/sku.0/sys.server/compiled/game/script/quest/hero_of_tatooine/spawner_pirate_leader.java @@ -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); } } diff --git a/sku.0/sys.server/compiled/game/script/quest/task/pgc/fan_faire_demo/spawner_fan_faire.java b/sku.0/sys.server/compiled/game/script/quest/task/pgc/fan_faire_demo/spawner_fan_faire.java index 391ec23ae..56d33837c 100755 --- a/sku.0/sys.server/compiled/game/script/quest/task/pgc/fan_faire_demo/spawner_fan_faire.java +++ b/sku.0/sys.server/compiled/game/script/quest/task/pgc/fan_faire_demo/spawner_fan_faire.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/space/crafting/interior_component.java b/sku.0/sys.server/compiled/game/script/space/crafting/interior_component.java index 76e2199d7..4ce4046d7 100755 --- a/sku.0/sys.server/compiled/game/script/space/crafting/interior_component.java +++ b/sku.0/sys.server/compiled/game/script/space/crafting/interior_component.java @@ -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); } diff --git a/sku.0/sys.server/compiled/game/script/space/ship/ship_interior.java b/sku.0/sys.server/compiled/game/script/space/ship/ship_interior.java index 7e8bc8212..bc6681354 100755 --- a/sku.0/sys.server/compiled/game/script/space/ship/ship_interior.java +++ b/sku.0/sys.server/compiled/game/script/space/ship/ship_interior.java @@ -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("")) diff --git a/sku.0/sys.server/compiled/game/script/systems/battlefield/battlefield_region.java b/sku.0/sys.server/compiled/game/script/systems/battlefield/battlefield_region.java index fe9317951..2811d15a6 100755 --- a/sku.0/sys.server/compiled/game/script/systems/battlefield/battlefield_region.java +++ b/sku.0/sys.server/compiled/game/script/systems/battlefield/battlefield_region.java @@ -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; } diff --git a/sku.0/sys.server/compiled/game/script/systems/gcw/player_pvp.java b/sku.0/sys.server/compiled/game/script/systems/gcw/player_pvp.java index 5e7550103..42cbdfa52 100755 --- a/sku.0/sys.server/compiled/game/script/systems/gcw/player_pvp.java +++ b/sku.0/sys.server/compiled/game/script/systems/gcw/player_pvp.java @@ -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, ""); diff --git a/sku.0/sys.server/compiled/game/script/systems/gcw/pvp_battlefield.java b/sku.0/sys.server/compiled/game/script/systems/gcw/pvp_battlefield.java index a9004d4a9..6fd4b4e1a 100755 --- a/sku.0/sys.server/compiled/game/script/systems/gcw/pvp_battlefield.java +++ b/sku.0/sys.server/compiled/game/script/systems/gcw/pvp_battlefield.java @@ -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 { } diff --git a/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_controller.java b/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_controller.java index b5dc497da..96e98e4f1 100755 --- a/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_controller.java +++ b/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_controller.java @@ -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. diff --git a/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java b/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java index 6bbf97b43..9e7caee8a 100755 --- a/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java +++ b/sku.0/sys.server/compiled/game/script/systems/gcw/space/battle_spawner.java @@ -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", diff --git a/sku.0/sys.server/compiled/game/script/systems/gcw/static_base/base_spawner.java b/sku.0/sys.server/compiled/game/script/systems/gcw/static_base/base_spawner.java index da0e33ead..95887aed4 100755 --- a/sku.0/sys.server/compiled/game/script/systems/gcw/static_base/base_spawner.java +++ b/sku.0/sys.server/compiled/game/script/systems/gcw/static_base/base_spawner.java @@ -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); } } diff --git a/sku.0/sys.server/compiled/game/script/systems/spawning/spawn_base.java b/sku.0/sys.server/compiled/game/script/systems/spawning/spawn_base.java index 8d0ecd696..973e7966a 100755 --- a/sku.0/sys.server/compiled/game/script/systems/spawning/spawn_base.java +++ b/sku.0/sys.server/compiled/game/script/systems/spawning/spawn_base.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/systems/spawning/spawn_master.java b/sku.0/sys.server/compiled/game/script/systems/spawning/spawn_master.java index 5701ce05d..d644d4006 100755 --- a/sku.0/sys.server/compiled/game/script/systems/spawning/spawn_master.java +++ b/sku.0/sys.server/compiled/game/script/systems/spawning/spawn_master.java @@ -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); diff --git a/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_area.java b/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_area.java index aa2875d8d..d88dd2ba1 100755 --- a/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_area.java +++ b/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_area.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_patrol.java b/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_patrol.java index 2217ef017..d620d42f6 100755 --- a/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_patrol.java +++ b/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_patrol.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_random.java b/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_random.java index 84578f4bb..bf3801c93 100755 --- a/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_random.java +++ b/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_random.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_random_proxy.java b/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_random_proxy.java index 48f9e423b..956f89540 100755 --- a/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_random_proxy.java +++ b/sku.0/sys.server/compiled/game/script/systems/spawning/spawner_random_proxy.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/systems/turret/generic_turret_ai.java b/sku.0/sys.server/compiled/game/script/systems/turret/generic_turret_ai.java index 1022dc123..71112bdc6 100755 --- a/sku.0/sys.server/compiled/game/script/systems/turret/generic_turret_ai.java +++ b/sku.0/sys.server/compiled/game/script/systems/turret/generic_turret_ai.java @@ -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; diff --git a/sku.0/sys.server/compiled/game/script/systems/turret/turret_ai.java b/sku.0/sys.server/compiled/game/script/systems/turret/turret_ai.java index c31a51660..5f3835f37 100755 --- a/sku.0/sys.server/compiled/game/script/systems/turret/turret_ai.java +++ b/sku.0/sys.server/compiled/game/script/systems/turret/turret_ai.java @@ -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; diff --git a/sku.0/sys.server/compiled/game/script/terminal/gcw_supply_terminal.java b/sku.0/sys.server/compiled/game/script/terminal/gcw_supply_terminal.java index ce4b51066..820daea0c 100755 --- a/sku.0/sys.server/compiled/game/script/terminal/gcw_supply_terminal.java +++ b/sku.0/sys.server/compiled/game/script/terminal/gcw_supply_terminal.java @@ -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) { diff --git a/sku.0/sys.server/compiled/game/script/terminal/terminal_travel.java b/sku.0/sys.server/compiled/game/script/terminal/terminal_travel.java index bcde337f7..d9a28c7c6 100755 --- a/sku.0/sys.server/compiled/game/script/terminal/terminal_travel.java +++ b/sku.0/sys.server/compiled/game/script/terminal/terminal_travel.java @@ -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; } diff --git a/sku.0/sys.server/compiled/game/script/terminal/terminal_travel_instant.java b/sku.0/sys.server/compiled/game/script/terminal/terminal_travel_instant.java index 228acef43..a3a232434 100755 --- a/sku.0/sys.server/compiled/game/script/terminal/terminal_travel_instant.java +++ b/sku.0/sys.server/compiled/game/script/terminal/terminal_travel_instant.java @@ -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; } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/corellia/content/kazic_pendre_area_spawner.java b/sku.0/sys.server/compiled/game/script/theme_park/corellia/content/kazic_pendre_area_spawner.java index aab51c7c4..aca5065ba 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/corellia/content/kazic_pendre_area_spawner.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/corellia/content/kazic_pendre_area_spawner.java @@ -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); } } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/corellia/content/u13_ponda_gungan_statue_spawner.java b/sku.0/sys.server/compiled/game/script/theme_park/corellia/content/u13_ponda_gungan_statue_spawner.java index 63ef03382..0b0f8170c 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/corellia/content/u13_ponda_gungan_statue_spawner.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/corellia/content/u13_ponda_gungan_statue_spawner.java @@ -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); } } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_armorsmith_droid.java b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_armorsmith_droid.java index 49993a32e..39a3597e9 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_armorsmith_droid.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_armorsmith_droid.java @@ -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")) diff --git a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_droidengineer_droid.java b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_droidengineer_droid.java index a145a41d0..52f176eaf 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_droidengineer_droid.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_droidengineer_droid.java @@ -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")) diff --git a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_jetpack_droid.java b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_jetpack_droid.java index dfe7ba007..335e3764d 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_jetpack_droid.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_jetpack_droid.java @@ -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")) diff --git a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_tailor_droid.java b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_tailor_droid.java index cf989f913..ba4f70d73 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_tailor_droid.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/craft_tailor_droid.java @@ -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")) diff --git a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/leaving.java b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/leaving.java index 0637816a3..33821a388 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/leaving.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/leaving.java @@ -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; diff --git a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/loot_chest.java b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/loot_chest.java index f06431362..e75ddcae1 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/loot_chest.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/death_watch_bunker/loot_chest.java @@ -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(); diff --git a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/ep3_clone_relics_generic_spawner.java b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/ep3_clone_relics_generic_spawner.java index 142f309ad..de1b7d400 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/ep3_clone_relics_generic_spawner.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/ep3_clone_relics_generic_spawner.java @@ -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; } } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/generic_spawner.java b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/generic_spawner.java index e82894293..1fe620a44 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/generic_spawner.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/generic_spawner.java @@ -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 { diff --git a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/geonosian_madbio_bunker/leaving.java b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/geonosian_madbio_bunker/leaving.java index da1dae586..d0fd82145 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/dungeon/geonosian_madbio_bunker/leaving.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/dungeon/geonosian_madbio_bunker/leaving.java @@ -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); diff --git a/sku.0/sys.server/compiled/game/script/theme_park/kashyyyk/bocctyyy_bet_spawner.java b/sku.0/sys.server/compiled/game/script/theme_park/kashyyyk/bocctyyy_bet_spawner.java index d565834f5..5b671d8c0 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/kashyyyk/bocctyyy_bet_spawner.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/kashyyyk/bocctyyy_bet_spawner.java @@ -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); } } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/kashyyyk/hracca_spawner.java b/sku.0/sys.server/compiled/game/script/theme_park/kashyyyk/hracca_spawner.java index 04e75fe48..0c2fedaa1 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/kashyyyk/hracca_spawner.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/kashyyyk/hracca_spawner.java @@ -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); } } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_han_solo_banners.java b/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_han_solo_banners.java index ded51f91e..728136bd6 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_han_solo_banners.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_han_solo_banners.java @@ -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); } } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_leia_crime_scene.java b/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_leia_crime_scene.java index 14d09360d..ea14653df 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_leia_crime_scene.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_leia_crime_scene.java @@ -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); } } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_luke_plants.java b/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_luke_plants.java index 1fc92dfc7..3b6c720d3 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_luke_plants.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/rebel/rtp_luke_plants.java @@ -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); } } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/warren/cell_guard.java b/sku.0/sys.server/compiled/game/script/theme_park/warren/cell_guard.java index d0f08243e..077efe6b6 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/warren/cell_guard.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/warren/cell_guard.java @@ -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); diff --git a/sku.0/sys.server/compiled/game/script/theme_park/warren/doctor_knag.java b/sku.0/sys.server/compiled/game/script/theme_park/warren/doctor_knag.java index 2e19e736f..f108967e7 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/warren/doctor_knag.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/warren/doctor_knag.java @@ -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); } diff --git a/sku.0/sys.server/compiled/game/script/theme_park/warren/trooper.java b/sku.0/sys.server/compiled/game/script/theme_park/warren/trooper.java index 46b891047..499c432e0 100755 --- a/sku.0/sys.server/compiled/game/script/theme_park/warren/trooper.java +++ b/sku.0/sys.server/compiled/game/script/theme_park/warren/trooper.java @@ -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;