From 9f87cc4f19df93af9d116fdf0cf7683e3d30f12a Mon Sep 17 00:00:00 2001 From: Cekis Date: Mon, 26 Dec 2016 22:08:07 +0000 Subject: [PATCH] Added god mode checks to all QA and testing scripts. --- .../compiled/game/script/gm/cmd.java | 32 +- .../compiled/game/script/test/ai_test.java | 3 + .../compiled/game/script/test/buy_box.java | 6 + .../script/test/cannot_die_healing_test.java | 6 + .../game/script/test/char_transfer.java | 3 + .../game/script/test/create_weapon.java | 7 + .../game/script/test/dmellencamp_test.java | 7 + .../game/script/test/dwhite_test.java | 3 + .../game/script/test/esebesta_test.java | 3 + .../game/script/test/juriarte_test.java | 3 + .../game/script/test/jwatson_test.java | 7 + .../game/script/test/mbogue_test.java | 7 + .../game/script/test/mboudreaux_test.java | 3 + .../game/script/test/mfarone_test.java | 5 +- .../game/script/test/mhalash_test.java | 7 + .../game/script/test/millbarge_test.java | 7 + .../compiled/game/script/test/mitigation.java | 7 + .../game/script/test/mjensen_test.java | 7 + .../game/script/test/msivertson_test.java | 7 + .../game/script/test/qa_character.java | 7 + .../compiled/game/script/test/qaspace.java | 7 +- .../compiled/game/script/test/qaxp.java | 7 + .../compiled/game/script/test/rhanz_test.java | 7 + .../game/script/test/swyckoff_test.java | 7 +- .../game/script/test/teidson_test.java | 7 + .../compiled/game/script/test/test_sui.java | 9 +- .../compiled/game/script/test/tford_test.java | 7 +- .../game/script/test/thicks_test.java | 7 + .../game/script/test/ttyson_test.java | 3 + .../compiled/game/script/working/.gitignore | 1 - .../script/working/ahunter/my_script.java | 797 ----- .../game/script/working/animtest.java | 221 -- .../game/script/working/asommers/debug.java | 454 --- .../script/working/asommers/transport.java | 44 - .../game/script/working/balancetest.java | 291 -- .../script/working/breinhart/missiontest.java | 44 - .../script/working/breinhart/speaktest.java | 82 - .../game/script/working/cannot_die.java | 30 - .../game/script/working/cincotest.java | 35 - .../game/script/working/cmayer/bottom.java | 43 - .../script/working/cmayer/buildingtest.java | 70 - .../script/working/cmayer/containertest.java | 60 - .../game/script/working/cmayer/inittest.java | 21 - .../game/script/working/cmayer/inttest.java | 92 - .../script/working/cmayer/jedi_reset.java | 194 -- .../game/script/working/cmayer/lairtest.java | 83 - .../game/script/working/cmayer/lostest.java | 42 - .../game/script/working/cmayer/memtest.java | 50 - .../game/script/working/cmayer/top.java | 24 - .../game/script/working/cmayer/trigtest.java | 74 - .../script/working/cmayer/troopertest.java | 104 - .../script/working/color_index_testing.java | 102 - .../script/working/cthurow/moneytest.java | 180 -- .../game/script/working/cthurow/test.java | 74 - .../game/script/working/cthurow/uber.java | 60 - .../script/working/cthurow/veterantest.java | 141 - .../compiled/game/script/working/dantest.java | 2817 ----------------- .../game/script/working/difficultytest.java | 51 - .../game/script/working/dosgood/test.java | 40 - .../script/working/dynamicregiontest.java | 39 - .../game/script/working/jbenjtest.java | 818 ----- .../working/jcarpenter/spawn_recorder.java | 95 - .../game/script/working/jcarpenter/util.java | 1222 ------- .../script/working/jfreeman/broadtest.java | 51 - .../script/working/jfreeman/combattest.java | 73 - .../script/working/jfreeman/creaturetest.java | 100 - .../script/working/jfreeman/dressnpc.java | 43 - .../game/script/working/jfreeman/elev.java | 53 - .../script/working/jfreeman/followtest.java | 50 - .../game/script/working/jfreeman/invtest.java | 65 - .../script/working/jfreeman/isapvpgod.java | 53 - .../script/working/jfreeman/loitertest.java | 42 - .../script/working/jfreeman/makemites.java | 123 - .../game/script/working/jfreeman/makepet.java | 43 - .../script/working/jfreeman/movetest.java | 25 - .../game/script/working/jfreeman/msgtest.java | 38 - .../script/working/jfreeman/msgtestbase.java | 22 - .../game/script/working/jfreeman/runfast.java | 41 - .../working/jfreeman/scriptvartest.java | 59 - .../script/working/jfreeman/skilltest.java | 37 - .../jfreeman/tutorial_request_test.java | 37 - .../game/script/working/jfreeman/wartest.java | 111 - .../game/script/working/jhaskell_test.java | 2460 -------------- .../game/script/working/jmichener_test.java | 146 - .../script/working/justin/test_scriptvar.java | 55 - .../game/script/working/justin/utilities.java | 205 -- .../game/script/working/kai/magic.java | 436 --- .../script/working/kai/particlebrowser.java | 1383 -------- .../script/working/rdelashmit/city_test.java | 119 - .../script/working/rdelashmit/guild_test.java | 105 - .../working/rdelashmit/new_ship_launch.java | 193 -- .../rdelashmit/ship_faction_debug.java | 91 - .../game/script/working/reecetest.java | 971 ------ .../game/script/working/requestloctest.java | 264 -- .../game/script/working/royscript.java | 41 - .../game/script/working/scriptvars.java | 23 - .../game/script/working/steve/myscript.java | 1974 ------------ .../script/working/steve/theater_test.java | 55 - .../script/working/steve/theater_test2.java | 20 - .../script/working/steve/veteran_npc.java | 53 - .../script/working/tfiala/broadcast_test.java | 24 - .../tfiala/container_broadcast_test.java | 25 - .../script/working/tfiala/dismount_test.java | 29 - .../script/working/tfiala/flytext_test.java | 28 - .../game/script/working/tfiala/mood_test.java | 31 - .../script/working/tfiala/mount_test.java | 29 - .../script/working/tfiala/posture_test.java | 40 - .../game/script/working/tfiala/rank_test.java | 20 - .../script/working/tfiala/scale_test.java | 29 - .../game/script/working/tfiala/sit_test.java | 108 - .../working/tfiala/stack_overflow_test.java | 46 - .../script/working/tfiala/vcdping_test.java | 33 - .../game/script/working/tfiala/wound_me.java | 20 - .../game/script/working/toad/access.java | 54 - .../script/working/toad/dungeon_logging.java | 56 - .../toad/emperors_retreat_elevators.java | 47 - .../script/working/toad/get_location.java | 29 - .../working/toad/msg_test_receiver.java | 32 - .../script/working/toad/msg_test_sender.java | 89 - .../game/script/working/toad/sizetest.java | 82 - .../game/script/working/toad/top.java | 41 - .../script/working/toad/wearable_test.java | 94 - .../game/script/working/ubertest.java | 55 - .../working/vthakkar/distance_test.java | 83 - .../script/working/vthakkar/npe_test.java | 290 -- .../wwallace/create_space_weapons.java | 113 - .../working/wwallace/dungeon_teleport.java | 32 - .../working/wwallace/grievous_test.java | 514 --- .../script/working/wwallace/lamdatest.java | 50 - .../working/wwallace/space_mining_test.java | 161 - .../working/wwallace/space_resource_test.java | 77 - .../working/wwallace/spawner_placer.java | 42 - .../working/wwallace/wwallace_test.java | 525 --- .../working/wwallace/yt1300_helper.java | 55 - .../script/working/wwallace/zone_distro.java | 186 -- 135 files changed, 164 insertions(+), 21358 deletions(-) mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/ai_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/buy_box.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/cannot_die_healing_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/char_transfer.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/create_weapon.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/dmellencamp_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/dwhite_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/esebesta_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/juriarte_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/jwatson_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/mbogue_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/mboudreaux_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/mfarone_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/mhalash_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/millbarge_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/mitigation.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/mjensen_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/msivertson_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/qa_character.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/qaspace.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/qaxp.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/rhanz_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/swyckoff_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/teidson_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/test_sui.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/tford_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/thicks_test.java mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/test/ttyson_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/.gitignore delete mode 100644 sku.0/sys.server/compiled/game/script/working/ahunter/my_script.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/animtest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/asommers/debug.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/asommers/transport.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/balancetest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/breinhart/missiontest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/breinhart/speaktest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cannot_die.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cincotest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/bottom.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/buildingtest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/containertest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/inittest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/inttest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/jedi_reset.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/lairtest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/lostest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/memtest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/top.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/trigtest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cmayer/troopertest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/color_index_testing.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cthurow/moneytest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cthurow/test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cthurow/uber.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/cthurow/veterantest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/dantest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/difficultytest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/dosgood/test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/dynamicregiontest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jbenjtest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jcarpenter/spawn_recorder.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jcarpenter/util.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/broadtest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/combattest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/creaturetest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/dressnpc.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/elev.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/followtest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/invtest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/isapvpgod.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/loitertest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/makemites.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/makepet.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/movetest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/msgtest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/msgtestbase.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/runfast.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/scriptvartest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/skilltest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/tutorial_request_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jfreeman/wartest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jhaskell_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/jmichener_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/justin/test_scriptvar.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/justin/utilities.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/kai/magic.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/kai/particlebrowser.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/rdelashmit/city_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/rdelashmit/guild_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/rdelashmit/new_ship_launch.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/rdelashmit/ship_faction_debug.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/reecetest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/requestloctest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/royscript.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/scriptvars.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/steve/myscript.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/steve/theater_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/steve/theater_test2.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/steve/veteran_npc.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/broadcast_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/container_broadcast_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/dismount_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/flytext_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/mood_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/mount_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/posture_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/rank_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/scale_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/sit_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/stack_overflow_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/vcdping_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/tfiala/wound_me.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/toad/access.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/toad/dungeon_logging.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/toad/emperors_retreat_elevators.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/toad/get_location.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/toad/msg_test_receiver.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/toad/msg_test_sender.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/toad/sizetest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/toad/top.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/toad/wearable_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/ubertest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/vthakkar/distance_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/vthakkar/npe_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/wwallace/create_space_weapons.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/wwallace/dungeon_teleport.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/wwallace/grievous_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/wwallace/lamdatest.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/wwallace/space_mining_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/wwallace/space_resource_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/wwallace/spawner_placer.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/wwallace/wwallace_test.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/wwallace/yt1300_helper.java delete mode 100644 sku.0/sys.server/compiled/game/script/working/wwallace/zone_distro.java 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 c57f9e0a3..36b3d950c 100755 --- a/sku.0/sys.server/compiled/game/script/gm/cmd.java +++ b/sku.0/sys.server/compiled/game/script/gm/cmd.java @@ -148,12 +148,7 @@ public class cmd extends script.base_script } public int cmdMoney(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { - if (getGodLevel(self) < 10) - { - sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); - } - else - { + if(!isGod(self)) return SCRIPT_CONTINUE; dictionary d = gm.parseTarget(params, target, "CREDITS"); if (d == null) { @@ -222,7 +217,6 @@ public class cmd extends script.base_script } } showMoneySyntax(self); - } return SCRIPT_CONTINUE; } public void showMoneySyntax(obj_id self) throws InterruptedException @@ -232,24 +226,13 @@ public class cmd extends script.base_script } public int cmdBroadcast(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { - if (getGodLevel(self) < 40) - { - sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); - } - else - { + if(!isGod(self)) return SCRIPT_CONTINUE; queueCommand(self, (-351572629), target, params, COMMAND_PRIORITY_DEFAULT); - } return SCRIPT_CONTINUE; } public int cmdBroadcastPlanet(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { - if (getGodLevel(self) < 40) - { - sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); - } - else - { + if(!isGod(self)) return SCRIPT_CONTINUE; if (params != null && !params.equalsIgnoreCase("")) { sendSystemMessagePlanetTestingOnly(params); @@ -259,17 +242,11 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "[Syntax] /broadcastPlanet "); return SCRIPT_CONTINUE; } - } return SCRIPT_CONTINUE; } public int cmdBroadcastGalaxy(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException { - if (getGodLevel(self) < 40) - { - sendSystemMessage(self, "You do not have the appropriate access level to use this command.", null); - } - else - { + if(!isGod(self)) return SCRIPT_CONTINUE; if (params != null && !params.equalsIgnoreCase("")) { sendSystemMessageGalaxyTestingOnly(params); @@ -279,7 +256,6 @@ public class cmd extends script.base_script sendSystemMessageTestingOnly(self, "[Syntax] /broadcastGalaxy "); return SCRIPT_CONTINUE; } - } return SCRIPT_CONTINUE; } public int cmdBroadcastArea(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/test/ai_test.java b/sku.0/sys.server/compiled/game/script/test/ai_test.java old mode 100644 new mode 100755 index eba8f3fb4..a18590915 --- a/sku.0/sys.server/compiled/game/script/test/ai_test.java +++ b/sku.0/sys.server/compiled/game/script/test/ai_test.java @@ -134,6 +134,9 @@ public class ai_test extends script.base_script } public int OnAttach(obj_id self) throws InterruptedException { + if(!isGod(self) || getGodLevel(self) < 10 || !isPlayer(self)){ + detachScript(self, "test.ai_test"); + } setObjVar(self, "blahblah", 1); start(self); return SCRIPT_CONTINUE; diff --git a/sku.0/sys.server/compiled/game/script/test/buy_box.java b/sku.0/sys.server/compiled/game/script/test/buy_box.java old mode 100644 new mode 100755 index 52eeb5af8..7184049b0 --- a/sku.0/sys.server/compiled/game/script/test/buy_box.java +++ b/sku.0/sys.server/compiled/game/script/test/buy_box.java @@ -13,6 +13,12 @@ public class buy_box extends script.base_script public buy_box() { } + public int OnAttach(obj_id self) throws InterruptedException { + if (!isGod(self) || getGodLevel(self) < 10 || !isPlayer(self)) { + detachScript(self, "test.buy_box"); + } + return SCRIPT_CONTINUE; + } public int OnObjectMenuSelect(obj_id self, obj_id player, int item) throws InterruptedException { LOG("tony_test", "player " + player + " item " + item); diff --git a/sku.0/sys.server/compiled/game/script/test/cannot_die_healing_test.java b/sku.0/sys.server/compiled/game/script/test/cannot_die_healing_test.java old mode 100644 new mode 100755 index f70a5fd2f..072ced86d --- a/sku.0/sys.server/compiled/game/script/test/cannot_die_healing_test.java +++ b/sku.0/sys.server/compiled/game/script/test/cannot_die_healing_test.java @@ -13,6 +13,12 @@ public class cannot_die_healing_test extends script.base_script public cannot_die_healing_test() { } + public int OnAttach(obj_id self) throws InterruptedException { + if (!isGod(self) || getGodLevel(self) < 10 || !isPlayer(self)) { + detachScript(self, "test.buy_box"); + } + return SCRIPT_CONTINUE; + } public int OnCreatureDamaged(obj_id self, obj_id attacker, obj_id weapon, int[] damage) throws InterruptedException { setAttrib(self, HEALTH, 100); diff --git a/sku.0/sys.server/compiled/game/script/test/char_transfer.java b/sku.0/sys.server/compiled/game/script/test/char_transfer.java old mode 100644 new mode 100755 index 38319755e..ca6a50311 --- a/sku.0/sys.server/compiled/game/script/test/char_transfer.java +++ b/sku.0/sys.server/compiled/game/script/test/char_transfer.java @@ -59,6 +59,9 @@ public class char_transfer extends script.base.remote_object_requester } public int OnAttach(obj_id self) throws InterruptedException { + if (!isGod(self) || getGodLevel(self) < 10 || !isPlayer(self)) { + detachScript(self, "test.char_transfer"); + } debugConsoleMsg(self, "char_transfer attached!"); return SCRIPT_CONTINUE; } diff --git a/sku.0/sys.server/compiled/game/script/test/create_weapon.java b/sku.0/sys.server/compiled/game/script/test/create_weapon.java old mode 100644 new mode 100755 index 47079332f..203b1cad8 --- a/sku.0/sys.server/compiled/game/script/test/create_weapon.java +++ b/sku.0/sys.server/compiled/game/script/test/create_weapon.java @@ -17,6 +17,13 @@ public class create_weapon extends script.base_script public create_weapon() { } + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 10 || !isPlayer(self)) { + detachScript(self, "test.create_weapon"); + } + return SCRIPT_CONTINUE; + } public void makeResource(obj_id self, String rclass) throws InterruptedException { obj_id[] rtypes = getResourceTypes(rclass); diff --git a/sku.0/sys.server/compiled/game/script/test/dmellencamp_test.java b/sku.0/sys.server/compiled/game/script/test/dmellencamp_test.java old mode 100644 new mode 100755 index 067608cb0..8f15a1cb4 --- a/sku.0/sys.server/compiled/game/script/test/dmellencamp_test.java +++ b/sku.0/sys.server/compiled/game/script/test/dmellencamp_test.java @@ -27,6 +27,13 @@ public class dmellencamp_test extends script.base_script public dmellencamp_test() { } + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.dmellencamp_test"); + } + return SCRIPT_CONTINUE; + } public void colorize(obj_id player, obj_id target, String customizationVar) throws InterruptedException { int pId = createSUIPage("Script.ColorPicker", player, player, "ColorizeCallback"); diff --git a/sku.0/sys.server/compiled/game/script/test/dwhite_test.java b/sku.0/sys.server/compiled/game/script/test/dwhite_test.java old mode 100644 new mode 100755 index bb7c962fe..2847b4d3f --- a/sku.0/sys.server/compiled/game/script/test/dwhite_test.java +++ b/sku.0/sys.server/compiled/game/script/test/dwhite_test.java @@ -28,6 +28,9 @@ public class dwhite_test extends script.base_script } public int OnAttach(obj_id self) throws InterruptedException { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.dwhite_test"); + } return SCRIPT_CONTINUE; } public int OnSpeaking(obj_id self, String text) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/test/esebesta_test.java b/sku.0/sys.server/compiled/game/script/test/esebesta_test.java old mode 100644 new mode 100755 index 4a8d11710..b2d08d81d --- a/sku.0/sys.server/compiled/game/script/test/esebesta_test.java +++ b/sku.0/sys.server/compiled/game/script/test/esebesta_test.java @@ -444,6 +444,9 @@ public class esebesta_test extends script.base_script } public int OnAttach(obj_id self) throws InterruptedException { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.esebesta_test"); + } return SCRIPT_CONTINUE; } public int OnFormCreateObject(obj_id self, String templateName, float xLoc, float yLoc, float zLoc, obj_id cell, String[] keys, String[] values) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/test/juriarte_test.java b/sku.0/sys.server/compiled/game/script/test/juriarte_test.java old mode 100644 new mode 100755 index 34a6d86f2..7c90aae2a --- a/sku.0/sys.server/compiled/game/script/test/juriarte_test.java +++ b/sku.0/sys.server/compiled/game/script/test/juriarte_test.java @@ -99,6 +99,9 @@ public class juriarte_test extends script.base.remote_object_requester } public int OnAttach(obj_id self) throws InterruptedException { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.juriarte_test"); + } return SCRIPT_CONTINUE; } public int startPerform(obj_id self, dictionary params) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/test/jwatson_test.java b/sku.0/sys.server/compiled/game/script/test/jwatson_test.java old mode 100644 new mode 100755 index f8dc2b824..8dd552aae --- a/sku.0/sys.server/compiled/game/script/test/jwatson_test.java +++ b/sku.0/sys.server/compiled/game/script/test/jwatson_test.java @@ -28,6 +28,13 @@ public class jwatson_test extends script.base_script public jwatson_test() { } + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.jwatson_test"); + } + return SCRIPT_CONTINUE; + } public void colorize(obj_id player, obj_id target, String customizationVar) throws InterruptedException { int pId = createSUIPage("Script.ColorPicker", player, player, "ColorizeCallback"); diff --git a/sku.0/sys.server/compiled/game/script/test/mbogue_test.java b/sku.0/sys.server/compiled/game/script/test/mbogue_test.java old mode 100644 new mode 100755 index 3abd022a2..7dddddc89 --- a/sku.0/sys.server/compiled/game/script/test/mbogue_test.java +++ b/sku.0/sys.server/compiled/game/script/test/mbogue_test.java @@ -34,6 +34,13 @@ public class mbogue_test extends script.base_script public static final String s_usageSpaceUnitSetTargetOrders = "Usage: spaceUnitSetTargetOrders "; public static final String s_usageSpaceUnitSetSquad = "Usage: spaceUnitSetSquad "; public static final String s_usageSpaceSquadAddPatrolPath = "Usage: spaceSquadAddPatrolPath "; + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.mbogue_test"); + } + return SCRIPT_CONTINUE; + } public int OnSpeaking(obj_id self, String text) throws InterruptedException { if (isGod(self)) diff --git a/sku.0/sys.server/compiled/game/script/test/mboudreaux_test.java b/sku.0/sys.server/compiled/game/script/test/mboudreaux_test.java old mode 100644 new mode 100755 index 0b929c049..3448a16be --- a/sku.0/sys.server/compiled/game/script/test/mboudreaux_test.java +++ b/sku.0/sys.server/compiled/game/script/test/mboudreaux_test.java @@ -911,6 +911,9 @@ public class mboudreaux_test extends script.base.remote_object_requester } public int OnAttach(obj_id self) throws InterruptedException { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.mboudreaux_test"); + } return SCRIPT_CONTINUE; } public int startPerform(obj_id self, dictionary params) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/test/mfarone_test.java b/sku.0/sys.server/compiled/game/script/test/mfarone_test.java old mode 100644 new mode 100755 index 419190545..130381498 --- a/sku.0/sys.server/compiled/game/script/test/mfarone_test.java +++ b/sku.0/sys.server/compiled/game/script/test/mfarone_test.java @@ -39,7 +39,10 @@ public class mfarone_test extends script.base_script } public int OnAttach(obj_id self) throws InterruptedException { - if (hasObjVar(self, "idiot_testing")) + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.mfarone_test"); + } + else if (hasObjVar(self, "idiot_testing")) { sendSystemMessage(self, "mfarone_test script attached.", ""); } diff --git a/sku.0/sys.server/compiled/game/script/test/mhalash_test.java b/sku.0/sys.server/compiled/game/script/test/mhalash_test.java old mode 100644 new mode 100755 index 8960b0b74..257716e82 --- a/sku.0/sys.server/compiled/game/script/test/mhalash_test.java +++ b/sku.0/sys.server/compiled/game/script/test/mhalash_test.java @@ -16,6 +16,13 @@ public class mhalash_test extends script.base_script public mhalash_test() { } + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.mhalash_test"); + } + return SCRIPT_CONTINUE; + } public int OnSpeaking(obj_id self, String text) throws InterruptedException { if (isGod(self)) diff --git a/sku.0/sys.server/compiled/game/script/test/millbarge_test.java b/sku.0/sys.server/compiled/game/script/test/millbarge_test.java old mode 100644 new mode 100755 index 09b37a875..818176cc1 --- a/sku.0/sys.server/compiled/game/script/test/millbarge_test.java +++ b/sku.0/sys.server/compiled/game/script/test/millbarge_test.java @@ -19,6 +19,13 @@ public class millbarge_test extends script.base_script public millbarge_test() { } + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.millbarge_test"); + } + return SCRIPT_CONTINUE; + } public int OnSpeaking(obj_id self, String text) throws InterruptedException { if (isGod(self)) diff --git a/sku.0/sys.server/compiled/game/script/test/mitigation.java b/sku.0/sys.server/compiled/game/script/test/mitigation.java old mode 100644 new mode 100755 index 1cb39987a..db8db2ae9 --- a/sku.0/sys.server/compiled/game/script/test/mitigation.java +++ b/sku.0/sys.server/compiled/game/script/test/mitigation.java @@ -51,6 +51,13 @@ public class mitigation extends script.base_script "DAMAGE_ENVIRONMENTAL_ACID", "DAMAGE_ENVIRONMENTAL_ELECTRICAL" }; + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 10) { + detachScript(self, "test.mitigation"); + } + return SCRIPT_CONTINUE; + } public int OnSpeaking(obj_id self, String text) throws InterruptedException { if (isGod(self)) diff --git a/sku.0/sys.server/compiled/game/script/test/mjensen_test.java b/sku.0/sys.server/compiled/game/script/test/mjensen_test.java old mode 100644 new mode 100755 index e27c6f3fa..a664b8c3b --- a/sku.0/sys.server/compiled/game/script/test/mjensen_test.java +++ b/sku.0/sys.server/compiled/game/script/test/mjensen_test.java @@ -39,6 +39,13 @@ public class mjensen_test extends script.base_script public mjensen_test() { } + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.mjensen_test"); + } + return SCRIPT_CONTINUE; + } public int OnSpeaking(obj_id self, String text) throws InterruptedException { java.util.StringTokenizer tok = new java.util.StringTokenizer(text); diff --git a/sku.0/sys.server/compiled/game/script/test/msivertson_test.java b/sku.0/sys.server/compiled/game/script/test/msivertson_test.java old mode 100644 new mode 100755 index 05585e230..70614bbae --- a/sku.0/sys.server/compiled/game/script/test/msivertson_test.java +++ b/sku.0/sys.server/compiled/game/script/test/msivertson_test.java @@ -19,6 +19,13 @@ public class msivertson_test extends script.base_script public msivertson_test() { } + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.msivertson_test"); + } + return SCRIPT_CONTINUE; + } public void maxStats(obj_id objPlayer) throws InterruptedException { addAttribModifier(objPlayer, HEALTH, 2000, 0, 0, MOD_POOL); diff --git a/sku.0/sys.server/compiled/game/script/test/qa_character.java b/sku.0/sys.server/compiled/game/script/test/qa_character.java old mode 100644 new mode 100755 index 1b917730a..e021924f2 --- a/sku.0/sys.server/compiled/game/script/test/qa_character.java +++ b/sku.0/sys.server/compiled/game/script/test/qa_character.java @@ -88,6 +88,13 @@ public class qa_character extends script.base_script "camouflage", "combat_block_value" }; + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 10) { + detachScript(self, "test.qa_character"); + } + return SCRIPT_CONTINUE; + } public int OnSpeaking(obj_id self, String text) throws InterruptedException { debugConsoleMsg(self, text); diff --git a/sku.0/sys.server/compiled/game/script/test/qaspace.java b/sku.0/sys.server/compiled/game/script/test/qaspace.java old mode 100644 new mode 100755 index 8d2f9a9fa..5e7df6cf5 --- a/sku.0/sys.server/compiled/game/script/test/qaspace.java +++ b/sku.0/sys.server/compiled/game/script/test/qaspace.java @@ -72,7 +72,12 @@ public class qaspace extends script.base_script } public int OnAttach(obj_id self) throws InterruptedException { - sendSystemMessageTestingOnly(self, "QaSpace script attached."); + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.qaspace"); + } + else { + sendSystemMessageTestingOnly(self, "QaSpace script attached."); + } return SCRIPT_CONTINUE; } public int OnDetach(obj_id self) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/test/qaxp.java b/sku.0/sys.server/compiled/game/script/test/qaxp.java old mode 100644 new mode 100755 index 44dd74ff1..3c10fafa8 --- a/sku.0/sys.server/compiled/game/script/test/qaxp.java +++ b/sku.0/sys.server/compiled/game/script/test/qaxp.java @@ -52,6 +52,13 @@ public class qaxp extends script.base_script "entertainer", "trader" }; + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.qaxp"); + } + return SCRIPT_CONTINUE; + } public int OnSpeaking(obj_id self, String text) throws InterruptedException { if (isGod(self)) diff --git a/sku.0/sys.server/compiled/game/script/test/rhanz_test.java b/sku.0/sys.server/compiled/game/script/test/rhanz_test.java old mode 100644 new mode 100755 index 8406801db..5a75f818d --- a/sku.0/sys.server/compiled/game/script/test/rhanz_test.java +++ b/sku.0/sys.server/compiled/game/script/test/rhanz_test.java @@ -24,6 +24,13 @@ public class rhanz_test extends script.base.remote_object_requester { } public static final String STARTING_EQUIPMENT_FILE = "datatables/equipment/newbie_equipment.iff"; + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.rhanz_test"); + } + return SCRIPT_CONTINUE; + } public int OnSpeaking(obj_id self, String text) throws InterruptedException { if (isGod(self)) diff --git a/sku.0/sys.server/compiled/game/script/test/swyckoff_test.java b/sku.0/sys.server/compiled/game/script/test/swyckoff_test.java old mode 100644 new mode 100755 index 65b9be045..fca932918 --- a/sku.0/sys.server/compiled/game/script/test/swyckoff_test.java +++ b/sku.0/sys.server/compiled/game/script/test/swyckoff_test.java @@ -306,7 +306,12 @@ public class swyckoff_test extends script.base.remote_object_requester } public int OnAttach(obj_id self) throws InterruptedException { - debugConsoleMsg(self, "attached swyckoff_test"); + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.swyckoff_test"); + } + else { + debugConsoleMsg(self, "attached swyckoff_test"); + } return SCRIPT_CONTINUE; } public int startPerform(obj_id self, dictionary params) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/test/teidson_test.java b/sku.0/sys.server/compiled/game/script/test/teidson_test.java old mode 100644 new mode 100755 index a859ff5e5..da59eb8de --- a/sku.0/sys.server/compiled/game/script/test/teidson_test.java +++ b/sku.0/sys.server/compiled/game/script/test/teidson_test.java @@ -35,6 +35,13 @@ public class teidson_test extends script.base_script public teidson_test() { } + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.teidson_test"); + } + return SCRIPT_CONTINUE; + } public int OnSpeaking(obj_id self, String strText) throws InterruptedException { String[] strCommands = split(strText, ' '); diff --git a/sku.0/sys.server/compiled/game/script/test/test_sui.java b/sku.0/sys.server/compiled/game/script/test/test_sui.java old mode 100644 new mode 100755 index d5a702d3c..4197dbba5 --- a/sku.0/sys.server/compiled/game/script/test/test_sui.java +++ b/sku.0/sys.server/compiled/game/script/test/test_sui.java @@ -18,8 +18,13 @@ public class test_sui extends script.base_script } public int OnAttach(obj_id self) throws InterruptedException { - debugSpeakMsg(self, "test_sui: attached!"); - debugServerConsoleMsg(self, "test_sui: attached!"); + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.test_sui"); + } + else{ + debugSpeakMsg(self, "test_sui: attached!"); + debugServerConsoleMsg(self, "test_sui: attached!"); + } return SCRIPT_CONTINUE; } public int OnDetach(obj_id self) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/test/tford_test.java b/sku.0/sys.server/compiled/game/script/test/tford_test.java old mode 100644 new mode 100755 index 423cbef9c..d8fbc8953 --- a/sku.0/sys.server/compiled/game/script/test/tford_test.java +++ b/sku.0/sys.server/compiled/game/script/test/tford_test.java @@ -110,7 +110,12 @@ public class tford_test extends script.base_script } public int OnAttach(obj_id self) throws InterruptedException { - debugSpeakMsg(self, "tford_test.script attached"); + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.tford_test"); + } + else{ + debugSpeakMsg(self, "tford_test.script attached"); + } return SCRIPT_CONTINUE; } public int OnLocomotionChanged(obj_id self, int newLocomotion, int oldLocomotion) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/test/thicks_test.java b/sku.0/sys.server/compiled/game/script/test/thicks_test.java old mode 100644 new mode 100755 index 0cb0f01fc..e0379bf8d --- a/sku.0/sys.server/compiled/game/script/test/thicks_test.java +++ b/sku.0/sys.server/compiled/game/script/test/thicks_test.java @@ -58,6 +58,13 @@ public class thicks_test extends script.base_script public static final int clearAllObjVars = 5; public static final int doClientEffect = 6; public static final int spawnCreature = 7; + public int OnAttach(obj_id self) throws InterruptedException + { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.thicks_test"); + } + return SCRIPT_CONTINUE; + } public int OnMoveMoving(obj_id self) throws InterruptedException { setState(self, STATE_STUNNED, false); diff --git a/sku.0/sys.server/compiled/game/script/test/ttyson_test.java b/sku.0/sys.server/compiled/game/script/test/ttyson_test.java old mode 100644 new mode 100755 index 3a1417219..19460ad5c --- a/sku.0/sys.server/compiled/game/script/test/ttyson_test.java +++ b/sku.0/sys.server/compiled/game/script/test/ttyson_test.java @@ -650,6 +650,9 @@ public class ttyson_test extends script.base.remote_object_requester } public int OnAttach(obj_id self) throws InterruptedException { + if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) { + detachScript(self, "test.ttyson_test"); + } return SCRIPT_CONTINUE; } public int handleFailedStructurePackup(obj_id self, dictionary params) throws InterruptedException diff --git a/sku.0/sys.server/compiled/game/script/working/.gitignore b/sku.0/sys.server/compiled/game/script/working/.gitignore deleted file mode 100644 index 8b1378917..000000000 --- a/sku.0/sys.server/compiled/game/script/working/.gitignore +++ /dev/null @@ -1 +0,0 @@ - diff --git a/sku.0/sys.server/compiled/game/script/working/ahunter/my_script.java b/sku.0/sys.server/compiled/game/script/working/ahunter/my_script.java deleted file mode 100644 index c2adfa78b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/ahunter/my_script.java +++ /dev/null @@ -1,797 +0,0 @@ -package script.working.ahunter; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.colors; -import script.library.hue; -import script.library.prose; -import script.library.pclib; -import script.library.player_structure; -import script.library.skill; -import script.library.utils; -import script.library.fs_quests_sad; -import script.library.chat; -import script.library.respec; - -public class my_script extends script.base_script -{ - public my_script() - { - } - public int[] anArrayFunc() throws InterruptedException - { - return new int[5]; - } - public int OnAttach(obj_id self) throws InterruptedException - { - boolean result; - int intArrayIndex; - obj_id other = null; - if (other == self) - { - } - else - { - other = self; - } - debugServerConsoleMsg(self, "about to crash in C!"); - debugServerConsoleMsg(null, "crashing in C!"); - debugServerConsoleMsg(self, "after crash in C!"); - messageTo(self, "myMessageHandler", null, 0, true); - - debugServerConsoleMsg(null, "in debug mode"); - - debugConsoleMsg(self, "myscript reload attached!"); - debugConsoleMsg(self, "current objvars:"); - listObjvars(self, self); - debugConsoleMsg(self, "adding objvars"); - debugConsoleMsg(self, "integer"); - result = setObjVar(self, "idata", 111); - if (result) - { - debugConsoleMsg(self, "ok"); - } - else - { - debugConsoleMsg(self, "fail"); - } - debugConsoleMsg(self, "float"); - result = setObjVar(self, "fdata", 666.999f); - if (result) - { - debugConsoleMsg(self, "ok"); - } - else - { - debugConsoleMsg(self, "fail"); - } - debugConsoleMsg(self, "string"); - result = setObjVar(self, "sdata", "winona"); - if (result) - { - debugConsoleMsg(self, "ok"); - } - else - { - debugConsoleMsg(self, "fail"); - } - debugConsoleMsg(self, "obj_id"); - result = setObjVar(self, "oid_data", self); - if (result) - { - debugConsoleMsg(self, "ok"); - } - else - { - debugConsoleMsg(self, "fail"); - } - debugConsoleMsg(self, "obj_id array"); - obj_id[] oidaData = new obj_id[3]; - oidaData[0] = self; - oidaData[1] = self; - oidaData[2] = self; - result = setObjVar(self, "oidArray_data", oidaData); - if (result) - { - debugConsoleMsg(self, "ok"); - } - else - { - debugConsoleMsg(self, "fail"); - } - debugConsoleMsg(self, "sublist"); - result = setObjVar(self, "item1", 123); - result = setObjVar(self, "item2", 123.456f); - result = setObjVar(self, "sublist.sub item", "yadayada"); - if (result) - { - debugConsoleMsg(self, "result:"); - listObjvars(self, self); - } - else - { - debugConsoleMsg(self, "setObjVar failed!"); - } - debugConsoleMsg(self, "leaving OnAttach"); - return SCRIPT_CONTINUE; - } - public int OnDetach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "Bye bye!"); - return SCRIPT_CONTINUE; - } - public int OnInitialize(obj_id self) throws InterruptedException - { - debugServerConsoleMsg(self, "I'm initialized!"); - return SCRIPT_CONTINUE; - } - public int OnAddedToWorld(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "I'm in the world!"); - return SCRIPT_CONTINUE; - } - public void whackamoleRandomize(obj_id self, int pid) throws InterruptedException - { - int button = rand(0, 2); - utils.setScriptVar(self, "whackamolebutton", button); - setSUIProperty(pid, "%button0%", "BackgroundTint", "#FF0000"); - setSUIProperty(pid, "%button1%", "BackgroundTint", "#FF0000"); - setSUIProperty(pid, "%button2%", "BackgroundTint", "#FF0000"); - setSUIProperty(pid, "%button" + button + "%", "BackgroundTint", "#00FF00"); - flushSUIPage(pid); - utils.setScriptVar(self, "whackamolebutton", button); - } - public int whackamoleTimerCallback(obj_id self, dictionary params) throws InterruptedException - { - int pid = utils.getIntScriptVar(self, "whackamolepid"); - if (pid > 0) - { - whackamoleRandomize(self, pid); - messageTo(self, "whackamoleTimerCallback", null, 1, false); - } - return SCRIPT_CONTINUE; - } - public int whackamoleCallback(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "whackamoleCallback"); - String widgetName = params.getString("eventWidgetName"); - debugSpeakMsg(self, "eventWidgetName = " + widgetName); - int buttonPressed = -1; - if (widgetName.equalsIgnoreCase("%button0%")) - { - buttonPressed = 0; - } - else if (widgetName.equalsIgnoreCase("%button1%")) - { - buttonPressed = 1; - } - else if (widgetName.equalsIgnoreCase("%button2%")) - { - buttonPressed = 2; - } - int targetButton = utils.getIntScriptVar(self, "whackamolebutton"); - int currentScore = utils.getIntScriptVar(self, "whackamolescore"); - int pid = utils.getIntScriptVar(self, "whackamolepid"); - if (targetButton == buttonPressed) - { - currentScore += 1; - } - else - { - currentScore = 0; - } - setSUIProperty(pid, "score.numberBox", "Text", "" + currentScore); - utils.setScriptVar(self, "whackamolescore", currentScore); - whackamoleRandomize(self, pid); - return SCRIPT_CONTINUE; - } - public int OnTheaterCreated(obj_id self, obj_id[] objects, obj_id player, obj_id creator) throws InterruptedException - { - debugSpeakMsg(player, "my id is " + self); - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - debugServerConsoleMsg(self, "From myscript.script OnSpeaking: " + text); - java.util.StringTokenizer st = new java.util.StringTokenizer(text); - String arg = st.nextToken(); - String arg2 = st.nextToken(); - if (arg.equals("gotoDungeon") && st.countTokens() == 1) - { - obj_id dungeon = utils.stringToObjId(st.nextToken()); - obj_id cell = getCellId(dungeon, "cave_entrance"); - location dest = new location(2.4f, 10.5f, 9.3f, getCurrentSceneName(), cell); - setLocation(self, dest); - } - else if (arg.equals("gotoStation") && st.countTokens() == 1) - { - obj_id station = utils.stringToObjId(st.nextToken()); - obj_id cell = getCellId(station, "hangarbay2"); - location dest = new location(62.7f, 0.9f, -33.5f, getCurrentSceneName(), cell); - setLocation(self, dest); - } - if (text.equals("newdewd")) - { - location mylocation = getLocation(self); - createObject("creature/fodder", mylocation); - } - else if (arg.equals("turnon")) - { - debugSpeakMsg(self, ("turning on")); - setCondition(obj_id.getObjId(Integer.parseInt(arg2)), CONDITION_ON); - } - else if (arg.equals("turnoff")) - { - debugSpeakMsg(self, ("turning off")); - clearCondition(obj_id.getObjId(Integer.parseInt(arg2)), CONDITION_ON); - } - else if (arg.equals("oc")) - { - debugSpeakMsg(self, "opening customization window with " + Integer.parseInt(arg2)); - obj_id oid = obj_id.getObjId(Integer.parseInt(arg2)); - custom_var[] allVars = getAllCustomVars(oid); - if (allVars.length == 1) - { - openCustomizationWindow(self, oid, allVars[0].getVarName(), -1, -1, "", -1, -1, "", -1, -1, "", -1, -1); - } - else if (allVars.length == 2) - { - openCustomizationWindow(self, oid, allVars[0].getVarName(), 0, 10, allVars[1].getVarName(), -1, -1, "", -1, -1, "", -1, -1); - } - else if (allVars.length == 3) - { - openCustomizationWindow(self, oid, allVars[0].getVarName(), -1, -1, allVars[1].getVarName(), -1, -1, allVars[2].getVarName(), -1, -1, "", -1, -1); - } - } - else if (text.equals("sendcombat1")) - { - string_id critSpam = new string_id("combat_effects", "action_too_tired"); - prose_package ppc = new prose_package(); - ppc = prose.setStringId(ppc, critSpam); - showFlyTextPrivateProseWithFlags(self, self, ppc, 1.5f, colors.DARKORANGE, FLY_TEXT_FLAG_IS_BLEED); - } - else if (text.equals("sendcombat2")) - { - string_id critSpam = new string_id("combat_effects", "action_too_tired"); - prose_package ppc = new prose_package(); - ppc = prose.setStringId(ppc, critSpam); - showFlyTextPrivateProseWithFlags(self, self, ppc, 1.5f, colors.DARKORANGE, FLY_TEXT_FLAG_IS_HEAL); - } - else if (text.equals("rae")) - { - resetExpertises(self); - } - else if (text.equals("rcs")) - { - recomputeCommandSeries(self); - } - else if (text.equals("scs")) - { - debugSpeakMsg(self, "sending fake combat spam"); - hit_result hit = new hit_result(); - hit.damage = 1000; - hit.hitLocation = 0; - string_id sid = new string_id("combat_effects", "action_too_tired"); - sendCombatSpam(self, self, getCurrentWeapon(self), hit, sid, true, true, true, COMBAT_RESULT_HIT); - } - else if (text.equals("sit")) - { - } - else if (text.equals("git")) - { - debugSpeakMsg(self, "getting intended target: " + getIntendedTarget(self)); - } - else if (text.equals("cit")) - { - } - else if (text.equals("gt")) - { - debugSpeakMsg(self, "getting template: '" + getSkillTemplate(self) + "'"); - } - else if (text.equals("ct")) - { - debugSpeakMsg(self, "setting template to nothing"); - setSkillTemplate(self, ""); - } - else if (text.equals("sti")) - { - debugSpeakMsg(self, "setting template to something invalid"); - setSkillTemplate(self, "foo"); - } - else if (text.equals("st")) - { - debugSpeakMsg(self, "setting template to teras kasi smuggler"); - setSkillTemplate(self, "smuggler_2a"); - } - else if (text.equals("st2")) - { - debugSpeakMsg(self, "setting template to pistoleer smuggler"); - setSkillTemplate(self, "smuggler_2b"); - } - else if (text.equals("st3")) - { - debugSpeakMsg(self, "setting template to commando b"); - setSkillTemplate(self, "commando_2b"); - } - else if (text.equals("st4")) - { - debugSpeakMsg(self, "setting template to commando a"); - setSkillTemplate(self, "commando_2a"); - } - else if (text.equals("sws")) - { - debugSpeakMsg(self, "setting working skill to combat_marksman_pistol_01"); - setWorkingSkill(self, "combat_marksman_pistol_01"); - } - else if (text.equals("advance")) - { - debugSpeakMsg(self, "advancing along template"); - grantSkill(self, "combat_marksman_pistol_01"); - grantSkill(self, "combat_brawler_unarmed_01"); - grantSkill(self, "combat_marksman_pistol_02"); - grantSkill(self, "combat_brawler_unarmed_02"); - grantSkill(self, "combat_marksman_pistol_03"); - grantSkill(self, "combat_brawler_unarmed_03"); - grantSkill(self, "combat_marksman_pistol_04"); - grantSkill(self, "combat_brawler_unarmed_04"); - grantSkill(self, "combat_smuggler_novice"); - grantSkill(self, "science_medic_novice"); - grantSkill(self, "outdoors_scout_novice"); - setWorkingSkill(self, "combat_brawler_2handmelee_01"); - } - else if (text.equals("demo")) - { - debugSpeakMsg(self, "setting up template demo"); - setSkillTemplate(self, "smuggler_2a"); - grantSkill(self, "combat_marksman_novice"); - grantSkill(self, "combat_brawler_novice"); - setWorkingSkill(self, "combat_marksman_pistol_01"); - } - else if (text.equals("gt")) - { - debugSpeakMsg(self, "getting template: " + getSkillTemplate(self)); - } - else if (text.equals("gws")) - { - debugSpeakMsg(self, "getting working skill: " + getWorkingSkill(self)); - } - else if (text.equals("ht")) - { - debugSpeakMsg(self, "highlighting toolbar widget"); - newbieTutorialHighlightUIElement(self, "/GroundHUD.Toolbar.volume.1", 5.0f); - } - else if (text.equals("hm")) - { - debugSpeakMsg(self, "highlighting toolbar widget"); - newbieTutorialHighlightUIElement(self, "/GroundHUD.ButtonBar.buttonsComposite.buttonInventoryComposite.inventory", 5.0f); - } - else if (text.equals("hm2")) - { - debugSpeakMsg(self, "highlighting toolbar widget"); - newbieTutorialHighlightUIElement(self, "/GroundHUD.ButtonBar.bigMenuPage.bigMenu", 5.0f); - } - else if (text.equals("hy")) - { - debugSpeakMsg(self, "highlighting widget"); - newbieTutorialHighlightUIElement(self, "/GroundHUD.radar", true); - } - else if (text.equals("hn")) - { - debugSpeakMsg(self, "turning off highlighting widget"); - newbieTutorialHighlightUIElement(self, "/GroundHUD.radar", false); - } - else if (text.equals("hw")) - { - debugSpeakMsg(self, "highlighting widget"); - newbieTutorialHighlightUIElement(self, "/GroundHUD.radar", 6.0f); - } - else if (text.equals("sb")) - { - debugSpeakMsg(self, "setting bar"); - newbieTutorialSetToolbarElement(self, 8, "/meleeHit"); - } - else if (text.equals("sp")) - { - debugSpeakMsg(self, "setting pants in bar"); - newbieTutorialSetToolbarElement(self, 8, obj_id.getObjId(new Long(10000720))); - } - else if (text.equals("cb")) - { - debugSpeakMsg(self, "setting bar"); - newbieTutorialSetToolbarElement(self, 8, ""); - } - else if (text.equals("no")) - { - debugSpeakMsg(self, "sending notification"); - addNotification(self, "foo", false, 0, 0.0f, 0, "sound/tut_15_opencontainer.snd"); - } - else if (text.equals("no2")) - { - debugSpeakMsg(self, "sending notification"); - int handle = addNotification(self, "foo2", false, NOTE_ICON_STYLE_EXCLAMATION, 0.0f, 0, ""); - utils.setScriptVar(self, "notifyhandle", handle); - debugSpeakMsg(self, "handle " + handle); - } - else if (text.equals("no3")) - { - debugSpeakMsg(self, "sending notification"); - addNotification(self, "foo3", true, NOTE_ICON_STYLE_QUESTION, 0.0f, 0, ""); - } - else if (text.equals("no4")) - { - debugSpeakMsg(self, "sending notification"); - addNotification(self, "foo4", true, 0, 6.0f, 0, ""); - } - else if (text.equals("cl2")) - { - int handle = utils.getIntScriptVar(self, "notifyhandle"); - debugSpeakMsg(self, "sending cancel " + handle); - cancelNotification(self, handle); - } - else if (text.equals("tt")) - { - String duration = getConfigSetting("GameServer", "respecDurationAllowedInSeconds"); - debugSpeakMsg(self, "current config time = " + duration); - int now = getGameTime(); - debugSpeakMsg(self, "now = " + now); - int timestamp = getIntObjVar(self, respec.OBJVAR_TIMESTAMP); - debugSpeakMsg(self, "timestamp = " + timestamp); - String duration2 = getConfigSetting("GameServer", "minRespecIntervalInSeconds"); - debugSpeakMsg(self, "duration2 = " + duration2); - int lastTimestamp = getIntObjVar(self, respec.OBJVAR_LAST_TIMESTAMP); - debugSpeakMsg(self, "lastTimestamp = " + lastTimestamp); - } - else if (text.equals("ab")) - { - String s = new String("testMedBuff"); - _addBuff(self, getStringCrc(s)); - } - else if (text.equals("nt1")) - { - debugSpeakMsg(self, "creating theater"); - location theaterLoc = getLocation(self); - theaterLoc.z -= 10.0; - boolean created = assignTheaterToPlayer(self, "datatables/theater/fs_quest_sad/theater1.iff", theaterLoc, "ahunter.my_script"); - debugSpeakMsg(self, "result = " + created); - } - else if (text.equals("nt2")) - { - debugSpeakMsg(self, "creating theater"); - location theaterLoc = getLocation(self); - theaterLoc.z -= 10.0; - boolean created = assignTheaterToPlayer(self, "datatables/theater/fs_quest_sad/theater2.iff", theaterLoc, "ahunter.my_script"); - debugSpeakMsg(self, "result = " + created); - } - else if (text.equals("nt3")) - { - debugSpeakMsg(self, "creating theater"); - location theaterLoc = getLocation(self); - theaterLoc.z -= 10.0; - boolean created = assignTheaterToPlayer(self, "datatables/theater/fs_quest_sad/theater3.iff", theaterLoc, "ahunter.my_script"); - debugSpeakMsg(self, "result = " + created); - } - else if (text.equals("foo")) - { - chat.chat(self, "bar"); - } - else if (text.equals("nqc")) - { - debugSpeakMsg(self, "num quests completed = " + fs_quests_sad.getNumberTasksCompleted(self)); - } - else if (text.equals("tu")) - { - debugSpeakMsg(self, "unassigning theater"); - unassignTheaterFromPlayer(self); - } - else if (text.equals("launchcalibpuzzle2")) - { - detachScript(self, "systems.fs_quest.calibrationpuzzle.puzzle2"); - attachScript(self, "systems.fs_quest.calibrationpuzzle.puzzle2"); - } - else if (text.equals("whackamole")) - { - debugSpeakMsg(self, "whackamole processing"); - int pid = createSUIPage("/Script.whackamole", self, self, "whackamoleCallback"); - utils.setScriptVar(self, "whackamolepid", pid); - debugSpeakMsg(self, "whackamole pid = " + pid); - if (pid < 0) - { - return SCRIPT_CONTINUE; - } - subscribeToSUIEvent(pid, sui_event_type.SET_onButton, "%button0%", "whackamoleCallback"); - subscribeToSUIPropertyForEvent(pid, sui_event_type.SET_onButton, "%button0%", "score", "Text"); - subscribeToSUIEvent(pid, sui_event_type.SET_onButton, "%button1%", "whackamoleCallback"); - subscribeToSUIPropertyForEvent(pid, sui_event_type.SET_onButton, "%button1%", "score", "Text"); - subscribeToSUIEvent(pid, sui_event_type.SET_onButton, "%button2%", "whackamoleCallback"); - subscribeToSUIPropertyForEvent(pid, sui_event_type.SET_onButton, "%button2%", "score", "Text"); - setSUIProperty(pid, "bg.caption.lbltitle", "Text", "WHACK-A-MOLE"); - utils.setScriptVar(self, "whackamolescore", 0); - setSUIProperty(pid, "score.numberBox", "Text", "0"); - setSUIAssociatedObject(pid, self); - showSUIPage(pid); - whackamoleRandomize(self, pid); - messageTo(self, "whackamoleTimerCallback", null, 1, false); - } - else if (text.equals("testlib")) - { - } - else if (text.equals("testweapon")) - { - obj_id weapon = getCurrentWeapon(self); - debugSpeakMsg(self, "My weapon damage = " + getAverageDamage(weapon)); - } - else if (text.equals("testattach")) - { - attachScript(self, "steve.dummy"); - } - else if (text.equals("testdetach")) - { - detachScript(self, "steve.myscript"); - setObjVar(self, "item1", 0); - removeObjVar(self, "item2"); - } - else if (text.equals("quest")) - { - messageTo(self, "spawnBoxDestroyed", null, 0, true); - } - else if (text.equals("broadcast")) - { - debugServerConsoleMsg(self, "broadcasting message"); - dictionary params = new dictionary(); - } - else if (text.equals("messageTo")) - { - debugServerConsoleMsg(self, "testing messageTo"); - dictionary params = new dictionary(); - params.put("slef", self); - messageTo(self, "myMessageHandler", params, 0.5f, false); - } - else if (text.equals("damagehouse")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - deltadictionary scriptvars = target.getScriptVars(); - obj_id house = scriptvars.getObjId("player_structure.parent"); - if (isIdValid(house)) - { - int maxhp = getMaxHitpoints(house); - int current = getHitpoints(house); - int hp = current - (int)(maxhp * .1f); - if (hp < 0) - { - hp = 0; - } - debugSpeakMsg(self, "setting house hp from " + current + " to " + hp); - player_structure.damageStructure(house, current - hp); - } - else - { - debugSpeakMsg(self, "Can't find scriptvar player_structure.parent"); - } - } - else - { - debugSpeakMsg(self, "No lookat target"); - } - } - else if (text.equals("makemejedi")) - { - String[] skills = getStringArrayObjVar(self, pclib.OBJVAR_JEDI_SKILL_REQUIREMENTS); - if (skills != null) - { - for (int i = 0; i < skills.length; ++i) - { - skill.grantSkillToPlayer(self, skills[i]); - } - } - } - else if (text.equals("isjedi")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - if (isJedi(target)) - { - debugSpeakMsg(self, "jedi"); - } - else - { - debugSpeakMsg(self, "not jedi"); - } - } - else if (text.equals("getjedistate")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - debugSpeakMsg(self, "jedi state = " + getJediState(target)); - } - else if (text.equals("setjediforcesensitive")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - setJediState(target, JEDI_STATE_FORCE_SENSITIVE); - debugSpeakMsg(self, "setting jedi state to JEDI_STATE_FORCE_SENSITIVE"); - } - else if (text.equals("setjedijedi")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - setJediState(target, JEDI_STATE_JEDI); - debugSpeakMsg(self, "setting jedi state to JEDI_STATE_JEDI"); - } - else if (text.equals("setjediforcerankedlight")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - setJediState(target, JEDI_STATE_FORCE_RANKED_LIGHT); - debugSpeakMsg(self, "setting jedi state to JEDI_STATE_FORCE_RANKED_LIGHT"); - } - else if (text.equals("setjediforcerankeddark")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - setJediState(target, JEDI_STATE_FORCE_RANKED_DARK); - debugSpeakMsg(self, "setting jedi state to JEDI_STATE_FORCE_RANKED_DARK"); - } - else if (text.equals("setjedinone")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - setJediState(target, JEDI_STATE_NONE); - debugSpeakMsg(self, "setting jedi state to JEDI_STATE_NONE"); - } - else if (text.equals("getjedi")) - { - dictionary result = requestJedi(IGNORE_JEDI_STAT, IGNORE_JEDI_STAT, 1, 1000, IGNORE_JEDI_STAT, IGNORE_JEDI_STAT, IGNORE_JEDI_STAT); - if (result != null) - { - obj_id[] id = result.getObjIdArray("id"); - String[] name = result.getStringArray("name"); - location[] loc = result.getLocationArray("location"); - String[] scene = result.getStringArray("scene"); - int[] visibility = result.getIntArray("visibility"); - int[] bountyValue = result.getIntArray("bountyValue"); - int[] level = result.getIntArray("level"); - int[] hoursAlive = result.getIntArray("hoursAlive"); - int[] state = result.getIntArray("state"); - obj_id[][] bounties = (obj_id[][])(result.get("bounties")); - boolean[] online = result.getBooleanArray("online"); - if (id != null && id.length > 0) - { - for (int i = 0; i < id.length; ++i) - { - debugConsoleMsg(self, "Player " + name[i]); - debugConsoleMsg(self, "\tid = " + id[i]); - debugConsoleMsg(self, "\tloc = " + loc[i]); - debugConsoleMsg(self, "\tscene = " + scene[i]); - debugConsoleMsg(self, "\tvisibility = " + visibility[i]); - debugConsoleMsg(self, "\tbounty value = " + bountyValue[i]); - debugConsoleMsg(self, "\tlevel = " + level[i]); - debugConsoleMsg(self, "\thours alive = " + hoursAlive[i]); - debugConsoleMsg(self, "\tstate = " + state[i]); - debugConsoleMsg(self, "\tonline = " + online[i]); - } - } - else - { - debugConsoleMsg(self, "No jedi"); - } - } - else - { - debugConsoleMsg(self, "Error getting jedi"); - } - } - return SCRIPT_CONTINUE; - } - public void listObjvars(obj_id self, obj_id object) throws InterruptedException - { - obj_var_list list = getObjVarList(object, null); - if (list != null) - { - debugConsoleMsg(self, list.toString()); - } - else - { - debugConsoleMsg(self, "no objvars on me"); - } - } - public String myFunc() throws InterruptedException - { - return new String(""); - } - public dictionary myOtherFunc() throws InterruptedException - { - return null; - } - public int myMessageHandler(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "in my message handler"); - if (params != null) - { - debugServerConsoleMsg(self, "params = " + params); - Object slef = params.get("slef"); - if (slef != null) - { - debugServerConsoleMsg(self, "slef class is " + slef.getClass()); - obj_id o_slef = (obj_id)slef; - if (o_slef != null) - { - debugServerConsoleMsg(self, "slef converted to obj_id"); - } - else - { - debugServerConsoleMsg(self, "cannot convert slef"); - } - obj_id d_slef = params.getObjId("slef"); - if (d_slef != null) - { - debugServerConsoleMsg(self, "dictionary converted to obj_id"); - } - else - { - debugServerConsoleMsg(self, "dictionary cannot convert to obj_id"); - } - } - else - { - debugServerConsoleMsg(self, "can't find slef"); - } - } - else - { - debugServerConsoleMsg(self, "null params"); - } - return SCRIPT_CONTINUE; - } - public int OnCustomizeFinished(obj_id self, obj_id object, String params) throws InterruptedException - { - java.util.StringTokenizer st = new java.util.StringTokenizer(params); - String var = st.nextToken(); - int i = Integer.parseInt(st.nextToken()); - debugSpeakMsg(self, "OnCustomizeFinished: " + object + " , '" + var + "' " + i); - hue.setColor(object, var, i); - if (st.hasMoreTokens()) - { - var = st.nextToken(); - i = Integer.parseInt(st.nextToken()); - debugSpeakMsg(self, "OnCustomizeFinished: " + object + " , '" + var + "' " + i); - hue.setColor(object, var, i); - } - if (st.hasMoreTokens()) - { - var = st.nextToken(); - i = Integer.parseInt(st.nextToken()); - debugSpeakMsg(self, "OnCustomizeFinished: " + object + " , '" + var + "' " + i); - hue.setColor(object, var, i); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/animtest.java b/sku.0/sys.server/compiled/game/script/working/animtest.java deleted file mode 100644 index 15873f9a0..000000000 --- a/sku.0/sys.server/compiled/game/script/working/animtest.java +++ /dev/null @@ -1,221 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.ai_lib; -import script.library.sui; -import script.library.utils; -import script.library.anims; -import script.library.chat; - -public class animtest extends script.base_script -{ - public animtest() - { - } - public static final String[] ANIMATIONS_ALL = - { - anims.PLAYER_ACCEPT_AFFECTION, - anims.PLAYER_BECKON, - anims.PLAYER_BEG, - anims.PLAYER_BELLY_LAUGH, - anims.PLAYER_BOW2, - anims.PLAYER_BOW3, - anims.PLAYER_BOW4, - anims.PLAYER_BOW5, - anims.PLAYER_CELEBRATE, - anims.PLAYER_CELEBRATE1, - anims.PLAYER_CHECK_WRIST_DEVICE, - anims.PLAYER_CLAP_ROUSING, - anims.PLAYER_COUGH_POLITE, - anims.PLAYER_COVER_EARS_MOCKING, - anims.PLAYER_COVER_MOUTH, - anims.PLAYER_CURTSEY, - anims.PLAYER_CURTSEY1, - anims.PLAYER_DOOR_KNOCK, - anims.PLAYER_DOOR_POUND, - anims.PLAYER_EMBARRASSED, - anims.PLAYER_FLEX_BICEPS, - anims.PLAYER_FORCE_ABSORB, - anims.PLAYER_FORCE_BLAST, - anims.PLAYER_FORCE_CHANNEL, - anims.PLAYER_FORCE_CHOKE, - anims.PLAYER_FORCE_DAMPEN, - anims.PLAYER_FORCE_DESTRUCTION, - anims.PLAYER_FORCE_ILLUSION, - anims.PLAYER_FORCE_LIGHTNING, - anims.PLAYER_FORCE_PERSUASION, - anims.PLAYER_FORCE_PROTECTION, - anims.PLAYER_FORCE_PULL, - anims.PLAYER_FORCE_PUSH, - anims.PLAYER_FORCE_STRENGTH, - anims.PLAYER_FORCE_THROW, - anims.PLAYER_GESTICULATE_WILDLY, - anims.PLAYER_HAIR_FLIP, - anims.PLAYER_HANDS_ABOVE_HEAD, - anims.PLAYER_HANDS_BEHIND_HEAD, - anims.PLAYER_HEAVY_COUGH_VOMIT, - anims.PLAYER_HOLD_NOSE, - anims.PLAYER_HUG_SELF, - anims.PLAYER_IMPLORE, - anims.PLAYER_KISS_BLOW_KISS, - anims.PLAYER_LAUGH_CACKLE, - anims.PLAYER_LAUGH_POINTING, - anims.PLAYER_LAUGH_TITTER, - anims.PLAYER_LISTEN, - anims.PLAYER_NOD_HEAD_MULTIPLE, - anims.PLAYER_NOD_HEAD_ONCE, - anims.PLAYER_OFFER_AFFECTION, - anims.PLAYER_PAT_ABDOMEN, - anims.PLAYER_POINT_ACCUSINGLY, - anims.PLAYER_POINT_AWAY, - anims.PLAYER_POINT_DOWN, - anims.PLAYER_POINT_FORWARD, - anims.PLAYER_POINT_LEFT, - anims.PLAYER_POINT_RIGHT, - anims.PLAYER_POINT_TO_SELF, - anims.PLAYER_POINT_UP, - anims.PLAYER_POSE_PROUDLY, - anims.PLAYER_POUND_FIST_CHEST, - anims.PLAYER_POUND_FIST_PALM, - anims.PLAYER_REFUSE_OFFER_AFFECTION, - anims.PLAYER_REFUSE_OFFER_FORMAL, - anims.PLAYER_RUB_BELLY, - anims.PLAYER_RUB_CHIN_THOUGHTFUL, - anims.PLAYER_SALUTE1, - anims.PLAYER_SALUTE2, - anims.PLAYER_SCRATCH_HEAD, - anims.PLAYER_SEARCH, - anims.PLAYER_SHAKE_HEAD_DISGUST, - anims.PLAYER_SHAKE_HEAD_NO, - anims.PLAYER_SHIVER, - anims.PLAYER_SHRUG_HANDS, - anims.PLAYER_SHRUG_SHOULDERS, - anims.PLAYER_SHUSH, - anims.PLAYER_SIGH_DEEPLY, - anims.PLAYER_SLIT_THROAT, - anims.PLAYER_SLOW_DOWN, - anims.PLAYER_SLUMP_HEAD, - anims.PLAYER_SMACK_SELF, - anims.PLAYER_SMELL_AIR, - anims.PLAYER_SMELL_ARMPIT, - anims.PLAYER_SNAP_FINGER1, - anims.PLAYER_SNAP_FINGER2, - anims.PLAYER_SNEEZE, - anims.PLAYER_STAMP_FEET, - anims.PLAYER_STANDING_PLACATE, - anims.PLAYER_STANDING_RAISE_FIST, - anims.PLAYER_STOP, - anims.PLAYER_TAP_HEAD, - anims.PLAYER_TAUNT1, - anims.PLAYER_TAUNT2, - anims.PLAYER_TAUNT3, - anims.PLAYER_WAVE_FINGER_WARNING, - anims.PLAYER_WAVE_HAIL, - anims.PLAYER_WAVE_ON_DIRECTING, - anims.PLAYER_WAVE_ON_DISMISSING, - anims.PLAYER_WAVE1, - anims.PLAYER_WAVE2, - anims.PLAYER_WEEPING, - anims.PLAYER_WHISPER, - anims.PLAYER_YAWN - }; - public int OnAttach(obj_id self) throws InterruptedException - { - if (isPlayer(self)) - { - debugSpeakMsg(self, "ERROR: This script must be attached to a humanoid NPC"); - return SCRIPT_OVERRIDE; - } - else - { - String skeleton = dataTableGetString("datatables/ai/species.iff", ai_lib.aiGetSpecies(self), "Skeleton"); - if (!skeleton.equals("human")) - { - debugSpeakMsg(self, "ERROR: This script must be attached to a humanoid NPC"); - return SCRIPT_OVERRIDE; - } - } - setName(self, "Animation Tester"); - ai_lib.setDefaultCalmBehavior(self, ai_lib.BEHAVIOR_SENTINEL); - setInvulnerable(self, true); - return SCRIPT_CONTINUE; - } - public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info mi) throws InterruptedException - { - if (isPlayer(self)) - { - return SCRIPT_OVERRIDE; - } - else - { - String skeleton = dataTableGetString("datatables/ai/species.iff", ai_lib.aiGetSpecies(self), "Skeleton"); - if (!skeleton.equals("human")) - { - return SCRIPT_OVERRIDE; - } - } - if (isIdValid(player)) - { - if (utils.hasScriptVar(player, "anim_test.testing")) - { - int old_pid = utils.getIntScriptVar(player, "anim_test.testing"); - forceCloseSUIPage(old_pid); - utils.removeScriptVar(player, "anim_test.testing"); - } - } - String title = "Animation Testing Menu"; - String prompt = "The following is a list of standing idle animations that can be performed by humanoid NPCs in a script.\n\n"; - prompt += "To have an NPC perform an animation, use this function:\n"; - prompt += "doAnimationAction(obj_id npc, string animation);\n\n"; - prompt += "Please choose an animation to test:"; - int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, ANIMATIONS_ALL, "animationAll", true, false); - debugSpeakMsg(self, "PID is " + pid); - if (pid > -1) - { - utils.setScriptVar(player, "anim_test.testing", pid); - } - return SCRIPT_CONTINUE; - } - public int animationAll(obj_id self, dictionary params) throws InterruptedException - { - if (params == null || params.isEmpty()) - { - debugSpeakMsg(self, " Message passed with no parameters"); - return SCRIPT_CONTINUE; - } - int idx = sui.getListboxSelectedRow(params); - int btn = sui.getIntButtonPressed(params); - obj_id player = sui.getPlayerId(params); - if ((btn == sui.BP_CANCEL) || (btn == sui.BP_OK && idx < 0)) - { - if (isIdValid(player)) - { - if (utils.hasScriptVar(player, "anim_test.testing")) - { - utils.removeScriptVar(player, "anim_test.testing"); - } - } - return SCRIPT_CONTINUE; - } - String title = "Animation Testing Menu"; - String prompt = "Now playing: " + ANIMATIONS_ALL[idx] + "\n\n"; - prompt += "To have an NPC perform this animation, use the function:\n"; - prompt += "doAnimationAction(npc, \"" + ANIMATIONS_ALL[idx] + "\");\n\n"; - prompt += "Please choose an animation to test:"; - int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, ANIMATIONS_ALL, "animationAll", true, false); - debugSpeakMsg(self, "PID is " + pid); - if (pid > -1) - { - utils.setScriptVar(player, "anim_test.testing", pid); - } - doAnimationAction(self, ANIMATIONS_ALL[idx]); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/asommers/debug.java b/sku.0/sys.server/compiled/game/script/working/asommers/debug.java deleted file mode 100644 index d131ad62b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/asommers/debug.java +++ /dev/null @@ -1,454 +0,0 @@ -package script.working.asommers; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.sui; -import script.library.create; -import script.library.ship_ai; -import script.library.utils; - -public class debug extends script.base_script -{ - public debug() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - location playerLocation = getLocation(self); - if (text.equals("newbieZoomCamera")) - { - boolean result = newbieTutorialRequest(self, "zoomCamera"); - if (result) - { - debugSpeakMsg(self, "success"); - } - else - { - debugSpeakMsg(self, "fail"); - } - } - if (text.equals("newbieOpenInventory")) - { - boolean result = newbieTutorialRequest(self, "openInventory"); - if (result) - { - debugSpeakMsg(self, "success"); - } - else - { - debugSpeakMsg(self, "fail"); - } - } - if (text.equals("newbieCloseInventory")) - { - boolean result = newbieTutorialRequest(self, "closeInventory"); - if (result) - { - debugSpeakMsg(self, "success"); - } - else - { - debugSpeakMsg(self, "fail"); - } - } - if (text.equals("newbieOpenCharacterSheet")) - { - boolean result = newbieTutorialRequest(self, "openCharacterSheet"); - if (result) - { - debugSpeakMsg(self, "success"); - } - else - { - debugSpeakMsg(self, "fail"); - } - } - if (text.equals("newbieCloseCharacterSheet")) - { - boolean result = newbieTutorialRequest(self, "closeCharacterSheet"); - if (result) - { - debugSpeakMsg(self, "success"); - } - else - { - debugSpeakMsg(self, "fail"); - } - } - if (text.equals("newbieChangeMouseMode")) - { - boolean result = newbieTutorialRequest(self, "changeMouseMode"); - if (result) - { - debugSpeakMsg(self, "success"); - } - else - { - debugSpeakMsg(self, "fail"); - } - } - if (text.equals("newbieEquipToolbar")) - { - boolean result = newbieTutorialRequest(self, "equipToolbar"); - if (result) - { - debugSpeakMsg(self, "success"); - } - else - { - debugSpeakMsg(self, "fail"); - } - } - if (text.equals("newbieEnableRadar")) - { - boolean result = newbieTutorialEnableHudElement(self, "radar", true, 5); - if (result) - { - debugSpeakMsg(self, "success"); - } - else - { - debugSpeakMsg(self, "fail"); - } - } - if (text.equals("newbieDisableRadar")) - { - boolean result = newbieTutorialEnableHudElement(self, "radar", false, 0); - if (result) - { - debugSpeakMsg(self, "success"); - } - else - { - debugSpeakMsg(self, "fail"); - } - } - if (text.equals("suitest")) - { - int temp = sui.msgbox(self, text); - } - if (text.equals("warptest")) - { - warpPlayer(self, playerLocation.area, playerLocation.x, playerLocation.y, playerLocation.z + 100, null, 0, 0, 0); - } - if (text.equals("weather0")) - { - boolean set = setWeatherData(0, 1.0f, 0.0f); - if (set) - { - debugSpeakMsg(self, text + "set"); - } - else - { - debugSpeakMsg(self, text + "not set"); - } - } - if (text.equals("weather1")) - { - boolean set = setWeatherData(1, 0.0f, 1.0f); - if (set) - { - debugSpeakMsg(self, text + "set"); - } - else - { - debugSpeakMsg(self, text + "not set"); - } - } - if (text.equals("weather2")) - { - boolean set = setWeatherData(2, -1.0f, 0.0f); - if (set) - { - debugSpeakMsg(self, text + "set"); - } - else - { - debugSpeakMsg(self, text + "not set"); - } - } - if (text.equals("weather3")) - { - boolean set = setWeatherData(3, 0.0f, -1.0f); - if (set) - { - debugSpeakMsg(self, text + "set"); - } - else - { - debugSpeakMsg(self, text + "not set"); - } - } - if (text.equals("addTravelPoints")) - { - String planet = getCurrentSceneName(); - location location = getLocation(self); - location.x -= 50; - obj_id object1 = createObject("object/installation/mining_ore/mining_ore_harvester_style_2.iff", location); - boolean result = addPlanetTravelPoint(planet, "point 1", location, 100, true, TPT_PC_Shuttleport); - if (result) - { - debugSpeakMsg(self, "addPlanetTravelPoint point1 succeeded"); - } - else - { - debugSpeakMsg(self, "addPlanetTravelPoint point1 failed"); - } - location.x += 100; - obj_id object2 = createObject("object/installation/mining_ore/mining_ore_harvester_style_2.iff", location); - result = addPlanetTravelPoint(planet, "point2", location, 50, true, TPT_PC_Shuttleport); - if (result) - { - debugSpeakMsg(self, "addPlanetTravelPoint point2 succeeded"); - } - else - { - debugSpeakMsg(self, "addPlanetTravelPoint point2 failed"); - } - } - if (text.equals("purchaseTicket1")) - { - String planet = getCurrentSceneName(); - boolean result = enterClientTicketPurchaseMode(self, planet, "point 1", false); - if (result) - { - debugSpeakMsg(self, "enterClientTicketPurchaseMode succeeded"); - } - else - { - debugSpeakMsg(self, "enterClientTicketPurchaseMode failed"); - } - } - if (text.equals("purchaseTicket2")) - { - String planet = getCurrentSceneName(); - boolean result = enterClientTicketPurchaseMode(self, planet, "point2", false); - if (result) - { - debugSpeakMsg(self, "enterClientTicketPurchaseMode succeeded"); - } - else - { - debugSpeakMsg(self, "enterClientTicketPurchaseMode failed"); - } - } - if (text.equals("place")) - { - boolean placed = enterClientStructurePlacementMode(self, self, "object/installation/mining_ore/mining_ore_harvester_style_2.iff"); - if (!placed) - { - debugSpeakMsg(self, "OnSpeaking: enterClientStructurePlacementMode failed"); - } - else - { - debugSpeakMsg(self, "OnSpeaking: enterClientStructurePlacementMode succeeded"); - } - } - if (text.equals("poiTest")) - { - debugSpeakMsg(self, "Making lair at your location"); - location locHome = getLocation(self); - String strLairDifficulty = create.getLairDifficulty(4, 40, 20); - obj_id objLair = createObject("object/tangible/lair/npc_lair.iff", locHome); - setObjVar(objLair, "spawning.intDifficultyLevel", 20); - setObjVar(objLair, "spawning.lairDifficulty", strLairDifficulty); - setObjVar(objLair, "spawning.lairType", "evil_tatooine_village"); - messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false); - } - if (text.equals("heightTest")) - { - int i; - for (i = 0; i < 9; ++i) - { - location position = utils.getRandomLocationInRing(playerLocation, 1, 20); - float height = getHeightAtLocation(position.x, position.z); - debugSpeakMsg(self, "height = " + height); - } - } - if (text.equals("zeroLots")) - { - adjustLotCount(self, -getAccountNumLots(self)); - } - if (text.equals("requestLocation")) - { - if (requestLocation(self, "locationId", playerLocation, 200, 32, true, true)) - { - debugSpeakMsg(self, "requestLocation succeeded"); - } - else - { - debugSpeakMsg(self, "requestLocation failed"); - } - } - if (text.equals("enemy_xwing")) - { - obj_id ship = createObject("object/ship/xwing.iff", playerLocation); - ship_ai.unitAddDamageTaken(ship, self, 10000.0f); - } - if (text.equals("enemy_tiefighter")) - { - obj_id ship = createObject("object/ship/tiefighter.iff", playerLocation); - ship_ai.unitAddDamageTaken(ship, self, 10000.0f); - } - if (text.equals("deleteObject")) - { - obj_id target = getLookAtTarget(self); - if (target != null && target != obj_id.NULL_ID) - { - destroyObject(target); - debugSpeakMsg(self, "destroyObject " + target + " succeeded"); - } - } - if (text.equals("createTestObjects")) - { - for (int i = -3; i < 3; ++i) - { - for (int j = -3; j < 3; ++j) - { - location location = getLocation(self); - location.x -= 5 * i; - location.z -= 5 * j; - obj_id object = createObject("object/tangible/furniture/space/frn_chair_falcon_passenger_s01.iff", location); - } - } - } - if (text.equals("addMissionCriticalObject")) - { - obj_id target = getLookAtTarget(self); - if (target != null && target != obj_id.NULL_ID) - { - if (addMissionCriticalObject(self, target)) - { - debugSpeakMsg(self, "addMissionCriticalObject" + target + " succeeded"); - } - } - else - { - debugSpeakMsg(self, "no target"); - } - } - if (text.equals("removeMissionCriticalObject")) - { - obj_id target = getLookAtTarget(self); - if (target != null && target != obj_id.NULL_ID) - { - if (removeMissionCriticalObject(self, target)) - { - debugSpeakMsg(self, "removeMissionCriticalObject" + target + " succeeded"); - } - } - else - { - debugSpeakMsg(self, "no target"); - } - } - if (text.equals("isMissionCriticalObject")) - { - obj_id target = getLookAtTarget(self); - if (target != null && target != obj_id.NULL_ID) - { - if (isMissionCriticalObject(self, target)) - { - debugSpeakMsg(self, "isMissionCriticalObject" + target + " yes"); - } - else - { - debugSpeakMsg(self, "isMissionCriticalObject" + target + " no"); - } - } - } - if (text.equals("clearMissionCriticalObjects")) - { - if (clearMissionCriticalObjects(self)) - { - debugSpeakMsg(self, "clearMissionCriticalObjects succeeded"); - } - else - { - debugSpeakMsg(self, "clearMissionCriticalObjects failed"); - } - } - if (text.equals("conditionTest1")) - { - obj_id object = createObject("object/tangible/ship/interior_components/alarm_interior.iff", playerLocation); - } - if (text.equals("conditionTest2")) - { - obj_id target = getLookAtTarget(self); - if (target != null && target != obj_id.NULL_ID) - { - setCondition(target, CONDITION_ON); - } - } - if (text.equals("getConditionOnOff")) - { - obj_id target = getLookAtTarget(self); - if (target != null && target != obj_id.NULL_ID) - { - if (hasCondition(target, CONDITION_ON)) - { - debugSpeakMsg(target, "on"); - } - else - { - debugSpeakMsg(target, "off"); - } - } - } - return SCRIPT_CONTINUE; - } - public int OnPlaceStructure(obj_id self, obj_id player, obj_id deed, location position, int rotation) throws InterruptedException - { - debugSpeakMsg(self, "OnPlaceStructure: entered"); - obj_id structure = createObject("object/installation/mining_ore/mining_ore_harvester_style_2.iff", position); - if (structure == null || structure == obj_id.NULL_ID) - { - debugSpeakMsg(self, "OnPlaceStructure: createObject failed"); - return SCRIPT_OVERRIDE; - } - setYaw(structure, (float)(90 * rotation)); - return SCRIPT_CONTINUE; - } - public int OnPurchaseTicket(obj_id self, obj_id player, String departPlanetName, String departTravelPointName, String arrivePlanetName, String arriveTravelPointName, boolean roundTrip) throws InterruptedException - { - debugSpeakMsg(self, "OnPurchaseTicket: entered"); - debugSpeakMsg(self, departPlanetName); - debugSpeakMsg(self, departTravelPointName); - debugSpeakMsg(self, arrivePlanetName); - debugSpeakMsg(self, arriveTravelPointName); - debugSpeakMsg(self, roundTrip ? "roundtrip" : "not roundtrip"); - return SCRIPT_CONTINUE; - } - public int OnNewbieTutorialResponse(obj_id self, String response) throws InterruptedException - { - debugSpeakMsg(self, "Newbie tutorial: " + response); - return SCRIPT_CONTINUE; - } - public int OnLocationReceived(obj_id self, String locationId, obj_id locationObject, location locationLocation, float locationRadius) throws InterruptedException - { - debugSpeakMsg(self, "OnLocationReceived: " + locationId); - if (locationObject == null || locationObject == obj_id.NULL_ID) - { - debugSpeakMsg(self, "OnLocationReceived: could not find a valid location"); - } - else - { - obj_id object = createObject("object/installation/mining_ore/mining_ore_harvester_style_2.iff", locationLocation); - if (object == null || object == obj_id.NULL_ID) - { - debugSpeakMsg(self, "OnLocationReceived: createObject failed"); - } - if (!destroyObject(locationObject)) - { - debugSpeakMsg(self, "OnLocationReceived: failed to destroy locationObject"); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/asommers/transport.java b/sku.0/sys.server/compiled/game/script/working/asommers/transport.java deleted file mode 100644 index 71bce5d3e..000000000 --- a/sku.0/sys.server/compiled/game/script/working/asommers/transport.java +++ /dev/null @@ -1,44 +0,0 @@ -package script.working.asommers; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class transport extends script.base_script -{ - public transport() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - detachScript(self, "ai.ai"); - detachScript(self, "ai.creature_combat"); - detachScript(self, "skeleton.humanoid"); - detachScript(self, "systems.combat.combat_actions"); - detachScript(self, "systems.combat.credit_for_kills"); - stop(self); - setName(self, "Hutt Cargo Transport"); - setPosture(self, POSTURE_UPRIGHT); - queueCommand(self, (-1465754503), self, "", COMMAND_PRIORITY_FRONT); - messageTo(self, "changePosture", null, 60, true); - return SCRIPT_CONTINUE; - } - public int changePosture(obj_id self, dictionary params) throws InterruptedException - { - setPosture(self, POSTURE_PRONE); - queueCommand(self, (-1114832209), self, "", COMMAND_PRIORITY_FRONT); - messageTo(self, "changePostureAgain", null, 30, true); - return SCRIPT_CONTINUE; - } - public int changePostureAgain(obj_id self, dictionary params) throws InterruptedException - { - setPosture(self, POSTURE_UPRIGHT); - queueCommand(self, (-1465754503), self, "", COMMAND_PRIORITY_FRONT); - messageTo(self, "changePosture", null, 60, true); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/balancetest.java b/sku.0/sys.server/compiled/game/script/working/balancetest.java deleted file mode 100644 index 98ade1401..000000000 --- a/sku.0/sys.server/compiled/game/script/working/balancetest.java +++ /dev/null @@ -1,291 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.ai_lib; -import script.library.battlefield; -import script.library.bio_engineer; -import script.library.buff; -import script.library.create; -import script.library.dot; -import script.library.features; -import script.library.hq; -import script.library.locations; -import script.library.mustafar; -import script.library.pclib; -import script.library.pet_lib; -import script.library.prose; -import script.library.player_structure; -import script.library.regions; -import script.library.skill; -import script.library.utils; -import script.library.space_crafting; -import script.library.space_transition; -import script.library.weapons; -import java.util.StringTokenizer; - -public class balancetest extends script.base_script -{ - public balancetest() - { - } - public static final String CREATURE_TABLE = "datatables/mob/creatures.iff"; - public static final String STAT_BALANCE_TABLE = "datatables/mob/stat_balance.iff"; - public static final boolean CONST_FLAG_DO_LOGGING = true; - public int checkDifficulty(obj_id self, dictionary params) throws InterruptedException - { - int intRawDifficulty = getLevel(self); - sendSystemMessageTestingOnly(self, "getLevel returned " + intRawDifficulty); - if (intRawDifficulty == 0) - { - sendSystemMessageTestingOnly(self, "you lost your difficulty!"); - deltadictionary dctScriptVars = self.getScriptVars(); - sendSystemMessageTestingOnly(self, "Scriptvars are " + dctScriptVars.toString()); - } - messageTo(self, "checkDifficulty", null, 3, false); - return SCRIPT_CONTINUE; - } - public void debugLogging(String section, String message) throws InterruptedException - { - if (CONST_FLAG_DO_LOGGING) - { - LOG("working/balancetest/" + section, message); - } - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - debugLogging("//// OnHearSpeech: ", "////>>>> Enter"); - if (objSpeaker != self) - { - debugLogging("//// OnHearSpeech: ", "////>>>> 1"); - return SCRIPT_CONTINUE; - } - if (strText.indexOf("b ") < 0) - { - debugLogging("//// OnHearSpeech: ", "////>>>> 2 - index is: " + strText.indexOf("b ")); - return SCRIPT_CONTINUE; - } - StringTokenizer st = new StringTokenizer(strText); - int numArgs = st.countTokens(); - String actionUnlock = st.nextToken(); - String actionName = st.nextToken(); - if (actionName.equals("help")) - { - sendSystemMessageTestingOnly(self, "REMINDER: key phrases for balancetest are: or 'b wipe' or 'b spawn ' or 'b newlevel '"); - sendSystemMessageTestingOnly(self, " 'b clev ' or 'b wdam ' (can enter just one damage value to set both same)' "); - sendSystemMessageTestingOnly(self, " 'b newlevel will mod all current and following creatures. A value of 0 will remove a stored level delta variable "); - } - else if (actionName.equals("clev")) - { - debugLogging("//// OnHearSpeech: ", "////>>>> 3"); - if (numArgs < 3) - { - sendSystemMessageTestingOnly(self, "You've got to have at least TWO arguments to spawn a creature 'b clev "); - debugLogging("//// OnHearSpeech: ", "////>>>> 4"); - return SCRIPT_CONTINUE; - } - String levelStr = st.nextToken(); - int level = utils.stringToInt(levelStr); - sendSystemMessageTestingOnly(self, "creature level selected: " + level); - dictionary creatureDict = null; - Vector validCreatureNames = new Vector(); - validCreatureNames.setSize(0); - int[] creatureTabLevels = dataTableGetIntColumn(CREATURE_TABLE, "BaseLevel"); - for (int i = 0; i < creatureTabLevels.length; i++) - { - if (creatureTabLevels[i] == level) - { - creatureDict = dataTableGetRow(CREATURE_TABLE, i); - float aggressiveness = creatureDict.getFloat("aggressive"); - String creatureName = creatureDict.getString("creatureName"); - debugLogging("//// OnHearSpeech: ", "////>>>> Checking a creature: " + creatureName + " its aggressiveness is: " + aggressiveness); - if (aggressiveness > 0.0) - { - utils.addElement(validCreatureNames, creatureName); - } - } - } - debugLogging("//// OnHearSpeech: ", "////>>>> TOTAL MATCHES FOUND IS: " + validCreatureNames.size()); - if (validCreatureNames.size() > 0) - { - debugLogging("//// OnHearSpeech: ", "////>>>> 7"); - int matchNumber = 1; - if (validCreatureNames.size() > 1) - { - matchNumber = rand(1, validCreatureNames.size()); - } - creatureDict = dataTableGetRow(CREATURE_TABLE, ((String)validCreatureNames.get(matchNumber - 1))); - } - else - { - sendSystemMessageTestingOnly(self, "no matches in creatures.tab found for level: " + level); - return SCRIPT_CONTINUE; - } - if (creatureDict == null) - { - sendSystemMessageTestingOnly(self, "no creatures found at level: " + level); - return SCRIPT_CONTINUE; - } - else - { - sendSystemMessageTestingOnly(self, "creature selected for spawn is: " + creatureDict.getString("creatureName")); - } - String creatureName = creatureDict.getString("creatureName"); - utils.setScriptVar(self, "clev_creature", creatureName); - utils.setScriptVar(self, "clev_creature_level", level); - } - else if (actionName.equals("spawn")) - { - debugLogging("//// OnHearSpeech: ", "////>>>> 8"); - if (!utils.hasScriptVar(self, "clev_creature")) - { - sendSystemMessageTestingOnly(self, "no you haven't selected a creature to spawn"); - return SCRIPT_CONTINUE; - } - int creaturelevel = utils.getIntScriptVar(self, "clev_creature_level"); - String creatureName = utils.getStringScriptVar(self, "clev_creature"); - sendSystemMessageTestingOnly(self, "we're going to try to spawn the level " + creaturelevel + " creature, the " + creatureName); - int newCreatureLevel = 0; - if (utils.hasScriptVar(self, "newCreatureLevel")) - { - newCreatureLevel = utils.getIntScriptVar(self, "newCreatureLevel"); - sendSystemMessageTestingOnly(self, " and going to re-level the creature to be " + newCreatureLevel); - } - int numCreatures = 1; - if (numArgs == 3) - { - String numberOfCreaturesStr = st.nextToken(); - int numberOfCreatures = utils.stringToInt(numberOfCreaturesStr); - if (numberOfCreatures == 9) - { - numCreatures = rand(1, 10); - } - else - { - numCreatures = numberOfCreatures; - } - } - obj_id[] spawnedCreatures = new obj_id[numCreatures]; - location here = getLocation(self); - for (int i = 0; i < numCreatures; i++) - { - location spawnLoc = locations.getGoodLocationAroundLocation(here, 1f, 1f, 4f, 4f); - if (spawnLoc == null) - { - sendSystemMessageTestingOnly(self, " spawnLoc was NULL "); - return SCRIPT_CONTINUE; - } - obj_id mob = create.createCreature(creatureName, spawnLoc, creaturelevel, true, false); - if (!isIdValid(mob)) - { - sendSystemMessageTestingOnly(self, "invalid objid on the creature we just tried to spawn. OH NO!"); - } - else - { - spawnedCreatures[i] = mob; - if (newCreatureLevel > 0) - { - reLevelMob(mob, newCreatureLevel); - } - } - } - if (spawnedCreatures != null) - { - utils.setScriptVar(self, "spawnedCreatures", spawnedCreatures); - } - } - else if (actionName.equals("wdam")) - { - debugLogging("//// OnHearSpeech: ", "////>>>> 9"); - String damageStr = st.nextToken(); - int damageValue = utils.stringToInt(damageStr); - obj_id weapon = getCurrentWeapon(self); - if (!isIdValid(weapon)) - { - sendSystemMessageTestingOnly(self, "bad weapon - objId was: " + weapon); - } - if (getWeaponType(weapon) != WEAPON_TYPE_UNARMED) - { - setWeaponMinDamage(weapon, damageValue); - setWeaponMaxDamage(weapon, damageValue); - weapons.setWeaponData(weapon); - } - } - else if (actionName.equals("newlevel")) - { - debugLogging("//// OnHearSpeech: ", "////>>>> 10"); - String reLevelStr = st.nextToken(); - int newLevel = utils.stringToInt(reLevelStr); - if (newLevel == 0) - { - if (utils.hasScriptVar(self, "newCreatureLevel")) - { - sendSystemMessageTestingOnly(self, "Removed existing creature level delta value"); - utils.removeScriptVar(self, "newCreatureLevel"); - } - } - else - { - if (utils.setScriptVar(self, "newCreatureLevel", newLevel)) - { - sendSystemMessageTestingOnly(self, "All creatures spawned will now be set to level " + newLevel); - } - } - if (utils.hasScriptVar(self, "spawnedCreatures")) - { - obj_id[] mobsToRelevel = utils.getObjIdArrayScriptVar(self, "spawnedCreatures"); - int reLeveledMobCounter = 0; - for (int i = 0; i < mobsToRelevel.length; i++) - { - if (isIdValid(mobsToRelevel[i]) && !ai_lib.aiIsDead(mobsToRelevel[i])) - { - reLevelMob(mobsToRelevel[i], newLevel); - reLeveledMobCounter++; - } - } - if (reLeveledMobCounter > 0) - { - sendSystemMessageTestingOnly(self, "A total of " + reLeveledMobCounter + " creatures were re-set to be level " + newLevel); - } - } - } - else if (actionName.equals("wipe")) - { - debugLogging("//// OnHearSpeech: ", "////>>>> 11"); - if (!utils.hasScriptVar(self, "spawnedCreatures")) - { - sendSystemMessageTestingOnly(self, "No apparent creature to destroy. Couldn't find obj_id scripvar. OH NO!"); - } - else - { - obj_id[] mobsToDestroy = utils.getObjIdArrayScriptVar(self, "spawnedCreatures"); - for (int i = 0; i < mobsToDestroy.length; i++) - { - if (isIdValid(mobsToDestroy[i])) - { - destroyObject(mobsToDestroy[i]); - } - } - } - } - else - { - sendSystemMessageTestingOnly(self, "valid trigger phrases for balancetest script are: 'wdam #' for weapon damage value and 'clev #' for creature level."); - } - return SCRIPT_CONTINUE; - } - public void reLevelMob(obj_id mob, int level) throws InterruptedException - { - obj_id self = getSelf(); - String creatureName = utils.getStringScriptVar(self, "clev_creature"); - dictionary creatureDict = utils.dataTableGetRow(CREATURE_TABLE, creatureName); - create.initializeCreature(mob, creatureName, creatureDict, level); - return; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/breinhart/missiontest.java b/sku.0/sys.server/compiled/game/script/working/breinhart/missiontest.java deleted file mode 100644 index cf56d698e..000000000 --- a/sku.0/sys.server/compiled/game/script/working/breinhart/missiontest.java +++ /dev/null @@ -1,44 +0,0 @@ -package script.working.breinhart; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.space_quest; - -public class missiontest extends script.base_script -{ - public missiontest() - { - } - public static final String mission_type = "patrol"; - public static final String mission_name = "npe_easy_main_1"; - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - location playerLocation = getLocation(self); - if (text.equals("assignquest")) - { - boolean grant = space_quest.grantQuest(self, mission_type, mission_name); - } - else if (text.equals("winquest")) - { - obj_id mobj = space_quest._getQuest(self, mission_type, mission_name); - space_quest.setQuestWon(self, mobj); - } - else if (text.equals("failquest")) - { - obj_id mobj = space_quest._getQuest(self, mission_type, mission_name); - space_quest.setQuestFailed(self, mobj); - } - else if (text.equals("abortquest")) - { - obj_id mobj = space_quest._getQuest(self, mission_type, mission_name); - space_quest.setQuestAborted(self, mobj); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/breinhart/speaktest.java b/sku.0/sys.server/compiled/game/script/working/breinhart/speaktest.java deleted file mode 100644 index 717dd6ea6..000000000 --- a/sku.0/sys.server/compiled/game/script/working/breinhart/speaktest.java +++ /dev/null @@ -1,82 +0,0 @@ -package script.working.breinhart; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; -import script.library.ai_lib; -import script.library.xp; -import script.library.factions; -import script.library.dot; -import script.library.city; -import script.library.loot; -import script.library.player_structure; -import script.library.player_stomach; -import script.library.space_quest; -import script.library.space_create; -import script.library.movement; - -public class speaktest extends script.base_script -{ - public speaktest() - { - } - public double randBell(double avg, double var) throws InterruptedException - { - var = var / 2; - double r, v1, v2; - do - { - v1 = 2.0 * rand() - 1.0; - v2 = 2.0 * rand() - 1.0; - r = v1 * v1 + v2 * v2; - } while (r >= 1.0 || r == 0.0); - double fac = Math.sqrt(-2.0 * Math.log(r) / r); - double value = (avg + (v1 * fac) * (avg * var)); - if (value < 0) - { - return 0; - } - else - { - return value; - } - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - location playerLocation = getLocation(self); - if (text.equals("meganuke")) - { - obj_id[] objects = getObjectsInRange(playerLocation, 250.0f); - for (int i = 0; i < objects.length; i++) - { - if (!isPlayer(objects[i])) - { - LOG("LOG_CHANNEL", "object deleted ->" + objects[i]); - destroyObject(objects[i]); - } - } - } - else if (text.equals("test")) - { - obj_id t = getLookAtTarget(self); - setCraftedId(t, self); - } - else if (text.equals("blindme")) - { - setState(self, STATE_BLINDED, true); - setObjVar(self, "combat.intEffects.13", 1); - } - else if (text.equals("poisonme")) - { - sendSystemMessageTestingOnly(self, "poisoning"); - dot.applyDotEffect(self, self, "poison", "poison1", HEALTH, -1, 5, 60, true, null); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cannot_die.java b/sku.0/sys.server/compiled/game/script/working/cannot_die.java deleted file mode 100644 index 551c0e8ac..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cannot_die.java +++ /dev/null @@ -1,30 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class cannot_die extends script.base_script -{ - public cannot_die() - { - } - public int OnCreatureDamaged(obj_id self, obj_id attacker, obj_id weapon, int[] damage) throws InterruptedException - { - setAttrib(self, HEALTH, 100); - return SCRIPT_CONTINUE; - } - public int OnObjectDamaged(obj_id self, obj_id attacker, obj_id weapon, int damage) throws InterruptedException - { - setHitpoints(self, 100); - return SCRIPT_CONTINUE; - } - public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException - { - return SCRIPT_OVERRIDE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cincotest.java b/sku.0/sys.server/compiled/game/script/working/cincotest.java deleted file mode 100644 index 70ef05561..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cincotest.java +++ /dev/null @@ -1,35 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class cincotest extends script.base_script -{ - public cincotest() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (objSpeaker != self) - { - return SCRIPT_CONTINUE; - } - if (strText.equals("setupTerminal")) - { - obj_id objTarget = getLookAtTarget(self); - if (isIdValid(objTarget)) - { - location locTest = new location(); - locTest.area = "space_tatooine"; - setObjVar(objTarget, "space.destination", locTest); - sendSystemMessageTestingOnly(self, "Set the coordinates to your thang!"); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/bottom.java b/sku.0/sys.server/compiled/game/script/working/cmayer/bottom.java deleted file mode 100644 index a846d058d..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/bottom.java +++ /dev/null @@ -1,43 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class bottom extends script.base_script -{ - public bottom() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("test")) - { - obj_id building = getTopMostContainer(self); - moveHouseItemToPlayer(building, self, 0); - } - else if (text.equals("test2")) - { - obj_id building = getTopMostContainer(self); - deleteAllHouseItems(building, self); - } - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - return SCRIPT_CONTINUE; - } - public int OnReceivedItem(obj_id self, obj_id srcContainer, obj_id transferer, obj_id item) throws InterruptedException - { - if (isPlayer(item)) - { - debugServerConsoleMsg(self, "Got player"); - sendSystemMessageTestingOnly(item, "Building got player"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/buildingtest.java b/sku.0/sys.server/compiled/game/script/working/cmayer/buildingtest.java deleted file mode 100644 index 59d79d586..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/buildingtest.java +++ /dev/null @@ -1,70 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.ai.ai_combat; -import script.library.create; - -public class buildingtest extends script.base_script -{ - public buildingtest() - { - } - public int OnInitialize(obj_id self) throws InterruptedException - { - createTriggerVolume("guards", 20f, true); - obj_id room = getCellId(self, "mainhall"); - location termLoc = new location(0.1f, .13f, -5.46f, "tatooine", room); - obj_id destructor = createObject("object/tangible/furniture/imperial/data_terminal_s1.iff", termLoc); - setObjVar(self, "DESTRUCTOR", destructor); - setObjVar(destructor, "bldg", self); - attachScript(destructor, "theme_park.bldg_destroy"); - return SCRIPT_CONTINUE; - } - public int OnAttach(obj_id self) throws InterruptedException - { - createTriggerVolume("guards", 20f, true); - obj_id room = getCellId(self, "mainhall"); - location termLoc = new location(0.1f, .13f, -5.46f, "tatooine", room); - obj_id destructor = createObject("object/tangible/furniture/imperial/data_terminal_s1.iff", termLoc); - setObjVar(self, "DESTRUCTOR", destructor); - setObjVar(destructor, "bldg", self); - attachScript(destructor, "theme_park.bldg_destroy"); - return SCRIPT_CONTINUE; - } - public int OnTriggerVolumeEntered(obj_id self, String volumeName, obj_id breacher) throws InterruptedException - { - if (!isPlayer(breacher)) - { - return SCRIPT_CONTINUE; - } - if (volumeName.equals("guards")) - { - obj_id g1 = getObjIdObjVar(self, "guard1"); - obj_id g2 = getObjIdObjVar(self, "guard2"); - obj_id g3 = getObjIdObjVar(self, "guard3"); - obj_id g4 = getObjIdObjVar(self, "guard4"); - startCombat(g1, breacher); - startCombat(g2, breacher); - startCombat(g3, breacher); - startCombat(g4, breacher); - } - return SCRIPT_CONTINUE; - } - public int spawnTerminal(obj_id self, dictionary params) throws InterruptedException - { - obj_id room = getCellId(self, "mainhall"); - location termLoc = new location(0.1f, .13f, -5.46f, "tatooine", room); - obj_id destructor = createObject("object/tangible/furniture/imperial/data_terminal_s1.iff", termLoc); - setObjVar(self, "DESTRUCTOR", destructor); - setObjVar(destructor, "bldg", self); - attachScript(destructor, "theme_park.bldg_destroy"); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/containertest.java b/sku.0/sys.server/compiled/game/script/working/cmayer/containertest.java deleted file mode 100644 index 0d6eadd5a..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/containertest.java +++ /dev/null @@ -1,60 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class containertest extends script.base_script -{ - public containertest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("test")) - { - obj_id groupObject = getGroupObject(self); - if (isIdValid(groupObject)) - { - int groupSize = getGroupSize(groupObject); - int pcSize = getPCGroupSize(groupObject); - LOG("GroupTest", "Size: " + groupSize + " PCSIze: " + pcSize); - } - } - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (text.equals("list")) - { - obj_id[] contents = getContents(self); - for (int i = 0; i < contents.length; ++i) - { - debugConsoleMsg(speaker, "I have " + contents[i]); - } - } - else if (text.equals("yaw")) - { - float f = rand(0.0f, 270.0f); - debugConsoleMsg(speaker, "Rotating object " + f); - setYaw(self, f); - } - else if (text.equals("createyaw")) - { - float f = rand(0.0f, 270.0f); - debugConsoleMsg(speaker, "Rotating object " + f); - obj_id obj = createObject("object/building/player/player_house_tatooine_small_style_01.iff", getLocation(speaker)); - persistObject(obj); - setYaw(obj, f); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/inittest.java b/sku.0/sys.server/compiled/game/script/working/cmayer/inittest.java deleted file mode 100644 index 0d4d75c66..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/inittest.java +++ /dev/null @@ -1,21 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class inittest extends script.base_script -{ - public inittest() - { - } - public int OnInitialize(obj_id self) throws InterruptedException - { - debugServerConsoleMsg(self, ("I am initialized")); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/inttest.java b/sku.0/sys.server/compiled/game/script/working/cmayer/inttest.java deleted file mode 100644 index 4b0e082a5..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/inttest.java +++ /dev/null @@ -1,92 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; - -public class inttest extends script.base_script -{ - public inttest() - { - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (text.equals("test")) - { - debugConsoleMsg(speaker, "Yaw is " + getYaw(self)); - setYaw(self, 180); - debugConsoleMsg(speaker, "Yaw is " + getYaw(self)); - } - else if (text.equals("test2")) - { - int x = dataTableSearchColumnForInt(2, 7, "datatables/combat/combat_data.iff"); - debugConsoleMsg(speaker, "Row is " + x); - x = dataTableSearchColumnForInt(2, 8, "datatables/combat/combat_data.iff"); - debugConsoleMsg(speaker, "Invalid Column Row is " + x); - x = dataTableSearchColumnForInt(2, 7, "datatables/combat/combats_data.iff"); - debugConsoleMsg(speaker, "Invalid Datatable Row is " + x); - } - else if (text.equals("test3")) - { - location loc = getLocation(self); - setObjVar(self, "test1", loc); - setObjVar(self, "test2", loc); - setObjVar(self, "test3", loc); - setObjVar(self, "test4", loc); - setObjVar(self, "test5", loc); - setObjVar(self, "test6", loc); - setObjVar(self, "test7", loc); - setObjVar(self, "test8", loc); - setObjVar(self, "test9", loc); - setObjVar(self, "test10", loc); - } - else if (text.equals("test4")) - { - removeObjVar(self, "test1"); - removeObjVar(self, "test2"); - removeObjVar(self, "test3"); - removeObjVar(self, "test4"); - removeObjVar(self, "test5"); - removeObjVar(self, "test6"); - removeObjVar(self, "test7"); - removeObjVar(self, "test8"); - removeObjVar(self, "test9"); - removeObjVar(self, "test10"); - } - else if (text.equals("test5")) - { - Vector ids = new Vector(); - ids.setSize(0); - ids.clear(); - utils.addElement(ids, self); - setObjVar(self, "testids", ids); - } - else if (text.equals("test6")) - { - Vector ids = getResizeableObjIdArrayObjVar(self, "testids"); - int idx = utils.getElementPositionInArray(ids, self); - if (idx > -1) - { - ids = utils.removeElementAt(ids, idx); - setObjVar(self, "testids", ids); - } - } - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("shirt")) - { - obj_id target = getLookAtTarget(self); - boolean retval = equipOverride(target, self); - debugServerConsoleMsg(self, "Retval is " + retval); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/jedi_reset.java b/sku.0/sys.server/compiled/game/script/working/cmayer/jedi_reset.java deleted file mode 100644 index bea585093..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/jedi_reset.java +++ /dev/null @@ -1,194 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; -import script.library.pclib; -import script.library.sui; -import java.util.StringTokenizer; - -public class jedi_reset extends script.base_script -{ - public jedi_reset() - { - } - public static final String SCRIPT_NAME = "cmayer.jedi_reset"; - public static final String COMMAND = "reset_jedi"; - public static final String JEDI_TABLE = "datatables/jedi/jedi_skill_requirements.iff"; - public void resetJedi(obj_id self, obj_id target, int numSkills) throws InterruptedException - { - boolean result = true; - if (result) - { - removeOldJediData(target); - setNewSkillReq(target, numSkills); - sendSystemMessageTestingOnly(self, "Jedi requirements have successfully been reset"); - } - else - { - sendSystemMessageTestingOnly(self, "Jedi requirements were not reset"); - } - return; - } - public int OnAttach(obj_id self) throws InterruptedException - { - if (!isGod(self) || (getGodLevel(self) < 50)) - { - int numSkills = 8; - if (hasObjVar(self, "numJediSkillsToReset")) - { - numSkills = getIntObjVar(self, "numJediSkillsToReset"); - } - resetJedi(self, self, numSkills); - detachScript(self, SCRIPT_NAME); - } - return SCRIPT_CONTINUE; - } - public int OnInitialize(obj_id self) throws InterruptedException - { - if (!isGod(self) || (getGodLevel(self) < 50)) - { - int numSkills = 8; - if (hasObjVar(self, "numJediSkillsToReset")) - { - numSkills = getIntObjVar(self, "numJediSkillsToReset"); - } - resetJedi(self, self, numSkills); - detachScript(self, SCRIPT_NAME); - } - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if ((toLower(text)).startsWith(COMMAND)) - { - StringTokenizer st = new StringTokenizer(text); - if (st.countTokens() != 2) - { - sendSystemMessageTestingOnly(self, "Error: Syntax is \"" + COMMAND + " \""); - return SCRIPT_CONTINUE; - } - String command = st.nextToken(); - int numSkills = utils.stringToInt(st.nextToken()); - if ((numSkills < 1) || (numSkills > 8)) - { - sendSystemMessageTestingOnly(self, "Error: Number of skills must be 1-8"); - return SCRIPT_CONTINUE; - } - obj_id target = getLookAtTarget(self); - if (target == null || !isIdValid(target) || !isPlayer(target)) - { - sendSystemMessageTestingOnly(self, "Error: You must target a valid player"); - return SCRIPT_CONTINUE; - } - if (!hasObjVar(target, "jedi.enabled")) - { - String error = "WARNING: It appears that " + getName(target) + " "; - error += "has not yet met the requirements to activate a force sensitive "; - error += "slot.\n\nDo you still wish to continue resetting this player's "; - error += "Jedi requirements?"; - showWarningSui(self, target, numSkills, error); - return SCRIPT_CONTINUE; - } - resetJedi(self, target, numSkills); - } - return SCRIPT_CONTINUE; - } - public void showWarningSui(obj_id self, obj_id target, int numSkills, String msg) throws InterruptedException - { - int pid = sui.msgbox(self, self, msg, sui.YES_NO, "RESET JEDI", "handleWarningSui"); - if (pid > -1) - { - utils.setScriptVar(self, "resetJedi_target", target); - utils.setScriptVar(self, "resetJedi_numSkills", numSkills); - } - return; - } - public int handleWarningSui(obj_id self, dictionary params) throws InterruptedException - { - int bp = sui.getIntButtonPressed(params); - if (bp == sui.BP_CANCEL) - { - return SCRIPT_CONTINUE; - } - obj_id target = utils.getObjIdScriptVar(self, "resetJedi_target"); - int numSkills = utils.getIntScriptVar(self, "resetJedi_numSkills"); - if (target == null || !isIdValid(target)) - { - sendSystemMessageTestingOnly(self, "Error: Jedi requirements did not reset"); - return SCRIPT_CONTINUE; - } - if (numSkills < 1 || numSkills > 8) - { - sendSystemMessageTestingOnly(self, "Error: Jedi requirements did not reset"); - return SCRIPT_CONTINUE; - } - resetJedi(self, target, numSkills); - return SCRIPT_CONTINUE; - } - public void removeOldJediData(obj_id target) throws InterruptedException - { - if (hasObjVar(target, pclib.OBJVAR_JEDI_SKILL_REQUIREMENTS)) - { - removeObjVar(target, pclib.OBJVAR_JEDI_SKILL_REQUIREMENTS); - } - if (hasObjVar(target, "jedi.timeStamp")) - { - removeObjVar(target, "jedi.timeStamp"); - } - if (hasObjVar(target, "jedi.enabled")) - { - removeObjVar(target, "jedi.enabled"); - } - if (hasObjVar(target, "jediAddedAcknowlege")) - { - removeObjVar(target, "jediAddedAcknowlege"); - } - return; - } - public void setNewSkillReq(obj_id target, int numSkills) throws InterruptedException - { - int rows = dataTableGetNumRows(JEDI_TABLE); - if (numSkills < 1) - { - numSkills = 1; - } - if (numSkills > 8) - { - numSkills = 8; - } - String[] skills = new String[numSkills]; - int n = 0; - while (n < numSkills) - { - String skill = dataTableGetString(JEDI_TABLE, rand(0, (rows - 1)), 0); - if (skill != null && !skill.equals("")) - { - boolean skillNotUsed = true; - for (int i = 0; i < n; i++) - { - if (skills[i] != null && !skills[i].equals("")) - { - if (skills[i].equals(skill)) - { - skillNotUsed = false; - } - } - } - if (skillNotUsed) - { - skills[n] = skill; - n++; - } - } - } - setObjVar(target, pclib.OBJVAR_JEDI_SKILL_REQUIREMENTS, skills); - return; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/lairtest.java b/sku.0/sys.server/compiled/game/script/working/cmayer/lairtest.java deleted file mode 100644 index e7b6c4d44..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/lairtest.java +++ /dev/null @@ -1,83 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.create; -import script.library.utils; - -public class lairtest extends script.base_script -{ - public lairtest() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("makePOI")) - { - debugSpeakMsg(self, "Making lair at your location"); - location locHome = getLocation(self); - String strLairDifficulty = create.getLairDifficulty(4, 40, 20); - obj_id objLair = createObject("object/tangible/lair/npc_lair.iff", locHome); - setObjVar(objLair, "spawning.intDifficultyLevel", 20); - setObjVar(objLair, "spawning.lairDifficulty", strLairDifficulty); - setObjVar(objLair, "spawning.lairType", "evil_tatooine_village"); - messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false); - } - if (strText.equals("lairTest")) - { - debugSpeakMsg(self, "making womprat lair"); - location locHome = getLocation(self); - String strLairDifficulty = create.getLairDifficulty(1, 15, 8); - obj_id objLair = createObject("object/tangible/lair/npc_lair.iff", locHome); - setObjVar(objLair, "spawning.intDifficultyLevel", 8); - setObjVar(objLair, "spawning.lairDifficulty", strLairDifficulty); - setObjVar(objLair, "spawning.lairType", "lesser_desert_womprat"); - setObjVar(objLair, "spawning.target", "object/tangible/lair/base/trash_dark.iff"); - messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false); - } - if (strText.equals("theaterTest1")) - { - debugSpeakMsg(self, "Making lair at your location"); - location locHome = getLocation(self); - String strLairDifficulty = create.getLairDifficulty(4, 40, 20); - obj_id objLair = createObject("object/tangible/lair/npc_lair.iff", locHome); - setObjVar(objLair, "spawning.intDifficultyLevel", 20); - setObjVar(objLair, "spawning.lairDifficulty", strLairDifficulty); - setObjVar(objLair, "spawning.lairType", "patrol_test"); - setObjVar(objLair, "spawning.target", "object/installation/battlefield/destructible/shared_bfield_target_power_generator.iff"); - messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false); - } - if (strText.equals("theaterTest2")) - { - debugSpeakMsg(self, "Making lair at your location"); - location locHome = getLocation(self); - String strLairDifficulty = create.getLairDifficulty(4, 40, 20); - obj_id objLair = createObject("object/tangible/lair/npc_lair.iff", locHome); - setObjVar(objLair, "spawning.intDifficultyLevel", 20); - setObjVar(objLair, "spawning.lairDifficulty", strLairDifficulty); - setObjVar(objLair, "spawning.lairType", "patrol_test"); - setObjVar(objLair, "spawning.target", "object/installation/battlefield/destructible/shared_bfield_target_power_transformer_2.iff"); - messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false); - } - if (strText.equals("sampleHeight")) - { - int intI = 0; - while (intI < 9) - { - location locHome = getLocation(self); - location locTest = utils.getRandomLocationInRing(locHome, 1, 20); - float fltHeight = getHeightAtLocation(locTest.x, locTest.z); - debugSpeakMsg(self, "location tested was " + locTest); - debugSpeakMsg(self, "height at location was " + fltHeight); - intI = intI + 1; - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/lostest.java b/sku.0/sys.server/compiled/game/script/working/cmayer/lostest.java deleted file mode 100644 index 8c087b0c5..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/lostest.java +++ /dev/null @@ -1,42 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class lostest extends script.base_script -{ - public lostest() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("test")) - { - int times = 50; - if (hasObjVar(self, "lostest")) - { - times = getIntObjVar(self, "lostest"); - } - obj_id target = getLookAtTarget(self); - boolean test = canSee(self, target); - if (test) - { - sendSystemMessageTestingOnly(self, "Can See!"); - } - else - { - sendSystemMessageTestingOnly(self, "NOOOO Can See!"); - } - for (int i = 0; i < times; ++i) - { - test = canSee(self, target); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/memtest.java b/sku.0/sys.server/compiled/game/script/working/cmayer/memtest.java deleted file mode 100644 index a9f452716..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/memtest.java +++ /dev/null @@ -1,50 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; - -public class memtest extends script.base_script -{ - public memtest() - { - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (text.equals("test")) - { - dictionary dict = new dictionary(); - if (!hasObjVar(self, "myTest")) - { - messageTo(self, "TestCallback", dict, 1, true); - setObjVar(self, "myTest", 1); - } - } - if (text.equals("end")) - { - removeObjVar(self, "myTest"); - } - return SCRIPT_CONTINUE; - } - public int TestCallback(obj_id self, dictionary params) throws InterruptedException - { - if (hasObjVar(self, "myTest")) - { - debugSpeakMsg(self, "bleh"); - Vector test = new Vector(); - test.setSize(0); - for (int j = 0; j < 2000; ++j) - { - test = utils.addElement(test, j); - } - messageTo(self, "TestCallback", params, 1, true); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/top.java b/sku.0/sys.server/compiled/game/script/working/cmayer/top.java deleted file mode 100644 index 114d6b30a..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/top.java +++ /dev/null @@ -1,24 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class top extends script.base_script -{ - public top() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("test")) - { - debugSpeakMsg(self, "TopScript"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/trigtest.java b/sku.0/sys.server/compiled/game/script/working/cmayer/trigtest.java deleted file mode 100644 index c87fff71b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/trigtest.java +++ /dev/null @@ -1,74 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class trigtest extends script.base_script -{ - public trigtest() - { - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (text.equals("test")) - { - createTriggerVolume("trigTest", 3, true); - } - if (text.equals("end")) - { - removeTriggerVolume("trigTest"); - } - return SCRIPT_CONTINUE; - } - public int OnTriggerVolumeEntered(obj_id self, String triggerVolumeName, obj_id breacher) throws InterruptedException - { - debugSpeakMsg(self, "Entered!"); - return SCRIPT_CONTINUE; - } - public int OnTriggerVolumeExited(obj_id self, String triggerVolumeName, obj_id breacher) throws InterruptedException - { - debugSpeakMsg(self, "Exitted!"); - return SCRIPT_OVERRIDE; - } - public int OnSkillAboutToBeGranted(obj_id self, String name) throws InterruptedException - { - debugSpeakMsg(self, "Entered about to be granted!"); - if (hasObjVar(self, "override_test")) - { - return SCRIPT_OVERRIDE; - } - return SCRIPT_CONTINUE; - } - public int OnSkillAboutToBeRevoked(obj_id self, String name) throws InterruptedException - { - debugSpeakMsg(self, "Entered about to be revoked!"); - if (hasObjVar(self, "override_test")) - { - return SCRIPT_OVERRIDE; - } - return SCRIPT_CONTINUE; - } - public int OnSkillGranted(obj_id self, String name) throws InterruptedException - { - debugSpeakMsg(self, "Entered granted!"); - if (hasObjVar(self, "override_test")) - { - return SCRIPT_OVERRIDE; - } - return SCRIPT_CONTINUE; - } - public int OnSkillRevoked(obj_id self, String name) throws InterruptedException - { - debugSpeakMsg(self, "Entered revoked!"); - if (hasObjVar(self, "override_test")) - { - return SCRIPT_OVERRIDE; - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cmayer/troopertest.java b/sku.0/sys.server/compiled/game/script/working/cmayer/troopertest.java deleted file mode 100644 index ea4d29f2b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cmayer/troopertest.java +++ /dev/null @@ -1,104 +0,0 @@ -package script.working.cmayer; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class troopertest extends script.base_script -{ - public troopertest() - { - } - public obj_id makeStormtrooper(obj_id player, location here) throws InterruptedException - { - String gender = "male"; - String species = "object/creature/player/human_"; - String name = "stormtrooper"; - species = species + gender + ".iff"; - obj_id npc = createObject(species, here); - obj_id clothes1 = createObject("object/tangible/wearables/armor/stormtrooper/armor_stormtrooper_boots.iff", npc, ""); - if (clothes1 == null) - { - debugConsoleMsg(player, "I wasn't able to make boots "); - } - clothes1 = createObject("object/tangible/wearables/armor/stormtrooper/armor_stormtrooper_bicep_l.iff", npc, ""); - if (clothes1 == null) - { - debugConsoleMsg(player, "I wasn't able to make 1 "); - } - clothes1 = createObject("object/tangible/wearables/armor/stormtrooper/armor_stormtrooper_bicep_r.iff", npc, ""); - if (clothes1 == null) - { - debugConsoleMsg(player, "I wasn't able to make 2 "); - } - clothes1 = createObject("object/tangible/wearables/armor/stormtrooper/armor_stormtrooper_bracer_l.iff", npc, ""); - if (clothes1 == null) - { - debugConsoleMsg(player, "I wasn't able to make 3 "); - } - clothes1 = createObject("object/tangible/wearables/armor/stormtrooper/armor_stormtrooper_bracer_r.iff", npc, ""); - if (clothes1 == null) - { - debugConsoleMsg(player, "I wasn't able to make 4 "); - } - clothes1 = createObject("object/tangible/wearables/armor/stormtrooper/armor_stormtrooper_chest_plate.iff", npc, ""); - if (clothes1 == null) - { - debugConsoleMsg(player, "I wasn't able to make 5 "); - } - clothes1 = createObject("object/tangible/wearables/armor/stormtrooper/armor_stormtrooper_gloves.iff", npc, ""); - if (clothes1 == null) - { - debugConsoleMsg(player, "I wasn't able to make 6 "); - } - clothes1 = createObject("object/tangible/wearables/armor/stormtrooper/armor_stormtrooper_helmet.iff", npc, ""); - if (clothes1 == null) - { - debugConsoleMsg(player, "I wasn't able to make 7 "); - } - clothes1 = createObject("object/tangible/wearables/armor/stormtrooper/armor_stormtrooper_leggings.iff", npc, ""); - if (clothes1 == null) - { - debugConsoleMsg(player, "I wasn't able to make 8 "); - } - clothes1 = createObject("object/tangible/wearables/armor/stormtrooper/armor_stormtrooper_utility_belt.iff", npc, ""); - if (clothes1 == null) - { - debugConsoleMsg(player, "I wasn't able to make 9 "); - } - if (false) - { - String clothes_table = "datatables/npc_customization/stormtrooper_clothes.iff"; - int columns = dataTableGetNumColumns(clothes_table); - int intX = 1; - while (intX <= columns) - { - debugConsoleMsg(player, "This is some clothes"); - int clothesRows = dataTableGetNumRows(clothes_table); - int randrow = rand(1, clothesRows); - String clothes = dataTableGetString(clothes_table, randrow, intX - 1); - debugConsoleMsg(player, "Creating " + clothes); - obj_id newClothes = createObject(clothes, npc, ""); - if (newClothes == null) - { - debugConsoleMsg(player, "I wasn't able to make " + clothes); - } - intX = intX + 1; - } - } - return npc; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("test")) - { - location l = getLocation(self); - obj_id test = makeStormtrooper(self, l); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/color_index_testing.java b/sku.0/sys.server/compiled/game/script/working/color_index_testing.java deleted file mode 100644 index 7bcc6287b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/color_index_testing.java +++ /dev/null @@ -1,102 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.hue; -import script.library.sui; -import script.library.utils; - -public class color_index_testing extends script.base_script -{ - public color_index_testing() - { - } - public static final string_id PCOLOR = new string_id("sui", "set_primary_color"); - public static final string_id SCOLOR = new string_id("sui", "set_secondary_color"); - public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info mi) throws InterruptedException - { - if (!isGod(player)) - { - return SCRIPT_CONTINUE; - } - obj_id hueObject = self; - if (!utils.isNestedWithin(hueObject, player)) - { - return SCRIPT_CONTINUE; - } - int mnuPrimaryColor = mi.addRootMenu(menu_info_types.SERVER_MENU9, PCOLOR); - int mnuSecondaryColor = mi.addRootMenu(menu_info_types.SERVER_MENU10, SCOLOR); - return SCRIPT_CONTINUE; - } - public int OnObjectMenuSelect(obj_id self, obj_id player, int item) throws InterruptedException - { - if (!isGod(player)) - { - return SCRIPT_CONTINUE; - } - obj_id hueObject = self; - if (!utils.isNestedWithin(hueObject, player)) - { - return SCRIPT_CONTINUE; - } - if (item == menu_info_types.SERVER_MENU9) - { - sui.colorize(hueObject, player, hueObject, hue.INDEX_1, "handlePrimaryColorize"); - } - if (item == menu_info_types.SERVER_MENU10) - { - sui.colorize(hueObject, player, hueObject, hue.INDEX_2, "handleSecondaryColorize"); - } - return SCRIPT_CONTINUE; - } - public int handlePrimaryColorize(obj_id self, dictionary params) throws InterruptedException - { - obj_id hueObject = self; - int idx = sui.getColorPickerIndex(params); - int bp = sui.getIntButtonPressed(params); - obj_id player = sui.getPlayerId(params); - if (bp == sui.BP_CANCEL) - { - return SCRIPT_CONTINUE; - } - if (idx > -1) - { - custom_var myVar = getCustomVarByName(hueObject, hue.INDEX_1); - if (myVar != null && myVar.isPalColor()) - { - palcolor_custom_var pcVar = (palcolor_custom_var)myVar; - pcVar.setValue(idx); - debugConsoleMsg(player, "index_color_1: " + idx); - } - } - return SCRIPT_CONTINUE; - } - public int handleSecondaryColorize(obj_id self, dictionary params) throws InterruptedException - { - obj_id hueObject = self; - int idx = sui.getColorPickerIndex(params); - int bp = sui.getIntButtonPressed(params); - obj_id player = sui.getPlayerId(params); - if (bp == sui.BP_CANCEL) - { - return SCRIPT_CONTINUE; - } - if (idx > -1) - { - custom_var myVar = getCustomVarByName(hueObject, hue.INDEX_2); - if (myVar != null && myVar.isPalColor()) - { - palcolor_custom_var pcVar = (palcolor_custom_var)myVar; - pcVar.setValue(idx); - debugConsoleMsg(player, "index_color_2: " + idx); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cthurow/moneytest.java b/sku.0/sys.server/compiled/game/script/working/cthurow/moneytest.java deleted file mode 100644 index 7aa21196d..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cthurow/moneytest.java +++ /dev/null @@ -1,180 +0,0 @@ -package script.working.cthurow; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class moneytest extends script.base_script -{ - public moneytest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "money test script attached."); - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - dictionary d = new dictionary(); - if (text.equals("from_named")) - { - boolean boolReturn = transferBankCreditsFromNamedAccount("slush_fund", self, 1000, null, null, null); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("to_named")) - { - boolean boolReturn = transferBankCreditsToNamedAccount(self, "slush_fund", 1000, null, null, null); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("cash_to_object")) - { - boolean boolReturn = transferCashTo(self, obj_id.getObjId(200025), 1000, null, null, null); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("bank_to_object")) - { - boolean boolReturn = transferBankCreditsTo(self, obj_id.getObjId(200025), 1000, null, null, null); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("withdraw")) - { - boolean boolReturn = withdrawCashFromBank(self, 1000, null, null, null); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("deposit")) - { - boolean boolReturn = depositCashToBank(self, 1000, null, null, null); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("from_named_callback")) - { - boolean boolReturn = transferBankCreditsFromNamedAccount("slush_fund", self, 1000, "success", "fail", d); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("to_named_callback")) - { - boolean boolReturn = transferBankCreditsToNamedAccount(self, "slush_fund", 1000, "success", "fail", d); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("cash_to_object_callback")) - { - boolean boolReturn = transferCashTo(self, obj_id.getObjId(200025), 1000, "success", "fail", d); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("bank_to_object_callback")) - { - boolean boolReturn = transferBankCreditsTo(self, obj_id.getObjId(200025), 1000, "success", "fail", d); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("withdraw_callback")) - { - boolean boolReturn = withdrawCashFromBank(self, 1000, "success", "fail", d); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - if (text.equals("deposit_callback")) - { - boolean boolReturn = depositCashToBank(self, 1000, "success", "fail", d); - if (boolReturn) - { - debugSpeakMsg(self, "returned true."); - } - else - { - debugSpeakMsg(self, "returned false."); - } - } - return SCRIPT_CONTINUE; - } - public int success(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "Got success message."); - return SCRIPT_CONTINUE; - } - public int fail(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "Got fail message."); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cthurow/test.java b/sku.0/sys.server/compiled/game/script/working/cthurow/test.java deleted file mode 100644 index de9dc50a6..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cthurow/test.java +++ /dev/null @@ -1,74 +0,0 @@ -package script.working.cthurow; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; - -public class test extends script.base_script -{ - public test() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - sendSystemMessageTestingOnly(self, "Name test script attached. Use \"setname \" to set an object's name to a max-length name."); - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (speaker != self) - { - return SCRIPT_CONTINUE; - } - String[] argv = split(text, ' '); - if (argv[0].equals("setname")) - { - Long id = new Long(argv[1]); - obj_id target = obj_id.getObjId(id); - setName(target, "abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij"); - debugSpeakMsg(self, "named."); - } - if (argv[0].equals("test")) - { - messageTo(self, "TestMessage", null, 0, false); - } - if (argv[0].equals("bigspawn")) - { - location whereAt = getLocation(self); - for (int i = 0; i < 100; ++i) - { - obj_id newObject = createObject("object/tangible/container/general/satchel.iff", whereAt); - } - } - if (argv[0].equals("bigspawn")) - { - location whereAt = getLocation(self); - for (int i = 0; i < 100; ++i) - { - obj_id newObject = createObject("object/tangible/container/general/satchel.iff", whereAt); - } - } - return SCRIPT_CONTINUE; - } - public int TestMessage(obj_id self, dictionary params) throws InterruptedException - { - sendSystemMessageTestingOnly(self, "Test message received."); - return SCRIPT_CONTINUE; - } - public int RecurringTestMessage(obj_id self, dictionary params) throws InterruptedException - { - sendSystemMessageTestingOnly(self, "Recurring test message received."); - return SCRIPT_CONTINUE; - } - public int MessageLost(obj_id self, dictionary params) throws InterruptedException - { - sendSystemMessageTestingOnly(self, "Test message not delivered."); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cthurow/uber.java b/sku.0/sys.server/compiled/game/script/working/cthurow/uber.java deleted file mode 100644 index 6e503cf2a..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cthurow/uber.java +++ /dev/null @@ -1,60 +0,0 @@ -package script.working.cthurow; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; - -public class uber extends script.base_script -{ - public uber() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - sendSystemMessageTestingOnly(self, "Uberscript attached. Say \"uber\" for options."); - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (speaker != self) - { - return SCRIPT_CONTINUE; - } - String[] argv = split(text, ' '); - if (argv[0].equals("uber")) - { - sendSystemMessageTestingOnly(self, "List of commands:vendor_skills house generator factory bank_terminal"); - } - if (argv[0].equals("house")) - { - obj_id inventory = utils.getInventoryContainer(self); - createObject("object/tangible/deed/player_house_deed/tatooine_house_small_deed.iff", inventory, ""); - sendSystemMessageTestingOnly(self, "Housified."); - } - if (argv[0].equals("generator")) - { - obj_id inventory = utils.getInventoryContainer(self); - createObject("object/tangible/deed/generator_deed/power_generator_fusion_deed.iff", inventory, ""); - sendSystemMessageTestingOnly(self, "Generated."); - } - if (argv[0].equals("factory")) - { - obj_id inventory = utils.getInventoryContainer(self); - createObject("object/tangible/deed/factory_deed/item_factory_deed.iff", inventory, ""); - sendSystemMessageTestingOnly(self, "Factored."); - } - if (argv[0].equals("bank_terminal")) - { - obj_id inventory = utils.getInventoryContainer(self); - createObject("object/tangible/terminal/terminal_bank.iff", getLocation(self)); - sendSystemMessageTestingOnly(self, "terminated."); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/cthurow/veterantest.java b/sku.0/sys.server/compiled/game/script/working/cthurow/veterantest.java deleted file mode 100644 index 081ba46d5..000000000 --- a/sku.0/sys.server/compiled/game/script/working/cthurow/veterantest.java +++ /dev/null @@ -1,141 +0,0 @@ -package script.working.cthurow; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.features; -import script.library.sui; -import script.library.utils; - -public class veterantest extends script.base_script -{ - public veterantest() - { - } - public static final String ANNOUNCEMENT_BOX_TITLE = "Announcement Box Title"; - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "veteran test script attached. Say \"lewt\" to get stuff."); - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (text.equals("lewt")) - { - checkForVeteranRewards(self); - } - return SCRIPT_CONTINUE; - } - public void checkForVeteranRewards(obj_id self) throws InterruptedException - { - } - public int handleRewardAnnouncement(obj_id self, dictionary params) throws InterruptedException - { - String event = utils.getStringScriptVar(self, "veteran_rewards.event"); - int rowSelected = sui.getListboxSelectedRow(params); - debugSpeakMsg(self, "In handleRewardAnnouncement. Row selected is " + rowSelected); - if (rowSelected == 0) - { - chooseRewardForEvent(self, event); - } - else - { - if (rowSelected == 1) - { - launchClientWebBrowser(self, veteranGetEventUrl(event)); - checkForVeteranRewards(self); - } - if (rowSelected == 2) - { - return SCRIPT_CONTINUE; - } - int waitForNextPrompt = 0; - if (rowSelected == 3) - { - waitForNextPrompt = 24 * 60 * 60; - } - if (rowSelected == 4) - { - waitForNextPrompt = 7 * 24 * 60 * 60; - } - int gameTime = getGameTime(); - int nextPromptTime = gameTime + waitForNextPrompt; - setObjVar(self, "veteran_rewards.nextPromptTime", nextPromptTime); - } - return SCRIPT_CONTINUE; - } - public void chooseRewardForEvent(obj_id self, String event) throws InterruptedException - { - String[] rewardChoices = veteranGetRewardChoicesDescriptions(self, event); - String[] rewardChoicesTags = veteranGetRewardChoicesTags(self, event); - utils.setScriptVar(self, "veteran_rewards.event", event); - utils.setScriptVar(self, "veteran_rewards.rewardTags", rewardChoicesTags); - if (rewardChoices.length == 0) - { - } - else if (rewardChoices.length == 1) - { - veteranClaimReward(self, event, rewardChoicesTags[0]); - } - else - { - String[] choicesWithLaunchWeb = new String[rewardChoices.length + 1]; - choicesWithLaunchWeb[0] = "@veteran:launch_web_browser_for_event"; - for (int i = 0; i < rewardChoices.length; ++i) - { - choicesWithLaunchWeb[i + 1] = rewardChoices[i]; - } - int pid = sui.listbox(self, self, veteranGetEventDescription(event), sui.OK_CANCEL, sui.DEFAULT_TITLE, choicesWithLaunchWeb, "rewardSelectHandler", true, true); - if (pid < 0) - { - debugSpeakMsg(self, "Could not create sui reward list for player, error = " + pid); - } - } - } - public int rewardSelectHandler(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "In rewardSelectHandler message handler"); - if ((params == null) || (params.isEmpty())) - { - return SCRIPT_CONTINUE; - } - int bp = sui.getIntButtonPressed(params); - int rowSelected = sui.getListboxSelectedRow(params); - if (bp == sui.BP_CANCEL || rowSelected < 0) - { - debugSpeakMsg(self, "Cancel was pressed or no row was picked."); - return SCRIPT_CONTINUE; - } - String event = utils.getStringScriptVar(self, "veteran_rewards.event"); - if (rowSelected == 0) - { - launchClientWebBrowser(self, veteranGetEventUrl(event)); - checkForVeteranRewards(self); - } - else - { - String[] rewardChoicesTags = utils.getStringArrayScriptVar(self, "veteran_rewards.rewardTags"); - debugSpeakMsg(self, "Choice is " + event + ":" + rewardChoicesTags[rowSelected - 1]); - veteranClaimReward(self, event, rewardChoicesTags[rowSelected - 1]); - } - return SCRIPT_CONTINUE; - } - public int veteranItemGrantSucceeded(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "In veteranItemGrantSucceeded message handler"); - sendSystemMessage(self, new string_id("veteran", "item_grant_succeeded")); - checkForVeteranRewards(self); - return SCRIPT_CONTINUE; - } - public int veteranItemGrantFailed(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "In veteranItemGrantFailed message handler"); - sendSystemMessage(self, new string_id("veteran", "item_grant_failed")); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/dantest.java b/sku.0/sys.server/compiled/game/script/working/dantest.java deleted file mode 100644 index 04a3996f3..000000000 --- a/sku.0/sys.server/compiled/game/script/working/dantest.java +++ /dev/null @@ -1,2817 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.callable; -import script.library.locations; -import script.library.loot; -import script.library.npe; -import script.library.static_item; -import script.library.vehicle; -import script.library.armor; -import script.library.chat; -import script.library.space_quest; -import script.library.anims; -import script.library.sequencer; -import script.library.sui; -import script.library.gcw; -import script.library.space_pilot_command; -import script.library.factions; -import script.library.healing; -import script.library.planetary_map; -import script.library.player_structure; -import script.library.space_battlefield; -import script.library.space_utils; -import script.library.ship_ai; -import script.library.space_combat; -import script.library.space_transition; -import script.library.space_crafting; -import script.library.datatable; -import script.library.battlefield; -import script.library.create; -import script.library.utils; -import script.library.skill; -import script.library.pclib; -import script.library.regions; -import script.library.dot; -import script.library.pet_lib; -import script.library.space_create; -import script.library.trial; - -public class dantest extends script.base_script -{ - public dantest() - { - } - public static final int SPAWN_TEMPLATE_CHECK_DISTANCE = 128; - public static final int SPAWN_CHECK_TEMPLATE_LIMIT = 140; - public static final int SPAWN_THEATER_CHECK_DISTANCE = 200; - public static final int SPAWN_CHECK_DISTANCE = 64; - public static final int SPAWN_CHECK_LIMIT = 15; - public static final int SPAWN_CHECK_THEATER_LIMIT = 1; - public String getLevelString(int intLevel) throws InterruptedException - { - if (intLevel <= 10) - { - return "1_10"; - } - if (intLevel <= 20) - { - return "11_20"; - } - if (intLevel <= 30) - { - return "21_30"; - } - if (intLevel <= 40) - { - return "31_40"; - } - if (intLevel <= 50) - { - return "41_50"; - } - if (intLevel <= 60) - { - return "51_60"; - } - if (intLevel <= 70) - { - return "61_70"; - } - if (intLevel <= 80) - { - return "71_80"; - } - if (intLevel <= 90) - { - return "81_90"; - } - return "81_90"; - } - public int checkDifficulty(obj_id self, dictionary params) throws InterruptedException - { - int intRawDifficulty = getLevel(self); - sendSystemMessageTestingOnly(self, "getLevel returned " + intRawDifficulty); - if (intRawDifficulty == 0) - { - sendSystemMessageTestingOnly(self, "you lost your difficulty!"); - deltadictionary dctScriptVars = self.getScriptVars(); - sendSystemMessageTestingOnly(self, "Scriptvars are " + dctScriptVars.toString()); - } - messageTo(self, "checkDifficulty", null, 3, false); - return SCRIPT_CONTINUE; - } - public void setupJediTrainer(obj_id self) throws InterruptedException - { - final String[] TRAINER_TYPES = - { - "trainer_brawler" - }; - String strPrimaryCategory = "trainer"; - String strSecondaryCategory = TRAINER_TYPES[rand(0, TRAINER_TYPES.length - 1)]; - map_location[] mapLocations = getPlanetaryMapLocations(strPrimaryCategory, strSecondaryCategory); - if ((mapLocations == null) || (mapLocations.length == 0)) - { - location locTest = getLocation(self); - LOG("DESIGNER_FATAL", "JEDI : For planet " + locTest.area + ", primary category : " + strPrimaryCategory + " and secondary category " + strSecondaryCategory + " No planetary map location was found"); - return; - } - int intRoll = rand(0, mapLocations.length - 1); - location locHome = getLocation(self); - location locTest = new location(); - locTest.x = mapLocations[intRoll].getX(); - locTest.z = mapLocations[intRoll].getY(); - locTest.area = locHome.area; - setObjVar(self, "jedi.locTrainerLocation", locTest); - return; - } - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - String[] strCommands = split(strText, ' '); - if (strCommands[0].equalsIgnoreCase("march")) - { - play2dNonLoopingMusic(self, "sound/mus_imperial_march_excerpt.snd"); - return SCRIPT_CONTINUE; - } - if (strCommands[0].equalsIgnoreCase("hangar")) - { - location myLoc = new location(getLocation(self)); - obj_id bldg = getTopMostContainer(self); - warpPlayer(self, "space_light1", 0, 0, 0, bldg, "elevator_e3_down", -74.5f, 204.9f, 330.8f); - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("exception")) - { - obj_id objTest = null; - space_utils.notifyObject(objTest, "fixit", null); - } - if (strCommands[0].equals("shipStatus")) - { - obj_id objShip = getPilotedShip(self); - int[] intSlots = space_crafting.getShipInstalledSlots(objShip); - for (int intI = 0; intI < intSlots.length; intI++) - { - String strName = ship_chassis_slot_type.names[intSlots[intI]]; - debugConsoleMsg(self, "Item: " + strName); - debugConsoleMsg(self, "General Efficiency: " + getShipComponentEfficiencyGeneral(objShip, intSlots[intI])); - debugConsoleMsg(self, "Energy Efficiency: " + getShipComponentEfficiencyEnergy(objShip, intSlots[intI])); - debugConsoleMsg(self, "Current Hitpoints: " + getShipComponentHitpointsCurrent(objShip, intSlots[intI])); - debugConsoleMsg(self, "Maximum Hitpoints: " + getShipComponentHitpointsMaximum(objShip, intSlots[intI])); - } - } - if (strCommands[0].equals("validateCharacter")) - { - String strObject = strCommands[1]; - sendSystemMessageTestingOnly(self, "strCommands[1] is " + strObject); - obj_id objTarget = utils.stringToObjId(strObject); - obj_id objWeapon = getDefaultWeapon(objTarget); - sendSystemMessageTestingOnly(self, "Weapon Speed is " + getWeaponAttackSpeed(objWeapon)); - sendSystemMessageTestingOnly(self, "template is " + getTemplateName(objWeapon)); - sendSystemMessageTestingOnly(self, "Run Speed of target is " + getRunSpeed(objTarget)); - } - if (strCommands[0].equals("moveTestOn")) - { - applySkillStatisticModifier(self, "slope_move", 30); - sendSystemMessageTestingOnly(self, "on"); - } - if (strCommands[0].equals("moveTestOff")) - { - applySkillStatisticModifier(self, "slope_move", -10); - sendSystemMessageTestingOnly(self, "off"); - } - if (strCommands[0].equals("gcwCrap")) - { - gcw.incrementGCWStanding(self, self); - sendSystemMessageTestingOnly(self, "YEAH"); - } - if (strCommands[0].equals("unarmedSpeed")) - { - obj_id objWeapon = getDefaultWeapon(self); - sendSystemMessageTestingOnly(self, "Weapon Speed s " + getWeaponAttackSpeed(objWeapon)); - sendSystemMessageTestingOnly(self, "template is " + getTemplateName(objWeapon)); - } - if (strCommands[0].equals("setVehicleSpeed")) - { - obj_id objVehicle = getMountId(self); - vehicle.initializeVehicle(objVehicle, self); - sendSystemMessageTestingOnly(self, "= " + getTemplateName(objVehicle)); - } - if (strCommands[0].equals("testTarget")) - { - setCombatTarget(self, getLookAtTarget(self)); - sendSystemMessageTestingOnly(self, "asdsa"); - } - if (strCommands[0].equals("show3po")) - { - string_id strSpam = new string_id("beta", "blank_line"); - npe.commTutorialPlayer(self, self, 20, strSpam, "", "object/mobile/c_3po.iff"); - sendSystemMessageTestingOnly(self, "asdadasd"); - } - if (strCommands[0].equals("testStatup")) - { - skill.recalcPlayerPools(self, true); - sendSystemMessageTestingOnly(self, "asdsa"); - } - if (strCommands[0].equals("checkReimburse")) - { - String[] strArray = new String[2]; - strArray[0] = "object/weapon/ranged/rifle/rifle_dlt20.iff"; - strArray[1] = "object/weapon/ranged/rifle/rifle_t21.iff"; - setObjVar(self, "item_reimbursement_list", strArray); - sendSystemMessageTestingOnly(self, "Set"); - } - if (strCommands[0].equals("checkStringId")) - { - string_id strSpam = new string_id("faction/faction_hq/faction_hq_response", "terminal_response23"); - sendSystemMessage(self, strSpam); - String strTest = getString(strSpam); - sendSystemMessageTestingOnly(self, "strTest is " + strTest); - strSpam = new string_id("gcw", "newsnet_extra"); - strTest = getString(strSpam); - sendSystemMessageTestingOnly(self, "strTest is " + strTest); - } - if (strCommands[0].equals("countMobs")) - { - int intMobs = 0; - obj_id[] objObjects = getObjectsInRange(getLocation(self), 320000); - for (int intI = 0; intI < objObjects.length; intI++) - { - if (isMob(objObjects[intI])) - { - intMobs++; - } - else - { - obj_id[] objContents = utils.getContents(objObjects[intI], true); - if (objContents != null) - { - for (int intJ = 0; intJ < objContents.length; intJ++) - { - if (isMob(objContents[intJ])) - { - sendSystemMessageTestingOnly(self, "Found mob in " + objContents[intI]); - intMobs++; - } - } - } - } - } - sendSystemMessageTestingOnly(self, "Found " + intMobs); - } - if (strCommands[0].equals("findMobs")) - { - obj_id[] objMobs = getAllObjectsWithObjVar(getLocation(self), 32000f, "ai"); - int intRoll = rand(0, objMobs.length - 1); - sendSystemMessageTestingOnly(self, "Try "); - int intTest = 0; - String strTest = ""; - Vector objDungeons = new Vector(); - objDungeons.setSize(0); - Vector intCounts = new Vector(); - intCounts.setSize(0); - for (int intI = 0; intI < objMobs.length; intI++) - { - if (hasCondition(objMobs[intI], CONDITION_HIBERNATING)) - { - intTest++; - } - obj_id objTest = getTopMostContainer(objMobs[intI]); - int intIndex = utils.getElementPositionInArray(objDungeons, objTest); - if (intIndex < 0) - { - objDungeons = utils.addElement(objDungeons, objTest); - intCounts = utils.addElement(intCounts, 0); - } - else - { - int intCount = ((Integer)intCounts.get(intIndex)).intValue(); - intCount++; - intCounts.set(intIndex, new Integer(intCount)); - } - } - for (int intI = 0; intI < objDungeons.size(); intI++) - { - strTest += "For " + getTemplateName(((obj_id)objDungeons.get(intI))) + " NPC Count is " + ((Integer)intCounts.get(intI)).intValue() + "\r\n"; - sendSystemMessageTestingOnly(self, "For " + getTemplateName(((obj_id)objDungeons.get(intI))) + " NPC Count is " + ((Integer)intCounts.get(intI)).intValue()); - LOG("npe", "For " + getTemplateName(((obj_id)objDungeons.get(intI))) + " NPC Count is " + ((Integer)intCounts.get(intI)).intValue()); - } - sendSystemMessageTestingOnly(self, "Total Hibernating Mob Count is " + intTest + " from " + objMobs.length); - strTest += "Total Hibernating Mob Count is " + intTest + " from " + objMobs.length; - saveTextOnClient(self, "dungeon1.txt", strTest); - } - if (strCommands[0].equals("dumpLocations")) - { - String strTest = ""; - obj_id objBuilding = getTopMostContainer(self); - obj_id[] objContents = getShipContents(objBuilding); - for (int intI = 0; intI < objContents.length; intI++) - { - if (hasScript(objContents[intI], "systems.spawning.spawner_area")) - { - String strName = getStringObjVar(objContents[intI], "strName"); - strTest += getDumpString(objContents[intI], strName); - } - else if (!hasScript(objContents[intI], "content_tools.sequencer_object")) - { - if (!hasScript(objContents[intI], "systems.spawning.spawned_tracker")) - { - String strName = getEncodedName(objContents[intI]); - if (strName == null) - { - strName = getName(objContents[intI]); - } - int intIndex = strName.indexOf("@"); - if (intIndex > -1) - { - strName = getString(utils.unpackString(strName)); - } - strTest += getDumpString(objContents[intI], strName); - } - } - } - saveTextOnClient(self, "everything.txt", strTest); - sendSystemMessageTestingOnly(self, "length was " + objContents.length); - } - if (strCommands[0].equals("checkForceRegen")) - { - int baseRegenRate = getSkillStatisticModifier(self, "jedi_force_power_regen"); - float regenRate = (float)baseRegenRate; - sendSystemMessageTestingOnly(self, "regen Rate base is " + regenRate); - float fltActualRegen = getForcePowerRegenRate(self); - sendSystemMessageTestingOnly(self, "Actual Modified Regen is " + fltActualRegen); - } - if (strCommands[0].equals("checkRate")) - { - obj_id objTarget = getLookAtTarget(self); - int intRate = player_structure.getMaintenanceRate(objTarget); - sendSystemMessageTestingOnly(self, "rate is " + intRate); - } - if (strCommands[0].equals("goOnLeave")) - { - factions.goOnLeaveWithDelay(self, 1.0f); - sendSystemMessageTestingOnly(self, "GOING"); - } - if (strCommands[0].equals("startFlash")) - { - newbieTutorialHighlightUIElement(self, "/GroundHUD.Toolbar.volume.0", true); - sendSystemMessageTestingOnly(self, "ON"); - } - if (strCommands[0].equals("stopFlash")) - { - newbieTutorialHighlightUIElement(self, "/GroundHUD.Toolbar.volume.0", false); - sendSystemMessageTestingOnly(self, "OFF"); - } - if (strCommands[0].equals("fixLots")) - { - adjustLotCount(self, 10); - sendSystemMessageTestingOnly(self, "fixed"); - } - if (strCommands[0].equals("startLoop")) - { - messageTo(getLookAtTarget(self), "updateGCWInfo", null, 30, false); - sendSystemMessageTestingOnly(self, "Looping"); - } - if (strCommands[0].equals("setHyperspaceLoc")) - { - setObjVar(self, "trHyperspace", getTransform_o2p(space_transition.getContainingShip(self))); - sendSystemMessageTestingOnly(self, "Set Transform"); - } - if (strCommands[0].equals("fakeHyperspace")) - { - transform trTest = getTransformObjVar(self, "trHyperspace"); - obj_id objTest = space_create.createShipHyperspace("imp_tie_bomber_tier1", trTest, null); - setLookAtTarget(self, objTest); - sendSystemMessageTestingOnly(self, "Made " + objTest + " at " + getLocation(objTest) + " and you are at " + getLocation(space_transition.getContainingShip(self))); - } - if (strCommands[0].equals("hitMe")) - { - startCombat(getLookAtTarget(self), self); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("welcomeAboard")) - { - obj_id objTarget = getLookAtTarget(self); - chat.chat(objTarget, "Welcome aboard, Sir. Lord Vader is waiting for you on the bridge."); - doAnimationAction(objTarget, anims.PLAYER_SALUTE2); - return SCRIPT_OVERRIDE; - } - if (strCommands[0].equals("resetStormtroopers")) - { - obj_id[] objTestObjects = getAllObjectsWithTemplate(getLocation(self), 2000, "object/mobile/stormtrooper.iff"); - for (int intI = 0; intI < objTestObjects.length; intI++) - { - detachScript(objTestObjects[intI], "e3demo.e3_stormtrooper"); - attachScript(objTestObjects[intI], "e3demo.e3_stormtrooper"); - } - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("makeStormtroopers")) - { - location locTest = getLocation(self); - locTest.x = 30; - locTest.y = 205; - locTest.z = 318; - for (int intI = 0; intI < 6; intI++) - { - obj_id objTest = createObject("object/mobile/stormtrooper.iff", locTest); - attachScript(objTest, "e3demo.e3_stormtrooper"); - locTest.z = locTest.z - 1.5f; - } - locTest.x = 28; - locTest.y = 205; - locTest.z = 318; - for (int intI = 0; intI < 6; intI++) - { - obj_id objTest = createObject("object/mobile/stormtrooper.iff", locTest); - attachScript(objTest, "e3demo.e3_stormtrooper"); - locTest.z = locTest.z - 1.5f; - } - } - if (strCommands[0].equals("lifeDay")) - { - location locTest = getLocation(self); - final String[] strItems = - { - "object/tangible/furniture/decorative/event_chewbacca_toy.iff", - "object/tangible/furniture/decorative/event_lifeday05_painting_01.iff", - "object/tangible/furniture/decorative/event_lifeday05_painting_02.iff", - "object/tangible/furniture/decorative/event_lifeday05_painting_03.iff", - "object/tangible/furniture/decorative/event_wookiee_rifle_display.iff", - "object/tangible/furniture/decorative/event_wookiee_shield.iff", - "object/tangible/furniture/decorative/event_wroshyr_tree.iff", - "object/tangible/painting/painting_wookiee_m.iff", - "object/tangible/painting/painting_wookiee_f.iff", - "object/tangible/painting/painting_trees_s01.iff", - "object/tangible/loot/quest/lifeday_orb.iff", - "object/tangible/wearables/wookiee/wke_lifeday_robe.iff" - }; - for (int intI = 0; intI < strItems.length; intI++) - { - locTest.x = locTest.x + 3; - obj_id objTest = createObject(strItems[intI], locTest); - } - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("decrementScore")) - { - setObjVar(self, "faction", strCommands[1]); - gcw.decrementGCWScore(self); - sendSystemMessageTestingOnly(self, "Decrementing"); - } - if (strCommands[0].equals("steal")) - { - obj_id myPack = utils.getInventoryContainer(self); - loot.generateTheftLoot(myPack, getLookAtTarget(self), 0, 1); - } - if (strCommands[0].equals("incrementScore")) - { - setObjVar(self, "faction", strCommands[1]); - gcw.incrementGCWScore(self); - sendSystemMessageTestingOnly(self, "Incrementing"); - } - if (strCommands[0].equals("forceSpawn")) - { - messageTo(getLookAtTarget(self), "doSpawnEvent", null, 1, false); - sendSystemMessageTestingOnly(self, "Doing spawny thing"); - } - if (strCommands[0].equals("forceMaintenance")) - { - obj_id objTarget = getLookAtTarget(self); - int intLoops = 5; - int intTimeStamp = intLoops * 1800; - int intTime = getGameTime(); - intTime = intTime - intTimeStamp; - setObjVar(objTarget, player_structure.VAR_LAST_MAINTANENCE, intTimeStamp); - dictionary dctParams = new dictionary(); - dctParams.put("objSender", self); - messageTo(objTarget, "OnMaintenanceLoop", dctParams, 0, false); - sendSystemMessageTestingOnly(self, "Sent maintenance loop request to " + objTarget); - } - if (strCommands[0].equals("shootTest")) - { - setState(self, STATE_COMBAT, true); - setCombatTarget(self, getLookAtTarget(self)); - sequencer.doCombatAnimation(self, getLookAtTarget(self), "fire_1_single_light"); - sendSystemMessageTestingOnly(self, "s"); - } - if (strCommands[0].equals("twiddle")) - { - doAnimationAction(self, anims.PLAYER_USE_GENERIC_OBJECT_MEDIUM); - } - if (strCommands[0].equals("validateSequencer")) - { - obj_id master = sequencer.getSequenceObject(strCommands[1]); - sendSystemMessageTestingOnly(self, "" + master); - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("forceMaintenanceLong")) - { - obj_id objTarget = getLookAtTarget(self); - int intLoops = 45; - int intTimeStamp = intLoops * 1800; - int intTime = getGameTime(); - intTime = intTime - intTimeStamp; - setObjVar(objTarget, player_structure.VAR_LAST_MAINTANENCE, intTimeStamp); - messageTo(objTarget, "OnMaintenanceLoop", null, 0, false); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("sellItemTest")) - { - obj_id objItem = createObject("object/weapon/ranged/rifle/rifle_t21.iff", getLocation(self)); - setObjVar(objItem, "junkDealer.intPrice", 100); - attachScript(objItem, "object.autostack"); - } - if (strCommands[0].equals("verboseDebug")) - { - setObjVar(self, "verboseDebug", 1); - sendSystemMessageTestingOnly(self, "Debug on"); - } - if (strCommands[0].equals("makeGuy")) - { - location here = getLocation(self); - obj_id npc = create.object("commoner", here); - attachScript(npc, "systems.missions.dynamic.mission_deliver_npc"); - } - if (strCommands[0].equals("checkMissions")) - { - obj_id[] objMissions = getMissionObjects(self); - for (int intI = 0; intI < objMissions.length; intI++) - { - location locTest = getMissionStartLocation(objMissions[intI]); - sendSystemMessageTestingOnly(self, "Start: " + locTest); - float dist = utils.getDistance2D(getLocation(self), locTest); - sendSystemMessageTestingOnly(self, "dist is " + dist); - locTest = getMissionEndLocation(objMissions[intI]); - sendSystemMessageTestingOnly(self, "End: " + locTest); - dist = utils.getDistance2D(getLocation(self), locTest); - sendSystemMessageTestingOnly(self, "dist is " + dist); - } - } - if (strCommands[0].equals("verboseDebug")) - { - setObjVar(self, "verboseDebug", 1); - sendSystemMessageTestingOnly(self, "Debug on"); - } - if (strCommands[0].equals("makeGuy")) - { - location here = getLocation(self); - obj_id npc = create.object("commoner", here); - attachScript(npc, "systems.missions.dynamic.mission_deliver_npc"); - } - if (strCommands[0].equals("checkMissions")) - { - obj_id[] objMissions = getMissionObjects(self); - for (int intI = 0; intI < objMissions.length; intI++) - { - location locTest = getMissionStartLocation(objMissions[intI]); - sendSystemMessageTestingOnly(self, "Start: " + locTest); - float dist = utils.getDistance2D(getLocation(self), locTest); - sendSystemMessageTestingOnly(self, "dist is " + dist); - locTest = getMissionEndLocation(objMissions[intI]); - sendSystemMessageTestingOnly(self, "End: " + locTest); - dist = utils.getDistance2D(getLocation(self), locTest); - sendSystemMessageTestingOnly(self, "dist is " + dist); - } - } - if (strCommands[0].equals("testFaction")) - { - int intFaction = pvpGetAlignedFaction(self); - sendSystemMessageTestingOnly(self, "I am " + intFaction); - obj_id objTarget = getLookAtTarget(self); - intFaction = pvpGetAlignedFaction(objTarget); - sendSystemMessageTestingOnly(self, "They are " + intFaction); - } - if (strCommands[0].equals("setupRebelFaction")) - { - factions.addFactionStanding(self, factions.FACTION_REBEL, 30000); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("setupImperialFaction")) - { - factions.addFactionStanding(self, factions.FACTION_IMPERIAL, 30000); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("negativeImperial")) - { - factions.addFactionStanding(self, factions.FACTION_IMPERIAL, -30000); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("negativeRebel")) - { - factions.addFactionStanding(self, factions.FACTION_REBEL, -30000); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("negativeImperial")) - { - factions.addFactionStanding(self, factions.FACTION_IMPERIAL, -30000); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("negativeRebel")) - { - factions.addFactionStanding(self, factions.FACTION_REBEL, -30000); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("setupImperialFaction")) - { - factions.addFactionStanding(self, factions.FACTION_IMPERIAL, 30000); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("logTest")) - { - LOG("space", "WOBBLE"); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("testReload")) - { - obj_id ship = space_transition.getContainingShip(self); - int[] slots = space_crafting.getShipInstalledSlots(ship); - for (int i = 0; i < slots.length; i++) - { - sendSystemMessageTestingOnly(self, "checking slot " + slots[i]); - if (space_crafting.isMissileSlot(ship, slots[i])) - { - space_pilot_command.weaponLauncherSpaceReload(ship, self, slots[i]); - } - else if (space_crafting.isCounterMeasureSlot(ship, slots[i])) - { - sendSystemMessageTestingOnly(self, "aweads"); - space_pilot_command.countermeasureLauncherSpaceReload(ship, self, slots[i]); - } - } - sendSystemMessageTestingOnly(self, "WACHSD"); - } - if (strCommands[0].equals("registerRecruiter")) - { - obj_id objTarget = getLookAtTarget(self); - String strMapName = "pilot_recruiter"; - String strPrimaryCategory = "space"; - String strSecondaryCategory = "space_recruiter"; - string_id strMapNameId = new string_id("map_loc_type_n", strMapName); - obj_id objContainer = getTopMostContainer(objTarget); - location locTest = getLocation(objTarget); - if (isIdValid(objContainer)) - { - locTest = getLocation(objContainer); - } - addPlanetaryMapLocation(objTarget, utils.packStringId(strMapNameId), (int)locTest.x, (int)locTest.z, strPrimaryCategory, strSecondaryCategory, MLT_STATIC, planetary_map.NO_FLAG); - sendSystemMessageTestingOnly(self, "Registered the whozit"); - } - if (strCommands[0].equals("countShips")) - { - obj_id[] objStuff = getAllObjectsWithScript(getLocation(space_transition.getContainingShip(self)), 32000, "space.combat.combat_ship"); - sendSystemMessageTestingOnly(self, "objStuff length is " + objStuff.length); - } - if (strCommands[0].equals("countLair")) - { - obj_id[] objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/creature/player/bothan_male.iff"); - sendSystemMessageTestingOnly(self, "objStuff length is " + objStuff.length); - int intCount = 0; - objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/tangible/location/location_32.iff"); - intCount = intCount + objStuff.length; - objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/tangible/location/location_48.iff"); - intCount = intCount + objStuff.length; - objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/tangible/location/location_64.iff"); - intCount = intCount + objStuff.length; - objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/tangible/location/location_80.iff"); - intCount = intCount + objStuff.length; - objStuff = getAllObjectsWithTemplate(getLocation(self), 32000, "object/tangible/location/location_96.iff"); - intCount = intCount + objStuff.length; - sendSystemMessageTestingOnly(self, "intCount is " + intCount); - } - if (strCommands[0].equals("clearImperialFaction")) - { - factions.addFactionStanding(self, factions.FACTION_IMPERIAL, -1000); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("zoneStatus")) - { - obj_id objShip = getPilotedShip(self); - obj_id[] objSpawnedShips = getAllObjectsWithObjVar(getLocation(objShip), 32000, "objParent"); - obj_id[] objAllShips = getAllObjectsWithScript(getLocation(objShip), 32000, "space.combat.combat_ship"); - sendSystemMessageTestingOnly(self, "Ships From Spawners: " + objSpawnedShips.length); - sendSystemMessageTestingOnly(self, "Ships From Spawners and Missions: " + objAllShips.length); - obj_id[] objSpawners = getAllObjectsWithTemplate(getLocation(objShip), 32000, "object/tangible/space/content_infrastructure/basic_spawner.iff"); - for (int intI = 0; intI < objSpawners.length; intI++) - { - obj_id objParent = objSpawners[intI]; - LOG("space", "Checking " + objParent); - int intSpawnCount = getIntObjVar(objParent, "intSpawnCount"); - int intActualCount = 0; - for (int intJ = 0; intJ < objSpawnedShips.length; intJ++) - { - obj_id objSpawnParent = getObjIdObjVar(objSpawnedShips[intJ], "objParent"); - LOG("space", "Checking spawn parent of " + objSpawnParent); - if (objSpawnParent == objParent) - { - intActualCount = intActualCount + 1; - } - } - sendSystemMessageTestingOnly(self, objParent + " Set count is :" + intSpawnCount + " and spawned count is: " + intActualCount); - if (intActualCount > intSpawnCount) - { - sendSystemMessageTestingOnly(self, "WARNING! WARNING! WARNING! SPAWN COUNT IS OVER SET COUNT!@!@"); - } - } - } - if (strCommands[0].equals("youDead")) - { - attachScript(getLookAtTarget(self), "e3demo.e3_deadguy"); - } - if (strCommands[0].equals("ownYou")) - { - obj_id objTest = getTopMostContainer(self); - setOwner(objTest, self); - sendSystemMessageTestingOnly(self, "Owned"); - } - if (strCommands[0].equals("makeShip")) - { - obj_id objTest = space_transition.getContainingShip(self); - if (!isIdValid(objTest)) - { - objTest = self; - } - if (strCommands.length > 1) - { - obj_id objShip = createObject(strCommands[1], getLocation(objTest)); - setOwner(objShip, self); - } - } - if (strCommands[0].equals("whereAmI")) - { - obj_id objTest = space_transition.getContainingShip(self); - sendSystemMessageTestingOnly(self, "I am at " + getLocation(objTest)); - } - if (strCommands[0].equals("trainerTest")) - { - space_utils.openCommChannelAfterLoad(getPilotedShip(self), getPilotedShip(self)); - sendSystemMessageTestingOnly(self, "done"); - } - if (strCommands[0].equals("fixChassis")) - { - obj_id objTarget = getLookAtTarget(self); - setShipMaximumChassisHitPoints(objTarget, 10000); - setShipCurrentChassisHitPoints(objTarget, 10000); - } - if (strCommands[0].equals("addBooster")) - { - boolean boolTest = shipPseudoInstallComponent(space_transition.getContainingShip(self), space_crafting.BOOSTER, (1521210513)); - sendSystemMessageTestingOnly(self, "Added booster, " + boolTest); - } - if (strCommands[0].equals("radialCrash")) - { - for (int intI = 0; intI < 100000; intI++) - { - menu_info mi = new menu_info(); - string_id strSpam = new string_id("space/foo", "spam"); - mi.addRootMenu(menu_info_types.CRAFT_START, strSpam); - Object[] newParams = new Object[3]; - newParams[0] = getLookAtTarget(self); - newParams[1] = self; - newParams[2] = mi; - space_utils.callTrigger("OnObjectMenuRequest", newParams); - newParams[0] = getLookAtTarget(self); - newParams[1] = self; - Integer intTest = new Integer(menu_info_types.CRAFT_START); - newParams[2] = intTest; - space_utils.callTrigger("OnObjectMenuSelect", newParams); - queueCommand(self, (1283441724), getLookAtTarget(self), "", COMMAND_PRIORITY_IMMEDIATE); - } - sendSystemMessageTestingOnly(self, "DONE DONE DONE"); - sendSystemMessageTestingOnly(self, "DONE DONE DONE"); - sendSystemMessageTestingOnly(self, "DONE DONE DONE"); - sendSystemMessageTestingOnly(self, "DONE DONE DONE"); - } - if (strText.equals("shotTest")) - { - obj_id objMonsters[] = getAllObjectsWithObjVar(getLocation(self), 320000, "ai"); - obj_id objTarget = objMonsters[0]; - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - queueCommand(self, (2027179676), objTarget, "", COMMAND_PRIORITY_FRONT); - } - if (strText.equals("healClone")) - { - healing.healClone(self, true); - sendSystemMessageTestingOnly(self, "f"); - return SCRIPT_CONTINUE; - } - if (strText.equals("mapTest")) - { - String[] strTest = planetary_map.getUniquePlanetaryMapCategories(null); - for (int intI = 0; intI < strTest.length; intI++) - { - sendSystemMessageTestingOnly(self, "strTest " + intI + " is " + strTest[intI]); - } - strTest = planetary_map.getUniquePlanetaryMapCategories("space"); - for (int intI = 0; intI < strTest.length; intI++) - { - sendSystemMessageTestingOnly(self, "strTest " + intI + " is " + strTest[intI]); - } - } - if (strText.equals("testRegen")) - { - sendSystemMessageTestingOnly(self, "regen is " + getHealthRegenRate(self)); - setAttrib(self, HEALTH, 1); - setAttrib(self, ACTION, 1); - setAttrib(self, MIND, 1); - } - if (strText.equals("lootTest")) - { - obj_id objInventory = utils.getInventoryContainer(self); - String strTable = "npc/generic_1_10"; - loot.makeLootInContainer(objInventory, strTable, 10, 10); - sendSystemMessageTestingOnly(self, "Loot"); - } - if (strText.equals("asd")) - { - String strSource = "datatables/mob/creatures.iff"; - String[] strLootTables = dataTableGetStringColumn(strSource, "lootList"); - String[] strNames = dataTableGetStringColumn(strSource, "creatureName"); - for (int intI = 0; intI < strLootTables.length; intI++) - { - int intIndex = strNames[intI].indexOf("ep3"); - if (intIndex > -1) - { - if (!strLootTables[intI].equals("")) - { - sendSystemMessageTestingOnly(self, "loot table is " + strLootTables[intI]); - } - } - } - } - if (strText.equals("redoLoot")) - { - String strSource = "datatables/mob/creatures.iff"; - String[] strLootTables = dataTableGetStringColumn(strSource, "lootTable"); - String[] strOldLootTables = dataTableGetStringColumn(strSource, "lootList"); - int[] intNiches = dataTableGetIntColumn(strSource, "niche"); - String[] strMeatTypes = dataTableGetStringColumn(strSource, "meatType"); - int[] intLevels = dataTableGetIntColumn(strSource, "BaseLevel"); - String strTableToWrite = "datatables/loot/test_rewrite.tab"; - String[] strHeaders = new String[1]; - strHeaders[0] = "strTest"; - String[] strTypes = new String[1]; - strTypes[0] = "s"; - boolean boolTest = datatable.createDataTable(strTableToWrite, strHeaders, strTypes); - for (int intI = 0; intI < strLootTables.length; intI++) - { - String strTest = ""; - if (strLootTables[intI].equals("")) - { - String strLevelString = getLevelString(intLevels[intI]); - if ((intNiches[intI] == 3) || (intNiches[intI] == 10)) - { - strTest = "droid/droid_" + strLevelString; - } - else if (intNiches[intI] == 5) - { - strTest = "npc/npc_" + strLevelString; - } - else - { - int intIndex = strMeatTypes[intI].indexOf("insect"); - if (intIndex > -1) - { - strTest = "creature/insect_" + strLevelString; - } - else - { - strTest = "creature/creature_" + strLevelString; - } - } - } - else - { - strTest = strLootTables[intI]; - } - dictionary dctTest = new dictionary(); - dctTest.put("strTest", strTest); - datatable.serverDataTableAddRow(strTableToWrite, dctTest); - } - } - if (strText.equals("makeDynamicWeapon")) - { - static_item.makeDynamicObject("dynamic_weapon_basic_all", utils.getInventoryContainer(self), rand(5, 60)); - sendSystemMessageTestingOnly(self, "woof"); - } - if (strText.equals("makeStaticWeapon")) - { - obj_id objInventory = utils.getInventoryContainer(self); - obj_id lootItem = static_item.createNewItemFunction("weapon_tow_pistol_02_01", objInventory); - sendSystemMessageTestingOnly(self, "made " + lootItem); - } - if (strText.equals("checkStats")) - { - skill.recalcPlayerPools(self, false); - sendSystemMessageTestingOnly(self, "Action Max is " + getMaxAttrib(self, ACTION)); - sendSystemMessageTestingOnly(self, "Health Max is " + getMaxAttrib(self, HEALTH)); - } - if (strText.equals("weaponUpdates")) - { - obj_id objInventory = utils.getInventoryContainer(self); - obj_id[] objContents = utils.getContents(self, true); - for (int intI = 0; intI < objContents.length; intI++) - { - if (hasScript(objContents[intI], "systems.combat.combat_weapon")) - { - setWeaponAttackSpeed(objContents[intI], .25f); - setWeaponMinDamage(objContents[intI], 5); - setWeaponMaxDamage(objContents[intI], 10); - } - } - sendSystemMessageTestingOnly(self, "Done length was " + objContents.length); - } - if (strCommands[0].equals("setupMonster")) - { - obj_id objMonsters[] = getAllObjectsWithObjVar(getLocation(self), 320000, "ai"); - for (int intI = 0; intI < objMonsters.length; intI++) - { - setMaxAttrib(objMonsters[intI], HEALTH, 50); - setAttrib(objMonsters[intI], HEALTH, 50); - debugSpeakMsg(objMonsters[intI], "SET HEALTH AND STUFF"); - } - sendSystemMessageTestingOnly(self, "as"); - } - if (strCommands[0].equals("engineTesting")) - { - obj_id objInventory = utils.getInventoryContainer(self); - obj_id objItem = createObject("object/tangible/ship/components/engine/eng_gallofree_jx2.iff", objInventory, ""); - setName(objItem, "Tier 1"); - objItem = createObject("object/tangible/ship/components/engine/eng_kse_a5x.iff", objInventory, ""); - setName(objItem, "Tier 2"); - objItem = createObject("object/tangible/ship/components/engine/eng_kse_a7x.iff", objInventory, ""); - setName(objItem, "Tier 3"); - objItem = createObject("object/tangible/ship/components/engine/eng_novaldex_x7.iff", objInventory, ""); - setName(objItem, "Tier 4"); - objItem = createObject("object/tangible/ship/components/engine/eng_kse_advanced.iff", objInventory, ""); - setName(objItem, "Tier 5"); - sendSystemMessageTestingOnly(self, "Made stuff"); - } - if (strCommands[0].equals("chassisRepairTest")) - { - obj_id objInventory = utils.getInventoryContainer(self); - for (int intI = 0; intI < 5; intI++) - { - obj_id objKit = createObject("object/tangible/ship/crafted/repair/repair_kit_chassis.iff", objInventory, ""); - setCount(objKit, 400); - } - obj_id[] objPcds = space_transition.findShipControlDevicesForPlayer(self); - obj_id objShip = space_transition.getShipFromShipControlDevice(objPcds[0]); - setShipCurrentChassisHitPoints(objShip, 10); - } - if (strCommands[0].equals("getShipIds")) - { - obj_id[] objControlDevices = space_transition.findShipControlDevicesForPlayer(self); - for (int intI = 0; intI < objControlDevices.length; intI++) - { - obj_id objTestShip = space_transition.getShipFromShipControlDevice(objControlDevices[intI]); - sendSystemMessageTestingOnly(self, "Ship from PCD " + objControlDevices[intI] + " is " + objTestShip); - } - } - if (strCommands[0].equals("woozle")) - { - space_quest.grantNewbieShip(self, "neutral"); - sendSystemMessageTestingOnly(self, "asd"); - } - if (strCommands[0].equals("zeroShip")) - { - obj_id objDefender = getLookAtTarget(self); - int[] intRawSlots = getShipChassisSlots(objDefender); - for (int intI = 0; intI < intRawSlots.length; intI++) - { - if (isShipSlotInstalled(objDefender, intRawSlots[intI])) - { - setShipComponentArmorHitpointsCurrent(objDefender, intRawSlots[intI], 0); - setShipComponentHitpointsCurrent(objDefender, intRawSlots[intI], 0); - } - } - setShipCurrentChassisHitPoints(objDefender, 0); - sendSystemMessageTestingOnly(self, "Zeroed"); - } - if (strCommands[0].equals("weaponRepairKits")) - { - obj_id objInventory = utils.getInventoryContainer(self); - obj_id objKit = createObject("object/tangible/ship/crafted/repair/repair_kit_weapon.iff", objInventory, ""); - setCount(objKit, 10000); - sendSystemMessageTestingOnly(self, "Kitted"); - } - if (strCommands[0].equals("engineRepairKits")) - { - obj_id objInventory = utils.getInventoryContainer(self); - obj_id objKit = createObject("object/tangible/ship/crafted/repair/repair_kit_engine.iff", objInventory, ""); - setCount(objKit, 10000); - sendSystemMessageTestingOnly(self, "Kitted"); - } - if (strCommands[0].equals("checkEngineValue")) - { - dictionary dctParams = new dictionary(); - dctParams.put("intLoops", 90); - messageTo(self, "checkEngineValue", dctParams, .25f, false); - sendSystemMessageTestingOnly(self, "checking"); - } - if (strCommands[0].equals("checkImmune")) - { - space_transition.doAIImmunityCheck(space_transition.getContainingShip(self)); - sendSystemMessageTestingOnly(self, "Chassis is " + getShipChassisType(space_transition.getContainingShip(self))); - playMusic(self, "sound/ship_hyperspace_countdown.snd"); - } - if (strCommands[0].equals("raiseMass")) - { - obj_id[] objControlDevices = space_transition.findShipControlDevicesForPlayer(self); - int intCount = 0; - for (int intI = 0; intI < objControlDevices.length; intI++) - { - obj_id objTestShip = space_transition.getShipFromShipControlDevice(objControlDevices[intI]); - setChassisComponentMassMaximum(objTestShip, 500000f); - sendSystemMessageTestingOnly(self, "massed "); - } - } - if (strCommands[0].equals("forceMaintenance")) - { - obj_id objTarget = getLookAtTarget(self); - int intLoops = 100; - int intTimeStamp = intLoops * 1800; - int intTime = getGameTime(); - intTime = intTime - intTimeStamp; - setObjVar(objTarget, player_structure.VAR_LAST_MAINTANENCE, intTime); - dictionary dctParams = new dictionary(); - dctParams.put("objSender", self); - messageTo(objTarget, "OnMaintenanceLoop", dctParams, 0, false); - sendSystemMessageTestingOnly(self, "Sent maintenance loop request to " + objTarget); - } - if (strCommands[0].equals("setHitpoints")) - { - obj_id objTarget = getLookAtTarget(self); - setHitpoints(objTarget, 1000); - sendSystemMessageTestingOnly(self, "for " + objTarget + " hitpoints are " + getHitpoints(objTarget)); - setInvulnerableHitpoints(objTarget, 2000); - sendSystemMessageTestingOnly(self, "for " + objTarget + " hitpoints are " + getHitpoints(objTarget)); - setInvulnerableHitpoints(objTarget, 0); - sendSystemMessageTestingOnly(self, "for " + objTarget + " hitpoints are " + getHitpoints(objTarget)); - setInvulnerableHitpoints(objTarget, 3500); - sendSystemMessageTestingOnly(self, "for " + objTarget + " hitpoints are " + getHitpoints(objTarget)); - } - if (strCommands[0].equals("forceMaintenanceRaw")) - { - obj_id objTarget = getLookAtTarget(self); - dictionary dctParams = new dictionary(); - dctParams.put("objSender", self); - messageTo(objTarget, "OnMaintenanceLoop", dctParams, 0, false); - sendSystemMessageTestingOnly(self, "Sent maintenance loop request to " + objTarget); - } - if (strCommands[0].equals("powerDebug")) - { - obj_id[] objPcds = space_transition.findShipControlDevicesForPlayer(self); - obj_id objShip = space_transition.getShipFromShipControlDevice(objPcds[0]); - objShip = space_transition.getContainingShip(self); - setShipReactorEnergyGenerationRate(objShip, 500); - setShipComponentEnergyMaintenanceRequirement(objShip, space_crafting.SHIELD_GENERATOR, 200); - setShipComponentEnergyMaintenanceRequirement(objShip, space_crafting.ENGINE, 100); - setShipComponentEnergyMaintenanceRequirement(objShip, space_crafting.WEAPON_0, 100); - setShipComponentEnergyMaintenanceRequirement(objShip, space_crafting.WEAPON_1, 100); - setShipComponentEnergyMaintenanceRequirement(objShip, space_crafting.CAPACITOR, 100); - sendSystemMessageTestingOnly(self, "whacked "); - } - if (strCommands[0].equals("emptyInventory")) - { - obj_id objInventory = utils.getInventoryContainer(self); - obj_id[] objContents = getContents(objInventory); - for (int intI = 0; intI < objContents.length; intI++) - { - destroyObject(objContents[intI]); - } - sendSystemMessageTestingOnly(self, "WHOOM"); - } - if (strCommands[0].equals("validateConduits")) - { - obj_id objShip = space_transition.getContainingShip(self); - LOG("space", "Fixing all conduits"); - if (utils.hasScriptVar(objShip, "objPlasmaConduits")) - { - Vector objPlasmaConduits = utils.getResizeableObjIdArrayScriptVar(objShip, "objPlasmaConduits"); - for (int intI = 0; intI < objPlasmaConduits.size(); intI++) - { - if (hasCondition(((obj_id)objPlasmaConduits.get(intI)), CONDITION_ON)) - { - Vector locBrokenComponents = getResizeableLocationArrayObjVar(objShip, "locBrokenComponents"); - location locTest = getLocation(((obj_id)objPlasmaConduits.get(intI))); - int intIndex = utils.getElementPositionInArray(locBrokenComponents, locTest); - if (intIndex > -1) - { - sendSystemMessageTestingOnly(self, ((obj_id)objPlasmaConduits.get(intI)) + " is in the list"); - } - else - { - sendSystemMessageTestingOnly(self, ((obj_id)objPlasmaConduits.get(intI)) + " is NOT IN THE LIST"); - } - } - } - } - } - if (strCommands[0].equals("fixConduits")) - { - obj_id objShip = space_transition.getContainingShip(self); - space_crafting.fixAllPlasmaConduits(objShip); - sendSystemMessageTestingOnly(self, "Fixed"); - } - if (strCommands[0].equals("fillInventory")) - { - obj_id objInventory = utils.getInventoryContainer(self); - for (int intI = 0; intI < 60; intI++) - { - obj_id objItem = createObject("object/tangible/ship/components/engine/eng_kse_a5x.iff", objInventory, ""); - } - sendSystemMessageTestingOnly(self, "Filled"); - } - if (strCommands[0].equals("bridge1")) - { - attachScript(getLookAtTarget(self), "e3demo.e3_bridge_worker_1"); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("setLaunchLocation")) - { - obj_id[] objTestObjects = getAllObjectsWithTemplate(getLocation(self), 320000, "object/ship/player/player_star_destroyer.iff"); - obj_id objShip = objTestObjects[0]; - obj_id objMe = space_transition.getContainingShip(self); - setObjVar(objShip, "trLaunchLocation", getTransform_o2p(objMe)); - setObjVar(objShip, "locLaunchLocation", getLocation(objMe)); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("testExit")) - { - } - if (strCommands[0].equals("destroyerUp")) - { - location locTest = new location(); - obj_id objShip = space_transition.getContainingShip(self); - obj_id objCell = getCellId(objShip, "elevator05"); - locTest.cell = objCell; - setLocation(self, locTest); - playClientEffectObj(self, "clienteffect/elevator_rise.cef", self, null); - elevatorMove(self, 1); - } - if (strCommands[0].equals("destroyerDown")) - { - location locTest = new location(); - obj_id objShip = space_transition.getContainingShip(self); - obj_id objCell = getCellId(objShip, "elevator_e3"); - locTest.cell = objCell; - setLocation(self, locTest); - } - if (strCommands[0].equals("equipClothes")) - { - } - if (strCommands[0].equals("breakShipInDatapad")) - { - obj_id objInventory = utils.getInventoryContainer(self); - obj_id[] objPcds = space_transition.findShipControlDevicesForPlayer(self); - obj_id objShip = space_transition.getShipFromShipControlDevice(objPcds[0]); - int intSlot = space_crafting.ENGINE; - setShipComponentHitpointsCurrent(objShip, intSlot, 0); - setShipComponentArmorHitpointsCurrent(objShip, intSlot, 0); - space_combat.recalculateEfficiency(intSlot, objShip); - intSlot = space_crafting.WEAPON_0; - setShipComponentHitpointsCurrent(objShip, intSlot, 0); - setShipComponentArmorHitpointsCurrent(objShip, intSlot, 0); - space_combat.recalculateEfficiency(intSlot, objShip); - intSlot = space_crafting.REACTOR; - setShipComponentHitpointsCurrent(objShip, intSlot, 0); - setShipComponentArmorHitpointsCurrent(objShip, intSlot, 0); - space_combat.recalculateEfficiency(intSlot, objShip); - intSlot = space_crafting.CAPACITOR; - setShipComponentHitpointsCurrent(objShip, intSlot, 0); - setShipComponentArmorHitpointsCurrent(objShip, intSlot, 0); - space_combat.recalculateEfficiency(intSlot, objShip); - intSlot = space_crafting.DROID_INTERFACE; - setShipComponentHitpointsCurrent(objShip, intSlot, 0); - setShipComponentArmorHitpointsCurrent(objShip, intSlot, 0); - space_combat.recalculateEfficiency(intSlot, objShip); - sendSystemMessageTestingOnly(self, "whacked " + getShipComponentName(objShip, intSlot)); - } - if (strCommands[0].equals("setBackShields")) - { - obj_id objShip = space_transition.getContainingShip(self); - int intSide = space_combat.BACK; - space_combat.setShieldHitPoints(objShip, intSide, 5.0f); - } - if (strCommands[0].equals("damageShip")) - { - obj_id objAttacker = space_transition.getContainingShip(self); - float fltDamage = 200; - int intSide = 1; - int intTargetedComponent = 112; - int intWeaponSlot = space_crafting.WEAPON_0; - space_combat.doShieldDamage(objAttacker, objAttacker, intWeaponSlot, fltDamage, intSide); - space_combat.doArmorDamage(objAttacker, objAttacker, intWeaponSlot, fltDamage, intSide); - space_combat.doComponentDamage(objAttacker, objAttacker, intWeaponSlot, intTargetedComponent, fltDamage, intSide); - } - if (strCommands[0].equals("registerRecruiter")) - { - obj_id objTarget = getLookAtTarget(self); - String strMapName = "pilot_recruiter"; - String strPrimaryCategory = "space"; - String strSecondaryCategory = "recruiter"; - string_id strMapNameId = new string_id("map_loc_type_n", strMapName); - obj_id objContainer = getTopMostContainer(objTarget); - location locTest = getLocation(objTarget); - if (isIdValid(objContainer)) - { - locTest = getLocation(objContainer); - } - addPlanetaryMapLocation(objTarget, utils.packStringId(strMapNameId), (int)locTest.x, (int)locTest.z, strPrimaryCategory, strSecondaryCategory, MLT_STATIC, planetary_map.NO_FLAG); - sendSystemMessageTestingOnly(self, "Registered the whozit"); - } - if (strCommands[0].equals("fixChassis")) - { - obj_id[] objPcds = space_transition.findShipControlDevicesForPlayer(self); - obj_id objShip = space_transition.getShipFromShipControlDevice(objPcds[0]); - dictionary dctParams = new dictionary(); - dctParams.put("strSlot", "" + space_crafting.CHASSIS); - dctParams.put("objShip", objShip); - space_utils.notifyObject(self, "fixit", dctParams); - } - if (strCommands[0].equals("damageReactor")) - { - obj_id objShip = getPilotedShip(self); - float fltCurrentHitPoints = getShipComponentHitpointsCurrent(objShip, ship_chassis_slot_type.SCST_reactor); - sendSystemMessageTestingOnly(self, "changing hp from " + fltCurrentHitPoints + " to " + fltCurrentHitPoints / 2); - fltCurrentHitPoints = fltCurrentHitPoints / 2; - setShipComponentHitpointsCurrent(objShip, ship_chassis_slot_type.SCST_reactor, fltCurrentHitPoints); - space_combat.recalculateEfficiency(ship_chassis_slot_type.SCST_reactor, objShip); - } - if (strCommands[0].equals("tauntMe")) - { - string_id strSpam = new string_id("space/space_interaction", "aborting_reactor_pump"); - space_utils.tauntPlayer(self, getLookAtTarget(self), strSpam); - } - if (strCommands[0].equals("checkKessel")) - { - obj_id objKesselObject = getPlanetByName("space_light1"); - obj_id objKesselManager = utils.getObjIdScriptVar(objKesselObject, "objKesselManager"); - sendSystemMessageTestingOnly(self, "on planet " + objKesselObject + " got " + objKesselManager); - } - if (strCommands[0].equals("damageUp")) - { - obj_id objShip = space_transition.getContainingShip(self); - setShipCapacitorEnergyMaximum(objShip, 300000); - setShipCapacitorEnergyRechargeRate(objShip, 1200000); - setShipWeaponDamageMaximum(objShip, space_crafting.WEAPON_0, 2500000); - } - if (strCommands[0].equals("hasReactor")) - { - boolean boolTest = isShipSlotInstalled(getLookAtTarget(self), 2); - sendSystemMessageTestingOnly(self, "boolTest is " + boolTest); - int intChassisSlot = space_crafting.getComponentSlotInt("reactor"); - sendSystemMessageTestingOnly(self, "slot is " + intChassisSlot); - } - if (strCommands[0].equals("resetSpaceFaction")) - { - int spaceFaction = space_transition.getPlayerSpaceFaction(self); - shipSetSpaceFaction(space_transition.getContainingShip(self), spaceFaction); - sendSystemMessageTestingOnly(self, "Reset faction"); - } - if (strCommands[0].equals("checkTargetFaction")) - { - obj_id objTarget = getLookAtTarget(self); - String strFaction = "rebel"; - sendSystemMessageTestingOnly(self, "set " + objTarget + " to Faction " + strFaction); - } - if (strCommands[0].equals("getShip")) - { - } - if (strCommands[0].equals("updateShipFaction")) - { - space_transition.updateShipFaction(space_transition.getContainingShip(self), self); - sendSystemMessageTestingOnly(self, "updated faction "); - int intTest = (-615855020); - sendSystemMessageTestingOnly(self, "Imperial : " + intTest); - intTest = (370444368); - sendSystemMessageTestingOnly(self, "Rebel : " + intTest); - } - if (strCommands[0].equals("testSM")) - { - obj_id objShip = space_transition.getContainingShip(self); - string_id strSpam = new string_id("fpp", "fooo"); - space_utils.sendSystemMessageShip(objShip, strSpam, true, false, true, true); - space_utils.sendSystemMessageToOperations(objShip, strSpam); - obj_id objOfficer = space_utils.getOperationsOfficer(objShip); - sendSystemMessageTestingOnly(self, "objOfficer is " + objOfficer); - } - if (strCommands[0].equals("makeShipImperial")) - { - int intTest = (-615855020); - obj_id objShip = space_transition.getContainingShip(self); - shipSetSpaceFaction(objShip, intTest); - sendSystemMessageTestingOnly(self, "Set Ship Faction to Imperial"); - } - if (strCommands[0].equals("makeShipRebel")) - { - obj_id objShip = space_transition.getContainingShip(self); - int intTest = (370444368); - shipSetSpaceFaction(objShip, intTest); - sendSystemMessageTestingOnly(self, "Set Ship Faction to Rebel"); - } - if (strCommands[0].equals("clearOvert")) - { - obj_id objShip = space_transition.getContainingShip(self); - space_transition.clearOvertStatus(objShip); - space_transition.updatePVPStatus(objShip); - } - if (strCommands[0].equals("checkOvert")) - { - if (pvpGetType(self) == PVPTYPE_DECLARED) - { - sendSystemMessageTestingOnly(self, "Overt"); - } - else - { - sendSystemMessageTestingOnly(self, "covert"); - } - } - if (strCommands[0].equals("asd")) - { - factions.goCovert(self); - } - if (strCommands[0].equals("checkMe")) - { - sendSystemMessageTestingOnly(self, "Faction " + space_transition.getPlayerSpaceFaction(self)); - obj_id objShip = space_transition.getContainingShip(self); - sendSystemMessageTestingOnly(self, "ship Faction " + shipGetSpaceFaction(objShip)); - int intTest = (-615855020); - sendSystemMessageTestingOnly(self, "Imperial : " + intTest); - intTest = (370444368); - sendSystemMessageTestingOnly(self, "Rebel : " + intTest); - } - if (strCommands[0].equals("deckOut")) - { - space_combat.setupCapitalShipFromTurretDefinition(getLookAtTarget(self), "star_destroyer"); - sendSystemMessageTestingOnly(self, "DECKED"); - } - if (strCommands[0].equals("testFoo")) - { - space_crafting.setEngineMaximumPitch(self, 100); - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("lookAtTarget")) - { - obj_id objTarget = getLookAtTarget(self); - sendSystemMessageTestingOnly(self, "lookAtTarget is " + objTarget); - } - if (strCommands[0].equals("myScriptVars")) - { - deltadictionary dctScriptVars = self.getScriptVars(); - sendSystemMessageTestingOnly(self, "Script Vars are :" + dctScriptVars.toString()); - } - if (strCommands[0].equals("nameShip")) - { - obj_id shipControlDevice = space_transition.findEmptyShipControlDeviceForPlayer(self); - obj_id objShip = getPilotedShip(self); - space_transition.setShipName(objShip, self, shipControlDevice); - sendSystemMessageTestingOnly(self, "asd"); - } - if (strCommands[0].equals("dumpShip")) - { - obj_id[] shipControlDevices = space_transition.findShipControlDevicesForPlayer(self); - obj_id shipControlDevice = shipControlDevices[0]; - obj_id ship = space_transition.getShipFromShipControlDevice(shipControlDevice); - location x = getLocation(self); - setLocation(ship, x); - debugSpeakMsg(self, "Ship ID = " + ship); - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("yourScriptVars")) - { - obj_id objTest = getLookAtTarget(self); - deltadictionary dctScriptVars = objTest.getScriptVars(); - sendSystemMessageTestingOnly(self, "Script Vars are :" + dctScriptVars.toString()); - } - if (strCommands[0].equals("checkLocation")) - { - sendSystemMessageTestingOnly(self, "i am at " + getLocation(self)); - } - if (strCommands[0].equals("resendMail")) - { - obj_id objTarget = getLookAtTarget(self); - removeObjVar(objTarget, player_structure.VAR_LAST_MESSAGE); - player_structure.sendMaintenanceMail(objTarget); - sendSystemMessageTestingOnly(self, "Resetn"); - } - if (strCommands[0].equals("checkMail")) - { - player_structure.sendCondemnedMail(getLookAtTarget(self)); - sendSystemMessageTestingOnly(self, "sentMial"); - } - if (strCommands[0].equals("sendNewbieMail")) - { - string_id strSubject = new string_id("space/space_interaction", "email_subject_" + strCommands[1]); - string_id strBody = new string_id("space/space_interaction", "email_body_" + strCommands[1]); - string_id strSender = new string_id("space/space_interaction", "email_sender_" + strCommands[1]); - String strSenderName = utils.packStringId(strSender); - sendSystemMessageTestingOnly(self, "sending mail " + strCommands[1]); - utils.sendMail(strSubject, strBody, self, strSenderName); - } - if (strCommands[0].equals("sendNewbieMailMessage")) - { - if (strCommands[1].equals("1")) - { - dictionary dctParams = new dictionary(); - dctParams.put("intMail", 1); - messageTo(self, "sendNewbieMails", dctParams, rand(10, 11), true); - sendSystemMessageTestingOnly(self, "Email 1"); - } - if (strCommands[1].equals("2")) - { - dictionary dctParams = new dictionary(); - dctParams.put("intMail", 2); - messageTo(self, "sendNewbieMails", dctParams, rand(10, 11), true); - sendSystemMessageTestingOnly(self, "Email 2"); - } - if (strCommands[1].equals("3")) - { - dictionary dctParams = new dictionary(); - dctParams.put("intMail", 3); - messageTo(self, "sendNewbieMails", dctParams, rand(10, 11), true); - sendSystemMessageTestingOnly(self, "Email 2"); - } - } - if (strCommands[0].equals("testItem1")) - { - obj_id objInventory = utils.getInventoryContainer(self); - obj_id objItem = createObjectOverloaded("object/tangible/ship/components/shield_generator/shd_seinar_experimental_a1.iff", objInventory); - sendSystemMessageTestingOnly(self, "made item " + objItem + " in " + objInventory); - } - if (strCommands[0].equals("testItem2")) - { - obj_id objItem = createObject("object/tangible/ship/components/weapon/wpn_armek_sw4.iff", getLocation(self)); - sendSystemMessageTestingOnly(self, "made item " + objItem); - } - if (strCommands[0].equals("hitMe")) - { - obj_id objTarget = getLookAtTarget(self); - obj_id objShip = getPilotedShip(self); - dictionary dctParams = new dictionary(); - dctParams.put("objShip", objTarget); - space_utils.notifyObject(objShip, "megaDamage", dctParams); - sendSystemMessageTestingOnly(self, "objTarget of " + objTarget + " is attacking " + objShip); - } - if (strCommands[0].equals("findStationEggs")) - { - obj_id objStationEggs[] = getAllObjectsWithObjVar(getLocation(self), 320000, "intStationRespawner"); - for (int intI = 0; intI < objStationEggs.length; intI++) - { - sendSystemMessageTestingOnly(self, "Egg is " + objStationEggs[intI]); - } - } - if (strCommands[0].equals("destroyerPhase")) - { - obj_id objManager = space_battlefield.getManagerObject(); - space_battlefield.doDestroyerPhase(objManager); - sendSystemMessageTestingOnly(self, "DESTROYER"); - } - if (strCommands[0].equals("makeSquad")) - { - space_create.createSquad(self, "squad_test", getTransform_o2p(self), 10, null); - sendSystemMessageTestingOnly(self, "spawned"); - } - if (strCommands[0].equals("breakThing1")) - { - obj_id objTest = getLookAtTarget(self); - setInvulnerableHitpoints(objTest, 1); - sendSystemMessageTestingOnly(self, "Hitpoints are " + getHitpoints(objTest)); - } - if (strCommands[0].equals("breakThing50")) - { - obj_id objTest = getLookAtTarget(self); - setInvulnerableHitpoints(objTest, 50); - sendSystemMessageTestingOnly(self, "Hitpoints are " + getHitpoints(objTest)); - } - if (strCommands[0].equals("breakThing100")) - { - obj_id objTest = getLookAtTarget(self); - setInvulnerableHitpoints(objTest, 100); - sendSystemMessageTestingOnly(self, "Hitpoints are " + getHitpoints(objTest)); - } - if (strCommands[0].equals("breakThing500")) - { - obj_id objTest = getLookAtTarget(self); - setInvulnerableHitpoints(objTest, 500); - sendSystemMessageTestingOnly(self, "Hitpoints are " + getHitpoints(objTest)); - } - if (strCommands[0].equals("fixThing")) - { - obj_id objTest = getLookAtTarget(self); - setInvulnerableHitpoints(objTest, 1000); - sendSystemMessageTestingOnly(self, "Hitpoints are " + getHitpoints(objTest)); - } - if (strCommands[0].equals("setDifficulty")) - { - int intRawDifficulty = getLevel(self); - } - if (strCommands[0].equals("testDirectDamage")) - { - int intSlot = space_crafting.ENGINE; - float fltPercent = utils.stringToFloat(strCommands[1]); - fltPercent = fltPercent / 100; - dictionary dctParams = new dictionary(); - dctParams.put("intSlot", intSlot); - fltPercent = 1000 * fltPercent; - dctParams.put("fltCurrentHitpoints", fltPercent); - LOG("space", "Put"); - dctParams.put("fltMaximumHitpoints", 1000f); - LOG("space", "DctParams is " + dctParams); - space_utils.notifyObject(space_transition.getContainingShip(self), "componentEfficiencyChanged", dctParams); - sendSystemMessageTestingOnly(self, "set " + intSlot + " to " + fltPercent); - } - if (strCommands[0].equals("bustEngine")) - { - int intSlot = space_crafting.ENGINE; - setShipComponentHitpointsCurrent(getTopMostContainer(self), intSlot, 0); - setShipComponentArmorHitpointsCurrent(getTopMostContainer(self), intSlot, 0); - space_combat.recalculateEfficiency(intSlot, getTopMostContainer(self)); - sendSystemMessageTestingOnly(self, "WHACk!@"); - } - if (strCommands[0].equals("breakHull")) - { - obj_id objTest = getLookAtTarget(self); - obj_id objShip = space_transition.getContainingShip(self); - space_crafting.breakHullPanel(objTest, objShip, getLocation(objTest), true); - sendSystemMessageTestingOnly(self, "broke"); - } - if (strCommands[0].equals("fixHull")) - { - obj_id objTest = getLookAtTarget(self); - obj_id objShip = space_transition.getContainingShip(self); - space_crafting.fixHullPanel(objTest, objShip, getLocation(objTest)); - sendSystemMessageTestingOnly(self, "fix "); - } - if (strCommands[0].equals("checkItemCount")) - { - int intCount = player_structure.getStructureNumItems(space_transition.getContainingShip(self)); - sendSystemMessageTestingOnly(self, "intCount is " + intCount); - } - if (strCommands[0].equals("checkTrainer")) - { - String strPrimary = "trainer"; - String strSub = "trainer_pilot_privateer"; - map_location[] map_locs = getPlanetaryMapLocations(strPrimary, strSub); - if (map_locs.length == 0) - { - sendSystemMessageTestingOnly(self, "000000000"); - } - sendSystemMessageTestingOnly(self, "map_locs x is " + map_locs[0].getX() + " y is " + map_locs[0].getY()); - } - if (strCommands[0].equals("fixEngine")) - { - int intSlot = space_crafting.ENGINE; - setShipComponentHitpointsCurrent(getTopMostContainer(self), intSlot, 100); - space_combat.recalculateEfficiency(intSlot, getTopMostContainer(self)); - sendSystemMessageTestingOnly(self, "WHACk!@"); - } - if (strCommands[0].equals("testCells")) - { - location locTest = getLocation(self); - obj_id objCell = locTest.cell; - obj_id objBuilding = getContainedBy(objCell); - String[] strCells = getCellNames(objBuilding); - if (strCells == null) - { - sendSystemMessageTestingOnly(self, "objCell is " + objCell + " building i s" + objBuilding); - } - } - if (strCommands[0].equals("testItemCreation")) - { - obj_id objFoo = createObject("object/weapon/ranged/rifle/rifle_dlt20.iff", getTransform_o2p(self), null); - sendSystemMessageTestingOnly(self, "Made object type " + objFoo); - } - if (strCommands[0].equals("setupShip")) - { - Vector objSparkers = new Vector(); - objSparkers.setSize(0); - location locTest = getLocation(self); - obj_id objObject = getContainedBy(locTest.cell); - Vector objContents = new Vector(); - objContents.setSize(0); - obj_id[] objCells = getContents(objObject); - for (int intI = 0; intI < objCells.length; intI++) - { - obj_id[] objTestContents = getContents(objCells[intI]); - if ((objTestContents != null) && (objTestContents.length > 0)) - { - for (int intJ = 0; intJ < objTestContents.length; intJ++) - { - String strTest = getTemplateName(objTestContents[intJ]); - if (strTest.equals("object/tangible/space/content_infrastructure/generic_egg_small.iff")) - { - objSparkers = utils.addElement(objSparkers, objTestContents[intJ]); - } - } - } - } - utils.setScriptVar(objObject, "objSparkers", objSparkers); - sendSystemMessageTestingOnly(self, "set sparkers of length " + objSparkers + " on " + objObject); - } - if (strCommands[0].equals("locationTesting")) - { - obj_id objTarget = getLookAtTarget(self); - location locTest = getLocation(objTarget); - Vector locTests = new Vector(); - locTests.setSize(0); - locTests = utils.addElement(locTests, locTest); - setObjVar(self, "locTest2", locTest); - } - if (strCommands[0].equals("validateLocations")) - { - obj_id objTarget = getLookAtTarget(self); - location locTest = getLocation(objTarget); - Vector locTests = getResizeableLocationArrayObjVar(self, "locTest"); - for (int intI = 0; intI < locTests.size(); intI++) - { - sendSystemMessageTestingOnly(self, "locTest is " + locTest); - sendSystemMessageTestingOnly(self, "locTests[" + intI + "] is " + ((location)locTests.get(intI))); - if (locTest.equals(((location)locTests.get(intI)))) - { - sendSystemMessageTestingOnly(self, "Equality comparison is true"); - } - else - { - sendSystemMessageTestingOnly(self, "Equality comparison is false"); - } - } - } - if (strCommands[0].equals("fixConduit")) - { - space_crafting.fixPlasmaConduit(getLookAtTarget(self), space_transition.getContainingShip(self), getLocation(getLookAtTarget(self))); - sendSystemMessageTestingOnly(self, "Fixing " + getLookAtTarget(self)); - } - if (strCommands[0].equals("fixCombat")) - { - setState(self, STATE_COMBAT, false); - sendSystemMessageTestingOnly(self, "done"); - } - if (strCommands[0].equals("breakConduit")) - { - space_crafting.breakPlasmaConduit(getLookAtTarget(self), space_transition.getContainingShip(self), getLocation(getLookAtTarget(self)), true); - sendSystemMessageTestingOnly(self, "BROKE"); - } - if (strCommands[0].equals("checkCondition")) - { - sendSystemMessageTestingOnly(self, "Condition is " + hasCondition(getLookAtTarget(self), CONDITION_ON)); - } - if (strCommands[0].equals("closestStation")) - { - obj_id objClosestStation = space_combat.getClosestSpaceStation(self); - sendSystemMessageTestingOnly(self, "Found " + objClosestStation); - } - if (strCommands[0].equals("getSpawnerData")) - { - space_utils.notifyObject(getLookAtTarget(self), "getSpawnerData", null); - sendSystemMessageTestingOnly(self, "weh"); - } - if (strCommands[0].equals("checkStations")) - { - obj_id objManager = space_battlefield.getManagerObject(); - obj_id objStationEggs[] = getAllObjectsWithObjVar(getLocation(objManager), 320000, "intStationRespawner"); - if (objStationEggs != null) - { - for (int intI = 0; intI < objStationEggs.length; intI++) - { - String strObjVars = utils.getStringLocalVar(objStationEggs[intI], "strObjVars"); - String strScripts = utils.getStringLocalVar(objStationEggs[intI], "strScripts"); - String strTemplate = utils.getStringLocalVar(objStationEggs[intI], "strTemplate"); - LOG("space", "making " + strTemplate + " from object " + objStationEggs[intI]); - transform trTest = getTransform_o2p(objStationEggs[intI]); - } - } - } - if (strCommands[0].equals("getShipId")) - { - obj_id objShip = space_transition.getContainingShip(self); - sendSystemMessageTestingOnly(self, "I am in " + objShip); - } - if (strCommands[0].equals("pingObject")) - { - String strObject = strCommands[1]; - sendSystemMessageTestingOnly(self, "strCommands[1] is " + strObject); - obj_id objTarget = utils.stringToObjId(strObject); - dictionary dctParams = new dictionary(); - dctParams.put("objSender", self); - messageTo(objTarget, "pingObject", dctParams, 0, false); - sendSystemMessageTestingOnly(self, "Sent message to " + objTarget + " with ping message"); - } - if (strCommands[0].equals("doSpawns")) - { - messageTo(space_transition.getContainingShip(self), "delayedSpawn", null, 1, false); - sendSystemMessageTestingOnly(self, "going"); - } - if (strCommands[0].equals("damageParticleTest")) - { - int intDamageType = 0; - if (strCommands[1].equals("chassis")) - { - intDamageType = 1; - } - else if (strCommands[1].equals("component")) - { - intDamageType = 2; - } - else if (strCommands[1].equals("shield")) - { - intDamageType = 3; - } - else if (strCommands[1].equals("armor")) - { - intDamageType = 4; - } - int intDamageIntensity = 0; - if (strCommands[2].equals("light")) - { - intDamageIntensity = 1; - } - if (strCommands[2].equals("heavy")) - { - intDamageIntensity = 2; - } - dictionary dctParams = new dictionary(); - dctParams.put("intDamageType", intDamageType); - dctParams.put("intDamageIntensity", intDamageIntensity); - location locTest = getLocation(self); - obj_id objCell = locTest.cell; - obj_id objShip = getContainedBy(objCell); - space_utils.notifyObject(objShip, "interiorDamageNotification", dctParams); - sendSystemMessageTestingOnly(self, "text : " + strText + " sent to " + objShip + "type is " + intDamageType + " and intensity is " + intDamageIntensity); - } - if (strCommands[0].equals("checkDroid")) - { - obj_id[] shipControlDevices = space_transition.findShipControlDevicesForPlayer(self); - if (shipControlDevices != null) - { - for (int i = 0; i < shipControlDevices.length; ++i) - { - sendSystemMessageTestingOnly(self, "objPcd is " + shipControlDevices[i]); - obj_id objShip = space_transition.getShipFromShipControlDevice(shipControlDevices[i]); - sendSystemMessageTestingOnly(self, "objShip is " + objShip); - obj_id objDroid = getDroidControlDeviceForShip(objShip); - sendSystemMessageTestingOnly(self, "objDroid is " + objDroid); - } - } - } - if (strCommands[0].equals("reset world sure")) - { - obj_id[] objObjects = getObjectsInRange(self, 32000); - sendSystemMessageTestingOnly(self, "Destroying world"); - for (int intI = 0; intI < objObjects.length; intI++) - { - if (!isPlayer(objObjects[intI])) - { - if (hasObjVar(objObjects[intI], "intNoDump")) - { - destroyObject(objObjects[intI]); - } - } - } - } - if (strCommands[0].equals("destroyObject")) - { - destroyObject(getLookAtTarget(self)); - sendSystemMessageTestingOnly(self, "KABOOM"); - } - if (strCommands[0].equals("nukeworld")) - { - if (strCommands.length > 1) - { - if (strCommands[1].equals("sure")) - { - obj_id[] objObjects = getObjectsInRange(self, 32000); - sendSystemMessageTestingOnly(self, "Destroying world"); - for (int intI = 0; intI < objObjects.length; intI++) - { - if (isIdValid(objObjects[intI]) && !isPlayer(objObjects[intI])) - { - setObjVar(objObjects[intI], "intCleaningUp", 1); - trial.cleanupObject(objObjects[intI]); - } - } - } - } - } - if (strCommands[0].equals("stationTest")) - { - obj_id objStation = space_combat.getClosestSpaceStation(getPilotedShip(self)); - sendSystemMessageTestingOnly(self, "found " + objStation); - } - if (strCommands[0].equals("pilotShip")) - { - obj_id objShip = getLookAtTarget(self); - if (isIdValid(objShip)) - { - boolean boolTest = pilotShip(self, objShip); - sendSystemMessageTestingOnly(self, "You are FLYING " + objShip + " and boolTest is " + boolTest); - } - else - { - sendSystemMessageTestingOnly(self, "You have no ship targeted"); - } - } - if (strCommands[0].equals("checkShields")) - { - obj_id objShip = getPilotedShip(self); - if (isShipSlotInstalled(objShip, ship_chassis_slot_type.SCST_shield_0)) - { - sendSystemMessageTestingOnly(self, "shield generator"); - } - else - { - sendSystemMessageTestingOnly(self, "No shield generator"); - } - } - if (strCommands[0].equals("unpilotShip")) - { - unpilotShip(self); - sendSystemMessageTestingOnly(self, "NO MORE FLYING!"); - } - if (strCommands[0].equals("checkOwner")) - { - obj_id objShip = getLookAtTarget(self); - obj_id objOwner = getOwner(objShip); - sendSystemMessageTestingOnly(self, "objOwner is " + objOwner); - } - if (strCommands[0].equals("setOwner")) - { - obj_id objShip = space_transition.getContainingShip(self); - setOwner(objShip, self); - sendSystemMessageTestingOnly(self, "setOwner to " + getOwner(objShip)); - } - if (strCommands[0].equals("getWeaponEnergy")) - { - } - if (strCommands[0].equals("setWeaponEnergy")) - { - } - if (strCommands[0].equals("dataTableTest")) - { - String[] strHeaders = new String[3]; - String[] strHeaderTypes = new String[3]; - for (int intI = 0; intI < 3; intI++) - { - strHeaders[intI] = "hello" + intI; - strHeaderTypes[intI] = "i"; - } - boolean boolTest = datatable.createDataTable("test.tab", strHeaders, strHeaderTypes); - sendSystemMessageTestingOnly(self, "return value is " + boolTest); - } - if (strCommands[0].equals("checkTargets")) - { - obj_id[] objTargets = pvpGetTargetsInRange(self, self, 32f); - sendSystemMessageTestingOnly(self, "Found " + objTargets.length + " pvp targets in range"); - } - if (strCommands[0].equals("jediTrainer")) - { - setupJediTrainer(self); - sendSystemMessageTestingOnly(self, "setup jedi trainer"); - } - if (strCommands[0].equals("changeLocation")) - { - location locTest = getLocationObjVar(self, "jedi.locTrainerLocation"); - locTest.area = "naboo"; - setObjVar(self, "jedi.locTrainerLocation", locTest); - sendSystemMessageTestingOnly(self, "updated"); - } - if (strCommands[0].equals("checkDifficultyLoop")) - { - messageTo(self, "checkDifficulty", null, 3, false); - } - if (strCommands[0].equals("jackVisibility")) - { - setJediVisibility(self, 4000); - sendSystemMessageTestingOnly(self, "set"); - } - if (strCommands[0].equals("damageHealth")) - { - setHealth(self, 1); - } - if (strCommands[0].equals("drainHealth")) - { - attrib_mod[] attrTest = new attrib_mod[1]; - attrTest[0] = utils.createAttribMod(HEALTH, -1 * 500, 0, 0, 15.0f); - addAttribModifiers(self, attrTest); - } - if (strCommands[0].equals("incapMe")) - { - setHealth(self, -100); - } - if (strCommands[0].equals("checkVisibility")) - { - int intVisibility = getJediVisibility(self); - sendSystemMessageTestingOnly(self, "visibility is " + intVisibility); - } - if (strCommands[0].equals("clearGallop")) - { - obj_id objMount = getMountId(self); - obj_id objControlDevice = callable.getCallableCD(objMount); - utils.removeScriptVar(objControlDevice, "mount.intGalloping"); - utils.removeScriptVar(objControlDevice, "mount.intTired"); - sendSystemMessageTestingOnly(self, "cleared"); - } - if (strCommands[0].equals("goFast")) - { - obj_id objMount = getMountId(self); - setBaseRunSpeed(objMount, 20.0f); - sendSystemMessageTestingOnly(self, "Running"); - } - if (strCommands[0].equals("goSlow")) - { - obj_id objMount = getMountId(self); - setBaseRunSpeed(objMount, 6.0f); - sendSystemMessageTestingOnly(self, "Jogging"); - } - if (strCommands[0].equals("jediRevive")) - { - setForcePower(self, 9000); - sendSystemMessageTestingOnly(self, "force power maxed"); - } - if (strCommands[0].equals("bleedMe")) - { - dot.applyBleedingEffect(self, "foo", HEALTH, 100, 120); - } - if (strCommands[0].equals("diseaseMe")) - { - dot.applyDotEffect(self, dot.DOT_DISEASE, "foo2", 100, 120); - } - if (strCommands[0].equals("slowMe")) - { - setBaseRunSpeed(self, 1.0f); - } - if (strCommands[0].equals("fastMe")) - { - setBaseRunSpeed(self, 6.0f); - } - if (strCommands[0].equals("jediSetup")) - { - grantSkill(self, "jedi_padawan_novice"); - queueCommand(self, (-1292820740), null, "metal", COMMAND_PRIORITY_IMMEDIATE); - queueCommand(self, (-1292820740), null, "mineral", COMMAND_PRIORITY_IMMEDIATE); - queueCommand(self, (-1292820740), null, "chemical", COMMAND_PRIORITY_IMMEDIATE); - queueCommand(self, (-1292820740), null, "gemstone", COMMAND_PRIORITY_IMMEDIATE); - queueCommand(self, (-1292820740), null, "gas", COMMAND_PRIORITY_IMMEDIATE); - } - if (strCommands[0].equals("forcePower")) - { - setMaxForcePower(self, 100); - sendSystemMessageTestingOnly(self, "Force power set to 100"); - int intTest = getMaxForcePower(self); - sendSystemMessageTestingOnly(self, "Force power regotten is " + intTest); - } - if (strCommands[0].equals("reloadForcePower")) - { - int intMaxPower = getSkillStatisticModifier(self, "jedi_force_power_max"); - setMaxForcePower(self, intMaxPower); - LOG("jedi", "Setting force power to " + intMaxPower); - int intRegenRate = getSkillStatisticModifier(self, "jedi_force_power_regen"); - float fltRate = (float)intRegenRate; - fltRate = fltRate / 10; - setForcePowerRegenRate(self, fltRate); - } - if (strCommands[0].equals("getScriptVars")) - { - deltadictionary dctScriptVars = self.getScriptVars(); - sendSystemMessageTestingOnly(self, "Scriptvars are " + dctScriptVars.toString()); - } - if (strCommands[0].equals("rawDifficulty")) - { - int intRawDifficulty = getLevel(self); - sendSystemMessageTestingOnly(self, "getLevel returned " + intRawDifficulty); - } - if (strCommands[0].equals("skillDifficulty")) - { - int intCombatDifficulty = getLevel(self); - sendSystemMessageTestingOnly(self, "combat difficulty is " + intCombatDifficulty); - } - if (strCommands[0].equals("getMissions")) - { - obj_id[] objMissions = getMissionObjects(self); - for (int intI = 0; intI < objMissions.length; intI++) - { - sendSystemMessageTestingOnly(self, "Mission is " + objMissions[intI]); - } - } - if (strCommands[0].equals("getNewbieSpawnerScriptVars")) - { - obj_id[] objFoo = getAllObjectsWithTemplate(getLocation(self), 10, "object/tangible/creature_spawner/tatooine_spawner_hard.iff"); - if (objFoo != null) - { - for (int intI = 0; intI < objFoo.length; intI++) - { - deltadictionary dctScriptVars = objFoo[intI].getScriptVars(); - sendSystemMessageTestingOnly(self, "scriptvars for " + objFoo[intI] + " are " + dctScriptVars.toString()); - } - } - } - if (strCommands[0].equals("getMissionData")) - { - obj_id[] objMissions = getMissionObjects(self); - for (int intI = 0; intI < objMissions.length; intI++) - { - sendSystemMessageTestingOnly(self, "Mission is " + objMissions[intI]); - obj_id objMissionData = objMissions[intI]; - if (objMissionData == null) - { - sendSystemMessageTestingOnly(self, " missionData is null"); - } - else - { - sendSystemMessageTestingOnly(self, "missionData is " + objMissionData); - } - } - } - if (strCommands[0].equals("checkDynamicRegion")) - { - region[] rgnRegions = getRegionsWithGeographicalAtPoint(getLocation(self), 600); - if (rgnRegions == null) - { - sendSystemMessageTestingOnly(self, "NULL, No regions of type 600 found"); - } - else if (rgnRegions.length == 0) - { - sendSystemMessageTestingOnly(self, "0 LENGTH, No regions of type 600 found"); - } - else - { - for (int intI = 0; intI < rgnRegions.length; intI++) - { - sendSystemMessageTestingOnly(self, "region name is " + rgnRegions[intI].getName()); - } - } - } - if (strCommands[0].equals("goodLocationSlope")) - { - location locTest = locations.getGoodLocationAroundLocation(getLocation(self), 1, 1, 3, 3, false, true); - if (locTest == null) - { - sendSystemMessageTestingOnly(self, "good location is null"); - } - else - { - sendSystemMessageTestingOnly(self, "good location is " + locTest); - } - } - else if (strCommands[0].equals("goodLocationNoSlope")) - { - location locTest = locations.getGoodLocationAroundLocation(getLocation(self), 5, 5, 10, 10, false, true); - if (locTest == null) - { - sendSystemMessageTestingOnly(self, "good location is null"); - } - else - { - sendSystemMessageTestingOnly(self, "good location is " + locTest); - } - } - else if (strCommands[0].equals("object")) - { - location locTest = getLocation(self); - locTest.x = locTest.x + 10; - obj_id objTest = createObject("object/weapon/ranged/pistol/pistol_dl44.iff", locTest); - locTest.z = locTest.z + 10; - objTest = createObject("object/weapon/ranged/pistol/pistol_dl44.iff", locTest); - obj_id[] objFoo = getObjectsInRange(locTest, 10); - sendSystemMessageTestingOnly(self, "objFoo length is " + objFoo.length); - for (int intI = 0; intI < objFoo.length; intI++) - { - destroyObject(objFoo[intI]); - } - } - else if (strCommands[0].equals("npcLairCheck")) - { - } - else if (strCommands[0].equals("objectWithTemplate")) - { - location locTest = getLocation(self); - locTest.x = locTest.x + 10; - obj_id objTest = createObject("object/weapon/ranged/pistol/pistol_dl44.iff", locTest); - locTest.z = locTest.z + 10; - objTest = createObject("object/weapon/ranged/pistol/pistol_dl44.iff", locTest); - obj_id[] objFoo = getAllObjectsWithTemplate(locTest, 10, "object/weapon/ranged/pistol/pistol_dl44.iff"); - sendSystemMessageTestingOnly(self, "objFoo length is " + objFoo.length); - for (int intI = 0; intI < objFoo.length; intI++) - { - destroyObject(objFoo[intI]); - } - } - else if (strCommands[0].equals("lairs")) - { - float fltDistance = rand(120, 150); - location locHome = getLocation(self); - obj_id[] objLairs = getAllObjectsWithTemplate(locHome, fltDistance, "object/tangible/lair/npc_lair.iff"); - sendSystemMessageTestingOnly(self, "length of lairs is " + objLairs.length + " at distance " + fltDistance); - } - else if (strCommands[0].equals("theaters")) - { - location locHome = getLocation(self); - obj_id[] objLairs = getAllObjectsWithTemplate(locHome, 200, "object/tangible/lair/npc_lair.iff"); - int intCount = utils.countSubStringObjVars(objLairs, "spawing.lairType", "theater"); - sendSystemMessageTestingOnly(self, "intCount is " + intCount); - } - if (strCommands[0].equals("alarmOn")) - { - space_crafting.turnOnInteriorAlarms(space_transition.getContainingShip(self)); - } - if (strCommands[0].equals("alarmOff")) - { - space_crafting.turnOffInteriorAlarms(space_transition.getContainingShip(self)); - } - else if (strCommands[0].equals("getStats")) - { - obj_id objTarget = getLookAtTarget(self); - if (objTarget != null) - { - int intConstitution = getConst(objTarget); - int intHealth = getHealth(objTarget); - sendSystemMessageTestingOnly(self, "Const=" + intConstitution + " Health=" + intHealth); - int intStamina = getStam(objTarget); - int intAction = getAction(objTarget); - sendSystemMessageTestingOnly(self, "Stamina=" + intStamina + " Action=" + intAction); - int intWillPower = getWill(objTarget); - int intMind = getMind(objTarget); - sendSystemMessageTestingOnly(self, "WillPower=" + intWillPower + " Mind=" + intMind); - } - } - if (strCommands[0].equals("jediFull")) - { - String[] skillsNeeded = getStringArrayObjVar(self, pclib.OBJVAR_JEDI_SKILL_REQUIREMENTS); - if (skillsNeeded != null) - { - for (int i = 0; i < skillsNeeded.length; ++i) - { - skill.grantSkillToPlayer(self, skillsNeeded[i]); - } - } - } - if (strCommands[0].equals("whoAreYou")) - { - obj_id objTarget = getLookAtTarget(self); - obj_id objPilot = getPilotId(objTarget); - sendSystemMessageTestingOnly(self, "objPilot is " + objPilot); - } - if (strCommands[0].equals("getInCellTest")) - { - obj_id objShip = getLookAtTarget(self); - if (!isIdValid(objShip)) - { - sendSystemMessageTestingOnly(self, "No look at target"); - return SCRIPT_CONTINUE; - } - obj_id[] objCells = getContents(objShip); - if ((objCells == null) || (objCells.length == 0)) - { - sendSystemMessageTestingOnly(self, "ship doesn't have an interior"); - return SCRIPT_CONTINUE; - } - obj_id objCell = objCells[0]; - location locTest = new location(); - locTest.cell = objCell; - } - if (strCommands[0].equals("getOutTest")) - { - } - if (strCommands[0].equals("spawnEvent")) - { - obj_id objTarget = getLookAtTarget(self); - messageTo(objTarget, "doSpawnEvent", null, 0, false); - sendSystemMessageTestingOnly(self, "done"); - } - if (strCommands[0].equals("jedi5")) - { - String[] skillsNeeded = getStringArrayObjVar(self, pclib.OBJVAR_JEDI_SKILL_REQUIREMENTS); - if (skillsNeeded != null) - { - for (int i = 0; i < 5; ++i) - { - skill.grantSkillToPlayer(self, skillsNeeded[i]); - } - } - } - if (strCommands[0].equals("setJediTime")) - { - int intTime = getGameTime(); - sendSystemMessageTestingOnly(self, "set time stamp"); - setObjVar(self, "jedi.timeStamp", intTime); - } - if (strCommands[0].equals("damage")) - { - obj_id objTarget = getLookAtTarget(self); - if (objTarget != null) - { - obj_id objWeapon = getCurrentWeapon(self); - hit_result cbtHitData = new hit_result(); - cbtHitData.success = true; - cbtHitData.baseRoll = 50; - cbtHitData.finalRoll = 100; - cbtHitData.hitLocation = rand(0, 5); - cbtHitData.canSee = true; - cbtHitData.damage = 200; - cbtHitData.bleedingChance = 1; - doDamage(self, objTarget, objWeapon, cbtHitData); - sendSystemMessageTestingOnly(self, "200 damage done to target"); - debugSpeakMsg(objTarget, "ow!"); - } - } - if (strCommands[0].equals("soundTest")) - { - playMusic(self, "sound/sys_comm_rebel.snd"); - } - if (strCommands[0].equals("makeJedi")) - { - removeObjVar(self, "jedi.timeStamp"); - addJediSlot(self); - playMusic(self, "sound/music_amb_underwater_b.snd"); - setObjVar(self, "jedi.enabled", 1); - string_id strSpam = new string_id("jedi_spam", "force_sensitive"); - sendSystemMessage(self, strSpam); - } - if (strCommands[0].equals("music")) - { - playMusic(self, "sound/music_int_complete_rebel.snd"); - } - if (strCommands[0].equals("badWeapon")) - { - obj_id objWeapon = createObject("object/weapon/ranged/rifle/rifle_dlt20a.iff", getLocation(self)); - setWeaponAttackSpeed(objWeapon, 1.5f); - } - if (strCommands[0].equals("checkFlags")) - { - obj_id objTarget = getLookAtTarget(self); - if (isIdValid(objTarget)) - { - sendSystemMessageTestingOnly(self, "NPC is: " + objTarget); - sendSystemMessageTestingOnly(self, "InvulnerableFlag is: " + isInvulnerable(objTarget)); - sendSystemMessageTestingOnly(self, "pvpCanAttack is: " + pvpCanAttack(self, objTarget)); - sendSystemMessageTestingOnly(self, "pvpCanHelp is " + pvpCanHelp(self, objTarget)); - sendSystemMessageTestingOnly(self, "Your PVPType is " + pvpGetType(self)); - sendSystemMessageTestingOnly(self, "Target PVPType is " + pvpGetType(objTarget)); - sendSystemMessageTestingOnly(self, "Your Faction is " + pvpGetAlignedFaction(self)); - sendSystemMessageTestingOnly(self, "Target Faction is " + pvpGetAlignedFaction(objTarget)); - } - else - { - sendSystemMessageTestingOnly(self, "No target"); - } - } - if (strCommands[0].equals("checkAreaFlags")) - { - obj_id[] objStuff = getObjectsInRange(getLocation(self), 40); - sendSystemMessageTestingOnly(self, "length is " + objStuff.length); - for (int intI = 0; intI < objStuff.length; intI++) - { - sendSystemMessageTestingOnly(self, "NPC is: " + objStuff[intI]); - sendSystemMessageTestingOnly(self, "InvulnerableFlag is: " + isInvulnerable(objStuff[intI])); - sendSystemMessageTestingOnly(self, "pvpCanAttack is: " + pvpCanAttack(self, objStuff[intI])); - } - } - if (strCommands[0].equals("burySomeHouses")) - { - sendSystemMessageTestingOnly(self, "burying"); - location locSpawnLocation = getLocation(self); - locSpawnLocation.x = 1988; - locSpawnLocation.z = -1996; - location locGoodLocation = locations.getGoodLocationAroundLocation(locSpawnLocation, 72, 72, 75, 75, false, true); - if (locGoodLocation != null) - { - sendSystemMessageTestingOnly(self, "location is " + locGoodLocation); - String strLairType = "tatooine_dim_u_church_neutral_large_theater"; - int intMinDifficulty = 10; - int intMaxDifficulty = 20; - int intPlayerDifficulty = rand(intMinDifficulty, intMaxDifficulty); - int intNumToSpawn = 0; - String strTemplate = "object/tangible/lair/npc_lair.iff"; - String strTemplateToSpawn = ""; - String strBuildingType = ""; - obj_id objCreatedTemplate = createObject(strTemplate, locGoodLocation); - if (!(objCreatedTemplate == null)) - { - setObjVar(objCreatedTemplate, "spawning.intDifficultyLevel", intPlayerDifficulty); - String strDifficulty = create.getLairDifficulty(intMinDifficulty, intMaxDifficulty, intPlayerDifficulty); - setObjVar(objCreatedTemplate, "spawning.lairDifficulty", strDifficulty); - setObjVar(objCreatedTemplate, "spawning.lairType", strLairType); - setObjVar(objCreatedTemplate, "spawning.buildingTrackingType", strBuildingType); - if (!strBuildingType.equals("")) - { - setObjVar(objCreatedTemplate, "spawning.buildingType", strBuildingType); - } - messageTo(objCreatedTemplate, "handle_Spawn_Setup_Complete", null, 0, false); - } - } - else - { - sendSystemMessageTestingOnly(self, "null"); - } - } - if (strCommands[0].equals("commTest")) - { - dictionary dctParams = new dictionary(); - dctParams.put("objStation", getLookAtTarget(self)); - messageTo(space_transition.getContainingShip(self), "openComm", dctParams, 0, false); - } - if (strCommands[0].equals("ringCalc")) - { - location locSpawnLocation = getLocation(self); - locSpawnLocation.x = 1988; - locSpawnLocation.z = -1996; - location locTest = utils.getRandomLocationInRing(locSpawnLocation, 100, 110); - sendSystemMessageTestingOnly(self, "location is " + locTest); - } - if (strCommands[0].equals("missionLocation")) - { - location locTest = getGoodMissionLocation(getLocation(self), self); - sendSystemMessageTestingOnly(self, "location found is " + locTest); - } - if (strCommands[0].equals("isInMissionCity")) - { - location locTest = getLocation(self); - boolean boolTest = locations.isInMissionCity(locTest); - sendSystemMessageTestingOnly(self, "at location " + locTest + " isInMissionCity is " + boolTest); - } - if (strCommands[0].equals("whatCity")) - { - region[] rgnCities = getRegionsWithMunicipalAtPoint(getLocation(self), regions.MUNI_TRUE); - if (rgnCities != null) - { - sendSystemMessageTestingOnly(self, "name is " + rgnCities[0].getName()); - } - else - { - sendSystemMessageTestingOnly(self, "nul"); - } - rgnCities = getRegionsWithGeographicalAtPoint(getLocation(self), regions.GEO_CITY); - if (rgnCities != null) - { - sendSystemMessageTestingOnly(self, "name is " + rgnCities[0].getName()); - } - else - { - sendSystemMessageTestingOnly(self, "nul"); - } - } - if (strCommands[0].equals("spawnCheckWithoutCreation")) - { - for (int intM = 0; intM < 2; intM++) - { - float fltMinSpawnDistance = 30 + (rand(10, 30) / 2); - if (fltMinSpawnDistance > 100) - { - fltMinSpawnDistance = 100; - } - float fltMaxSpawnDistance = 200; - location locSpawnLocation = new location(); - int intI = 0; - Vector locSpawnLocations = new Vector(); - locSpawnLocations.setSize(0); - while (intI < 3) - { - final float[] QUADRANT_START_ANGLE = - { - 0, - 47, - -47 - }; - final float[] QUADRANT_SIZE = - { - 12, - 20, - 20 - }; - float fltSpawnDistance = rand(fltMinSpawnDistance, fltMaxSpawnDistance); - locSpawnLocation = utils.getLocationInArc(self, QUADRANT_START_ANGLE[intI], QUADRANT_SIZE[intI], fltSpawnDistance); - int intSize = rand(30, 72); - location goodLocation = locations.getGoodLocationAroundLocation(locSpawnLocation, intSize, intSize, 75, 75, false, true); - if (goodLocation == null) - { - sendSystemMessageTestingOnly(self, "Null location"); - } - else - { - float fltY = getHeightAtLocation(goodLocation.x, goodLocation.z); - goodLocation.y = fltY; - locSpawnLocations = utils.addElement(locSpawnLocations, goodLocation); - } - intI = intI + 1; - } - intI = 0; - boolean boolCheckForTheaters = true; - location locCurrentLocation = getLocation(self); - while (intI < locSpawnLocations.size()) - { - locSpawnLocation = ((location)locSpawnLocations.get(intI)); - String strLairType = "tatooine_dim_u_church_neutral_large_theater"; - if (canSpawn(self, locSpawnLocation, true, strLairType)) - { - sendSystemMessageTestingOnly(self, "spawnLocation is " + locSpawnLocation); - } - intI = intI + 1; - } - } - } - if (strCommands[0].equals("components")) - { - obj_id objShip = space_transition.getContainingShip(self); - for (int intI = 0; intI < 10; intI++) - { - obj_id objManager = utils.getObjIdLocalVar(objShip, "objInteriorManager" + intI); - sendSystemMessageTestingOnly(self, "manager slot " + intI + " is " + objManager); - } - } - return SCRIPT_CONTINUE; - } - public location getGoodMissionLocation(location locSpawnLocation, obj_id objPlayer) throws InterruptedException - { - int intSize = 72; - location locGoodLocation = locations.getGoodLocationAroundLocation(locSpawnLocation, intSize, intSize, 300, 300, false, true); - if (locGoodLocation == null) - { - locGoodLocation = locations.getGoodLocationAroundLocation(getLocation(objPlayer), intSize, intSize, 400, 400, false, true); - if (locGoodLocation == null) - { - return null; - } - } - if (locations.isInMissionCity(locGoodLocation)) - { - locGoodLocation = locations.getGoodLocationAroundLocation(getLocation(objPlayer), intSize, intSize, 400, 400, false, true); - if (locGoodLocation == null) - { - return null; - } - if (locations.isInMissionCity(locGoodLocation)) - { - return null; - } - } - region rgnBattlefield = battlefield.getBattlefield(locGoodLocation); - if (rgnBattlefield != null) - { - return null; - } - if (locations.isInMissionCity(locGoodLocation)) - { - return null; - } - return locGoodLocation; - } - public boolean checkTemplatesInRange(obj_id objPlayer, location locHome, boolean boolCheckForTheaters, String strObjectType) throws InterruptedException - { - boolean boolLogFailures = true; - boolean boolVerboseMode = true; - float fltDistance = rand(120, 200); - obj_id[] objTemplates = getObjectsInRange(locHome, fltDistance); - if (objTemplates == null) - { - return true; - } - else - { - if (boolCheckForTheaters) - { - obj_id[] objLairs = getAllObjectsWithTemplate(locHome, fltDistance, "object/tangible/lair/npc_lair.iff"); - if (objLairs != null) - { - sendSystemMessageTestingOnly(objPlayer, "Non null objLairs.. length is " + objLairs.length); - if (objLairs.length > 0) - { - String strSpam = objPlayer + " Too many lairs in the area, kicking out, area was " + locHome + " number of lairs is " + objLairs.length; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - } - if (strObjectType != null) - { - int intIndex = strObjectType.indexOf("theater"); - if (intIndex > -1) - { - objLairs = getAllObjectsWithTemplate(locHome, 200, "object/creature/planet/bothan_male.iff"); - int intCount = utils.countSubStringObjVars(objLairs, "spawing.lairType", "theater"); - if (intCount > 0) - { - String strSpam = objPlayer + " theaters in range is " + intCount + " too many at location " + locHome; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - } - } - obj_id[] objTheaters = getAllObjectsWithObjVar(locHome, 200, "isScenario"); - if (objTheaters != null) - { - if (objTheaters.length > 0) - { - String strSpam = objPlayer + " too many scenarios neat " + locHome + " count was " + objTheaters.length; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - } - } - if (objTemplates.length > SPAWN_CHECK_TEMPLATE_LIMIT) - { - if (boolLogFailures) - { - String strSpam = objPlayer + " found too many normal templates in range of " + locHome + " count was " + objTemplates.length; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - } - return false; - } - } - return true; - } - public boolean canSpawn(obj_id objPlayer, location locSpawnLocation, boolean boolCheckForTheaters, String strObjectType) throws InterruptedException - { - boolean boolLogFailures = true; - boolean boolVerboseMode = true; - if (!isSpawningAllowed(locSpawnLocation)) - { - String strSpam = objPlayer + " spawning not allowed on " + locSpawnLocation.area; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - int intServerSpawnLimit = 0; - String strSpam = ""; - location locCurrentLocation = getLocation(objPlayer); - if (locCurrentLocation.area == "tutorial") - { - strSpam = objPlayer + " canSpawn failed: spawning disabled in tutorial"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - region[] rgnCities = getRegionsWithMunicipalAtPoint(locCurrentLocation, regions.MUNI_TRUE); - if (rgnCities != null) - { - strSpam = objPlayer + " canSpawn failed: spawning not allowed in cities"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - region rgnBattlefield = battlefield.getBattlefield(locCurrentLocation); - if (rgnBattlefield != null) - { - strSpam = objPlayer + " canSpawn failed: spawning disabled in battlefields"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - rgnCities = getRegionsWithGeographicalAtPoint(locCurrentLocation, regions.GEO_CITY); - if (rgnCities != null) - { - strSpam = objPlayer + " canSpawn failed: spawning not allowed in cities"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - obj_id objMasterSpawner = getPlanetByName(locCurrentLocation.area); - if (hasObjVar(objMasterSpawner, "boolSpawnerIsOn")) - { - boolean boolSpawnerIsOn; - boolSpawnerIsOn = getBooleanObjVar(objMasterSpawner, "boolSpawnerIsOn"); - if (boolSpawnerIsOn == false) - { - strSpam = objPlayer + " canSpawn failed: spawning is disabled"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return boolSpawnerIsOn; - } - } - if (locCurrentLocation.cell != obj_id.NULL_ID) - { - strSpam = objPlayer + " canSpawn failed: spawnig is disabled in cells"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - if (hasObjVar(objPlayer, "spawning.locSpawnLocation")) - { - int intSpawnedTemplates = 0; - if (hasObjVar(objPlayer, "spawning.intSpawnedTemplates")) - { - intSpawnedTemplates = getIntObjVar(objPlayer, "spawning.intSpawnedTemplates"); - } - if (intSpawnedTemplates >= SPAWN_CHECK_LIMIT) - { - location locLastSpawnLocation = getLocationObjVar(objPlayer, "spawning.locSpawnLocation"); - float fltDistance = utils.getDistance(locLastSpawnLocation, locCurrentLocation); - if (fltDistance < SPAWN_CHECK_DISTANCE) - { - strSpam = objPlayer + " You need to move before we spawn more stuff"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - strSpam = objPlayer + " The minimum check distance is: " + SPAWN_CHECK_DISTANCE; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - strSpam = objPlayer + " Your distance is: " + fltDistance; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - } - } - if (locSpawnLocation != null) - { - rgnCities = getRegionsWithMunicipalAtPoint(locSpawnLocation, regions.MUNI_TRUE); - if (rgnCities != null) - { - strSpam = " spawn location is in a city, returning false from canspawn"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - rgnCities = getRegionsWithGeographicalAtPoint(locSpawnLocation, regions.GEO_CITY); - if (rgnCities != null) - { - strSpam = "location is in a city2, returning false from canspawn"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - rgnBattlefield = battlefield.getBattlefield(locSpawnLocation); - if (rgnBattlefield != null) - { - strSpam = "location is in a battlefield, returning false from canspawn"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - if (!checkTemplatesInRange(objPlayer, locSpawnLocation, boolCheckForTheaters, strObjectType)) - { - return false; - } - } - return true; - } - public void sendSpawnSpam(obj_id self, boolean boolLogFailures, boolean boolVerboseMode, String strSpam) throws InterruptedException - { - sendSystemMessageTestingOnly(self, strSpam); - return; - } - public boolean isSpawningAllowed(location locTest) throws InterruptedException - { - return true; - } - public int gmCreateSpecificResource(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException - { - String strClass = params; - if ((strClass == null) || (strClass.equals(""))) - { - sendSystemMessageTestingOnly(self, "Bad class passed in, syntax is /gmCreateClassResource class"); - return SCRIPT_CONTINUE; - } - obj_id rtype = pickRandomNonDepeletedResource(strClass); - if (!isIdValid(rtype)) - { - sendSystemMessageTestingOnly(self, "No id found"); - sendSystemMessageTestingOnly(self, "Type was " + strClass); - return SCRIPT_CONTINUE; - } - String crateTemplate = getResourceContainerForType(rtype); - if (!crateTemplate.equals("")) - { - obj_id pInv = utils.getInventoryContainer(self); - if (pInv != null) - { - obj_id crate = createObject(crateTemplate, pInv, ""); - if (addResourceToContainer(crate, rtype, 100000, self)) - { - sendSystemMessageTestingOnly(self, "Resource of class " + params + " added"); - return SCRIPT_CONTINUE; - } - } - } - return SCRIPT_CONTINUE; - } - public int gmCreateClassResource(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException - { - String strClass = params; - if ((strClass == null) || (strClass.equals(""))) - { - sendSystemMessageTestingOnly(self, "Bad class passed in, syntax is /gmCreateClassResource class"); - return SCRIPT_CONTINUE; - } - obj_id rtype = pickRandomNonDepeletedResource(strClass); - if (!isIdValid(rtype)) - { - sendSystemMessageTestingOnly(self, "Bad class passed in, syntax is /gmCreateClassResource class"); - return SCRIPT_CONTINUE; - } - String crateTemplate = getResourceContainerForType(rtype); - if (!crateTemplate.equals("")) - { - obj_id pInv = utils.getInventoryContainer(self); - if (pInv != null) - { - obj_id crate = createObject(crateTemplate, pInv, ""); - if (addResourceToContainer(crate, rtype, 100000, self)) - { - sendSystemMessageTestingOnly(self, "Resource of class " + params + " added"); - return SCRIPT_CONTINUE; - } - } - } - return SCRIPT_CONTINUE; - } - public int OnShipWasHit(obj_id self, obj_id objAttacker, int weaponIndex, boolean isMissile, int missileType, int intTargetedComponent, boolean fromPlayerAutoTurret, float hitLocationX_o, float hitLocationY_o, float hitLocationZ_o) throws InterruptedException - { - int intRoll = rand(1, 10); - if (intRoll > 6) - { - obj_id[] objContents = getShipContents(self); - if ((objContents != null) && (objContents.length > 0)) - { - for (int intI = 0; intI < objContents.length; intI++) - { - if (isPlayer(objContents[intI])) - { - sendSystemMessageTestingOnly(objContents[intI], "playing effect"); - playClientEffectLoc(objContents[intI], "clienteffect/int_camshake_light.cef", getLocation(objContents[intI]), 0); - } - } - } - } - return SCRIPT_CONTINUE; - } - public obj_id[] getShipContents(obj_id objObject) throws InterruptedException - { - Vector objContents = new Vector(); - objContents.setSize(0); - obj_id[] objCells = getContents(objObject); - for (int intI = 0; intI < objCells.length; intI++) - { - obj_id[] objTestContents = getContents(objCells[intI]); - if ((objTestContents != null) && (objTestContents.length > 0)) - { - for (int intJ = 0; intJ < objTestContents.length; intJ++) - { - objContents = utils.addElement(objContents, objTestContents[intJ]); - } - } - } - obj_id[] _objContents = new obj_id[0]; - if (objContents != null) - { - _objContents = new obj_id[objContents.size()]; - objContents.toArray(_objContents); - } - return _objContents; - } - public int checkEngineValue(obj_id self, dictionary params) throws InterruptedException - { - int intLoops = params.getInt("intLoops"); - intLoops = intLoops - 1; - if (intLoops < 1) - { - LOG("space", "DONE CHECKING"); - sendSystemMessageTestingOnly(self, "DONE CHECKING"); - return SCRIPT_CONTINUE; - } - obj_id objShip = space_transition.getContainingShip(self); - sendSystemMessageTestingOnly(self, "Current Ship Speed: " + getShipCurrentSpeed(objShip) + " Actual Pitch: " + getShipActualPitchRateMaximumDegrees(objShip)); - LOG("space", "==============================================================="); - LOG("space", "Loops left: " + intLoops); - LOG("space", "Current Ship Speed: " + getShipCurrentSpeed(objShip)); - LOG("space", "Actual Yaw: " + getShipActualYawRateMaximumDegrees(objShip)); - LOG("space", "Actual Pitch: " + getShipActualPitchRateMaximumDegrees(objShip)); - LOG("space", "Actual Roll: " + getShipActualRollRateMaximumDegrees(objShip)); - params.put("intLoops", intLoops); - messageTo(self, "checkEngineValue", params, .25f, false); - return SCRIPT_CONTINUE; - } - public String getDumpString(obj_id objTest, String strName) throws InterruptedException - { - String strTest = ""; - location locTest = getWorldLocation(objTest); - location locFoo = getLocation(objTest); - String strCell = getCellName(locFoo.cell); - strTest = strName + " " + (int)locTest.x + " " + (int)locTest.y + " " + (int)locTest.z + " " + strCell + "\r\n"; - return strTest; - } - public int pingResponse(obj_id self, dictionary params) throws InterruptedException - { - location locTest = params.getLocation("locTest"); - obj_id objSender = params.getObjId("objSender"); - sendSystemMessageTestingOnly(self, "Response from " + objSender + " they are at location " + locTest); - obj_id objTopMost = params.getObjId("objTopMost"); - if (isIdValid(objTopMost)) - { - location locTopMost = params.getLocation("locTopMost"); - sendSystemMessageTestingOnly(self, "Top Most Container is " + objTopMost + " at " + locTopMost); - } - else - { - sendSystemMessageTestingOnly(self, "Target is in the world, not top most"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/difficultytest.java b/sku.0/sys.server/compiled/game/script/working/difficultytest.java deleted file mode 100644 index cfb1adb2d..000000000 --- a/sku.0/sys.server/compiled/game/script/working/difficultytest.java +++ /dev/null @@ -1,51 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.skill; - -public class difficultytest extends script.base_script -{ - public difficultytest() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (objSpeaker != self) - { - return SCRIPT_CONTINUE; - } - if (strText.equals("getDifficulty")) - { - int intLevel = getLevel(self); - sendSystemMessageTestingOnly(self, "My level is " + intLevel); - debugServerConsoleMsg(self, "my level is " + intLevel); - } - if (strText.equals("reloadDifficulty")) - { - sendSystemMessageTestingOnly(self, "Reloaded skill level"); - recalculateLevel(self); - } - if (strText.equals("getGroupDifficulty")) - { - int intLevel = skill.getGroupLevel(self); - sendSystemMessageTestingOnly(self, "My Group level is " + intLevel); - } - if (strText.equals("scriptVars")) - { - deltadictionary dctScriptVars = self.getScriptVars(); - if (dctScriptVars == null) - { - debugSpeakMsg(self, "null scriptvar"); - } - debugSpeakMsg(self, "scriptvars are " + dctScriptVars.toString()); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/dosgood/test.java b/sku.0/sys.server/compiled/game/script/working/dosgood/test.java deleted file mode 100644 index f32a2f116..000000000 --- a/sku.0/sys.server/compiled/game/script/working/dosgood/test.java +++ /dev/null @@ -1,40 +0,0 @@ -package script.working.dosgood; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; -import script.library.space_dungeon; -import script.library.npe; - -public class test extends script.base_script -{ - public test() - { - } - - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - java.util.StringTokenizer st = new java.util.StringTokenizer(text); - String arg = st.nextToken(); - if (arg.equals("testing")) - { - sendSystemMessageTestingOnly(self, "1... 2... 3..."); - } - if (arg.equals("path")) - { - float x = Float.parseFloat(st.nextToken()); - float y = Float.parseFloat(st.nextToken()); - float z = Float.parseFloat(st.nextToken()); - location destination = new location(x, y, z); - createClientPathAdvanced(self, getLocation(self), destination, "default"); - } - return SCRIPT_CONTINUE; - } - -} diff --git a/sku.0/sys.server/compiled/game/script/working/dynamicregiontest.java b/sku.0/sys.server/compiled/game/script/working/dynamicregiontest.java deleted file mode 100644 index dbad1b7cd..000000000 --- a/sku.0/sys.server/compiled/game/script/working/dynamicregiontest.java +++ /dev/null @@ -1,39 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.regions; - -public class dynamicregiontest extends script.base_script -{ - public dynamicregiontest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - createCircleRegion(getLocation(self), 2000, self.toString(), regions.PVP_REGION_TYPE_NORMAL, regions.BUILD_TRUE, regions.MUNI_FALSE, 600, 0, 50, regions.SPAWN_FALSE, regions.MISSION_NONE, false, false); - debugSpeakMsg(self, "made region called " + self.toString()); - return SCRIPT_CONTINUE; - } - public int OnDestroy(obj_id self) throws InterruptedException - { - location locTest = getLocation(self); - String strPlanet = locTest.area; - region rgnRegion = getRegion(strPlanet, self.toString()); - if (rgnRegion == null) - { - debugSpeakMsg(self, "Null region.. no good"); - } - else - { - deleteRegion(rgnRegion); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jbenjtest.java b/sku.0/sys.server/compiled/game/script/working/jbenjtest.java deleted file mode 100644 index 6f4465882..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jbenjtest.java +++ /dev/null @@ -1,818 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import java.util.StringTokenizer; -import java.lang.Math; -import script.library.ai_lib; -import script.library.buff; -import script.library.beast_lib; -import script.library.create; -import script.library.expertise; -import script.library.groundquests; -import script.library.guild; -import script.library.incubator; -import script.library.instance; -import script.library.npe; -import script.library.player_structure; -import script.library.pet_lib; -import script.library.respec; -import script.library.skill; -import script.library.skill_template; -import script.library.space_combat; -import script.library.space_flags; -import script.library.space_quest; -import script.library.static_item; -import script.library.sui; -import script.library.transition; -import script.library.trial; -import script.library.utils; - -public class jbenjtest extends script.base_script -{ - public jbenjtest() - { - } - public static final String PID_NAME = "hateList"; - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - obj_id player = self; - obj_id pInv = utils.getInventoryContainer(player); - obj_id target = getIntendedTarget(self); - obj_id tInv = utils.getInventoryContainer(target); - if (isGod(player)) - { - StringTokenizer st = new java.util.StringTokenizer(text); - int tokens = st.countTokens(); - String command = null; - if (st.hasMoreTokens()) - { - command = st.nextToken(); - } - if (command.equals("setSpaceFlag")) - { - if (st.hasMoreTokens()) - { - command = st.nextToken(); - space_flags.setSpaceFlag(self, command, 1); - return SCRIPT_CONTINUE; - } - return SCRIPT_CONTINUE; - } - if (command.equals("tweakRespecValues")) - { - int combatLevel = -1; - int entLevel = -1; - int traderLevel = -1; - if (st.hasMoreTokens()) - { - command = st.nextToken(); - combatLevel = utils.stringToInt(command); - if (st.hasMoreTokens()) - { - command = st.nextToken(); - entLevel = utils.stringToInt(command); - if (st.hasMoreTokens()) - { - command = st.nextToken(); - traderLevel = utils.stringToInt(command); - } - } - } - int[] recpecLevelsNewValue = - { - combatLevel, - entLevel, - traderLevel - }; - setObjVar(player, respec.PROF_LEVEL_ARRAY, recpecLevelsNewValue); - return SCRIPT_CONTINUE; - } - if (command.equals("respecFix")) - { - if (hasObjVar(player, respec.PROF_LEVEL_ARRAY)) - { - String skillTemplate = getSkillTemplate(player); - int[] recpecLevelsValue = getIntArrayObjVar(player, respec.PROF_LEVEL_ARRAY); - int currentLevel = getLevel(player); - if (!skillTemplate.startsWith("entertainer") && !skillTemplate.startsWith("trader")) - { - int combatLevel = recpecLevelsValue[respec.PROF_LEVEL_COMBAT]; - if (currentLevel < combatLevel) - { - respec.autoLevelPlayer(player, combatLevel, true); - } - } - else if (skillTemplate.startsWith("entertainer")) - { - debugSpeakMsg(self, "you should be a entertainer dude"); - int entLevel = recpecLevelsValue[respec.PROF_LEVEL_ENT]; - debugSpeakMsg(self, "entLevel " + entLevel); - if (currentLevel < entLevel) - { - respec.autoLevelPlayer(player, entLevel, true); - } - } - else if (skillTemplate.startsWith("trader")) - { - debugSpeakMsg(self, "you should be a trader dude"); - int traderLevel = recpecLevelsValue[respec.PROF_LEVEL_TRADER]; - debugSpeakMsg(self, "traderLevel " + traderLevel); - if (currentLevel < traderLevel) - { - respec.autoLevelPlayer(player, traderLevel, true); - } - } - } - } - if (command.equals("sendTestMail")) - { - utils.sendMail(new string_id("spam", "test_mail_title"), new string_id("spam", "test_mail_title"), self, "Galactic Vacant Building Demolishing Movement"); - return SCRIPT_CONTINUE; - } - if (command.equals("hasScriptVar")) - { - if (st.hasMoreTokens()) - { - command = st.nextToken(); - debugSpeakMsg(self, "" + utils.hasObjIdBatchScriptVar(target, command)); - return SCRIPT_CONTINUE; - } - } - if (command.equals("getAttackerList")) - { - obj_id[] attackerList = utils.getObjIdBatchScriptVar(target, "creditForKills.attackerList.attackers"); - String list = utils.getStringScriptVar(target, "creditForKills.attackerList"); - if (attackerList == null) - { - debugSpeakMsg(self, "attackerList was null"); - debugSpeakMsg(self, "list was " + list); - return SCRIPT_CONTINUE; - } - for (int i = 0; i < attackerList.length; ++i) - { - debugSpeakMsg(self, "attackerList[" + i + "] " + attackerList[i]); - } - return SCRIPT_CONTINUE; - } - if (command.equals("testMonthly")) - { - sendSystemMessageTestingOnly(self, "" + getCalendarTimeStringGMT(getIntObjVar(self, respec.OBJVAR_RESPEC_DECAY_TIME))); - return SCRIPT_CONTINUE; - } - if (command.equals("clearInstanceQueue")) - { - instance.setRequestResolved(self); - return SCRIPT_CONTINUE; - } - if (command.equals("setRespecDecay")) - { - sendSystemMessageTestingOnly(self, "setting respec decay to end in 10 seconds. You need to log out fully to test this, or say 'testRespecDecay'."); - int now = getCalendarTime(); - int then = now + 10; - setObjVar(player, respec.OBJVAR_RESPEC_DECAY_TIME, then); - return SCRIPT_CONTINUE; - } - if (command.equals("testRespecDecay")) - { - respec.checkRespecDecay(self); - return SCRIPT_CONTINUE; - } - if (command.equals("get_tat")) - { - obj_id planetId = getPlanetByName("tatooine"); - sendSystemMessageTestingOnly(self, "" + planetId); - } - if (command.equals("sendTestHeroicComplete")) - { - dictionary dict = new dictionary(); - dict.put("tokenIndex", 5); - dict.put("tokenCount", 9); - messageTo(self, "handleAwardtoken", dict, 1, false); - return SCRIPT_CONTINUE; - } - if (command.equals("getHealthRate")) - { - float fltHealthRegen = getHealthRegenRate(target); - debugSpeakMsg(self, "" + fltHealthRegen); - } - if (command.equals("testSuiCountDown")) - { - int flags = 0; - flags |= sui.CD_EVENT_INCAPACITATE; - flags |= sui.CD_EVENT_DAMAGED; - int startTime = 0; - int endTime = 6; - String displayGroup = "bm_creature_knowledge"; - string_id prompt = new string_id("beast", "ability_activate_creature_knowledge"); - String handler = "testSuiCountDown"; - float maxRange = 32; - int pid = sui.smartCountdownTimerSUI(self, self, displayGroup, prompt, startTime, endTime, handler, maxRange, flags); - return SCRIPT_CONTINUE; - } - if (command.equals("getFirstName")) - { - debugSpeakMsg(self, "" + getFirstName(self)); - return SCRIPT_CONTINUE; - } - if (command.equals("setStatic")) - { - setCreatureStatic(target, true); - return SCRIPT_CONTINUE; - } - if (command.equals("clearInspiration")) - { - utils.removeScriptVarTree(self, "performance"); - return SCRIPT_CONTINUE; - } - if (command.equals("removeScriptVar")) - { - if (st.hasMoreTokens()) - { - command = st.nextToken(); - utils.removeScriptVarTree(self, command); - return SCRIPT_CONTINUE; - } - } - if (command.equals("displayScriptVarDictionary")) - { - dictionary dict = new dictionary(); - dict.put("myInt", 1); - dict.put("myString", "Mikkel"); - debugSpeakMsg(self, "dictionary is " + dict.toString()); - return SCRIPT_CONTINUE; - } - if (command.equals("createCameraPcd")) - { - obj_id datapad = utils.getPlayerDatapad(self); - obj_id petControlDevice = createObject(pet_lib.PET_CTRL_DEVICE_TEMPLATE, datapad, ""); - attachScript(petControlDevice, "ai.pcd_ping_response"); - attachScript(petControlDevice, "ai.pet_control_device"); - setObjVar(petControlDevice, "ai.pet.command.0", "f"); - setObjVar(petControlDevice, "ai.pet.command.1", "st"); - setObjVar(petControlDevice, "ai.pet.command.10", "tran"); - setObjVar(petControlDevice, "ai.pet.command.11", "s"); - setObjVar(petControlDevice, "ai.pet.command.12", "t1"); - setObjVar(petControlDevice, "ai.pet.command.13", "t2"); - setObjVar(petControlDevice, "ai.pet.command.1563288080", "fa"); - setObjVar(petControlDevice, "ai.pet.command.16", "g"); - setObjVar(petControlDevice, "ai.pet.command.17", "ft"); - setObjVar(petControlDevice, "ai.pet.command.2", "gu"); - setObjVar(petControlDevice, "ai.pet.command.20", "r"); - setObjVar(petControlDevice, "ai.pet.command.3", "bef"); - setObjVar(petControlDevice, "ai.pet.command.4", "a"); - setObjVar(petControlDevice, "ai.pet.command.5", "p"); - setObjVar(petControlDevice, "ai.pet.command.6", "gp"); - setObjVar(petControlDevice, "ai.pet.command.7", "cp"); - setObjVar(petControlDevice, "ai.pet.command.8", "w"); - setObjVar(petControlDevice, "ai.pet.command.9", "c"); - setObjVar(petControlDevice, "ai.pet.currentStats", "0:0:0:0:0:0:"); - setObjVar(petControlDevice, "ai.pet.palvar.vars./private/index_color_1", 19); - setObjVar(petControlDevice, "ai.pet.type", 1); - setObjVar(petControlDevice, "ai.petAbility.abilityList", "1319491216:1563288080:"); - setObjVar(petControlDevice, "ai.petAbility.available", 2); - setObjVar(petControlDevice, "ai.petAbility.toBeEarned", 1); - setObjVar(petControlDevice, "ai.petAbility.trainingPts", 24); - setObjVar(petControlDevice, "ai.petAdvance.cannotBeMount", 1); - setObjVar(petControlDevice, "ai.petAdvance.growthStage", 5); - setObjVar(petControlDevice, "ai.petAdvance.xpEarned", 6223); - setObjVar(petControlDevice, "pet.creatureName", "noxious_vrelt_scavenger"); - setObjVar(petControlDevice, "pet.timeStored", 65802667); - return SCRIPT_CONTINUE; - } - if (command.equals("getExpertiseAllocation")) - { - String[] skills = expertise.getExpertiseAllocation(self); - if (skills == null || skills.length <= 0) - { - debugSpeakMsg(self, "No Expertise Skills"); - return SCRIPT_CONTINUE; - } - for (int i = 0; i < skills.length; ++i) - { - debugSpeakMsg(self, "" + skills[i]); - } - return SCRIPT_CONTINUE; - } - if (command.equals("getStandingON")) - { - debugSpeakMsg(self, "Standing On " + getStandingOn(self)); - return SCRIPT_CONTINUE; - } - if (command.equals("getTargetYaw")) - { - debugSpeakMsg(self, "yaw is " + getYaw(target)); - return SCRIPT_CONTINUE; - } - if (command.equals("clearHouseId")) - { - setHouseId(self, obj_id.NULL_ID); - return SCRIPT_CONTINUE; - } - if (command.equals("destroyTarget")) - { - destroyObject(target); - return SCRIPT_CONTINUE; - } - if (command.equals("getTargetHateList")) - { - if (!isIdValid(target) || !exists(target)) - { - return SCRIPT_CONTINUE; - } - String enemyNames = generateStringHateList(target); - if (enemyNames != null && !enemyNames.equals("")) - { - int pid = sui.msgbox(self, self, enemyNames, sui.OK_ONLY, "Hate List", "onHateListSuiUpdate"); - messageTo(self, "refreshSuiHateList", null, 1, false); - sui.setPid(self, pid, PID_NAME); - } - return SCRIPT_CONTINUE; - } - if (command.equals("freezeAi")) - { - stop(target); - return SCRIPT_CONTINUE; - } - if (command.equals("testAddHate")) - { - debugSpeakMsg(self, "beginingHate is " + getHate(target, self)); - addHateDot(target, self, 50, 25); - debugSpeakMsg(self, "hateDot is " + getHate(target, self)); - float currentHate = getHate(target, self); - addHate(target, self, currentHate + 500); - debugSpeakMsg(self, "SecondHate is " + getHate(target, self)); - return SCRIPT_CONTINUE; - } - if (command.equals("incrementSlot")) - { - if (st.hasMoreTokens()) - { - command = st.nextToken(); - if (st.hasMoreTokens()) - { - int number = utils.stringToInt(st.nextToken()); - modifyCollectionSlotValue(player, command, number); - } - } - return SCRIPT_CONTINUE; - } - if (command.equals("showDroids")) - { - obj_id[] droidIds = pet_lib.getPcdsForType(player, pet_lib.PET_TYPE_DROID); - Vector resizAbleDroidIds = new Vector(Arrays.asList(droidIds)); - Vector droidNames = new Vector(); - droidNames.setSize(0); - for (int i = 0; i < droidIds.length; ++i) - { - if (hasObjVar(droidIds[i], "module_data.dancing_droid")) - { - utils.removeElement(resizAbleDroidIds, droidIds[i]); - continue; - } - String droidName = getName(droidIds[i]); - String[] splitName = split(droidName, '/'); - if (splitName.length > 1) - { - utils.addElement(droidNames, "@" + droidName); - } - else - { - utils.addElement(droidNames, droidName); - } - } - utils.setScriptVar(player, "dancing_droid.ids", droidIds); - int pid = sui.listbox(self, self, "prompt", sui.OK_CANCEL, "title", droidNames, "onDanceDroidLoaded", true, true); - return SCRIPT_CONTINUE; - } - if (command.equals("getMemberIds")) - { - int guildId = getGuildId(self); - obj_id[] members = guildGetMemberIds(guildId); - debugSpeakMsg(self, "members.length = " + members.length); - debugSpeakMsg(self, "guildId = " + guildId); - for (int i = 0; i < members.length; ++i) - { - if (!isIdValid(members[i])) - { - debugSpeakMsg(self, "members[" + i + "] was Invalid"); - } - } - return SCRIPT_CONTINUE; - } - if (command.equals("gc")) - { - debugSpeakMsg(self, "telling Java to do garbage collection"); - System.gc(); - } - if (command.equals("getGameTime")) - { - debugSpeakMsg(self, "" + getGameTime()); - return SCRIPT_CONTINUE; - } - if (command.equals("clearGuildPid")) - { - guild.removeWindowPid(self); - return SCRIPT_CONTINUE; - } - if (command.equals("giveNewbShip")) - { - space_quest.grantNewbieShip(self, "neutral"); - return SCRIPT_CONTINUE; - } - if (command.equals("getGuildId")) - { - int guildId = getGuildId(target); - debugSpeakMsg(self, "guildId " + guildId); - return SCRIPT_CONTINUE; - } - if (command.equals("maxDailyPackup")) - { - setObjVar(self, "dailyHousePackup", player_structure.MAX_PACKUP_PER_DAY); - return SCRIPT_CONTINUE; - } - if (command.equals("getMasterGuildObj")) - { - obj_id masterGuildObj = getMasterGuildObject(); - debugSpeakMsg(self, "masterGuildObj " + masterGuildObj); - } - if (command.equals("getGameTime")) - { - debugSpeakMsg(self, "Game Time is " + getGameTime()); - return SCRIPT_CONTINUE; - } - if (command.equals("mountable")) - { - debugSpeakMsg(self, "couldPetBeMadeMountable " + couldPetBeMadeMountable(target)); - } - if (command.equals("getMyCityId")) - { - debugSpeakMsg(self, "My city is " + getCitizenOfCityId(self)); - return SCRIPT_CONTINUE; - } - if (command.equals("updateScriptvar")) - { - if (st.hasMoreTokens()) - { - String scriptVarName = st.nextToken(); - if (st.hasMoreTokens()) - { - String scriptVarValue = st.nextToken(); - utils.setScriptVar(target, scriptVarName, utils.stringToInt(scriptVarValue)); - return SCRIPT_CONTINUE; - } - else - { - debugSpeakMsg(self, "parameters are updateScriptvar "); - } - return SCRIPT_CONTINUE; - } - else - { - debugSpeakMsg(self, "parameters are updateScriptvar "); - } - return SCRIPT_CONTINUE; - } - if (command.equals("getAppearance")) - { - String targetAppearance = getAppearance(target); - String[] splitAppearance = split(targetAppearance, '/'); - String[] finalAppearance = split(splitAppearance[1], '.'); - int row = dataTableSearchColumnForString(finalAppearance[0], "start_template", "datatables/beast/incubator_templates.iff"); - debugSpeakMsg(self, "finalAppearance = " + finalAppearance[0]); - debugSpeakMsg(self, "row = " + row); - return SCRIPT_CONTINUE; - } - if (command.equals("getRawAppearance")) - { - String targetAppearance = getAppearance(target); - debugSpeakMsg(self, "targetAppearance = " + targetAppearance); - return SCRIPT_CONTINUE; - } - if (command.equals("getDna")) - { - obj_id dnaContainer = incubator.extractDna(self, target); - debugSpeakMsg(self, "dnaContainer = " + dnaContainer); - return SCRIPT_CONTINUE; - } - if (command.equals("validateExpertise")) - { - skill.validateExpertise(self); - return SCRIPT_CONTINUE; - } - if (command.equals("newbArmor")) - { - npe.grantNewbArmor(self); - return SCRIPT_CONTINUE; - } - if (command.equals("getTemplate")) - { - String skillTemplate = getSkillTemplate(self); - debugSpeakMsg(self, "Skill Template is " + skillTemplate); - return SCRIPT_CONTINUE; - } - if (command.equals("setBlankTemplate")) - { - setSkillTemplate(self, "a"); - String skillTemplate = getSkillTemplate(self); - debugSpeakMsg(self, "Skill Template is " + skillTemplate); - return SCRIPT_CONTINUE; - } - if (command.equals("startMarket")) - { - debugSpeakMsg(self, "target is " + target); - messageTo(target, "spawnMarketplaceNpcs", null, 1, false); - return SCRIPT_CONTINUE; - } - if (command.equals("nukeWorld")) - { - obj_id[] objObjects = getObjectsInRange(self, 32000); - sendSystemMessageTestingOnly(self, "Destroying world"); - for (int intI = 0; intI < objObjects.length; intI++) - { - if (!isPlayer(objObjects[intI])) - { - setObjVar(objObjects[intI], "intCleaningUp", 1); - destroyObject(objObjects[intI]); - } - } - return SCRIPT_CONTINUE; - } - if (command.equals("topMostContainer")) - { - debugSpeakMsg(self, "topmost is" + getTopMostContainer(self)); - return SCRIPT_CONTINUE; - } - if (command.equals("getScene")) - { - String planet = getCurrentSceneName(); - debugSpeakMsg(self, "planet is " + planet); - return SCRIPT_CONTINUE; - } - if (command.equals("faceMe")) - { - faceTo(target, self); - } - if (command.equals("addNightSisterVendor")) - { - applySkillStatisticModifier(self, "vendor_nightsister", 1); - } - if (command.equals("addSkillMod")) - { - if (st.hasMoreTokens()) - { - String modName = st.nextToken(); - if (st.hasMoreTokens()) - { - int amount = utils.stringToInt(st.nextToken()); - applySkillStatisticModifier(self, modName, amount); - messageTo(self, "setDisplayOnlyDefensiveMods", trial.getSessionDict(self, "displayDefensiveMods"), 0, false); - } - } - } - if (command.equals("callTravelUI")) - { - String planet = getCurrentSceneName(); - boolean uiCalled = enterClientTicketPurchaseMode(self, planet, "Dathomir Outpost", true); - debugSpeakMsg(self, "enterClientTicketPurchaseMode " + uiCalled); - } - if (command.equals("zoneAurillia")) - { - transition.zonePlayerNoGate("aurillia_township", self, true); - } - if (command.equals("removeNightSisterVendor")) - { - applySkillStatisticModifier(self, "vendor_nightsister", -1); - } - if (command.equals("getResistance")) - { - int resistance_mod = getEnhancedSkillStatisticModifier(self, "resistance_poison"); - float resist_scale = (0.4f / ((100f + resistance_mod) / 200f)); - float to_hit_chance = 100 * resist_scale; - debugSpeakMsg(self, "My resistance mod is " + resistance_mod); - debugSpeakMsg(self, "My resist_scale is " + resist_scale); - debugSpeakMsg(self, "To hit Chance for spy fang is " + to_hit_chance); - to_hit_chance = 360 * resist_scale; - debugSpeakMsg(self, "To hit Chance for artery strike is " + to_hit_chance); - to_hit_chance = 120 * resist_scale; - debugSpeakMsg(self, "To hit Chance for malady is " + to_hit_chance); - } - if (command.equals("spawnCommoner")) - { - location myLoc = getLocation(self); - create.object("commoner", myLoc, false); - } - if (command.equals("incrementHappiness")) - { - obj_id beast = beast_lib.getBeastOnPlayer(self); - obj_id bcd = beast_lib.getBeastBCD(beast); - int currentHappiness = utils.getIntScriptVar(bcd, beast_lib.PET_HAPPINESS_SCRIPTVAR); - int updatedHappiness = currentHappiness + 5; - utils.setScriptVar(bcd, beast_lib.PET_HAPPINESS_SCRIPTVAR, updatedHappiness); - beast_lib.updateBeastStats(bcd, beast); - } - if (command.equals("decrementHappiness")) - { - obj_id beast = beast_lib.getBeastOnPlayer(self); - obj_id bcd = beast_lib.getBeastBCD(beast); - int currentHappiness = utils.getIntScriptVar(bcd, beast_lib.PET_HAPPINESS_SCRIPTVAR); - int updatedHappiness = currentHappiness - 5; - utils.setScriptVar(bcd, beast_lib.PET_HAPPINESS_SCRIPTVAR, updatedHappiness); - beast_lib.updateBeastStats(bcd, beast); - } - if (command.equals("testCrystal")) - { - obj_id createdObject = createObjectInInventoryAllowOverload("object/tangible/item/quest/force_sensitive/fs_buff_item.iff", self); - if (!isIdNull(createdObject)) - { - setObjVar(createdObject, "createdFor", self); - setObjVar(createdObject, "item.time.reuse_time", 345600); - setObjVar(createdObject, "item.buff.type", 6); - setObjVar(createdObject, "item.buff.value", 900); - setObjVar(createdObject, "item.buff.duration", 5400); - } - return SCRIPT_CONTINUE; - } - if (command.equals("giveTargetBuff")) - { - if (st.hasMoreTokens()) - { - String buffName = st.nextToken(); - buff.applyBuff(target, buffName); - } - } - if (command.equals("giveMidlithe")) - { - if (st.hasMoreTokens()) - { - String count = st.nextToken(); - obj_id lootItem = static_item.createNewItemFunction(space_combat.NOVA_ORION_RESOURCE, utils.getInventoryContainer(self)); - setCount(lootItem, utils.stringToInt(count)); - } - } - if (command.equals("nukeTarget")) - { - destroyObject(target); - return SCRIPT_OVERRIDE; - } - if (command.equals("getPosture")) - { - int myPosture = getPosture(target); - switch (myPosture) - { - case POSTURE_NONE: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_NONE"); - break; - case POSTURE_UPRIGHT: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_UPRIGHT"); - break; - case POSTURE_CROUCHED: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_CROUCHED"); - break; - case POSTURE_PRONE: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_PRONE"); - break; - case POSTURE_SNEAKING: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_SNEAKING"); - break; - case POSTURE_BLOCKING: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_BLOCKING"); - break; - case POSTURE_CLIMBING: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_CLIMBING"); - break; - case POSTURE_FLYING: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_FLYING"); - break; - case POSTURE_LYING_DOWN: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_LYING_DOWN"); - break; - case POSTURE_SITTING: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_SITTING"); - break; - case POSTURE_SKILL_ANIMATING: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_SKILL_ANIMATING"); - break; - case POSTURE_DRIVING_VEHICLE: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_DRIVING_VEHICLE"); - break; - case POSTURE_RIDING_CREATURE: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_RIDING_CREATURE"); - break; - case POSTURE_KNOCKED_DOWN: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_KNOCKED_DOWN"); - break; - case POSTURE_INCAPACITATED: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_INCAPACITATED"); - break; - case POSTURE_DEAD: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_DEAD"); - break; - case POSTURE_COUNT: - sendSystemMessageTestingOnly(self, "my Posuture is POSTURE_COUNT"); - break; - default: - sendSystemMessageTestingOnly(self, "my Posuture is default"); - break; - } - } - } - return SCRIPT_CONTINUE; - } - public int testSuiCountDown(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "params is " + params); - return SCRIPT_CONTINUE; - } - public int onHateListSuiUpdate(obj_id self, dictionary params) throws InterruptedException - { - if (params == null || params.isEmpty()) - { - return SCRIPT_CONTINUE; - } - int bp = sui.getIntButtonPressed(params); - if (bp == sui.BP_CANCEL || bp == sui.BP_OK) - { - sui.removePid(self, PID_NAME); - return SCRIPT_CONTINUE; - } - if (!sui.hasPid(self, PID_NAME)) - { - return SCRIPT_CONTINUE; - } - return SCRIPT_CONTINUE; - } - public int refreshSuiHateList(obj_id self, dictionary params) throws InterruptedException - { - if (sui.hasPid(self, PID_NAME)) - { - int pid = sui.getPid(self, PID_NAME); - obj_id target = getIntendedTarget(self); - if (!isIdValid(target) || !exists(target)) - { - return SCRIPT_CONTINUE; - } - String enemyNames = generateStringHateList(target); - if (enemyNames != null && !enemyNames.equals("")) - { - setSUIProperty(pid, sui.MSGBOX_PROMPT, sui.PROP_TEXT, enemyNames); - flushSUIPage(pid); - messageTo(self, "refreshSuiHateList", null, 1, false); - } - } - return SCRIPT_CONTINUE; - } - public int getStructureGuildId(obj_id self) throws InterruptedException - { - int guildId = 0; - obj_id structure = player_structure.getStructure(self); - if (isIdValid(structure) && hasObjVar(structure, "player_structure.owner") && hasObjVar(structure, "guildId")) - { - guildId = getIntObjVar(structure, "guildId"); - if (guildId != 0 && !guildExists(guildId)) - { - removeObjVar(structure, "guildId"); - guildId = 0; - } - } - if (guildId == 0 && hasObjVar(self, "guildId")) - { - guildId = getIntObjVar(self, "guildId"); - if (guildId != 0 && !guildExists(guildId)) - { - removeObjVar(self, "guildId"); - guildId = 0; - } - } - return guildId; - } - public String generateStringHateList(obj_id target) throws InterruptedException - { - obj_id[] enemies = getHateList(target); - if (enemies == null || enemies.length == 0) - { - return null; - } - String enemyNames = "\n"; - for (int i = 0; i < enemies.length; ++i) - { - String enemyStringName = ""; - if (!isPlayer(enemies[i])) - { - enemyStringName = "NotAPlayer ObjID(" + enemies[i] + ")"; - } - else - { - enemyStringName = getPlayerName(enemies[i]); - } - enemyNames += enemyStringName + "\t\t" + (int)getHate(target, enemies[i]) + "\n"; - } - return enemyNames; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jcarpenter/spawn_recorder.java b/sku.0/sys.server/compiled/game/script/working/jcarpenter/spawn_recorder.java deleted file mode 100644 index f07256d89..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jcarpenter/spawn_recorder.java +++ /dev/null @@ -1,95 +0,0 @@ -package script.working.jcarpenter; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.datatable; -import java.util.StringTokenizer; - -public class spawn_recorder extends script.base_script -{ - public spawn_recorder() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - if (!hasObjVar(self, "record_table")) - { - sendSystemMessageTestingOnly(self, "Attach the objvar 'record_table' to yourself with the name of the table to which you want to record"); - } - else - { - String table = getStringObjVar(self, "record_table"); - sendSystemMessageTestingOnly(self, "Recording to table: " + table); - sendSystemMessageTestingOnly(self, "If this is not correct, change the value of the objvar 'record_table'"); - } - sendSystemMessageTestingOnly(self, "Say 'mark ' to place a creature or npc at your current location and heading"); - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (!(toLower(text)).startsWith("mark")) - { - return SCRIPT_CONTINUE; - } - if (!hasObjVar(self, "record_table")) - { - sendSystemMessageTestingOnly(self, "[ERROR] No datatable specified for recording"); - return SCRIPT_CONTINUE; - } - String table = getStringObjVar(self, "record_table"); - if (!(toLower(table)).startsWith("datatables") || !(toLower(table)).endsWith(".tab")) - { - sendSystemMessageTestingOnly(self, "[ERROR] Invalid datatable specified for recording"); - return SCRIPT_CONTINUE; - } - StringTokenizer st = new StringTokenizer(text); - String command = st.nextToken(); - String creature = ""; - if (st.hasMoreTokens()) - { - creature = st.nextToken(); - } - obj_id obj = self; - if (command.equalsIgnoreCase("markthis")) - { - obj = getLookAtTarget(self); - creature = getTemplateName(obj); - } - location here = getLocation(obj); - float yaw = getYaw(obj); - obj_id room = here.cell; - obj_id top = getTopMostContainer(obj); - String roomName = getRoomName(top, room); - sendSystemMessageTestingOnly(self, "Spawning: " + creature + " Location: " + here + " Heading: " + yaw); - dictionary dctRow = new dictionary(); - dctRow.put("spawns", creature); - dctRow.put("loc_x", here.x); - dctRow.put("loc_y", here.y); - dctRow.put("loc_z", here.z); - dctRow.put("room", roomName); - dctRow.put("yaw", yaw); - datatable.serverDataTableAddRow(table, dctRow); - return SCRIPT_CONTINUE; - } - public String getRoomName(obj_id building, obj_id cell) throws InterruptedException - { - String[] allCells = getCellNames(building); - int numberOfCells = allCells.length; - for (int i = 0; i < numberOfCells; i++) - { - String cellName = allCells[i]; - obj_id thisCell = getCellId(building, cellName); - if (thisCell == cell) - { - return cellName; - } - } - return "no_match"; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jcarpenter/util.java b/sku.0/sys.server/compiled/game/script/working/jcarpenter/util.java deleted file mode 100644 index 887b9af3b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jcarpenter/util.java +++ /dev/null @@ -1,1222 +0,0 @@ -package script.working.jcarpenter; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.combat; -import script.library.healing; -import script.library.utils; -import script.library.create; -import java.util.StringTokenizer; - -public class util extends script.base_script -{ - public util() - { - } - public static final String[] HELP_TEXT = - { - "Utility commands:", - "heal", - "autoheal", - "stopautoheal", - "up", - "down", - "eject", - "warp ", - "create ", - "create ", - "create ", - "create ", - "destroyObject (target)", - "grant ", - "grant help", - "revoke ", - "revoke help", - "wound (target)", - "wound all (target)", - "damage (target)", - "damage all (target)", - "============================" - }; - public static final String[] PROFESSIONS = - { - "entertainer", - "scout", - "medic", - "artisan", - "brawler", - "marksman", - "rifleman", - "pistoleer", - "carbineer", - "teraskasi", - "fencer", - "swordsman", - "pikeman", - "dancer", - "musician", - "doctor", - "ranger", - "creaturehandler", - "bioengineer", - "armorsmith", - "weaponsmith", - "chef", - "tailor", - "architect", - "droidengineer", - "bountyhunter", - "commando", - "combatmedic", - "imagedesigner", - "squadleader", - "merchant", - "politician" - }; - public int OnAttach(obj_id self) throws InterruptedException - { - boolean remove = true; - if (isPlayer(self)) - { - if (isGod(self)) - { - int godLevel = getGodLevel(self); - if (godLevel >= 50) - { - remove = false; - } - } - } - if (remove) - { - sendSystemMessageTestingOnly(self, "...you do not have a sufficient access level to use this script..."); - detachScript(self, "jcarpenter.util"); - } - else - { - sendSystemMessageTestingOnly(self, "...utility script attached..."); - sendSystemMessageTestingOnly(self, "...say 'help' to see a list of utility commands..."); - } - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if ((toLower(text)).equals("heal")) - { - healing.fullHeal(self); - sendSystemMessageTestingOnly(self, "...you have been fully healed..."); - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).equals("autoheal")) - { - utils.setScriptVar(self, "autoheal", 1); - sendSystemMessageTestingOnly(self, "...you will now be auto-healed..."); - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).equals("stopautoheal")) - { - if (utils.hasScriptVar(self, "autoheal")) - { - - } - utils.removeScriptVar(self, "autoheal"); - sendSystemMessageTestingOnly(self, "...you will no longer be auto-healed..."); - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).equals("help")) - { - for (int i = 0; i < HELP_TEXT.length; i++) - { - sendSystemMessageTestingOnly(self, HELP_TEXT[i]); - } - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).equals("up")) - { - if (elevatorMove(self, 1) != 0) - { - sendSystemMessageTestingOnly(self, "...you press the up button on a magic elevator..."); - } - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).equals("down")) - { - if (elevatorMove(self, -1) != 0) - { - sendSystemMessageTestingOnly(self, "...you press the down button on a magic elevator..."); - } - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).equals("eject")) - { - obj_id building = getTopMostContainer(self); - if (building == null || !isIdValid(building) || building == self) - { - return SCRIPT_CONTINUE; - } - location ejectLoc = getBuildingEjectLocation(building); - sendSystemMessageTestingOnly(self, "...you are being ejected from the building..."); - utils.warpPlayer(self, ejectLoc); - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).startsWith("warp")) - { - StringTokenizer st = new StringTokenizer(text); - if (st.countTokens() != 2) - { - return SCRIPT_CONTINUE; - } - String command = st.nextToken(); - String warpStr = st.nextToken(); - float warp = utils.stringToFloat(warpStr); - if (warp == Float.NEGATIVE_INFINITY) - { - return SCRIPT_CONTINUE; - } - warp += 0.05f; - warp *= 10.0f; - int chop = (int)warp; - warp = ((float)chop) / 10.0f; - if (warp <= 0.0f) - { - return SCRIPT_CONTINUE; - } - if (warp > 10.0f) - { - warp = 10.0f; - } - setMovementPercent(self, warp); - sendSystemMessageTestingOnly(self, "...you are now running at warp " + warp + "..."); - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).startsWith("create")) - { - StringTokenizer st = new StringTokenizer(text); - if (st.countTokens() != 2) - { - return SCRIPT_CONTINUE; - } - String command = st.nextToken(); - String createStr = st.nextToken(); - if (createResource(self, createStr)) - { - return SCRIPT_CONTINUE; - } - else if (createCreature(self, createStr)) - { - return SCRIPT_CONTINUE; - } - else if (createItem(self, createStr)) - { - return SCRIPT_CONTINUE; - } - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).equals("destroyobject")) - { - if (!isGod(self)) - { - return SCRIPT_CONTINUE; - } - obj_id target = getLookAtTarget(self); - if (isPlayer(target)) - { - return SCRIPT_CONTINUE; - } - if (destroyObject(target)) - { - sendSystemMessageTestingOnly(self, "...target destroyed..."); - } - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).startsWith("grant")) - { - StringTokenizer st = new StringTokenizer(text); - if (st.countTokens() != 2) - { - return SCRIPT_CONTINUE; - } - String command = st.nextToken(); - String profession = st.nextToken(); - if (profession.equals("help")) - { - sendSystemMessageTestingOnly(self, "These are the professions that can be used with the grant utility:"); - for (int j = 0; j < PROFESSIONS.length; j++) - { - sendSystemMessageTestingOnly(self, PROFESSIONS[j]); - } - return SCRIPT_CONTINUE; - } - String[] skills = getSkills(profession); - if (skills == null || skills.length == 0) - { - return SCRIPT_CONTINUE; - } - boolean result = true; - for (int i = 0; i < skills.length; i++) - { - if (!hasSkill(self, skills[i])) - { - result &= grantSkill(self, skills[i]); - } - } - if (result) - { - sendSystemMessageTestingOnly(self, "...profession successfully granted..."); - } - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).startsWith("revoke")) - { - StringTokenizer st = new StringTokenizer(text); - if (st.countTokens() != 2) - { - return SCRIPT_CONTINUE; - } - String command = st.nextToken(); - String profession = st.nextToken(); - if (profession.equals("help")) - { - sendSystemMessageTestingOnly(self, "These are the professions that can be used with the revoke utility:"); - for (int j = 0; j < PROFESSIONS.length; j++) - { - sendSystemMessageTestingOnly(self, PROFESSIONS[j]); - } - return SCRIPT_CONTINUE; - } - String[] skills = getSkills(profession); - if (skills == null || skills.length == 0) - { - return SCRIPT_CONTINUE; - } - for (int i = (skills.length - 1); i >= 0; i--) - { - if (hasSkill(self, skills[i])) - { - revokeSkill(self, skills[i]); - } - } - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).startsWith("wound")) - { - StringTokenizer st = new StringTokenizer(text); - if (st.countTokens() != 3) - { - return SCRIPT_CONTINUE; - } - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - return SCRIPT_CONTINUE; - } - String command = st.nextToken(); - String attribStr = st.nextToken(); - String amountStr = st.nextToken(); - int[] attrib = - { - 0, - 0, - 0, - 0, - 0, - 0 - }; - int amount = utils.stringToInt(amountStr); - if (attribStr.equals("health")) - { - attrib[HEALTH] = amount; - } - else if (attribStr.equals("constitution")) - { - attrib[CONSTITUTION] = amount; - } - else if (attribStr.equals("action")) - { - attrib[ACTION] = amount; - } - else if (attribStr.equals("stamina")) - { - attrib[STAMINA] = amount; - } - else if (attribStr.equals("mind")) - { - attrib[MIND] = amount; - } - else if (attribStr.equals("willpower")) - { - attrib[WILLPOWER] = amount; - } - else if (attribStr.equals("all")) - { - for (int i = 0; i < attrib.length; i++) - { - attrib[i] = amount; - } - } - else - { - return SCRIPT_CONTINUE; - } - int inc = 1; - if (!isPlayer(target)) - { - inc = NUM_ATTRIBUTES_PER_GROUP; - } - for (int j = 0; j < attrib.length; j += inc) - { - if (attrib[j] > 0) - { - int shock = getShockWound(target); - setShockWound(target, shock); - } - } - sendSystemMessageTestingOnly(self, "...target successully wounded..."); - return SCRIPT_CONTINUE; - } - else if ((toLower(text)).startsWith("damage")) - { - StringTokenizer st = new StringTokenizer(text); - if (st.countTokens() != 3) - { - return SCRIPT_CONTINUE; - } - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - return SCRIPT_CONTINUE; - } - String command = st.nextToken(); - String attribStr = st.nextToken(); - String amountStr = st.nextToken(); - attribute[] attrib = getAttribs(target); - int amount = utils.stringToInt(amountStr); - if (attribStr.equals("health")) - { - attrib[HEALTH] = new attribute(attrib[HEALTH].getType(), (attrib[HEALTH].getValue() - amount)); - } - else if (attribStr.equals("action")) - { - attrib[ACTION] = new attribute(attrib[ACTION].getType(), (attrib[ACTION].getValue() - amount)); - } - else if (attribStr.equals("mind")) - { - attrib[MIND] = new attribute(attrib[MIND].getType(), (attrib[MIND].getValue() - amount)); - } - else if (attribStr.equals("all")) - { - for (int i = 0; i < attrib.length; i += NUM_ATTRIBUTES_PER_GROUP) - { - attrib[i] = new attribute(attrib[i].getType(), (attrib[i].getValue() - amount)); - } - } - else - { - return SCRIPT_CONTINUE; - } - for (int j = 0; j < attrib.length; j += NUM_ATTRIBUTES_PER_GROUP) - { - if (attrib[j].getValue() < 1) - { - attrib[j] = new attribute(attrib[j].getType(), 1); - } - } - if (setAttribs(target, attrib)) - { - sendSystemMessageTestingOnly(self, "...target successully damaged..."); - } - return SCRIPT_CONTINUE; - } - else - { - return SCRIPT_CONTINUE; - } - } - public int OnCreatureDamaged(obj_id self, obj_id attacker, obj_id weapon, int[] damage) throws InterruptedException - { - if (utils.hasScriptVar(self, "autoheal")) - { - attribute[] maxAttribs = getUnmodifiedMaxAttribs(self); - attribute[] currentAttribs = getAttribs(self); - for (int i = 0; i < maxAttribs.length; i += 2) - { - if (((float)currentAttribs[i].getValue() / (float)maxAttribs[i].getValue()) < 0.25f) - { - healing.fullHeal(self); - sendSystemMessageTestingOnly(self, "...you have been auto-healed..."); - return SCRIPT_CONTINUE; - } - } - } - return SCRIPT_CONTINUE; - } - public boolean createResource(obj_id self, String createStr) throws InterruptedException - { - if (self == null || !isIdValid(self)) - { - return false; - } - if (createStr == null || createStr.equals("")) - { - return false; - } - obj_id resourceId = pickRandomNonDepeletedResource(createStr); - if (resourceId == null || !isIdValid(resourceId)) - { - resourceId = getResourceTypeByName(createStr); - if (resourceId == null || !isIdValid(resourceId)) - { - return false; - } - } - String crateTemplate = getResourceContainerForType(resourceId); - if (crateTemplate != null && !crateTemplate.equals("")) - { - obj_id pInv = utils.getInventoryContainer(self); - if (pInv != null) - { - obj_id crate = createObject(crateTemplate, pInv, ""); - if (addResourceToContainer(crate, resourceId, 100000, self)) - { - sendSystemMessageTestingOnly(self, "...resource " + createStr + " created..."); - return true; - } - } - } - return false; - } - public boolean createCreature(obj_id self, String createStr) throws InterruptedException - { - if (self == null || !isIdValid(self)) - { - return false; - } - if (createStr == null || createStr.equals("")) - { - return false; - } - location here = getLocation(self); - obj_id creature = create.object(createStr, here); - if (creature == null || !isIdValid(creature)) - { - return false; - } - sendSystemMessageTestingOnly(self, "..." + createStr + " created..."); - return true; - } - public boolean createItem(obj_id self, String createStr) throws InterruptedException - { - if (self == null || !isIdValid(self)) - { - return false; - } - if (createStr == null || createStr.equals("")) - { - return false; - } - location here = getLocation(self); - obj_id item = createObject(createStr, here); - if (item == null || !isIdValid(item)) - { - return false; - } - sendSystemMessageTestingOnly(self, "..." + createStr + " created..."); - return true; - } - public String[] getSkills(String profession) throws InterruptedException - { - final String[][] SKILLS = - { - - { - "social_entertainer_novice", - "social_entertainer_hairstyle_01", - "social_entertainer_hairstyle_02", - "social_entertainer_hairstyle_03", - "social_entertainer_hairstyle_04", - "social_entertainer_music_01", - "social_entertainer_music_02", - "social_entertainer_music_03", - "social_entertainer_music_04", - "social_entertainer_dance_01", - "social_entertainer_dance_02", - "social_entertainer_dance_03", - "social_entertainer_dance_04", - "social_entertainer_healing_01", - "social_entertainer_healing_02", - "social_entertainer_healing_03", - "social_entertainer_healing_04", - "social_entertainer_master" - }, - - { - "outdoors_scout_novice", - "outdoors_scout_movement_01", - "outdoors_scout_movement_02", - "outdoors_scout_movement_03", - "outdoors_scout_movement_04", - "outdoors_scout_tools_01", - "outdoors_scout_tools_02", - "outdoors_scout_tools_03", - "outdoors_scout_tools_04", - "outdoors_scout_harvest_01", - "outdoors_scout_harvest_02", - "outdoors_scout_harvest_03", - "outdoors_scout_harvest_04", - "outdoors_scout_camp_01", - "outdoors_scout_camp_02", - "outdoors_scout_camp_03", - "outdoors_scout_camp_04", - "outdoors_scout_master" - }, - - { - "science_medic_novice", - "science_medic_injury_01", - "science_medic_injury_02", - "science_medic_injury_03", - "science_medic_injury_04", - "science_medic_injury_speed_01", - "science_medic_injury_speed_02", - "science_medic_injury_speed_03", - "science_medic_injury_speed_04", - "science_medic_ability_01", - "science_medic_ability_02", - "science_medic_ability_03", - "science_medic_ability_04", - "science_medic_crafting_01", - "science_medic_crafting_02", - "science_medic_crafting_03", - "science_medic_crafting_04", - "science_medic_master" - }, - - { - "crafting_artisan_novice", - "crafting_artisan_engineering_01", - "crafting_artisan_engineering_02", - "crafting_artisan_engineering_03", - "crafting_artisan_engineering_04", - "crafting_artisan_domestic_01", - "crafting_artisan_domestic_02", - "crafting_artisan_domestic_03", - "crafting_artisan_domestic_04", - "crafting_artisan_business_01", - "crafting_artisan_business_02", - "crafting_artisan_business_03", - "crafting_artisan_business_04", - "crafting_artisan_survey_01", - "crafting_artisan_survey_02", - "crafting_artisan_survey_03", - "crafting_artisan_survey_04", - "crafting_artisan_master" - }, - - { - "combat_brawler_novice", - "combat_brawler_unarmed_01", - "combat_brawler_unarmed_02", - "combat_brawler_unarmed_03", - "combat_brawler_unarmed_04", - "combat_brawler_1handmelee_01", - "combat_brawler_1handmelee_02", - "combat_brawler_1handmelee_03", - "combat_brawler_1handmelee_04", - "combat_brawler_2handmelee_01", - "combat_brawler_2handmelee_02", - "combat_brawler_2handmelee_03", - "combat_brawler_2handmelee_04", - "combat_brawler_polearm_01", - "combat_brawler_polearm_02", - "combat_brawler_polearm_03", - "combat_brawler_polearm_04", - "combat_brawler_master" - }, - - { - "combat_marksman_novice", - "combat_marksman_rifle_01", - "combat_marksman_rifle_02", - "combat_marksman_rifle_03", - "combat_marksman_rifle_04", - "combat_marksman_pistol_01", - "combat_marksman_pistol_02", - "combat_marksman_pistol_03", - "combat_marksman_pistol_04", - "combat_marksman_carbine_01", - "combat_marksman_carbine_02", - "combat_marksman_carbine_03", - "combat_marksman_carbine_04", - "combat_marksman_support_01", - "combat_marksman_support_02", - "combat_marksman_support_03", - "combat_marksman_support_04", - "combat_marksman_master" - }, - - { - "combat_rifleman_novice", - "combat_rifleman_accuracy_01", - "combat_rifleman_accuracy_02", - "combat_rifleman_accuracy_03", - "combat_rifleman_accuracy_04", - "combat_rifleman_speed_01", - "combat_rifleman_speed_02", - "combat_rifleman_speed_03", - "combat_rifleman_speed_04", - "combat_rifleman_ability_01", - "combat_rifleman_ability_02", - "combat_rifleman_ability_03", - "combat_rifleman_ability_04", - "combat_rifleman_support_01", - "combat_rifleman_support_02", - "combat_rifleman_support_03", - "combat_rifleman_support_04", - "combat_rifleman_master" - }, - - { - "combat_pistol_novice", - "combat_pistol_accuracy_01", - "combat_pistol_accuracy_02", - "combat_pistol_accuracy_03", - "combat_pistol_accuracy_04", - "combat_pistol_speed_01", - "combat_pistol_speed_02", - "combat_pistol_speed_03", - "combat_pistol_speed_04", - "combat_pistol_ability_01", - "combat_pistol_ability_02", - "combat_pistol_ability_03", - "combat_pistol_ability_04", - "combat_pistol_support_01", - "combat_pistol_support_02", - "combat_pistol_support_03", - "combat_pistol_support_04", - "combat_pistol_master" - }, - - { - "combat_carbine_novice", - "combat_carbine_accuracy_01", - "combat_carbine_accuracy_02", - "combat_carbine_accuracy_03", - "combat_carbine_accuracy_04", - "combat_carbine_speed_01", - "combat_carbine_speed_02", - "combat_carbine_speed_03", - "combat_carbine_speed_04", - "combat_carbine_ability_01", - "combat_carbine_ability_02", - "combat_carbine_ability_03", - "combat_carbine_ability_04", - "combat_carbine_support_01", - "combat_carbine_support_02", - "combat_carbine_support_03", - "combat_carbine_support_04", - "combat_carbine_master" - }, - - { - "combat_unarmed_novice", - "combat_unarmed_accuracy_01", - "combat_unarmed_accuracy_02", - "combat_unarmed_accuracy_03", - "combat_unarmed_accuracy_04", - "combat_unarmed_speed_01", - "combat_unarmed_speed_02", - "combat_unarmed_speed_03", - "combat_unarmed_speed_04", - "combat_unarmed_ability_01", - "combat_unarmed_ability_02", - "combat_unarmed_ability_03", - "combat_unarmed_ability_04", - "combat_unarmed_support_01", - "combat_unarmed_support_02", - "combat_unarmed_support_03", - "combat_unarmed_support_04", - "combat_unarmed_master" - }, - - { - "combat_1hsword_novice", - "combat_1hsword_accuracy_01", - "combat_1hsword_accuracy_02", - "combat_1hsword_accuracy_03", - "combat_1hsword_accuracy_04", - "combat_1hsword_speed_01", - "combat_1hsword_speed_02", - "combat_1hsword_speed_03", - "combat_1hsword_speed_04", - "combat_1hsword_ability_01", - "combat_1hsword_ability_02", - "combat_1hsword_ability_03", - "combat_1hsword_ability_04", - "combat_1hsword_support_01", - "combat_1hsword_support_02", - "combat_1hsword_support_03", - "combat_1hsword_support_04", - "combat_1hsword_master" - }, - - { - "combat_2hsword_novice", - "combat_2hsword_accuracy_01", - "combat_2hsword_accuracy_02", - "combat_2hsword_accuracy_03", - "combat_2hsword_accuracy_04", - "combat_2hsword_speed_01", - "combat_2hsword_speed_02", - "combat_2hsword_speed_03", - "combat_2hsword_speed_04", - "combat_2hsword_ability_01", - "combat_2hsword_ability_02", - "combat_2hsword_ability_03", - "combat_2hsword_ability_04", - "combat_2hsword_support_01", - "combat_2hsword_support_02", - "combat_2hsword_support_03", - "combat_2hsword_support_04", - "combat_2hsword_master" - }, - - { - "combat_polearm_novice", - "combat_polearm_accuracy_01", - "combat_polearm_accuracy_02", - "combat_polearm_accuracy_03", - "combat_polearm_accuracy_04", - "combat_polearm_speed_01", - "combat_polearm_speed_02", - "combat_polearm_speed_03", - "combat_polearm_speed_04", - "combat_polearm_ability_01", - "combat_polearm_ability_02", - "combat_polearm_ability_03", - "combat_polearm_ability_04", - "combat_polearm_support_01", - "combat_polearm_support_02", - "combat_polearm_support_03", - "combat_polearm_support_04", - "combat_polearm_master" - }, - - { - "social_dancer_novice", - "social_dancer_ability_01", - "social_dancer_ability_02", - "social_dancer_ability_03", - "social_dancer_ability_04", - "social_dancer_wound_01", - "social_dancer_wound_02", - "social_dancer_wound_03", - "social_dancer_wound_04", - "social_dancer_knowledge_01", - "social_dancer_knowledge_02", - "social_dancer_knowledge_03", - "social_dancer_knowledge_04", - "social_dancer_shock_01", - "social_dancer_shock_02", - "social_dancer_shock_03", - "social_dancer_shock_04", - "social_dancer_master" - }, - - { - "social_musician_novice", - "social_musician_ability_01", - "social_musician_ability_02", - "social_musician_ability_03", - "social_musician_ability_04", - "social_musician_wound_01", - "social_musician_wound_02", - "social_musician_wound_03", - "social_musician_wound_04", - "social_musician_knowledge_01", - "social_musician_knowledge_02", - "social_musician_knowledge_03", - "social_musician_knowledge_04", - "social_musician_shock_01", - "social_musician_shock_02", - "social_musician_shock_03", - "social_musician_shock_04", - "social_musician_master" - }, - - { - "science_doctor_novice", - "science_doctor_wound_speed_01", - "science_doctor_wound_speed_02", - "science_doctor_wound_speed_03", - "science_doctor_wound_speed_04", - "science_doctor_wound_01", - "science_doctor_wound_02", - "science_doctor_wound_03", - "science_doctor_wound_04", - "science_doctor_ability_01", - "science_doctor_ability_02", - "science_doctor_ability_03", - "science_doctor_ability_04", - "science_doctor_support_01", - "science_doctor_support_02", - "science_doctor_support_03", - "science_doctor_support_04", - "science_doctor_master" - }, - - { - "outdoors_ranger_novice", - "outdoors_ranger_movement_01", - "outdoors_ranger_movement_02", - "outdoors_ranger_movement_03", - "outdoors_ranger_movement_04", - "outdoors_ranger_tracking_01", - "outdoors_ranger_tracking_02", - "outdoors_ranger_tracking_03", - "outdoors_ranger_tracking_04", - "outdoors_ranger_harvest_01", - "outdoors_ranger_harvest_02", - "outdoors_ranger_harvest_03", - "outdoors_ranger_harvest_04", - "outdoors_ranger_support_01", - "outdoors_ranger_support_02", - "outdoors_ranger_support_03", - "outdoors_ranger_support_04", - "outdoors_ranger_master" - }, - - { - "outdoors_creaturehandler_novice", - "outdoors_creaturehandler_taming_01", - "outdoors_creaturehandler_taming_02", - "outdoors_creaturehandler_taming_03", - "outdoors_creaturehandler_taming_04", - "outdoors_creaturehandler_training_01", - "outdoors_creaturehandler_training_02", - "outdoors_creaturehandler_training_03", - "outdoors_creaturehandler_training_04", - "outdoors_creaturehandler_healing_01", - "outdoors_creaturehandler_healing_02", - "outdoors_creaturehandler_healing_03", - "outdoors_creaturehandler_healing_04", - "outdoors_creaturehandler_support_01", - "outdoors_creaturehandler_support_02", - "outdoors_creaturehandler_support_03", - "outdoors_creaturehandler_support_04", - "outdoors_creaturehandler_master" - }, - - { - "outdoors_bio_engineer_novice", - "outdoors_bio_engineer_creature_01", - "outdoors_bio_engineer_creature_02", - "outdoors_bio_engineer_creature_03", - "outdoors_bio_engineer_creature_04", - "outdoors_bio_engineer_tissue_01", - "outdoors_bio_engineer_tissue_02", - "outdoors_bio_engineer_tissue_03", - "outdoors_bio_engineer_tissue_04", - "outdoors_bio_engineer_dna_harvesting_01", - "outdoors_bio_engineer_dna_harvesting_02", - "outdoors_bio_engineer_dna_harvesting_03", - "outdoors_bio_engineer_dna_harvesting_04", - "outdoors_bio_engineer_production_01", - "outdoors_bio_engineer_production_02", - "outdoors_bio_engineer_production_03", - "outdoors_bio_engineer_production_04", - "outdoors_bio_engineer_master" - }, - - { - "crafting_armorsmith_novice", - "crafting_armorsmith_personal_01", - "crafting_armorsmith_personal_02", - "crafting_armorsmith_personal_03", - "crafting_armorsmith_personal_04", - "crafting_armorsmith_heavy_01", - "crafting_armorsmith_heavy_02", - "crafting_armorsmith_heavy_03", - "crafting_armorsmith_heavy_04", - "crafting_armorsmith_deflectors_01", - "crafting_armorsmith_deflectors_02", - "crafting_armorsmith_deflectors_03", - "crafting_armorsmith_deflectors_04", - "crafting_armorsmith_complexity_01", - "crafting_armorsmith_complexity_02", - "crafting_armorsmith_complexity_03", - "crafting_armorsmith_complexity_04", - "crafting_armorsmith_master" - }, - - { - "crafting_weaponsmith_novice", - "crafting_weaponsmith_melee_01", - "crafting_weaponsmith_melee_02", - "crafting_weaponsmith_melee_03", - "crafting_weaponsmith_melee_04", - "crafting_weaponsmith_firearms_01", - "crafting_weaponsmith_firearms_02", - "crafting_weaponsmith_firearms_03", - "crafting_weaponsmith_firearms_04", - "crafting_weaponsmith_munitions_01", - "crafting_weaponsmith_munitions_02", - "crafting_weaponsmith_munitions_03", - "crafting_weaponsmith_munitions_04", - "crafting_weaponsmith_techniques_01", - "crafting_weaponsmith_techniques_02", - "crafting_weaponsmith_techniques_03", - "crafting_weaponsmith_techniques_04", - "crafting_weaponsmith_master" - }, - - { - "crafting_chef_novice", - "crafting_chef_dish_01", - "crafting_chef_dish_02", - "crafting_chef_dish_03", - "crafting_chef_dish_04", - "crafting_chef_dessert_01", - "crafting_chef_dessert_02", - "crafting_chef_dessert_03", - "crafting_chef_dessert_04", - "crafting_chef_drink_01", - "crafting_chef_drink_02", - "crafting_chef_drink_03", - "crafting_chef_drink_04", - "crafting_chef_techniques_01", - "crafting_chef_techniques_02", - "crafting_chef_techniques_03", - "crafting_chef_techniques_04", - "crafting_chef_master" - }, - - { - "crafting_tailor_novice", - "crafting_tailor_casual_01", - "crafting_tailor_casual_02", - "crafting_tailor_casual_03", - "crafting_tailor_casual_04", - "crafting_tailor_field_01", - "crafting_tailor_field_02", - "crafting_tailor_field_03", - "crafting_tailor_field_04", - "crafting_tailor_formal_01", - "crafting_tailor_formal_02", - "crafting_tailor_formal_03", - "crafting_tailor_formal_04", - "crafting_tailor_production_01", - "crafting_tailor_production_02", - "crafting_tailor_production_03", - "crafting_tailor_production_04", - "crafting_tailor_master" - }, - - { - "crafting_architect_novice", - "crafting_architect_production_01", - "crafting_architect_production_02", - "crafting_architect_production_03", - "crafting_architect_production_04", - "crafting_architect_techniques_01", - "crafting_architect_techniques_02", - "crafting_architect_techniques_03", - "crafting_architect_techniques_04", - "crafting_architect_harvesting_01", - "crafting_architect_harvesting_02", - "crafting_architect_harvesting_03", - "crafting_architect_harvesting_04", - "crafting_architect_blueprints_01", - "crafting_architect_blueprints_02", - "crafting_architect_blueprints_03", - "crafting_architect_blueprints_04", - "crafting_architect_master" - }, - - { - "crafting_droidengineer_novice", - "crafting_droidengineer_production_01", - "crafting_droidengineer_production_02", - "crafting_droidengineer_production_03", - "crafting_droidengineer_production_04", - "crafting_droidengineer_techniques_01", - "crafting_droidengineer_techniques_02", - "crafting_droidengineer_techniques_03", - "crafting_droidengineer_techniques_04", - "crafting_droidengineer_refinement_01", - "crafting_droidengineer_refinement_02", - "crafting_droidengineer_refinement_03", - "crafting_droidengineer_refinement_04", - "crafting_droidengineer_blueprints_01", - "crafting_droidengineer_blueprints_02", - "crafting_droidengineer_blueprints_03", - "crafting_droidengineer_blueprints_04", - "crafting_droidengineer_master" - }, - - { - "combat_bountyhunter_novice", - "combat_bountyhunter_investigation_01", - "combat_bountyhunter_investigation_02", - "combat_bountyhunter_investigation_03", - "combat_bountyhunter_investigation_04", - "combat_bountyhunter_droidcontrol_01", - "combat_bountyhunter_droidcontrol_02", - "combat_bountyhunter_droidcontrol_03", - "combat_bountyhunter_droidcontrol_04", - "combat_bountyhunter_droidresponse_01", - "combat_bountyhunter_droidresponse_02", - "combat_bountyhunter_droidresponse_03", - "combat_bountyhunter_droidresponse_04", - "combat_bountyhunter_support_01", - "combat_bountyhunter_support_02", - "combat_bountyhunter_support_03", - "combat_bountyhunter_support_04", - "combat_bountyhunter_master" - }, - - { - "combat_commando_novice", - "combat_commando_heavyweapon_accuracy_01", - "combat_commando_heavyweapon_accuracy_02", - "combat_commando_heavyweapon_accuracy_03", - "combat_commando_heavyweapon_accuracy_04", - "combat_commando_heavyweapon_speed_01", - "combat_commando_heavyweapon_speed_02", - "combat_commando_heavyweapon_speed_03", - "combat_commando_heavyweapon_speed_04", - "combat_commando_thrownweapon_01", - "combat_commando_thrownweapon_02", - "combat_commando_thrownweapon_03", - "combat_commando_thrownweapon_04", - "combat_commando_support_01", - "combat_commando_support_02", - "combat_commando_support_03", - "combat_commando_support_04", - "combat_commando_master" - }, - - { - "science_combatmedic_novice", - "science_combatmedic_healing_range_01", - "science_combatmedic_healing_range_02", - "science_combatmedic_healing_range_03", - "science_combatmedic_healing_range_04", - "science_combatmedic_healing_range_speed_01", - "science_combatmedic_healing_range_speed_02", - "science_combatmedic_healing_range_speed_03", - "science_combatmedic_healing_range_speed_04", - "science_combatmedic_medicine_01", - "science_combatmedic_medicine_02", - "science_combatmedic_medicine_03", - "science_combatmedic_medicine_04", - "science_combatmedic_support_01", - "science_combatmedic_support_02", - "science_combatmedic_support_03", - "science_combatmedic_support_04", - "science_combatmedic_master" - }, - - { - "social_imagedesigner_novice", - "social_imagedesigner_hairstyle_01", - "social_imagedesigner_hairstyle_02", - "social_imagedesigner_hairstyle_03", - "social_imagedesigner_hairstyle_04", - "social_imagedesigner_exotic_01", - "social_imagedesigner_exotic_02", - "social_imagedesigner_exotic_03", - "social_imagedesigner_exotic_04", - "social_imagedesigner_bodyform_01", - "social_imagedesigner_bodyform_02", - "social_imagedesigner_bodyform_03", - "social_imagedesigner_bodyform_04", - "social_imagedesigner_markings_01", - "social_imagedesigner_markings_02", - "social_imagedesigner_markings_03", - "social_imagedesigner_markings_04", - "social_imagedesigner_master" - }, - - { - "outdoors_squadleader_novice", - "outdoors_squadleader_movement_01", - "outdoors_squadleader_movement_02", - "outdoors_squadleader_movement_03", - "outdoors_squadleader_movement_04", - "outdoors_squadleader_offense_01", - "outdoors_squadleader_offense_02", - "outdoors_squadleader_offense_03", - "outdoors_squadleader_offense_04", - "outdoors_squadleader_defense_01", - "outdoors_squadleader_defense_02", - "outdoors_squadleader_defense_03", - "outdoors_squadleader_defense_04", - "outdoors_squadleader_support_01", - "outdoors_squadleader_support_02", - "outdoors_squadleader_support_03", - "outdoors_squadleader_support_04", - "outdoors_squadleader_master" - }, - - { - "crafting_merchant_novice", - "crafting_merchant_advertising_01", - "crafting_merchant_advertising_02", - "crafting_merchant_advertising_03", - "crafting_merchant_advertising_04", - "crafting_merchant_sales_01", - "crafting_merchant_sales_02", - "crafting_merchant_sales_03", - "crafting_merchant_sales_04", - "crafting_merchant_hiring_01", - "crafting_merchant_hiring_02", - "crafting_merchant_hiring_03", - "crafting_merchant_hiring_04", - "crafting_merchant_management_01", - "crafting_merchant_management_02", - "crafting_merchant_management_03", - "crafting_merchant_management_04", - "crafting_merchant_master" - }, - - { - "social_politician_novice", - "social_politician_fiscal_01", - "social_politician_fiscal_02", - "social_politician_fiscal_03", - "social_politician_fiscal_04", - "social_politician_martial_01", - "social_politician_martial_02", - "social_politician_martial_03", - "social_politician_martial_04", - "social_politician_civic_01", - "social_politician_civic_02", - "social_politician_civic_03", - "social_politician_civic_04", - "social_politician_urban_01", - "social_politician_urban_02", - "social_politician_urban_03", - "social_politician_urban_04", - "social_politician_master" - } - }; - if (profession == null || profession.equals("")) - { - return null; - } - for (int i = 0; i < PROFESSIONS.length; i++) - { - if (profession.equals(PROFESSIONS[i])) - { - return SKILLS[i]; - } - } - return null; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/broadtest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/broadtest.java deleted file mode 100644 index 0f891c52a..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/broadtest.java +++ /dev/null @@ -1,51 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class broadtest extends script.base_script -{ - public broadtest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "attached"); - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("go")) - { - obj_id lookAt = getLookAtTarget(self); - if (lookAt == null) - { - return SCRIPT_CONTINUE; - } - listenToMessage(lookAt, "handleBroadcast"); - debugSpeakMsg(self, "subscribed"); - } - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - dictionary stuff = new dictionary(); - stuff.put("objid", self); - if (text.equals("send")) - { - broadcastMessage("handleBroadcast", stuff); - debugSpeakMsg(self, "broadcast"); - } - return SCRIPT_CONTINUE; - } - public int handleBroadcast(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "received from " + params.getObjId("objid")); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/combattest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/combattest.java deleted file mode 100644 index 73af1277a..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/combattest.java +++ /dev/null @@ -1,73 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class combattest extends script.systems.combat.combat_base -{ - public combattest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "attached. Detaching AI scripts in 5"); - messageTo(self, "detachAI", null, 5, false); - return SCRIPT_CONTINUE; - } - public int detachAI(obj_id self, dictionary params) throws InterruptedException - { - detachScript(self, "ai.ai"); - detachScript(self, "ai.creature_combat"); - stop(self); - debugSpeakMsg(self, "ai detached!"); - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("setTarget")) - { - debugSpeakMsg(self, "target is set to " + objSpeaker); - setTarget(self, objSpeaker); - } - if (strText.equals("getTarget")) - { - obj_id objTarget = getTarget(self); - debugSpeakMsg(self, "target is " + objTarget); - } - return SCRIPT_CONTINUE; - } - public int OnDefenderCombatAction(obj_id self, obj_id attacker, obj_id weapon, int combatResult) throws InterruptedException - { - debugSpeakMsg(self, "defender_action, locomotion is " + getLocomotion(self) + " and posture is " + getPosture(self)); - if (hasCombatAction(self)) - { - debugSpeakMsg(self, "I've got combat actions already, returning"); - return SCRIPT_CONTINUE; - } - obj_id objTarget = getTarget(self); - if ((objTarget == null) || (objTarget == obj_id.NULL_ID)) - { - debugSpeakMsg(self, "setting target to " + attacker); - setTarget(self, attacker); - } - debugSpeakMsg(self, "queueing attack against " + attacker); - queueCommand(self, (966697619), attacker, "Test params", COMMAND_PRIORITY_DEFAULT); - return SCRIPT_CONTINUE; - } - public boolean hasCombatAction(obj_id npc) throws InterruptedException - { - return checkForCombatActions(npc); - } - public int OnIncapacitated(obj_id self, obj_id attacker) throws InterruptedException - { - kill(self); - debugSpeakMsg(self, "I am dead"); - detachScript(self, "jfreeman.combattest"); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/creaturetest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/creaturetest.java deleted file mode 100644 index 722c38698..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/creaturetest.java +++ /dev/null @@ -1,100 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; -import script.library.create; - -public class creaturetest extends script.base_script -{ - public creaturetest() - { - } - public static final String CREATURE_TABLE = "datatables/mob/creatures.iff"; - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "attached"); - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("creaturetest")) - { - if (utils.hasScriptVar(self, "creatureTest")) - { - debugSpeakMsg(self, "creaturetest is already running"); - return SCRIPT_CONTINUE; - } - int startTime = getGameTime(); - debugSpeakMsg(self, "beginning creatureTest " + startTime); - utils.setScriptVar(self, "startTime", startTime); - utils.setScriptVar(self, "creatureTest", 0); - LOG("creaturetest", "BEGIN " + startTime); - messageTo(self, "spawnNextCreature", null, 1, false); - } - else if (text.equals("creaturetest stop")) - { - utils.removeScriptVar(self, "creatureTest"); - } - return SCRIPT_CONTINUE; - } - public int spawnNextCreature(obj_id self, dictionary params) throws InterruptedException - { - if (!utils.hasScriptVar(self, "creatureTest")) - { - return SCRIPT_CONTINUE; - } - int creatureNum = utils.getIntScriptVar(self, "creatureTest"); - int numRows = dataTableGetNumRows(CREATURE_TABLE); - if (creatureNum >= numRows) - { - int startTime = utils.getIntScriptVar(self, "startTime"); - debugSpeakMsg(self, "creaturetest " + startTime + " is DONE"); - utils.removeScriptVar(self, "creatureTest"); - utils.removeScriptVar(self, "startTime"); - LOG("creaturetest", "END " + startTime); - return SCRIPT_CONTINUE; - } - String creatureName = dataTableGetString(CREATURE_TABLE, creatureNum, "creatureName"); - if (creatureName.equals("") || creatureName == null) - { - return SCRIPT_CONTINUE; - } - debugServerConsoleMsg(self, "CREATURE NAME IS " + creatureName + " - NUMBER: " + creatureNum); - utils.setScriptVar(self, "lastCreature", creatureName); - location spawnLoc = getLocation(self); - spawnLoc.x += 2; - spawnLoc.z += 2; - obj_id creature = create.object(creatureName, spawnLoc, false); - if (!isIdValid(creature)) - { - String templateName = dataTableGetString(CREATURE_TABLE, creatureName, "template"); - LOG("creaturetest", "UNABLE TO CREATE " + creatureName + " WITH TEMPLATE " + templateName + "DOES THIS TEMPLATE EXIST?"); - LOG("creaturetest", creatureName + ":" + templateName); - } - else - { - destroyObject(creature); - } - creatureNum++; - utils.setScriptVar(self, "creatureTest", creatureNum); - messageTo(self, "spawnNextCreature", null, 1, false); - return SCRIPT_CONTINUE; - } - public int OnImmediateLogout(obj_id self) throws InterruptedException - { - String creatureName = utils.getStringScriptVar(self, "lastCreature"); - if (creatureName != null) - { - LOG("creaturetest", "CLIENT FATAL " + creatureName); - debugServerConsoleMsg(self, "CLIENT FATAL " + creatureName); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/dressnpc.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/dressnpc.java deleted file mode 100644 index 6d07235d4..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/dressnpc.java +++ /dev/null @@ -1,43 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class dressnpc extends script.base_script -{ - public dressnpc() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "attached!"); - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (text.equals("done")) - { - debugSpeakMsg(self, "detaching jfreeman.dressnpc"); - detachScript(self, "jfreeman.dressnpc"); - return SCRIPT_CONTINUE; - } - else if (text.equals("dress")) - { - obj_id thingToWear = getLookAtTarget(speaker); - if (thingToWear == null) - { - debugSpeakMsg(self, "you aren't looking at anything."); - } - else - { - equip(thingToWear, self); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/elev.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/elev.java deleted file mode 100644 index 8ca3e7dd6..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/elev.java +++ /dev/null @@ -1,53 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; - -public class elev extends script.base_script -{ - public elev() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("up")) - { - playClientEffectObj(self, "clienteffect/elevator_rise.cef", self, null); - if (elevatorMove(self, 1) == 0) - { - sendSystemMessage(self, "You are already on the highest floor", null); - return SCRIPT_OVERRIDE; - } - return SCRIPT_CONTINUE; - } - else if (text.equals("down")) - { - playClientEffectObj(self, "clienteffect/elevator_descend.cef", self, null); - if (elevatorMove(self, -1) == 0) - { - sendSystemMessage(self, "You are already on the lowest floor", null); - return SCRIPT_OVERRIDE; - } - return SCRIPT_CONTINUE; - } - else if (text.equals("out")) - { - obj_id building = getTopMostContainer(self); - if (isIdValid(building) && building != self) - { - location outLoc = getBuildingEjectLocation(building); - utils.warpPlayer(self, outLoc); - return SCRIPT_OVERRIDE; - } - return SCRIPT_CONTINUE; - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/followtest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/followtest.java deleted file mode 100644 index ab50f3e6d..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/followtest.java +++ /dev/null @@ -1,50 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class followtest extends script.base_script -{ - public followtest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "attached"); - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (isPlayer(speaker) && text.equals("follow me")) - { - debugSpeakMsg(self, "following " + getName(speaker)); - follow(self, speaker, 1f, 5f); - } - return SCRIPT_CONTINUE; - } - public int OnFollowTargetLost(obj_id self, obj_id target) throws InterruptedException - { - debugSpeakMsg(self, "follow target lost"); - return SCRIPT_OVERRIDE; - } - public int OnFollowWaiting(obj_id self, obj_id target) throws InterruptedException - { - debugSpeakMsg(self, "follow waiting"); - return SCRIPT_CONTINUE; - } - public int OnFollowMoving(obj_id self, obj_id target) throws InterruptedException - { - debugSpeakMsg(self, "follow moving"); - return SCRIPT_OVERRIDE; - } - public int OnFollowPathNotFound(obj_id self, obj_id target) throws InterruptedException - { - debugSpeakMsg(self, "follow path not found"); - return SCRIPT_OVERRIDE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/invtest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/invtest.java deleted file mode 100644 index 57caf4bd4..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/invtest.java +++ /dev/null @@ -1,65 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; - -public class invtest extends script.base_script -{ - public invtest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - sendSystemMessageTestingOnly(self, "attached!"); - return SCRIPT_CONTINUE; - } - public int OnLogin(obj_id self) throws InterruptedException - { - obj_id bank = utils.getPlayerBank(self); - if (!isIdValid(bank)) - { - sendSystemMessageTestingOnly(self, "bank is invalid"); - return SCRIPT_CONTINUE; - } - obj_id inv = utils.getInventoryContainer(self); - if (!isIdValid(inv)) - { - sendSystemMessageTestingOnly(self, "inventory is invalid"); - return SCRIPT_CONTINUE; - } - obj_id[] bankContents = getContents(bank); - if (bankContents == null) - { - sendSystemMessageTestingOnly(self, "bank contents is null"); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "bank has " + bankContents.length + " items"); - obj_id[] invContents = getContents(inv); - if (invContents == null) - { - sendSystemMessageTestingOnly(self, "inv contents is null"); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "inv has " + invContents.length + " items"); - if (invContents.length > bankContents.length) - { - sendSystemMessageTestingOnly(self, "moving inv contents to bank"); - int numMoved = moveObjects(invContents, bank); - sendSystemMessageTestingOnly(self, "moved " + numMoved + " objects"); - } - else - { - sendSystemMessageTestingOnly(self, "moving bank contents to inv"); - int numMoved = moveObjects(bankContents, inv); - sendSystemMessageTestingOnly(self, "moved " + numMoved + " objects"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/isapvpgod.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/isapvpgod.java deleted file mode 100644 index b14a5a265..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/isapvpgod.java +++ /dev/null @@ -1,53 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.space_transition; - -public class isapvpgod extends script.base_script -{ - public isapvpgod() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - sendSystemMessageTestingOnly(self, "Greeting, Human! To begin applying the smackdown, say PVP ON"); - sendSystemMessageTestingOnly(self, "To discontinue the laying down of the smack, say PVP OFF"); - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equalsIgnoreCase("pvp on")) - { - if (isSpaceScene()) - { - space_transition.setPlayerOvert(self, (-615855020)); - sendSystemMessageTestingOnly(self, "Just start killing Bothans. I'll tell you when to stop."); - } - else - { - sendSystemMessageTestingOnly(self, "With what? Your HANDS?! You have to be in space, yo."); - } - } - else if (text.equalsIgnoreCase("pvp off")) - { - if (isSpaceScene()) - { - obj_id ship = space_transition.getContainingShip(self); - space_transition.clearOvertStatus(ship); - sendSystemMessageTestingOnly(self, "Ah! Safe, but never innocent. No wonder she still weeps for you."); - } - else - { - sendSystemMessageTestingOnly(self, "It is very dark. You are likely to be eaten by a Grue."); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/loitertest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/loitertest.java deleted file mode 100644 index 19e3d415a..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/loitertest.java +++ /dev/null @@ -1,42 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class loitertest extends script.base_script -{ - public loitertest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "attached. Loitering: "); - final location anchorLocation = getLocation(self); - final float minDistance = 10.0f; - final float maxDistance = 30.0f; - final float minDelay = 3.0f; - final float maxDelay = 8.0f; - loiterLocation(self, anchorLocation, minDistance, maxDistance, minDelay, maxDelay); - return SCRIPT_CONTINUE; - } - public int OnLoiterMoving(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "loiter moving"); - return SCRIPT_CONTINUE; - } - public int OnLoiterWaypoint(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "loiter waypoint"); - return SCRIPT_CONTINUE; - } - public int OnLoiterWaiting(obj_id self, modifiable_float time) throws InterruptedException - { - debugSpeakMsg(self, "loiter waiting"); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/makemites.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/makemites.java deleted file mode 100644 index abc274bc1..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/makemites.java +++ /dev/null @@ -1,123 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; - -public class makemites extends script.base_script -{ - public makemites() - { - } - public int OnDetach(obj_id self) throws InterruptedException - { - removeObjVar(self, "rockMiteMaking"); - if (hasObjVar(self, "miteReg")) - { - killAllMites(self); - } - return SCRIPT_CONTINUE; - } - public int OnRemovingFromWorld(obj_id self) throws InterruptedException - { - removeObjVar(self, "rockMiteMaking"); - if (hasObjVar(self, "miteReg")) - { - killAllMites(self); - } - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - location myLoc = getLocation(self); - if (text.equals("go")) - { - if (hasObjVar(self, "rockMiteMaking")) - { - debugSpeakMsg(self, "I'm still making rock mites!"); - return SCRIPT_CONTINUE; - } - setObjVar(self, "rockMiteMaking", 0); - messageTo(self, "spawnMite", null, 0, false); - } - else if ((text.equals("stop") || text.equals("die")) && hasObjVar(self, "rockMiteMaking")) - { - removeObjVar(self, "rockMiteMaking"); - } - if (text.equals("die") && hasObjVar(self, "miteReg")) - { - killAllMites(self); - } - return SCRIPT_CONTINUE; - } - public int spawnMite(obj_id self, dictionary params) throws InterruptedException - { - if (!hasObjVar(self, "rockMiteMaking")) - { - return SCRIPT_CONTINUE; - } - int numSpawned = getIntObjVar(self, "rockMiteMaking"); - location spawnLoc = new location(getLocation(self)); - spawnLoc.x += rand(-15, 15); - spawnLoc.z += rand(-15, 15); - String templateName = "object/creature/monster/rock_mite/rock_mite_desert_"; - switch (rand(0, 3)) - { - case 0: - templateName = templateName + "giant.iff"; - break; - case 1: - templateName = templateName + "large.iff"; - break; - case 2: - templateName = templateName + "medium.iff"; - break; - case 3: - templateName = templateName + "small.iff"; - break; - } - obj_id mite = createObject(templateName, spawnLoc); - registerMite(self, mite); - numSpawned++; - if (numSpawned > 19) - { - debugSpeakMsg(self, "I made 20 rock mites!"); - removeObjVar(self, "rockMiteMaking"); - return SCRIPT_CONTINUE; - } - setObjVar(self, "rockMiteMaking", numSpawned); - messageTo(self, "spawnMite", null, 1, false); - return SCRIPT_CONTINUE; - } - public void registerMite(obj_id player, obj_id mite) throws InterruptedException - { - if (!hasObjVar(player, "miteReg")) - { - obj_id[] mites = new obj_id[1]; - mites[0] = mite; - setObjVar(player, "miteReg", mites); - return; - } - Vector mites = getResizeableObjIdArrayObjVar(player, "miteReg"); - mites = utils.addElement(mites, mite); - if (mites != null && mites.size() > 0) - { - setObjVar(player, "miteReg", mites); - } - } - public void killAllMites(obj_id player) throws InterruptedException - { - obj_id[] mites = getObjIdArrayObjVar(player, "miteReg"); - for (int i = 0; i < mites.length; i++) - { - destroyObject(mites[i]); - } - removeObjVar(player, "miteReg"); - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/makepet.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/makepet.java deleted file mode 100644 index 5beb59b8b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/makepet.java +++ /dev/null @@ -1,43 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.pet_lib; -import script.library.ai_lib; - -public class makepet extends script.base_script -{ - public makepet() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "attached."); - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (pet_lib.hasMaster(self)) - { - return SCRIPT_CONTINUE; - } - if (ai_lib.isAiDead(self)) - { - return SCRIPT_CONTINUE; - } - if (text.equals("pet")) - { - dictionary params = new dictionary(); - params.put("pet", self); - params.put("master", speaker); - messageTo(self, "handleAddMaster", params, 1, true); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/movetest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/movetest.java deleted file mode 100644 index a65b521a0..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/movetest.java +++ /dev/null @@ -1,25 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class movetest extends script.base_script -{ - public movetest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "attached"); - location destLoc = new location(getLocation(self)); - destLoc.x = 0; - destLoc.z = 0; - pathTo(self, destLoc); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/msgtest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/msgtest.java deleted file mode 100644 index 5af4f6a69..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/msgtest.java +++ /dev/null @@ -1,38 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class msgtest extends script.base_script -{ - public msgtest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - messageTo(self, "handleTest", null, 0, false); - messageTo(self, "handleOtherTest", null, 20, true); - messageTo(self, "handleLastTest", null, 21, false); - return SCRIPT_CONTINUE; - } - public int handleTest(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "received non-persisted zero-length message"); - return SCRIPT_CONTINUE; - } - public int handleOtherTest(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "received persisted 20-second delay message"); - return SCRIPT_CONTINUE; - } - public int handleLastTest(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "received non-persisted 21-second delay message"); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/msgtestbase.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/msgtestbase.java deleted file mode 100644 index 8d2066c45..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/msgtestbase.java +++ /dev/null @@ -1,22 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class msgtestbase extends script.base_script -{ - public msgtestbase() - { - } - public int handleTest(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "msg test base received message"); - debugSpeakMsg(self, "this should not have happened, if this script was attached first."); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/runfast.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/runfast.java deleted file mode 100644 index a38e3d70c..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/runfast.java +++ /dev/null @@ -1,41 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class runfast extends script.base_script -{ - public runfast() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "attached: say 'runfast' to increase your speed"); - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("runfast")) - { - float movePercent = getMovementPercent(self); - debugSpeakMsg(self, "old speed: " + movePercent); - movePercent = movePercent * 2f; - setMovementPercent(self, movePercent); - debugSpeakMsg(self, "new speed: " + movePercent); - } - else if (text.equals("runslow")) - { - float movePercent = getMovementPercent(self); - debugSpeakMsg(self, "old speed: " + movePercent); - movePercent = movePercent / 2f; - setMovementPercent(self, movePercent); - debugSpeakMsg(self, "new speed: " + movePercent); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/scriptvartest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/scriptvartest.java deleted file mode 100644 index 376c8bb5b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/scriptvartest.java +++ /dev/null @@ -1,59 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class scriptvartest extends script.base_script -{ - public scriptvartest() - { - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (!text.equals("scriptvartest")) - { - return SCRIPT_CONTINUE; - } - obj_id target = getLookAtTarget(speaker); - if (target == null) - { - debugSpeakMsg(self, "Look-at something and then say scriptvartest"); - return SCRIPT_CONTINUE; - } - else if (target == self) - { - debugSpeakMsg(self, "I know I can set scriptvars on myself. Look at something else"); - return SCRIPT_CONTINUE; - } - deltadictionary targetScriptVars = target.getScriptVars(); - int testScriptVar = targetScriptVars.getInt("scriptvartest"); - debugSpeakMsg(self, "spriptvar test value on " + target + " is " + testScriptVar); - testScriptVar++; - targetScriptVars.put("scriptvartest", testScriptVar); - deltadictionary newTargetScriptVars = target.getScriptVars(); - int newTestScriptVar = newTargetScriptVars.getInt("scriptvartest"); - debugSpeakMsg(self, "Immediately: spriptvar test value on " + target + " is " + newTestScriptVar); - dictionary parms = new dictionary(); - parms.put("target", target); - messageTo(self, "handleRecheck", parms, 2, false); - return SCRIPT_CONTINUE; - } - public int handleRecheck(obj_id self, dictionary params) throws InterruptedException - { - obj_id target = params.getObjId("target"); - if (target == null || target == obj_id.NULL_ID) - { - debugSpeakMsg(self, "target is fuxed"); - return SCRIPT_CONTINUE; - } - deltadictionary targetScriptVars = target.getScriptVars(); - int testScriptVar = targetScriptVars.getInt("scriptvartest"); - debugSpeakMsg(self, "After Call Back: spriptvar test value on " + target + " is " + testScriptVar); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/skilltest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/skilltest.java deleted file mode 100644 index db51a9ad2..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/skilltest.java +++ /dev/null @@ -1,37 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class skilltest extends script.base_script -{ - public skilltest() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equalsIgnoreCase("choose")) - { - playUiEffect(self, "showMediator=ws_professiontemplateselect"); - return SCRIPT_CONTINUE; - } - if (text.equalsIgnoreCase("reset")) - { - debugSpeakMsg(self, "resetting"); - setSkillTemplate(self, ""); - setWorkingSkill(self, ""); - return SCRIPT_CONTINUE; - } - return SCRIPT_CONTINUE; - } - public int OnCreatureDamaged(obj_id self, obj_id attacker, obj_id weapon, int[] damage) throws InterruptedException - { - setHealth(self, getMaxHealth(self)); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/tutorial_request_test.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/tutorial_request_test.java deleted file mode 100644 index e79b7c388..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/tutorial_request_test.java +++ /dev/null @@ -1,37 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class tutorial_request_test extends script.base_script -{ - public tutorial_request_test() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - newbieTutorialRequest(self, "openInventory"); - newbieTutorialRequest(self, "closeInventory"); - return SCRIPT_CONTINUE; - } - public int OnNewbieTutorialResponse(obj_id self, String action) throws InterruptedException - { - if (action.equals("openInventory")) - { - debugSpeakMsg(self, "opened inventory!"); - newbieTutorialRequest(self, "openInventory"); - } - else if (action.equals("closeInventory")) - { - debugSpeakMsg(self, "closed inventory!"); - newbieTutorialRequest(self, "closeInventory"); - } - debugSpeakMsg(self, "woah : " + action); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jfreeman/wartest.java b/sku.0/sys.server/compiled/game/script/working/jfreeman/wartest.java deleted file mode 100644 index 247c63b66..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jfreeman/wartest.java +++ /dev/null @@ -1,111 +0,0 @@ -package script.working.jfreeman; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.create; -import script.library.factions; -import script.library.utils; -import script.ai.ai_combat; - -public class wartest extends script.base_script -{ - public wartest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - utils.removeScriptVar(self, "myWarriors"); - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String txt) throws InterruptedException - { - if (txt.equals("go")) - { - if (!utils.hasScriptVar(self, "myWarriors")) - { - spawnGroup(self, "group1", 20); - spawnGroup(self, "group2", -20); - } - else - { - debugSpeakMsg(self, "already going"); - } - } - else if (txt.equals("fight")) - { - startFight(self); - } - else if (txt.equals("stop")) - { - killWarriors(self); - } - return SCRIPT_CONTINUE; - } - public void spawnGroup(obj_id chris, String group, int offset) throws InterruptedException - { - Vector warriors = new Vector(); - warriors.setSize(0); - if (utils.hasScriptVar(chris, "myWarriors")) - { - warriors = utils.getResizeableObjIdArrayScriptVar(chris, "myWarriors"); - } - location groupLoc = new location(getLocation(chris)); - groupLoc.x += offset; - for (int i = 0; i < 50; i++) - { - obj_id npc = create.object("pirate", groupLoc); - warriors = utils.addElement(warriors, npc); - factions.setFaction(npc, group); - } - utils.setScriptVar(chris, "myWarriors", warriors); - } - public void killWarriors(obj_id chris) throws InterruptedException - { - if (!utils.hasScriptVar(chris, "myWarriors")) - { - debugSpeakMsg(chris, "none spawned"); - return; - } - obj_id[] warriors = utils.getObjIdArrayScriptVar(chris, "myWarriors"); - if (warriors.length < 100) - { - debugSpeakMsg(chris, "not done spawning yet " + warriors.length); - return; - } - for (int i = 0; i < warriors.length; i++) - { - if (exists(warriors[i])) - { - destroyObject(warriors[i]); - } - } - utils.removeScriptVar(chris, "myWarriors"); - } - public void startFight(obj_id chris) throws InterruptedException - { - if (!utils.hasScriptVar(chris, "myWarriors")) - { - debugSpeakMsg(chris, "no warriors"); - return; - } - obj_id[] warriors = utils.getObjIdArrayScriptVar(chris, "myWarriors"); - if (warriors.length < 100) - { - debugSpeakMsg(chris, "not done spawning yet"); - return; - } - for (int i = 0; i < 50; i++) - { - if (exists(warriors[i]) && exists(warriors[i + 50])) - { - startCombat(warriors[i], warriors[i + 50]); - } - } - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jhaskell_test.java b/sku.0/sys.server/compiled/game/script/working/jhaskell_test.java deleted file mode 100644 index 7e73f034d..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jhaskell_test.java +++ /dev/null @@ -1,2460 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.advanced_turret; -import script.library.ai_lib; -import script.library.armor; -import script.library.buff; -import script.library.city; -import script.library.camping; -import script.library.collection; -import script.library.factions; -import script.library.holiday; -import script.library.house_pet; -import script.library.gcw; -import script.library.groundquests; -import script.library.loot; -import script.library.money; -import script.library.player_structure; -import script.library.qa; -import script.library.performance; -import script.library.player_structure; -import script.library.static_item; -import script.library.stealth; -import script.library.trial; -import script.library.utils; -import script.library.vendor_lib; -import script.library.weapons; - -public class jhaskell_test extends script.base_script -{ - public jhaskell_test() - { - } - public static final int SF_COST_CITY_LOW = 16; - public static final int SF_SKILL_TRAINER = 64; - public static final String CITY_SKILL_TRAINERS = "datatables/city/skill_trainers.iff"; - public static final string_id SID_SYS_FOUND = new string_id("treasure_map/treasure_map", "sys_found"); - public static final String SCRIPT_DUMMY_CHEST = "systems.treasure_map.base.dummy_treasure_drum"; - public static final String TREASURE_TABLE = "datatables/treasure_map/treasure_map.iff"; - public static final String DUMMY_CHEST = "object/tangible/container/drum/nonopening_treasure_drum.iff"; - public static final String LOOT_TABLE_81_90 = "treasure/treasure_81_90"; - public static final String TREASURE_GUARDS = "treasure_guard_jedi_elite"; - public static final String BOSS_MOB = "none"; - public static final int TREASURE_GUARD_LEVEL = 90; - public static final int GROUP_MODIFIER = 1; - public static final int ENEMY_COUNT = 3; - public static final int DATATABLE_IDX = 8; - public static final String[] ALL_PLAYER_HOUSING = - { - "object/building/player/player_garage_corellia_style_01.iff", - "object/building/player/player_garage_naboo_style_01.iff", - "object/building/player/player_garage_tatooine_style_01.iff", - "object/building/player/player_guildhall_corellia_style_01.iff", - "object/building/player/player_guildhall_generic_style_01.iff", - "object/building/player/player_guildhall_naboo_style_01.iff", - "object/building/player/player_guildhall_tatooine_style_01.iff", - "object/building/player/player_guildhall_tatooine_style_02.iff", - "object/building/player/player_house_corellia_large_style_01.iff", - "object/building/player/player_house_corellia_large_style_02.iff", - "object/building/player/player_house_corellia_medium_style_01.iff", - "object/building/player/player_house_corellia_medium_style_02.iff", - "object/building/player/player_house_corellia_small_style_01.iff", - "object/building/player/player_house_corellia_small_style_01_floorplan_02.iff", - "object/building/player/player_house_corellia_small_style_02.iff", - "object/building/player/player_house_corellia_small_style_02_floorplan_02.iff", - "object/building/player/player_house_generic_large_style_01.iff", - "object/building/player/player_house_generic_large_style_02.iff", - "object/building/player/player_house_generic_medium_style_01.iff", - "object/building/player/player_house_generic_medium_style_02.iff", - "object/building/player/player_house_generic_small_style_01.iff", - "object/building/player/player_house_generic_small_style_01_floorplan_02.iff", - "object/building/player/player_house_generic_small_style_02.iff", - "object/building/player/player_house_generic_small_style_02_floorplan_02.iff", - "object/building/player/player_house_mustafar_lg.iff", - "object/building/player/player_house_naboo_large_style_01.iff", - "object/building/player/player_house_naboo_medium_style_01.iff", - "object/building/player/player_house_naboo_small_style_01.iff", - "object/building/player/player_house_naboo_small_style_02.iff", - "object/building/player/player_house_tatooine_large_style_01.iff", - "object/building/player/player_house_tatooine_medium_style_01.iff", - "object/building/player/player_house_tatooine_small_style_01.iff", - "object/building/player/player_house_tatooine_small_style_02.iff", - "object/building/player/player_merchant_tent_style_01.iff", - "object/building/player/player_merchant_tent_style_02.iff", - "object/building/player/player_merchant_tent_style_03.iff", - "object/building/player/player_mustafar_house_lg.iff" - }; - public static final String[] ALL_PLAYER_CITY_STRUCTURES = - { - "object/building/player/city/bank_corellia.iff", - "object/building/player/city/bank_naboo.iff", - "object/building/player/city/bank_tatooine.iff", - "object/building/player/city/barn_no_planet_restriction.iff", - "object/building/player/city/cantina_corellia.iff", - "object/building/player/city/cantina_naboo.iff", - "object/building/player/city/cantina_tatooine.iff", - "object/building/player/city/cityhall_corellia.iff", - "object/building/player/city/cityhall_naboo.iff", - "object/building/player/city/cityhall_tatooine.iff", - "object/building/player/city/cloning_corellia.iff", - "object/building/player/city/cloning_naboo.iff", - "object/building/player/city/cloning_tatooine.iff", - "object/building/player/city/diner_no_planet_restriction.iff", - "object/building/player/city/e3_demo_cityhall_tatooine.iff", - "object/building/player/city/e3_demo_shuttleport_tatooine.iff", - "object/building/player/city/garden_corellia_lrg_01.iff", - "object/building/player/city/garden_corellia_lrg_02.iff", - "object/building/player/city/garden_corellia_lrg_03.iff", - "object/building/player/city/garden_corellia_lrg_04.iff", - "object/building/player/city/garden_corellia_lrg_05.iff", - "object/building/player/city/garden_corellia_med_01.iff", - "object/building/player/city/garden_corellia_med_02.iff", - "object/building/player/city/garden_corellia_med_03.iff", - "object/building/player/city/garden_corellia_med_04.iff", - "object/building/player/city/garden_corellia_med_05.iff", - "object/building/player/city/garden_corellia_sml_01.iff", - "object/building/player/city/garden_corellia_sml_02.iff", - "object/building/player/city/garden_corellia_sml_03.iff", - "object/building/player/city/garden_corellia_sml_04.iff", - "object/building/player/city/garden_corellia_sml_05.iff", - "object/building/player/city/garden_dantooine_lrg_01.iff", - "object/building/player/city/garden_dantooine_med_01.iff", - "object/building/player/city/garden_dantooine_sml_01.iff", - "object/building/player/city/garden_dathomir_lrg_01.iff", - "object/building/player/city/garden_dathomir_med_01.iff", - "object/building/player/city/garden_dathomir_sml_01.iff", - "object/building/player/city/garden_endor_lrg_01.iff", - "object/building/player/city/garden_endor_med_01.iff", - "object/building/player/city/garden_endor_sml_01.iff", - "object/building/player/city/garden_naboo_large.iff", - "object/building/player/city/garden_naboo_lrg_01.iff", - "object/building/player/city/garden_naboo_lrg_02.iff", - "object/building/player/city/garden_naboo_lrg_03.iff", - "object/building/player/city/garden_naboo_lrg_04.iff", - "object/building/player/city/garden_naboo_lrg_05.iff", - "object/building/player/city/garden_naboo_med_01.iff", - "object/building/player/city/garden_naboo_med_02.iff", - "object/building/player/city/garden_naboo_med_03.iff", - "object/building/player/city/garden_naboo_med_04.iff", - "object/building/player/city/garden_naboo_med_05.iff", - "object/building/player/city/garden_naboo_sml_01.iff", - "object/building/player/city/garden_naboo_sml_02.iff", - "object/building/player/city/garden_naboo_sml_03.iff", - "object/building/player/city/garden_naboo_sml_04.iff", - "object/building/player/city/garden_naboo_sml_05.iff", - "object/building/player/city/garden_tatooine_lrg_01.iff", - "object/building/player/city/garden_tatooine_lrg_02.iff", - "object/building/player/city/garden_tatooine_lrg_03.iff", - "object/building/player/city/garden_tatooine_lrg_04.iff", - "object/building/player/city/garden_tatooine_lrg_05.iff", - "object/building/player/city/garden_tatooine_med_01.iff", - "object/building/player/city/garden_tatooine_med_02.iff", - "object/building/player/city/garden_tatooine_med_03.iff", - "object/building/player/city/garden_tatooine_med_04.iff", - "object/building/player/city/garden_tatooine_med_05.iff", - "object/building/player/city/garden_tatooine_sml_01.iff", - "object/building/player/city/garden_tatooine_sml_02.iff", - "object/building/player/city/garden_tatooine_sml_03.iff", - "object/building/player/city/garden_tatooine_sml_04.iff", - "object/building/player/city/garden_tatooine_sml_05.iff", - "object/building/player/city/hospital_corellia.iff", - "object/building/player/city/hospital_naboo.iff", - "object/building/player/city/hospital_tatooine.iff", - "object/building/player/city/shuttleport_corellia.iff", - "object/building/player/city/shuttleport_naboo.iff", - "object/building/player/city/shuttleport_tatooine.iff", - "object/building/player/city/theater_corellia.iff", - "object/building/player/city/theater_naboo.iff", - "object/building/player/city/theater_tatooine.iff" - }; - public static final String[] TCG_EXPANSION = - { - "item_tcg_loot_reward_series1_v_wing", - "item_tcg_loot_reward_series1_podracer_mawhonic", - "item_tcg_loot_reward_series1_sanyassan_skull", - "item_tcg_loot_reward_series1_video_game_table", - "item_tcg_loot_reward_series1_organizational_datapad", - "item_tcg_loot_reward_series1_barn", - "item_tcg_loot_reward_series1_versafunction88_datapad", - "item_tcg_loot_reward_series1_keelkana_tooth", - "item_tcg_loot_reward_series1_painting_darth_vader", - "item_tcg_loot_reward_series1_diner", - "item_tcg_loot_reward_series1_display_case_02", - "item_tcg_loot_reward_series1_greeter_ewok", - "item_tcg_loot_reward_series1_chon_bust", - "item_tcg_loot_reward_series1_vendor_bomarr_monk", - "item_tcg_loot_reward_series1_greeter_serving_droid", - "item_tcg_loot_reward_series1_drink_dispenser", - "item_tcg_loot_reward_series1_painting_alliance_propaganda", - "item_tcg_loot_reward_series1_vendor_meatlump", - "item_tcg_loot_reward_series1_arc170_flightsuit", - "item_tcg_loot_reward_series1_indoor_garden_01", - "item_tcg_loot_reward_series1_mandalorian_strongbox", - "item_tcg_loot_reward_series1_computer_console_02", - "item_tcg_loot_reward_series1_indoor_fountain_02", - "item_tcg_loot_reward_series1_lepese_dictionary", - "item_tcg_loot_reward_series1_morgukai_shadow_scroll", - "item_tcg_loot_reward_series1_snow_jacket", - "item_tcg_loot_reward_series1_darth_vader_statuette", - "item_tcg_loot_reward_series1_princess_leia_statuette", - "item_tcg_loot_reward_series1_greeter_jawa", - "item_tcg_loot_reward_series1_vendor_serving_droid", - "item_tcg_loot_reward_series1_fish_tank", - "item_tcg_loot_reward_series1_greeter_gungan" - }; - public static final String[] TCG_LAUNCH = - { - "item_tcg_loot_reward_series1_black_corset_dress", - "item_tcg_loot_reward_series1_naboo_jacket", - "item_tcg_loot_reward_series1_dooku_bust", - "item_tcg_loot_reward_series1_display_case_01", - "item_tcg_loot_reward_series1_gorax_ear", - "item_tcg_loot_reward_series1_bas_relief", - "item_tcg_loot_reward_series1_glowing_blue_eyes", - "item_tcg_loot_reward_series1_glowing_red_eyes", - "item_tcg_loot_reward_series1_vendor_gungan", - "item_tcg_loot_reward_series1_housecleaning_kit", - "item_tcg_loot_reward_series1_indoor_fountain_01", - "item_tcg_loot_reward_series1_vendor_jawa", - "item_tcg_loot_reward_series1_greeter_meatlump", - "item_tcg_loot_reward_series1_mechno_chair", - "item_tcg_loot_reward_series1_nuna_ball_advertisement", - "item_tcg_loot_reward_series1_podracer_gasgano", - "item_tcg_loot_reward_series1_painting_jedi_crest", - "item_tcg_loot_reward_series1_painting_trooper", - "item_tcg_loot_reward_series1_radtrooper_badge", - "item_tcg_loot_reward_series1_sith_speeder", - "item_tcg_loot_reward_series1_tusken_talisman", - "item_tcg_loot_reward_series1_organa_speeder", - "item_tcg_loot_reward_series1_computer_console_01", - "item_tcg_loot_reward_series1_vendor_ewok", - "item_tcg_loot_reward_series1_hans_hydrospanner", - "item_tcg_loot_reward_series1_painting_imperial_propaganda", - "item_tcg_loot_reward_series1_indoor_garden_02", - "item_tcg_loot_reward_series1_orange_flightsuit", - "item_tcg_loot_reward_series1_vendor_bomarr_monk", - "item_tcg_loot_reward_series1_target_creature", - "item_tcg_loot_reward_series1_beru_whitesuns_cookbook", - "item_tcg_loot_reward_series1_jedi_library_bookshelf" - }; - public static final String[] TCG_ANIMATIONS = - { - "greeter_anims_face", - "greeter_anims_happy", - "greeter_anims_sick_sad", - "greeter_anims_polite", - "greeter_anims_rude", - "greeter_anims_expression", - "emote_greeter_ewok", - "emote_greeter_jawa" - }; - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (isGod(self)) - { - debugConsoleMsg(self, "OnSpeaking: " + text); - java.util.StringTokenizer tok = new java.util.StringTokenizer(text); - if (tok.hasMoreTokens()) - { - String priCommand = tok.nextToken(); - String secCommand = ""; - String thirdCommand = ""; - if (tok.hasMoreTokens()) - { - secCommand = tok.nextToken(); - } - if (tok.hasMoreTokens()) - { - thirdCommand = tok.nextToken(); - } - debugConsoleMsg(self, "command is: " + priCommand); - if (priCommand.equalsIgnoreCase("what_scene") && secCommand.equals("")) - { - sendSystemMessage(self, "You are in scene: " + getCurrentSceneName(), null); - } - else if (priCommand.equalsIgnoreCase("is_tutorial") && secCommand.equals("")) - { - sendSystemMessage(self, "Is in Tutorial: " + isInTutorialArea(self), null); - } - else if (priCommand.equalsIgnoreCase("city") && secCommand.equalsIgnoreCase("set_trainers")) - { - obj_id structure = qa.findTarget(self); - if (!isValidId(structure) || !exists(structure)) - { - sendSystemMessage(self, "You must target object", null); - } - int city_id = findCityByCityHall(structure); - if (city_id <= 0) - { - sendSystemMessage(self, "You must target city hall", null); - } - if (!cityExists(city_id)) - { - sendSystemMessage(self, "Structure doesn't exist", null); - return SCRIPT_CONTINUE; - } - boolean successSkillTrainers = setCitySkillTrainers(self, city_id); - if (successSkillTrainers) - { - sendSystemMessage(self, "Legacy Trainer Spawners placed", null); - } - else - { - sendSystemMessage(self, "The Trainer Routine Failed", null); - } - } - else if (priCommand.equalsIgnoreCase("city") && secCommand.equalsIgnoreCase("destroy_trainers")) - { - obj_id structure = qa.findTarget(self); - if (!isValidId(structure) || !exists(structure)) - { - sendSystemMessage(self, "You must target object", null); - } - int city_id = findCityByCityHall(structure); - if (city_id <= 0) - { - sendSystemMessage(self, "You must target city hall", null); - } - if (!cityExists(city_id)) - { - sendSystemMessage(self, "Structure doesn't exist", null); - return SCRIPT_CONTINUE; - } - boolean destroySuccess = destroyCitySkillTrainers(self, city_id); - } - else if (priCommand.equalsIgnoreCase("city") && secCommand.equalsIgnoreCase("get_structures")) - { - obj_id structure = qa.findTarget(self); - if (!isValidId(structure) || !exists(structure)) - { - sendSystemMessage(self, "You must target object", null); - } - int city_id = findCityByCityHall(structure); - if (city_id <= 0) - { - sendSystemMessage(self, "You must target city hall", null); - } - if (!cityExists(city_id)) - { - sendSystemMessage(self, "Structure doesn't exist", null); - return SCRIPT_CONTINUE; - } - obj_id[] structures = cityGetStructureIds(city_id); - for (int i = 0; i < structures.length; i++) - { - sendSystemMessage(self, "Found: " + getName(structures[i]), null); - } - sendSystemMessage(self, "getTrainerCount: " + city.getTrainerCount(city_id), null); - sendSystemMessage(self, "getMaxTrainerCount: " + city.getMaxTrainerCount(city_id), null); - } - else if (priCommand.equalsIgnoreCase("get_name") && secCommand.equals("")) - { - obj_id target = qa.findTarget(self); - if (!isValidId(target) || !exists(target)) - { - sendSystemMessage(self, "You must target object", null); - } - sendSystemMessage(self, "Name: " + localize(getNameStringId(target)), null); - } - else if (priCommand.equalsIgnoreCase("get_loco") && secCommand.equals("")) - { - sendSystemMessage(self, "Locomotion:" + getLocomotion(self), null); - } - else if (priCommand.equalsIgnoreCase("squad") && !secCommand.equals("")) - { - sendSystemMessage(self, "Ship: " + secCommand, null); - obj_id secCmd = utils.stringToObjId(secCommand); - if (!isValidId(secCmd)) - { - sendSystemMessage(self, "Ship OID not valid ", null); - } - sendSystemMessage(self, "Ship OID valid", null); - sendSystemMessage(self, "Ship Squad: " + _spaceUnitGetSquadId(secCmd), null); - } - else if (priCommand.equalsIgnoreCase("grant_schematic") && !secCommand.equals("")) - { - grantSchematic(self, secCommand); - } - else if (priCommand.equalsIgnoreCase("test_chest") && secCommand.equals("")) - { - dictionary params = new dictionary(); - params.put("player", self); - messageTo(self, "spawnTreasure", params, 5, false); - } - else if (priCommand.equalsIgnoreCase("get_tat") && secCommand.equals("")) - { - obj_id planetId = getPlanetByName("tatooine"); - sendSystemMessageTestingOnly(self, "" + planetId); - } - else if (priCommand.equalsIgnoreCase("force_init") && secCommand.equals("")) - { - obj_id lookAtTarget = findTarget(self); - if (!isIdValid(lookAtTarget)) - { - sendSystemMessageTestingOnly(self, "You need to target a deprecated collection reactor."); - } - else - { - sendSystemMessageTestingOnly(self, "Forcing initialization on object."); - messageTo(lookAtTarget, "forceCollectionReactorInit", null, 1, false); - } - } - else if (priCommand.equalsIgnoreCase("force_init") && !secCommand.equals("")) - { - obj_id lookAtTarget = utils.stringToObjId(secCommand); - if (!isValidId(lookAtTarget)) - { - sendSystemMessageTestingOnly(self, "You need to specify a valid OID of a collection reactor."); - } - else - { - sendSystemMessageTestingOnly(self, "Forcing initialization on object."); - messageTo(lookAtTarget, "forceCollectionReactorInit", null, 1, false); - } - } - else if (priCommand.equalsIgnoreCase("bypass_forage_roll") && secCommand.equals("")) - { - utils.setScriptVar(self, "qa.main_forage_roll_bypass", "testing"); - sendSystemMessageTestingOnly(self, "main_forage_roll_bypass is 100%"); - } - else if (priCommand.equalsIgnoreCase("bypass_worm_roll") && secCommand.equals("")) - { - utils.setScriptVar(self, "qa.bypass_worm_roll", "testing"); - sendSystemMessageTestingOnly(self, "bypass_worm_roll is 100%"); - } - else if (priCommand.equalsIgnoreCase("bypass_component_roll") && secCommand.equals("")) - { - utils.setScriptVar(self, "qa.component_roll_bypass", "testing"); - sendSystemMessageTestingOnly(self, "bypass_component_roll is 100%"); - } - else if (priCommand.equalsIgnoreCase("bypass_treasure_roll") && secCommand.equals("")) - { - utils.setScriptVar(self, "qa.treasure_roll_bypass", "testing"); - sendSystemMessageTestingOnly(self, "bypass_treasure_roll is 100%"); - } - else if (priCommand.equalsIgnoreCase("bypass_enzyme_roll") && secCommand.equals("")) - { - utils.setScriptVar(self, "qa.enzyme_roll_bypass", "testing"); - sendSystemMessageTestingOnly(self, "bypass_enzyme_roll is 100%"); - } - else if (priCommand.equalsIgnoreCase("remove_bypass") && secCommand.equals("")) - { - utils.removeScriptVarTree(self, "qa"); - sendSystemMessageTestingOnly(self, "Bypass scriptvars removed"); - } - else if (priCommand.equalsIgnoreCase("bypass_searchlair_roll") && secCommand.equals("")) - { - utils.setScriptVar(self, "qa.egg_roll_bypass", "testing"); - sendSystemMessageTestingOnly(self, "egg_roll_bypass is setting roll to 89 so you only receive eggs."); - } - else if (priCommand.equalsIgnoreCase("bypass_milk_roll") && secCommand.equals("")) - { - utils.setScriptVar(self, "qa.milk_roll_bypass", "testing"); - sendSystemMessageTestingOnly(self, "milk_roll_bypass is setting roll to receive milk repeatedly...as if magic."); - } - else if (priCommand.equalsIgnoreCase("give_forage_data") && secCommand.equals("")) - { - utils.setScriptVar(self, "qa.give_forage_data", "testing"); - sendSystemMessageTestingOnly(self, "Forage data will be displayed in console."); - } - else if (priCommand.equalsIgnoreCase("rare_forage_loot_logger")) - { - utils.removeScriptVarTree(self, "qa"); - utils.setScriptVar(self, "qa.main_forage_roll_bypass", "testing"); - utils.setScriptVar(self, "qa.give_forage_data", "testing"); - int iteration = 25; - sendSystemMessageTestingOnly(self, "Foraging Rares " + iteration + " times. You must keep Godmode on for this to work"); - for (int i = 0; i < iteration; i++) - { - messageTo(self, "handlerForPlayerForaging", null, (5 + i), false); - } - } - else if (priCommand.equalsIgnoreCase("forage_loot_logger")) - { - utils.removeScriptVarTree(self, "qa"); - utils.setScriptVar(self, "qa.give_forage_data", "testing"); - int iteration = 25; - sendSystemMessageTestingOnly(self, "Foraging Normally for " + iteration + " times. You must keep Godmode on for this to work"); - for (int i = 0; i < iteration; i++) - { - messageTo(self, "handlerForPlayerForaging", null, (5 + i), false); - } - } - else if (priCommand.equalsIgnoreCase("buff_list") && secCommand.equals("")) - { - int[] buffs = buff.getAllBuffs(self); - if (buffs == null || buffs.length == 0) - { - sendSystemMessageTestingOnly(self, "No Buffs found"); - return SCRIPT_CONTINUE; - } - for (int i = 0; i < buffs.length; i++) - { - sendSystemMessageTestingOnly(self, "Buff " + i + " is " + buff.getBuffNameFromCrc(buffs[i])); - } - } - else if (priCommand.equalsIgnoreCase("fs_crystal") && secCommand.equals("")) - { - obj_id createdObject = createObjectInInventoryAllowOverload("object/tangible/item/quest/force_sensitive/fs_buff_item.iff", self); - if (isValidId(createdObject)) - { - setObjVar(createdObject, "item.time.reuse_time", 259200); - setObjVar(createdObject, "item.buff.type", 0); - setObjVar(createdObject, "item.buff.value", 2000); - setObjVar(createdObject, "item.buff.duration", 7200); - } - } - else if (priCommand.equalsIgnoreCase("give_lumps") && secCommand.equals("")) - { - obj_id pInv = utils.getInventoryContainer(self); - loot.addMeatlumpLumpsAsLoot(self, pInv, 5); - } - else if (priCommand.equalsIgnoreCase("meatlump_container") && secCommand.equals("buff")) - { - loot.giveMeatlumpPuzzleLoot(self, false, true); - } - else if (priCommand.equalsIgnoreCase("meatlump_container") && secCommand.equals("threshold")) - { - loot.giveMeatlumpPuzzleLoot(self, true, false); - } - else if (priCommand.equalsIgnoreCase("meatlump_container") && secCommand.equals("both")) - { - sendSystemMessageTestingOnly(self, "both received"); - loot.giveMeatlumpPuzzleLoot(self, true, true); - } - else if (priCommand.equalsIgnoreCase("meatlump_trigger") && secCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "removing all trigger scriptvars"); - utils.removeScriptVar(self, "meatlump_trigger"); - } - else if (priCommand.equalsIgnoreCase("remove_safe") && secCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "removing all trigger scriptvars"); - utils.removeScriptVarTree(self, "meatlump_safe"); - utils.removeScriptVarTree(self, "meatlump_safe_nonimperative"); - } - else if (priCommand.equalsIgnoreCase("num_combos")) - { - if (secCommand.equals("") || thirdCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "num_combos number1 number2"); - return SCRIPT_CONTINUE; - } - int number1 = utils.stringToInt(secCommand); - int number2 = utils.stringToInt(thirdCommand); - int numCombos = 0; - for (int i = 70; i < 88; i++) - { - for (int j = 70; j < 88; j++) - { - sendSystemMessageTestingOnly(self, " " + i + "*" + j + "= " + (i * j)); - if ((i * j) >= number1 && (i * j) <= number2) - { - numCombos++; - sendSystemMessageTestingOnly(self, "Valid hit " + i + "*" + j + "= " + (i * j)); - } - } - } - sendSystemMessageTestingOnly(self, "numbCombos =" + numCombos); - } - else if (priCommand.equalsIgnoreCase("set_scriptvar")) - { - if (secCommand.equals("") || thirdCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "set_scriptvar value"); - return SCRIPT_CONTINUE; - } - utils.setScriptVar(self, secCommand, thirdCommand); - sendSystemMessageTestingOnly(self, "Set " + secCommand + " to " + thirdCommand); - } - else if (priCommand.equalsIgnoreCase("removescriptvar") && !secCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "removing scriptvar: " + secCommand); - utils.removeScriptVar(self, secCommand); - } - else if (priCommand.equalsIgnoreCase("removescriptvartree") && !secCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "removing scriptvartree: " + secCommand); - utils.removeScriptVarTree(self, secCommand); - } - else if (priCommand.equalsIgnoreCase("addscriptvar") && !secCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "adding scriptvar: " + secCommand); - utils.removeScriptVar(self, secCommand); - } - else if (priCommand.equalsIgnoreCase("add_skill_mod") && !secCommand.equals("") && !thirdCommand.equals("")) - { - int amount = utils.stringToInt(thirdCommand); - applySkillStatisticModifier(self, secCommand, amount); - sendSystemMessageTestingOnly(self, "Attempting to apply Skill Mod: " + secCommand + " to : " + amount); - } - else if (priCommand.equalsIgnoreCase("has_skill_mod") && !secCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "Attempting to find Skill Mod: " + secCommand); - int hasMod = getSkillStatMod(self, secCommand); - if (hasMod > 0) - { - sendSystemMessageTestingOnly(self, "You have Skill Mod: " + secCommand + " and the value is: " + getSkillStatisticModifier(self, secCommand)); - } - else - { - sendSystemMessageTestingOnly(self, "CANNOT FIND SKILL MOD: " + secCommand); - } - } - else if (priCommand.equalsIgnoreCase("get_skill_mod") && !secCommand.equals("")) - { - String skillMod = secCommand; - if (skillMod == null || skillMod.equals("")) - { - sendSystemMessageTestingOnly(self, "skill mod example: vendor.special_vendor_skillmod"); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Getting: " + secCommand + ": " + getSkillStatMod(self, skillMod)); - } - else if (priCommand.equalsIgnoreCase("set_skill_mod") && !secCommand.equals("")) - { - String skillMod = secCommand; - if (skillMod == null || skillMod.equals("")) - { - sendSystemMessageTestingOnly(self, "skill mod example: vendor.special_vendor_skillmod"); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Setting: " + secCommand + " to +1"); - applySkillStatisticModifier(self, skillMod, 1); - } - else if (priCommand.equalsIgnoreCase("test_greeter_anim") && !secCommand.equals("") && !thirdCommand.equals("")) - { - obj_id greeter = utils.stringToObjId(secCommand); - if (!isValidId(greeter) || !exists(greeter)) - { - sendSystemMessageTestingOnly(self, "Couldn't find Greeter with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Attempting to player animation: " + thirdCommand + " on greeter: " + greeter); - doAnimationAction(greeter, thirdCommand); - } - else if (priCommand.equalsIgnoreCase("test_greeter_sound") && !secCommand.equals("") && !thirdCommand.equals("")) - { - obj_id greeter = utils.stringToObjId(secCommand); - if (!isValidId(greeter) || !exists(greeter)) - { - sendSystemMessageTestingOnly(self, "Couldn't find Greeter with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - String sound = thirdCommand; - if (sound == null || sound.equals("")) - { - sendSystemMessageTestingOnly(self, "Couldn't find sound argument"); - return SCRIPT_CONTINUE; - } - location loc = getLocation(greeter); - if (loc == null) - { - sendSystemMessageTestingOnly(self, "Couldn't find greeter location"); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Attempting to player sound: " + sound + " on greeter: " + greeter); - if (!playClientEffectLoc(greeter, sound, loc, 0.f)) - { - sendSystemMessageTestingOnly(self, "The sound could not be played per the game system."); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "The sound should have played."); - } - else if (priCommand.equalsIgnoreCase("test_greeter_voice") && !secCommand.equals("") && !thirdCommand.equals("")) - { - obj_id greeter = utils.stringToObjId(secCommand); - if (!isValidId(greeter) || !exists(greeter)) - { - sendSystemMessageTestingOnly(self, "Couldn't find Greeter with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - String voice = thirdCommand; - if (voice == null && voice.equals("")) - { - sendSystemMessageTestingOnly(self, "Couldn't find voice argument"); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Attempting to player sound: " + voice + " on greeter: " + greeter); - if (!play2dNonLoopingSound(self, voice)) - { - sendSystemMessageTestingOnly(self, "The sound could not be played per the game system."); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "The sound should have played."); - } - else if (priCommand.equalsIgnoreCase("get_tcg_expansion_templates")) - { - String data = ""; - int iteration = TCG_EXPANSION.length; - for (int i = 0; i < iteration; i++) - { - dictionary itemData = dataTableGetRow(static_item.MASTER_ITEM_TABLE, TCG_EXPANSION[i]); - data += itemData.getString("template_name"); - data += "\n\r"; - } - saveTextOnClient(self, "templates.txt", data); - } - else if (priCommand.equalsIgnoreCase("get_tcg_expansion_items")) - { - obj_id pInv = utils.getInventoryContainer(self); - if (!isValidId(pInv) || !exists(pInv)) - { - return SCRIPT_CONTINUE; - } - if (getVolumeFree(pInv) <= 0) - { - sendSystemMessage(self, vendor_lib.SID_INVENTORY_FULL_GENERIC); - return SCRIPT_CONTINUE; - } - for (int i = 0; i < TCG_EXPANSION.length; i++) - { - static_item.createNewItemFunction(TCG_EXPANSION[i], pInv); - } - } - else if (priCommand.equalsIgnoreCase("get_tcg_launch_items")) - { - obj_id pInv = utils.getInventoryContainer(self); - if (!isValidId(pInv) || !exists(pInv)) - { - return SCRIPT_CONTINUE; - } - if (getVolumeFree(pInv) <= 0) - { - sendSystemMessage(self, vendor_lib.SID_INVENTORY_FULL_GENERIC); - return SCRIPT_CONTINUE; - } - for (int i = 0; i < TCG_LAUNCH.length; i++) - { - static_item.createNewItemFunction(TCG_LAUNCH[i], pInv); - } - } - else if (priCommand.equalsIgnoreCase("play_client_test")) - { - playClientEffectObj(self, "sound/utinni.snd", self, ""); - } - else if (priCommand.equalsIgnoreCase("play_2d_test")) - { - play2dNonLoopingSound(self, "sound/utinni.snd"); - } - else if (priCommand.equalsIgnoreCase("play_music_test")) - { - playMusic(self, "sound/utinni.snd"); - } - else if (priCommand.equalsIgnoreCase("play_client") && !secCommand.equals("")) - { - if (secCommand == null || secCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "Sound Invalid. Valid sound: sound/utinni.snd"); - return SCRIPT_CONTINUE; - } - if (!playClientEffectObj(self, secCommand, self, "")) - { - sendSystemMessageTestingOnly(self, "Sound Failed."); - } - else - { - sendSystemMessageTestingOnly(self, "Sound should have played."); - } - } - else if (priCommand.equalsIgnoreCase("play_2d") && !secCommand.equals("")) - { - if (secCommand == null || secCommand.equals("") || !secCommand.startsWith("sound/") || secCommand.indexOf(".snd") < 0) - { - sendSystemMessageTestingOnly(self, "Sound Invalid. Valid sound: sound/utinni.snd"); - return SCRIPT_CONTINUE; - } - if (!play2dNonLoopingSound(self, secCommand)) - { - sendSystemMessageTestingOnly(self, "Sound Failed."); - } - else - { - sendSystemMessageTestingOnly(self, "Sound should have played."); - } - } - else if (priCommand.equalsIgnoreCase("play_music") && !secCommand.equals("")) - { - if (secCommand == null || secCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "Sound Invalid. Valid sound: sound/utinni.snd"); - return SCRIPT_CONTINUE; - } - if (!playMusic(self, "sound/" + secCommand + ".snd")) - { - sendSystemMessageTestingOnly(self, "Sound Failed."); - } - else - { - sendSystemMessageTestingOnly(self, "Sound should have played."); - } - } - else if (priCommand.equalsIgnoreCase("tcg_booster_msg")) - { - sendSystemMessage(self, new string_id("veteran_new", "tcg_available_monthly_bonus_booster_pack")); - } - else if (priCommand.equalsIgnoreCase("packup_points_100")) - { - int[] housePacking = new int[2]; - housePacking[0] = 100; - housePacking[1] = 100; - setObjVar(self, "housePackup", housePacking); - sendSystemMessageTestingOnly(self, "You now have points equal to a player that has destroyed 100 houses."); - } - else if (priCommand.equalsIgnoreCase("packup_points") && !secCommand.equals("")) - { - if (secCommand == null || secCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "Define how many abandoned houses you want to pack up"); - return SCRIPT_CONTINUE; - } - int number1 = utils.stringToInt(secCommand); - int[] housePacking = new int[2]; - housePacking[0] = number1; - housePacking[1] = number1; - setObjVar(self, "housePackup", housePacking); - sendSystemMessageTestingOnly(self, "You now have points equal to a player that has destroyed " + number1 + " houses."); - } - else if (priCommand.equalsIgnoreCase("packup_daily_max")) - { - if (!hasObjVar(self, player_structure.HOUSE_PACKUP_DAILY_TALLY_OBJVAR)) - { - sendSystemMessageTestingOnly(self, "No houses destroyed today."); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "You currently have destroyed " + getIntObjVar(self, player_structure.HOUSE_PACKUP_DAILY_TALLY_OBJVAR) + " houses today."); - } - else if (priCommand.equalsIgnoreCase("packup_remove_daily")) - { - if (!hasObjVar(self, player_structure.HOUSE_PACKUP_DAILY_TALLY_OBJVAR)) - { - sendSystemMessageTestingOnly(self, "No objvar found."); - return SCRIPT_CONTINUE; - } - removeObjVar(self, player_structure.HOUSE_PACKUP_DAILY_TALLY_OBJVAR); - sendSystemMessageTestingOnly(self, "You currently have destroyed " + getIntObjVar(self, player_structure.HOUSE_PACKUP_DAILY_TALLY_OBJVAR) + " houses today."); - } - else if (priCommand.equalsIgnoreCase("packup_remove_all")) - { - messageTo(self, "handlePlayerStructurePackupLockoutRemoval", null, 0, false); - if (!hasObjVar(self, player_structure.HOUSE_PACKUP_ARRAY_OBJVAR)) - { - sendSystemMessageTestingOnly(self, "No houses destroyed ever."); - return SCRIPT_CONTINUE; - } - removeObjVar(self, player_structure.HOUSE_PACKUP_ARRAY_OBJVAR); - if (!hasObjVar(self, player_structure.HOUSE_PACKUP_DAILY_TALLY_OBJVAR)) - { - sendSystemMessageTestingOnly(self, "No House Pack up tracking objvar found, removal skipped."); - return SCRIPT_CONTINUE; - } - removeObjVar(self, player_structure.HOUSE_PACKUP_DAILY_TALLY_OBJVAR); - messageTo(self, "handlePlayerStructurePackupLockoutRemoval", null, 0, false); - sendSystemMessageTestingOnly(self, "All House Pack Up tracking and Lock Outs removed."); - } - else if (priCommand.equalsIgnoreCase("packup_houses")) - { - if (!hasObjVar(self, player_structure.HOUSE_PACKUP_ARRAY_OBJVAR)) - { - sendSystemMessageTestingOnly(self, "No houses destroyed ever."); - return SCRIPT_CONTINUE; - } - int[] array = getIntArrayObjVar(self, player_structure.HOUSE_PACKUP_ARRAY_OBJVAR); - sendSystemMessageTestingOnly(self, "You have destroyed " + array[1] + " houses total."); - } - else if (priCommand.equalsIgnoreCase("packup_remove_lockout")) - { - messageTo(self, "handleFailedStructurePackup", null, 0, false); - sendSystemMessageTestingOnly(self, "If you had a house pack up lockout it no longer exists."); - } - else if (priCommand.equalsIgnoreCase("check_abandonable")) - { - obj_id lookAtTarget = findTarget(self); - sendSystemMessageTestingOnly(self, "Can be abandoned: " + player_structure.doesUnmarkedStructureQualifyForHousePackup(lookAtTarget)); - } - else if (priCommand.equalsIgnoreCase("isowner")) - { - obj_id lookAtTarget = findTarget(self); - sendSystemMessageTestingOnly(self, "Are you owner? " + player_structure.isOwner(lookAtTarget, self)); - if (isGod(self)) - { - sendSystemMessageTestingOnly(self, "You are in godmode and the isowner check may not work"); - } - } - else if (priCommand.equalsIgnoreCase("set_abandoned")) - { - obj_id lookAtTarget = findTarget(self); - if (!player_structure.doesUnmarkedStructureQualifyForHousePackup(lookAtTarget)) - { - sendSystemMessageTestingOnly(self, "Please target a valid player house or factory. This object cannot be packed up."); - return SCRIPT_CONTINUE; - } - if (hasObjVar(lookAtTarget, "player_structure.abandoned") && getIntObjVar(lookAtTarget, "player_structure.abandoned") == 1) - { - sendSystemMessageTestingOnly(self, "This structure is already abandoned."); - return SCRIPT_CONTINUE; - } - setObjVar(lookAtTarget, "player_structure.abandoned", 1); - sendSystemMessageTestingOnly(self, "Structure set abandoned."); - } - else if (priCommand.equalsIgnoreCase("setlots")) - { - adjustLotCount(getPlayerObject(self), -10); - sendSystemMessageTestingOnly(self, "Lots set to 10"); - } - else if (priCommand.equalsIgnoreCase("set_sarlacc")) - { - obj_id lookAtTarget = findTarget(self); - if (!isValidId(lookAtTarget)) - { - return SCRIPT_CONTINUE; - } - String sarlaccObjTemplate = getTemplateName(lookAtTarget); - if (sarlaccObjTemplate == null || sarlaccObjTemplate.equals("")) - { - return SCRIPT_CONTINUE; - } - if (sarlaccObjTemplate.indexOf("mini_s02.iff") < 0) - { - return SCRIPT_CONTINUE; - } - setObjVar(lookAtTarget, house_pet.SARLACC_FAST_UPDATE_RATE, true); - sendSystemMessageTestingOnly(self, "Sarlacc God Hack Applied."); - } - else if (priCommand.equalsIgnoreCase("get_player_housing_lots")) - { - String data = ""; - for (int i = 0; i < ALL_PLAYER_HOUSING.length; i++) - { - String lotStr = ""; - int lot = getAdjustedLotCount(ALL_PLAYER_HOUSING[i]); - if (lot == -99) - { - lotStr = "Lot count set to 1 because of error"; - } - else if (lot == -1) - { - lotStr = "template error"; - } - else if (lot == -2) - { - lotStr = "footprint template error"; - } - else if (lot == -3) - { - lotStr = "index error"; - } - else if (lot > 0) - { - lotStr = "" + lot; - } - else if (lot == 0) - { - lotStr = "none"; - } - else if (lot == -69) - { - lotStr = "Exempt"; - } - data += ALL_PLAYER_HOUSING[i] + "\t" + lotStr + "\n"; - } - saveTextOnClient(self, "playerHousingLots.txt", data); - } - else if (priCommand.equalsIgnoreCase("get_player_city_lots")) - { - String data = ""; - for (int i = 0; i < ALL_PLAYER_CITY_STRUCTURES.length; i++) - { - String lotStr = ""; - int lot = getAdjustedLotCount(ALL_PLAYER_CITY_STRUCTURES[i]); - if (lot == -99) - { - lotStr = "Lot count set to 1 because of error"; - } - else if (lot == -1) - { - lotStr = "template error"; - } - else if (lot == -2) - { - lotStr = "footprint template error"; - } - else if (lot == -3) - { - lotStr = "index error"; - } - else if (lot > 0) - { - lotStr = "" + lot; - } - else if (lot == 0) - { - lotStr = "none"; - } - else if (lot == -69) - { - lotStr = "Exempt"; - } - data += ALL_PLAYER_CITY_STRUCTURES[i] + "\t" + lotStr + "\n"; - } - saveTextOnClient(self, "cityStructureLots.txt", data); - } - else if (priCommand.equalsIgnoreCase("persist_obj") && !secCommand.equals("")) - { - obj_id object = utils.stringToObjId(secCommand); - if (!isValidId(object) || !exists(object)) - { - sendSystemMessageTestingOnly(self, "Couldn't find object with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - persistObject(object); - sendSystemMessageTestingOnly(self, "Object: " + secCommand + " persisted."); - } - else if (priCommand.equalsIgnoreCase("is_persisted") && !secCommand.equals("")) - { - obj_id object = utils.stringToObjId(secCommand); - if (!isValidId(object) || !exists(object)) - { - sendSystemMessageTestingOnly(self, "Couldn't find object with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - if (isObjectPersisted(self)) - { - sendSystemMessageTestingOnly(self, "Object: " + secCommand + " IS INDEED persisted."); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Object: " + secCommand + " IS NOT persisted."); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("get_sign_skillmod")) - { - int special_sign_tcg_series3 = getSkillStatMod(self, "special_sign_tcg_series3"); - sendSystemMessageTestingOnly(self, "special_sign_tcg_series3: " + special_sign_tcg_series3); - int special_sign_halloween_hanging_sign = getSkillStatMod(self, "special_sign_halloween_hanging_sign"); - sendSystemMessageTestingOnly(self, "special_sign_halloween_hanging_sign: " + special_sign_halloween_hanging_sign); - int special_sign_halloween_standing_sign = getSkillStatMod(self, "special_sign_halloween_standing_sign"); - sendSystemMessageTestingOnly(self, "special_sign_halloween_standing_sign: " + special_sign_halloween_standing_sign); - int shop_sign = getSkillStatMod(self, "shop_sign"); - sendSystemMessageTestingOnly(self, "shop_sign: " + shop_sign); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("give_shop_sign")) - { - applySkillStatisticModifier(self, "shop_sign", 1); - int shop_sign = getSkillStatMod(self, "shop_sign"); - sendSystemMessageTestingOnly(self, "shop_sign: " + shop_sign); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("remove_shop_sign")) - { - applySkillStatisticModifier(self, "shop_sign", -1); - int shop_sign = getSkillStatMod(self, "shop_sign"); - sendSystemMessageTestingOnly(self, "shop_sign: " + shop_sign); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("decrease_sign_skillmod") && !secCommand.equals("")) - { - int skillModAmount = getSkillStatMod(self, "special_sign_tcg_series3"); - sendSystemMessageTestingOnly(self, "Before: " + skillModAmount); - int number1 = utils.stringToInt(secCommand); - if (number1 <= 0) - { - return SCRIPT_CONTINUE; - } - if (!applySkillStatisticModifier(self, "special_sign_tcg_series3", -1 * number1)) - { - return SCRIPT_CONTINUE; - } - skillModAmount = getSkillStatMod(self, "special_sign_tcg_series3"); - sendSystemMessageTestingOnly(self, "Now: " + skillModAmount); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("increase_sign_skillmod") && !secCommand.equals("")) - { - int skillModAmount = getSkillStatMod(self, "special_sign_tcg_series3"); - sendSystemMessageTestingOnly(self, "Before: " + skillModAmount); - int number1 = utils.stringToInt(secCommand); - if (number1 <= 0) - { - return SCRIPT_CONTINUE; - } - if (!applySkillStatisticModifier(self, "special_sign_tcg_series3", number1)) - { - return SCRIPT_CONTINUE; - } - skillModAmount = getSkillStatMod(self, "special_sign_tcg_series3"); - sendSystemMessageTestingOnly(self, "Now: " + skillModAmount); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("play_particle") && !secCommand.equals("")) - { - playClientEffectObj(self, secCommand, self, ""); - sendSystemMessageTestingOnly(self, "Particle should have played"); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("sarlacc_day") && !secCommand.equals("")) - { - obj_id object = utils.stringToObjId(secCommand); - if (!isValidId(object) || !exists(object)) - { - sendSystemMessageTestingOnly(self, "Couldn't find object with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - if (isDeluxSarlacc(object)) - { - int totalSubtractedTime = house_pet.getUpdateDaily(object); - int lastFed = getIntObjVar(object, house_pet.SARLACC_BORN); - if (hasObjVar(object, house_pet.SARLACC_LAST_FED)) - { - lastFed = getIntObjVar(object, house_pet.SARLACC_LAST_FED); - } - int newFed = lastFed - totalSubtractedTime; - setObjVar(object, house_pet.SARLACC_LAST_FED, newFed); - sendSystemMessageTestingOnly(self, "Deluxe Sarlacc: " + secCommand + " Last Feeding Time has had " + totalSubtractedTime + " subtracted from it."); - } - else - { - sendSystemMessageTestingOnly(self, "Object: " + secCommand + " IS NOT a Deluxe Sarlacc or has never been fed."); - } - utils.removeScriptVar(object, house_pet.SARLACC_AVOID_REPEATED_UPDATES); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("sarlacc_phase_very_hungry") && !secCommand.equals("")) - { - obj_id object = utils.stringToObjId(secCommand); - if (!isValidId(object) || !exists(object)) - { - sendSystemMessageTestingOnly(self, "Couldn't find object with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - if (isDeluxSarlacc(object)) - { - setObjVar(object, house_pet.SARLACC_CURRENT_PHASE, 2); - sendSystemMessageTestingOnly(self, "Deluxe Sarlacc: " + secCommand + " has been set to very hungry."); - } - else - { - sendSystemMessageTestingOnly(self, "Object: " + secCommand + " IS NOT a Deluxe Sarlacc or has never been fed."); - } - utils.removeScriptVar(object, house_pet.SARLACC_AVOID_REPEATED_UPDATES); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("in_world") && !secCommand.equals("")) - { - obj_id object = utils.stringToObjId(secCommand); - if (!isValidId(object) || !exists(object)) - { - sendSystemMessageTestingOnly(self, "Couldn't find object with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Is in World Cell: " + isInWorldCell(object)); - } - else if (priCommand.equalsIgnoreCase("get_feed_list") && !secCommand.equals("")) - { - obj_id object = utils.stringToObjId(secCommand); - if (!isValidId(object) || !exists(object)) - { - sendSystemMessageTestingOnly(self, "Couldn't find object with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - String list = getListOfFoodItems(object); - if (list == null || list.equals("")) - { - sendSystemMessageTestingOnly(self, "Nothing returned"); - } - else - { - sendSystemMessageTestingOnly(self, "List of Items Fed: " + list); - } - } - else if (priCommand.equalsIgnoreCase("massiff_day") && !secCommand.equals("")) - { - obj_id object = utils.stringToObjId(secCommand); - if (!isValidId(object) || !exists(object)) - { - sendSystemMessageTestingOnly(self, "Couldn't find object with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - if (isMassiffBowl(object)) - { - int totalSubtractedTime = house_pet.getUpdateDaily(object); - int lastFed = getIntObjVar(object, house_pet.MASSIFF_LAST_FED); - int newFed = lastFed - totalSubtractedTime; - setObjVar(object, house_pet.MASSIFF_LAST_FED, newFed); - sendSystemMessageTestingOnly(self, "Massif Bowl: " + secCommand + " Last Feeding Time has had " + totalSubtractedTime + " subtracted from it."); - } - else - { - sendSystemMessageTestingOnly(self, "Object: " + secCommand + " IS NOT a Massif Bowl or has no spawned and fed Massif."); - } - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("massiff_emote") && !secCommand.equals("")) - { - obj_id object = utils.stringToObjId(secCommand); - if (!isValidId(object) || !exists(object)) - { - sendSystemMessageTestingOnly(self, "Couldn't find object with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - playClientEffectObj(object, house_pet.MASSIFF_HUNGRY_EMOTE, object, ""); - } - else if (priCommand.equalsIgnoreCase("getyaw") && !secCommand.equals("")) - { - obj_id object = utils.stringToObjId(secCommand); - if (!isValidId(object) || !exists(object)) - { - sendSystemMessageTestingOnly(self, "Couldn't find object with OID of: " + secCommand); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "The yaw of that object is: " + getYaw(object)); - } - else if (priCommand.equalsIgnoreCase("test_player_anim") && !secCommand.equals("")) - { - sendSystemMessageTestingOnly(self, "Animating using: " + secCommand); - doAnimationAction(self, secCommand); - } - else if (priCommand.equalsIgnoreCase("remove_lockout")) - { - removeObjVar(self, holiday.EMPIRE_DAY_RECRUITMENT_LOCKED_OUT); - removeObjVar(self, holiday.EMPIRE_DAY_RESISTANCE_LOCKED_OUT); - removeObjVar(self, holiday.EMPIRE_DAY_PROPAGANDA_LOCKED_OUT); - removeObjVar(self, holiday.EMPIRE_DAY_VANDAL_LOCKED_OUT); - removeObjVar(self, holiday.EMPIRE_DAY_RECRUITMENT_TIMESTAMP); - removeObjVar(self, holiday.EMPIRE_DAY_RESISTANCE_TIMESTAMP); - removeObjVar(self, holiday.EMPIRE_DAY_PROPAGANDA_TIMESTAMP); - removeObjVar(self, holiday.EMPIRE_DAY_VANDAL_TIMESTAMP); - removeObjVar(self, "empire_day_events.locked_out"); - sendSystemMessageTestingOnly(self, "Lockouts removed."); - } - else if (priCommand.equalsIgnoreCase("collections_removed")) - { - collection.removeCollectionForRealsies(self, holiday.REBEL_RESISTANCE_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.REBEL_VANDAL_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.REBEL_ENGINEERING_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.REBEL_ENTERTAINER_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.REBEL_RESCUE_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_RECRUITING_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_ANTIPROP_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_ENGINEERING_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_ENTERTAINER_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_RESCUE_COLLECTION); - } - else if (priCommand.equalsIgnoreCase("buffs_removed")) - { - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_RECRUITMENT_COMBATANT); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_RESISTANCE_COMBATANT); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_RECRUITMENT_SF); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_RESISTANCE_SF); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_ANTIPROP_COMBATANT); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_VANDAL_COMBATANT); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_ANTIPROP_SF); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_VANDAL_SF); - buff.removeBuff(self, holiday.BUFF_IMPERIAL_RECRUITMENT_COUNTER); - buff.removeBuff(self, holiday.BUFF_REBEL_RESISTANCE_COUNTER); - buff.removeBuff(self, holiday.BUFF_IMPERIAL_ANTIPROPAGANDA_COUNTER); - buff.removeBuff(self, holiday.BUFF_REBEL_PLAYER_VANDAL_COUNTER); - } - else if (priCommand.equalsIgnoreCase("apply_recruit_combat_buff")) - { - buff.applyBuff(self, holiday.BUFF_IMP_EMPIREDAY_RECRUITMENT_COMBATANT); - } - else if (priCommand.equalsIgnoreCase("apply_resist_combat_buff")) - { - buff.applyBuff(self, holiday.BUFF_REB_EMPIREDAY_RESISTANCE_COMBATANT); - } - else if (priCommand.equalsIgnoreCase("apply_recruit_sf_buff")) - { - buff.applyBuff(self, holiday.BUFF_IMP_EMPIREDAY_RECRUITMENT_SF); - } - else if (priCommand.equalsIgnoreCase("apply_resist_sf_buff")) - { - buff.applyBuff(self, holiday.BUFF_REB_EMPIREDAY_RESISTANCE_SF); - } - else if (priCommand.equalsIgnoreCase("apply_antiprop_combat_buff")) - { - buff.applyBuff(self, holiday.BUFF_IMP_EMPIREDAY_ANTIPROP_COMBATANT); - } - else if (priCommand.equalsIgnoreCase("apply_antiprop_sf_buff")) - { - buff.applyBuff(self, holiday.BUFF_IMP_EMPIREDAY_ANTIPROP_SF); - } - else if (priCommand.equalsIgnoreCase("apply_vandal_combat_buff")) - { - buff.applyBuff(self, holiday.BUFF_REB_EMPIREDAY_VANDAL_COMBATANT); - } - else if (priCommand.equalsIgnoreCase("apply_vandal_sf_buff")) - { - buff.applyBuff(self, holiday.BUFF_REB_EMPIREDAY_VANDAL_SF); - } - else if (priCommand.equalsIgnoreCase("apply_recruit_counter_buff")) - { - buff.applyBuff(self, holiday.BUFF_IMPERIAL_RECRUITMENT_COUNTER); - } - else if (priCommand.equalsIgnoreCase("apply_resist_counter_buff")) - { - buff.applyBuff(self, holiday.BUFF_REBEL_RESISTANCE_COUNTER); - } - else if (priCommand.equalsIgnoreCase("apply_antiprop_counter_buff")) - { - buff.applyBuff(self, holiday.BUFF_IMPERIAL_ANTIPROPAGANDA_COUNTER); - } - else if (priCommand.equalsIgnoreCase("apply_vandal_counter_buff")) - { - buff.applyBuff(self, holiday.BUFF_REBEL_PLAYER_VANDAL_COUNTER); - } - else if (priCommand.equalsIgnoreCase("hasImpTraderQuest")) - { - String quest = ""; - for (int i = 0; i < holiday.ALL_IMPERIAL_QUESTS.length; i++) - { - if (groundquests.isQuestActive(self, holiday.ALL_IMPERIAL_QUESTS[i])) - { - quest = holiday.ALL_IMPERIAL_QUESTS[i]; - sendSystemMessageTestingOnly(self, "FOUND QUEST: " + holiday.ALL_IMPERIAL_QUESTS[i]); - break; - } - else - { - sendSystemMessageTestingOnly(self, "is not quest: " + holiday.ALL_IMPERIAL_QUESTS[i]); - } - } - if (quest == null || quest.equals("")) - { - sendSystemMessageTestingOnly(self, "no quest, exiting"); - return SCRIPT_CONTINUE; - } - if (groundquests.isTaskActive(self, quest, quest)) - { - sendSystemMessageTestingOnly(self, "TASK QUEST: " + quest); - } - else - { - sendSystemMessageTestingOnly(self, "Task not found: " + quest); - } - } - else if (priCommand.equalsIgnoreCase("showBuildoutArea")) - { - location here = getLocation(self); - obj_id containingBuilding = getTopMostContainer(self); - if (isIdValid(containingBuilding)) - { - here = getLocation(containingBuilding); - } - String buildoutAreaName = getBuildoutAreaName(here.x, here.z); - sendSystemMessageTestingOnly(self, "You are in buildout area: " + buildoutAreaName); - } - else if (priCommand.equalsIgnoreCase("detach_spawner")) - { - obj_id lookAtTarget = findTarget(self); - if (!isValidId(lookAtTarget)) - { - sendSystemMessageTestingOnly(self, "failed"); - return SCRIPT_CONTINUE; - } - detachScript(lookAtTarget, "theme_park.dungeon.empire_day_interior_npc_spawner"); - sendSystemMessageTestingOnly(self, "removed"); - } - else if (priCommand.equalsIgnoreCase("attach_spawner")) - { - obj_id lookAtTarget = findTarget(self); - if (!isValidId(lookAtTarget)) - { - sendSystemMessageTestingOnly(self, "failed"); - return SCRIPT_CONTINUE; - } - attachScript(lookAtTarget, "theme_park.dungeon.empire_day_interior_npc_spawner"); - sendSystemMessageTestingOnly(self, "removed"); - } - else if (priCommand.equalsIgnoreCase("make_dead")) - { - obj_id lookAtTarget = findTarget(self); - if (!isValidId(lookAtTarget)) - { - sendSystemMessageTestingOnly(self, "failed"); - return SCRIPT_CONTINUE; - } - ai_lib.aiSetPosture(lookAtTarget, POSTURE_KNOCKED_DOWN); - sendSystemMessageTestingOnly(self, "done"); - } - else if (priCommand.equalsIgnoreCase("has_lock_out_timer")) - { - if (hasObjVar(self, holiday.EMPIRE_DAY_VANDAL_TIMESTAMP)) - { - sendSystemMessageTestingOnly(self, "HAS: " + holiday.EMPIRE_DAY_VANDAL_TIMESTAMP); - } - else - { - sendSystemMessageTestingOnly(self, "DOES NOT HAVE: " + holiday.EMPIRE_DAY_VANDAL_TIMESTAMP); - } - if (hasObjVar(self, holiday.EMPIRE_DAY_RESISTANCE_TIMESTAMP)) - { - sendSystemMessageTestingOnly(self, "HAS: " + holiday.EMPIRE_DAY_RESISTANCE_TIMESTAMP); - } - else - { - sendSystemMessageTestingOnly(self, "DOES NOT HAVE: " + holiday.EMPIRE_DAY_RESISTANCE_TIMESTAMP); - } - if (hasObjVar(self, holiday.EMPIRE_DAY_PROPAGANDA_TIMESTAMP)) - { - sendSystemMessageTestingOnly(self, "HAS: " + holiday.EMPIRE_DAY_PROPAGANDA_TIMESTAMP); - } - else - { - sendSystemMessageTestingOnly(self, "DOES NOT HAVE: " + holiday.EMPIRE_DAY_PROPAGANDA_TIMESTAMP); - } - if (hasObjVar(self, holiday.EMPIRE_DAY_RECRUITMENT_TIMESTAMP)) - { - sendSystemMessageTestingOnly(self, "HAS: " + holiday.EMPIRE_DAY_RECRUITMENT_TIMESTAMP); - } - else - { - sendSystemMessageTestingOnly(self, "DOES NOT HAVE: " + holiday.EMPIRE_DAY_RECRUITMENT_TIMESTAMP); - } - } - else if (priCommand.equalsIgnoreCase("has_lock_out_flag")) - { - if (hasObjVar(self, holiday.EMPIRE_DAY_VANDAL_LOCKED_OUT)) - { - sendSystemMessageTestingOnly(self, "HAS: " + holiday.EMPIRE_DAY_VANDAL_LOCKED_OUT); - } - else - { - sendSystemMessageTestingOnly(self, "DOES NOT HAVE: " + holiday.EMPIRE_DAY_VANDAL_LOCKED_OUT); - } - if (hasObjVar(self, holiday.EMPIRE_DAY_RESISTANCE_LOCKED_OUT)) - { - sendSystemMessageTestingOnly(self, "HAS: " + holiday.EMPIRE_DAY_RESISTANCE_LOCKED_OUT); - } - else - { - sendSystemMessageTestingOnly(self, "DOES NOT HAVE: " + holiday.EMPIRE_DAY_RESISTANCE_LOCKED_OUT); - } - if (hasObjVar(self, holiday.EMPIRE_DAY_PROPAGANDA_LOCKED_OUT)) - { - sendSystemMessageTestingOnly(self, "HAS: " + holiday.EMPIRE_DAY_PROPAGANDA_LOCKED_OUT); - } - else - { - sendSystemMessageTestingOnly(self, "DOES NOT HAVE: " + holiday.EMPIRE_DAY_PROPAGANDA_LOCKED_OUT); - } - if (hasObjVar(self, holiday.EMPIRE_DAY_RECRUITMENT_LOCKED_OUT)) - { - sendSystemMessageTestingOnly(self, "HAS: " + holiday.EMPIRE_DAY_RECRUITMENT_LOCKED_OUT); - } - else - { - sendSystemMessageTestingOnly(self, "DOES NOT HAVE: " + holiday.EMPIRE_DAY_RECRUITMENT_LOCKED_OUT); - } - } - else if (priCommand.equalsIgnoreCase("tatooine_vars")) - { - obj_id tatooine = getPlanetByName("tatooine"); - if (!isValidId(tatooine)) - { - sendSystemMessageTestingOnly(self, "No Tatooine Found."); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "has script: " + hasScript(tatooine, "event.planet_event_handler")); - sendSystemMessageTestingOnly(self, "OID: " + tatooine); - String data = holiday.getEventHighScores(tatooine, holiday.PLANET_VAR_EVENT_PREFIX + holiday.PLANET_VAR_EMPIRE_DAY + holiday.PLANET_VAR_SCORE, true); - if (data == null || data.length() <= 0) - { - sendSystemMessageTestingOnly(self, "High Score Data Invalid."); - return SCRIPT_CONTINUE; - } - if (!holiday.createEventLeaderBoardUI(self, holiday.LEADER_BOARD_TITLE, data)) - { - sendSystemMessageTestingOnly(self, "createEventLeaderBoardUI failed."); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "High Score Data should have worked."); - } - else if (priCommand.equalsIgnoreCase("score_vars")) - { - if (hasObjVar(self, holiday.PLAYER_EMPIRE_DAY_SCORE)) - { - sendSystemMessageTestingOnly(self, "Score var: " + getIntObjVar(self, holiday.PLAYER_EMPIRE_DAY_SCORE)); - } - else - { - sendSystemMessageTestingOnly(self, "You don't have var"); - } - } - else if (priCommand.equalsIgnoreCase("score_var_removed")) - { - if (hasObjVar(self, holiday.PLAYER_EMPIRE_DAY_SCORE)) - { - removeObjVar(self, holiday.PLAYER_EMPIRE_DAY_SCORE); - sendSystemMessageTestingOnly(self, "Score var removed."); - } - } - else if (priCommand.equalsIgnoreCase("set_score_var")) - { - setObjVar(self, holiday.PLAYER_EMPIRE_DAY_SCORE, 33); - sendSystemMessageTestingOnly(self, "Set to 33"); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_RECRUITMENT_COMBATANT); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_RESISTANCE_COMBATANT); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_RECRUITMENT_SF); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_RESISTANCE_SF); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_ANTIPROP_COMBATANT); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_VANDAL_COMBATANT); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_ANTIPROP_SF); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_VANDAL_SF); - buff.removeBuff(self, holiday.BUFF_IMPERIAL_RECRUITMENT_COUNTER); - buff.removeBuff(self, holiday.BUFF_REBEL_RESISTANCE_COUNTER); - buff.removeBuff(self, holiday.BUFF_IMPERIAL_ANTIPROPAGANDA_COUNTER); - buff.removeBuff(self, holiday.BUFF_REBEL_PLAYER_VANDAL_COUNTER); - } - else if (priCommand.equalsIgnoreCase("empire_day_remove_all")) - { - if (hasObjVar(self, holiday.PLAYER_EMPIRE_DAY_SCORE)) - { - removeObjVar(self, holiday.PLAYER_EMPIRE_DAY_SCORE); - sendSystemMessageTestingOnly(self, "Score var removed."); - } - removeObjVar(self, holiday.EMPIRE_DAY_BUFF_TRACKER); - removeObjVar(self, holiday.EMPIRE_DAY_RECRUITMENT_LOCKED_OUT); - removeObjVar(self, holiday.EMPIRE_DAY_RESISTANCE_LOCKED_OUT); - removeObjVar(self, holiday.EMPIRE_DAY_PROPAGANDA_LOCKED_OUT); - removeObjVar(self, holiday.EMPIRE_DAY_VANDAL_LOCKED_OUT); - removeObjVar(self, holiday.EMPIRE_DAY_RECRUITMENT_TIMESTAMP); - removeObjVar(self, holiday.EMPIRE_DAY_RESISTANCE_TIMESTAMP); - removeObjVar(self, holiday.EMPIRE_DAY_PROPAGANDA_TIMESTAMP); - removeObjVar(self, holiday.EMPIRE_DAY_VANDAL_TIMESTAMP); - removeObjVar(self, "empire_day_events.locked_out"); - sendSystemMessageTestingOnly(self, "Lockouts removed."); - collection.removeCollectionForRealsies(self, holiday.REBEL_RESISTANCE_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.REBEL_VANDAL_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.REBEL_ENGINEERING_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.REBEL_ENTERTAINER_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.REBEL_RESCUE_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_RECRUITING_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_ANTIPROP_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_ENGINEERING_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_ENTERTAINER_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_RESCUE_COLLECTION); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_RECRUITMENT_COMBATANT); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_RESISTANCE_COMBATANT); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_RECRUITMENT_SF); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_RESISTANCE_SF); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_ANTIPROP_COMBATANT); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_VANDAL_COMBATANT); - buff.removeBuff(self, holiday.BUFF_IMP_EMPIREDAY_ANTIPROP_SF); - buff.removeBuff(self, holiday.BUFF_REB_EMPIREDAY_VANDAL_SF); - buff.removeBuff(self, holiday.BUFF_IMPERIAL_RECRUITMENT_COUNTER); - buff.removeBuff(self, holiday.BUFF_REBEL_RESISTANCE_COUNTER); - buff.removeBuff(self, holiday.BUFF_IMPERIAL_ANTIPROPAGANDA_COUNTER); - buff.removeBuff(self, holiday.BUFF_REBEL_PLAYER_VANDAL_COUNTER); - } - else if (priCommand.equalsIgnoreCase("give_both_faction_kiosk_collections")) - { - modifyCollectionSlotValue(self, holiday.REBEL_RESISTANCE_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_VANDAL_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_RECRUITING_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ANTIPROP_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_RESISTANCE_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_VANDAL_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_RECRUITING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ANTIPROP_COUNTER_SLOT, 1); - } - else if (priCommand.equalsIgnoreCase("give_reb_kiosk_collections")) - { - modifyCollectionSlotValue(self, holiday.REBEL_RESISTANCE_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_VANDAL_START_SLOT, 1); - } - else if (priCommand.equalsIgnoreCase("complete_imp_kiosk_collection")) - { - modifyCollectionSlotValue(self, holiday.IMPERIAL_RECRUITING_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ANTIPROP_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_RECRUITING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ANTIPROP_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_RECRUITING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ANTIPROP_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_RECRUITING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ANTIPROP_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_RECRUITING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ANTIPROP_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_RECRUITING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ANTIPROP_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_RECRUITING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ANTIPROP_COUNTER_SLOT, 1); - } - else if (priCommand.equalsIgnoreCase("complete_reb_kiosk_collection")) - { - modifyCollectionSlotValue(self, holiday.REBEL_RESISTANCE_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_VANDAL_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_RESISTANCE_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_VANDAL_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_RESISTANCE_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_VANDAL_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_RESISTANCE_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_VANDAL_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_RESISTANCE_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_VANDAL_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_RESISTANCE_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_VANDAL_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_RESISTANCE_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.REBEL_VANDAL_COUNTER_SLOT, 1); - } - else if (priCommand.equalsIgnoreCase("remove_imp_kiosk_collection")) - { - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_RECRUITING_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_ANTIPROP_COLLECTION); - } - else if (priCommand.equalsIgnoreCase("remove_reb_kiosk_collection")) - { - collection.removeCollectionForRealsies(self, holiday.REBEL_RESISTANCE_COLLECTION); - collection.removeCollectionForRealsies(self, holiday.REBEL_VANDAL_COLLECTION); - } - else if (priCommand.equalsIgnoreCase("complete_imp_engineer_collection")) - { - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENGINEERING_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENGINEERING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENGINEERING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENGINEERING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENGINEERING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENGINEERING_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENGINEERING_COUNTER_SLOT, 1); - } - else if (priCommand.equalsIgnoreCase("complete_imp_entertainer_collection")) - { - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENTERTAINER_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENTERTAINER_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENTERTAINER_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENTERTAINER_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENTERTAINER_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENTERTAINER_COUNTER_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENTERTAINER_COUNTER_SLOT, 1); - } - else if (priCommand.equalsIgnoreCase("start_imp_engineer_collection")) - { - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENGINEERING_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENGINEERING_COUNTER_SLOT, 1); - } - else if (priCommand.equalsIgnoreCase("start_imp_entertainer_collection")) - { - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENTERTAINER_START_SLOT, 1); - modifyCollectionSlotValue(self, holiday.IMPERIAL_ENTERTAINER_COUNTER_SLOT, 1); - } - else if (priCommand.equalsIgnoreCase("remove_imp_engineer_collection")) - { - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_ENGINEERING_COLLECTION); - } - else if (priCommand.equalsIgnoreCase("remove_imp_entertainer_collection")) - { - collection.removeCollectionForRealsies(self, holiday.IMPERIAL_ENTERTAINER_COLLECTION); - } - else if (priCommand.equalsIgnoreCase("get_reb_buffs")) - { - buff.applyBuff(self, holiday.BUFF_REB_EMPIREDAY_RESISTANCE_COMBATANT); - buff.applyBuff(self, holiday.BUFF_REB_EMPIREDAY_VANDAL_COMBATANT); - } - else if (priCommand.equalsIgnoreCase("reb_leader_board") && !secCommand.equals("")) - { - int buffNumber = utils.stringToInt(secCommand); - if (buffNumber > 0) - { - setObjVar(self, holiday.PLAYER_EMPIRE_DAY_SCORE, buffNumber); - buffNumber = buffNumber / 2; - for (int i = 0; i < buffNumber; i++) - { - buff.applyBuff(self, holiday.BUFF_REBEL_RESISTANCE_COUNTER); - buff.applyBuff(self, holiday.BUFF_REBEL_PLAYER_VANDAL_COUNTER); - } - } - } - else if (priCommand.equalsIgnoreCase("get_imp_buffs")) - { - buff.applyBuff(self, holiday.BUFF_IMP_EMPIREDAY_RECRUITMENT_COMBATANT); - buff.applyBuff(self, holiday.BUFF_IMP_EMPIREDAY_ANTIPROP_COMBATANT); - } - else if (priCommand.equalsIgnoreCase("imp_leader_board") && !secCommand.equals("")) - { - int buffNumber = utils.stringToInt(secCommand); - if (buffNumber > 0) - { - setObjVar(self, holiday.PLAYER_EMPIRE_DAY_SCORE, buffNumber); - buffNumber = buffNumber / 2; - for (int i = 0; i < buffNumber; i++) - { - buff.applyBuff(self, holiday.BUFF_IMPERIAL_RECRUITMENT_COUNTER); - buff.applyBuff(self, holiday.BUFF_IMPERIAL_ANTIPROPAGANDA_COUNTER); - } - } - } - else if (priCommand.equalsIgnoreCase("reset_leaderboards")) - { - dictionary params = new dictionary(); - params.put("eventVar", holiday.PLANET_VAR_EMPIRE_DAY); - params.put("eventConfig", "empireday_ceremony"); - obj_id tatooine = getPlanetByName("tatooine"); - if (isValidId(tatooine)) - { - sendSystemMessageTestingOnly(self, "Resetting Leaderboard"); - messageTo(tatooine, "resetEventDataAfterDelay", params, 1, false); - } - } - else if (priCommand.equalsIgnoreCase("remove_console_vars")) - { - utils.removeScriptVarTree(self, "consoleMiniGame"); - sendSystemMessageTestingOnly(self, "done"); - } - else if (priCommand.equalsIgnoreCase("giveSignal1")) - { - if (groundquests.isQuestActive(self, "outbreak_quest_facility_02_imperial")) - { - sendSystemMessageTestingOnly(self, "has outbreak_quest_facility_02_imperial"); - } - if (groundquests.isTaskActive(self, "outbreak_quest_facility_02_imperial", "body1Searched")) - { - sendSystemMessageTestingOnly(self, "has tsk"); - } - sendSystemMessageTestingOnly(self, "done"); - } - else if (priCommand.equalsIgnoreCase("goAlpha")) - { - warpPlayer(self, "dathomir", -5925, 559, -6667, null, -5925, 559, -6667, null, true); - sendSystemMessageTestingOnly(self, "done"); - } - else if (priCommand.equalsIgnoreCase("goBeta")) - { - warpPlayer(self, "dathomir", -6283, 561, -7521, null, -6283, 561, -7521, null, true); - sendSystemMessageTestingOnly(self, "done"); - } - else if (priCommand.equalsIgnoreCase("goGamma")) - { - warpPlayer(self, "dathomir", -6824, 553, -6456, null, -6824, 553, -6456, null, true); - sendSystemMessageTestingOnly(self, "done"); - } - else if (priCommand.equalsIgnoreCase("goDelta")) - { - warpPlayer(self, "dathomir", -7145, 562, -6922, null, -7145, 562, -6922, null, true); - sendSystemMessageTestingOnly(self, "done"); - } - else if (priCommand.equalsIgnoreCase("goEpsilon")) - { - warpPlayer(self, "dathomir", -7448, 570, -7342, null, -7448, 570, -7342, null, true); - sendSystemMessageTestingOnly(self, "done"); - } - else if (priCommand.equalsIgnoreCase("giveSignal") && !secCommand.equals("")) - { - if (secCommand == null || secCommand.length() <= 0) - { - } - else - { - groundquests.sendSignal(self, secCommand); - } - } - else if (priCommand.equalsIgnoreCase("stopAi") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - stop(secCmd); - } - else if (priCommand.equalsIgnoreCase("getDeliveryObject")) - { - obj_id[] myList = getAllObjectsWithScript(getLocation(self), 100, "theme_park.outbreak.camp_arrival_trigger_volume"); - if (myList == null || myList.length <= 0) - { - sendSystemMessageTestingOnly(self, "failed"); - } - else - { - for (int i = 0; i < myList.length; i++) - { - sendSystemMessageTestingOnly(self, "found: " + myList[i]); - } - sendSystemMessageTestingOnly(self, "done"); - } - } - else if (priCommand.equalsIgnoreCase("finishSignal")) - { - if (groundquests.isTaskActive(self, "outbreak_quest_facility_05_imperial", "leaveFacility") || groundquests.isTaskActive(self, "outbreak_quest_facility_05_rebel", "leaveFacility") || groundquests.isTaskActive(self, "outbreak_quest_facility_05_neutral", "leaveFacility")) - { - groundquests.sendSignal(self, "hasLeftFacility"); - } - if (groundquests.isTaskActive(self, "outbreak_quest_facility_05_imperial", "coverSurvivors") || groundquests.isTaskActive(self, "outbreak_quest_facility_05_rebel", "coverSurvivors") || groundquests.isTaskActive(self, "outbreak_quest_facility_05_neutral", "coverSurvivors")) - { - groundquests.sendSignal(self, "allDoneSurvivors"); - } - } - else if (priCommand.equalsIgnoreCase("isInEntertainmentCamp")) - { - obj_id camp = getCurrentAdvancedCamp(self); - if (isIdValid(camp)) - { - sendSystemMessageTestingOnly(self, "camp: " + camp); - if (camping.isInEntertainmentCamp(self, camp)) - { - sendSystemMessageTestingOnly(self, "You are in entertainer camp"); - } - else - { - sendSystemMessageTestingOnly(self, "You are NOT in entertainer camp"); - } - sendSystemMessageTestingOnly(self, "can performance heal: " + performance.canPerformanceHeal(self)); - sendSystemMessageTestingOnly(self, "Max Duration: " + performance.inspireGetMaxDuration(self)); - } - else - { - sendSystemMessageTestingOnly(self, "not a valid camp"); - } - } - else if (priCommand.equalsIgnoreCase("gethp") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - sendSystemMessageTestingOnly(self, "CUR HP: " + getHitpoints(secCmd)); - sendSystemMessageTestingOnly(self, "MAX HP: " + getMaxHitpoints(secCmd)); - } - else if (priCommand.equalsIgnoreCase("sethp") && !secCommand.equals("") && !thirdCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - int thrdCmd = utils.stringToInt(thirdCommand); - setHitpoints(secCmd, thrdCmd); - sendSystemMessageTestingOnly(self, "CUR HP: " + getHitpoints(secCmd)); - sendSystemMessageTestingOnly(self, "MAX HP: " + getMaxHitpoints(secCmd)); - } - else if (priCommand.equalsIgnoreCase("incrementstack")) - { - buff.applyBuff(self, "event_lifeday_imperial_present_counter"); - } - else if (priCommand.equalsIgnoreCase("normalbuff")) - { - buff.applyBuff(self, "bh_dm_cc_1"); - } - else if (priCommand.equalsIgnoreCase("damagelittle") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - int maxHp = getMaxHitpoints(secCmd); - int threshold = (maxHp / 3); - setHitpoints(secCmd, (maxHp - threshold)); - } - else if (priCommand.equalsIgnoreCase("damagehalf") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - int maxHp = getMaxHitpoints(secCmd); - int threshold = (maxHp / 2); - setHitpoints(secCmd, (maxHp - threshold)); - } - else if (priCommand.equalsIgnoreCase("damagemore") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - int maxHp = getMaxHitpoints(secCmd); - int threshold = (maxHp / 3); - setHitpoints(secCmd, (maxHp - (threshold + threshold))); - } - else if (priCommand.equalsIgnoreCase("destroyturret") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - advanced_turret.explodeTurret(secCmd, self); - } - else if (priCommand.equalsIgnoreCase("getTemplateNoPath") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - String template = utils.getTemplateFilenameNoPath(secCmd); - sendSystemMessageTestingOnly(self, "template: " + template); - } - else if (priCommand.equalsIgnoreCase("getAttackerList") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - obj_id[] attackerList = utils.getObjIdBatchScriptVar(secCmd, "creditForKills.attackerList.attackers"); - String list = utils.getStringScriptVar(secCmd, "creditForKills.attackerList"); - if (attackerList == null) - { - debugSpeakMsg(self, "attackerList was null"); - debugSpeakMsg(self, "list was " + list); - return SCRIPT_CONTINUE; - } - for (int i = 0; i < attackerList.length; ++i) - { - debugSpeakMsg(self, "attackerList[" + i + "] " + attackerList[i]); - } - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("getskillmodresists") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - if (!isValidId(secCmd)) - { - sendSystemMessageTestingOnly(self, "invalid object"); - } - else - { - for (int i = 0; i < armor.DATATABLE_SPECIAL_PROTECTIONS.length; i++) - { - sendSystemMessageTestingOnly(self, "resist: " + armor.DATATABLE_SPECIAL_PROTECTIONS[i] + ": " + getSkillStatisticModifier(secCmd, "expertise_innate_protection_" + armor.DATATABLE_SPECIAL_PROTECTIONS[i])); - } - sendSystemMessageTestingOnly(self, "resist: all: " + getSkillStatisticModifier(secCmd, "expertise_innate_protection_all")); - } - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("playorbital")) - { - playClientEffectLoc(self, "clienteffect/combat_pt_orbitalstrike_low_pt.cef", getLocation(self), 0); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("planet_message")) - { - location loc = getLocation(self); - string_id message = new string_id("gcw", "static_base_capture_imperial" + loc.area); - sendFactionalSystemMessagePlanet(message, null, -1.0f, true, true); - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("defense_camp")) - { - obj_id lookAtTarget = findTarget(self); - if (!isValidId(lookAtTarget)) - { - sendSystemMessageTestingOnly(self, "invalid object"); - } - if (!utils.hasScriptVar(lookAtTarget, "defense_camp")) - { - sendSystemMessageTestingOnly(self, "failed hasScriptVar check"); - return SCRIPT_CONTINUE; - } - obj_id defendingGeneral = utils.getObjIdScriptVar(lookAtTarget, "defense_camp"); - if (!isValidId(defendingGeneral) || !exists(defendingGeneral)) - { - sendSystemMessageTestingOnly(self, "no object defense_camp"); - } - else - { - sendSystemMessageTestingOnly(self, "defense_camp found"); - } - return SCRIPT_CONTINUE; - } - else if (priCommand.equalsIgnoreCase("get_faction_flag") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - if (!isValidId(secCmd)) - { - sendSystemMessageTestingOnly(self, "invalid object"); - } - else - { - int factionFlag = factions.getFactionFlag(secCmd); - if (factionFlag == 0) - { - sendSystemMessageTestingOnly(self, "UNKNOWN FACTION"); - } - else if (factionFlag == 1) - { - sendSystemMessageTestingOnly(self, "REBEL FACTION"); - } - else if (factionFlag == 2) - { - sendSystemMessageTestingOnly(self, "IMPERIAL FACTION"); - } - else if (factionFlag == 3) - { - sendSystemMessageTestingOnly(self, "NEUTRAL FACTION"); - } - } - } - else if (priCommand.equalsIgnoreCase("reduce_hp") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - if (!isValidId(secCmd)) - { - sendSystemMessageTestingOnly(self, "invalid object"); - } - int currentHp = getHitpoints(secCmd); - setHitpoints(secCmd, currentHp - 5000); - } - else if (priCommand.equalsIgnoreCase("get_fatigue") && !secCommand.equals("")) - { - int secCmd = utils.stringToInt(secCommand); - if (secCmd < 0) - { - sendSystemMessageTestingOnly(self, "invalid amt"); - } - sendSystemMessageTestingOnly(self, "amt: " + secCmd); - buff.applyBuffWithStackCount(self, gcw.BUFF_PLAYER_FATIGUE, secCmd); - } - else if (priCommand.equalsIgnoreCase("isonlist") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - if (!isValidId(secCmd)) - { - sendSystemMessageTestingOnly(self, "invalid object"); - } - if (trial.isNonInstanceFactionParticipant(self, secCmd)) - { - sendSystemMessageTestingOnly(self, "You are on list"); - } - else - { - sendSystemMessageTestingOnly(self, "You are NOT on list"); - } - } - else if (priCommand.equalsIgnoreCase("removemefromlist") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - if (!isValidId(secCmd)) - { - sendSystemMessageTestingOnly(self, "invalid object"); - } - if (trial.removeNonInstanceFactionParticipant(self, secCmd)) - { - sendSystemMessageTestingOnly(self, "You are removed"); - } - else - { - sendSystemMessageTestingOnly(self, "You werent on it"); - } - } - else if (priCommand.equalsIgnoreCase("getgcwtools")) - { - obj_id pInv = utils.getInventoryContainer(self); - obj_id barricade = createObject("object/tangible/gcw/crafting_quest/gcw_barricade_tool.iff", pInv, null); - if (isValidId(barricade)) - { - setCount(barricade, 100); - } - obj_id patrol = createObject("object/tangible/gcw/crafting_quest/gcw_patrol_tool.iff", pInv, null); - if (isValidId(patrol)) - { - setCount(patrol, 100); - } - obj_id spawner = createObject("object/tangible/gcw/crafting_quest/gcw_spawner_tool.iff", pInv, null); - if (isValidId(spawner)) - { - setCount(spawner, 100); - } - obj_id tower = createObject("object/tangible/gcw/crafting_quest/gcw_tower_tool.iff", pInv, null); - if (isValidId(tower)) - { - setCount(tower, 100); - } - obj_id turret = createObject("object/tangible/gcw/crafting_quest/gcw_turret_tool.iff", pInv, null); - if (isValidId(turret)) - { - setCount(turret, 100); - } - obj_id vehicle = createObject("object/tangible/gcw/crafting_quest/gcw_vehicle_tool.iff", pInv, null); - if (isValidId(vehicle)) - { - setCount(vehicle, 100); - } - } - else if (priCommand.equalsIgnoreCase("remove_tutorial_flag")) - { - removeObjVar(self, gcw.GCW_TUTORIAL_FLAG); - sendSystemMessageTestingOnly(self, "Tutorial Flag Removed"); - } - else if (priCommand.equalsIgnoreCase("nym_warp_choster")) - { - String cantina = "8145375"; - obj_id building = utils.stringToObjId(cantina); - obj_id room = getCellId(building, "alcove3"); - warpPlayer(self, "lok", 0.0f, 0.0f, 0.0f, room, 9.0f, -0.9f, -16.1f); - } - else if (priCommand.equalsIgnoreCase("nym_warp_moore")) - { - String cantina = "8145375"; - obj_id building = utils.stringToObjId(cantina); - obj_id room = getCellId(building, "back_hallway"); - warpPlayer(self, "lok", 0.0f, 0.0f, 0.0f, room, -36.0f, 0.1f, -14.5f); - } - else if (priCommand.equalsIgnoreCase("nym_warp_vana")) - { - String stronghold = "6595508"; - obj_id building = utils.stringToObjId(stronghold); - obj_id room = getCellId(building, "lobby"); - warpPlayer(self, "lok", 0.0f, 0.0f, 0.0f, room, -3.7f, 3.5f, -14.9f); - } - else if (priCommand.equalsIgnoreCase("nym_warp_pirate_troll")) - { - String pirateCave = "5126308"; - obj_id building = utils.stringToObjId(pirateCave); - obj_id room = getCellId(building, "r15"); - warpPlayer(self, "lok", 0.0f, 0.0f, 0.0f, room, -104.1f, -40.9f, -40.6f); - } - else if (priCommand.equalsIgnoreCase("nym_warp_pirate_hacker")) - { - String pirateCave = "5126308"; - obj_id building = utils.stringToObjId(pirateCave); - obj_id room = getCellId(building, "r25"); - warpPlayer(self, "lok", 0.0f, 0.0f, 0.0f, room, -63.1f, -65.9f, -140.8f); - } - else if (priCommand.equalsIgnoreCase("nym_warp_mine_wes")) - { - String pirateCave = "5645584"; - obj_id building = utils.stringToObjId(pirateCave); - obj_id room = getCellId(building, "r5"); - warpPlayer(self, "lok", 0.0f, 0.0f, 0.0f, room, -3.1f, -45.0f, -133.9f); - } - else if (priCommand.equalsIgnoreCase("nym_warp_mine_raynar")) - { - String pirateCave = "5645584"; - obj_id building = utils.stringToObjId(pirateCave); - obj_id room = getCellId(building, "r8"); - warpPlayer(self, "lok", 0.0f, 0.0f, 0.0f, room, -92.0f, -73.3f, -170.7f); - } - else if (priCommand.equalsIgnoreCase("nym_warp_mine_filter")) - { - String pirateCave = "5645584"; - obj_id building = utils.stringToObjId(pirateCave); - obj_id room = getCellId(building, "r11"); - warpPlayer(self, "lok", 0.0f, 0.0f, 0.0f, room, -84.0f, -100.0f, -95.6f); - } - else if (priCommand.equalsIgnoreCase("nym_warp_facility_kendo_platt")) - { - String pirateCave = "5126270"; - obj_id building = utils.stringToObjId(pirateCave); - obj_id room = getCellId(building, "crittercell"); - warpPlayer(self, "lok", 0.0f, 0.0f, 0.0f, room, 70.4f, -12.0f, 79.4f); - } - else if (priCommand.equalsIgnoreCase("nym_warp_facility_jeran_goll")) - { - String pirateCave = "5126270"; - obj_id building = utils.stringToObjId(pirateCave); - obj_id room = getCellId(building, "researchlab2"); - warpPlayer(self, "lok", 0.0f, 0.0f, 0.0f, room, 20.0f, -20.0f, 139.1f); - } - else if (priCommand.equalsIgnoreCase("nym_warp_roof")) - { - warpPlayer(self, "lok", 477.0f, 33.0f, 4785.0f, null, 0f, 0f, 0f); - } - else if (priCommand.equalsIgnoreCase("nym_prisoner_quest")) - { - if (groundquests.isQuestActive(self, "u16_nym_themepark_pirate_prisoner_rescue_collection")) - { - groundquests.clearQuest(self, "u16_nym_themepark_pirate_prisoner_rescue_collection"); - } - groundquests.grantQuest(self, "u16_nym_themepark_pirate_prisoner_rescue_collection"); - if (hasCompletedCollectionSlot(self, "icon_nyms_rescue_prisoner")) - { - modifyCollectionSlotValue(self, "icon_nyms_rescue_prisoner", -1); - } - } - else if (priCommand.equalsIgnoreCase("nym_prisoner_log")) - { - LOG("prisoner_error_log", "prisoner log test!!"); - } - else if (priCommand.equalsIgnoreCase("nym_rifle_old")) - { - obj_id playerInv = utils.getInventoryContainer(self); - obj_id prize = weapons.createWeapon("object/weapon/ranged/carbine/carbine_nym_slugthrower.iff", playerInv, rand(0.8f, 1.1f)); - } - else if (priCommand.equalsIgnoreCase("nym_weed_signals")) - { - groundquests.sendSignal(self, "tallStalkWeedFound"); - groundquests.sendSignal(self, "yellowPodWeedFound"); - groundquests.sendSignal(self, "floweringCactiWeedFound"); - groundquests.sendSignal(self, "lowGrowingWeedsFound"); - groundquests.sendSignal(self, "paddleCactiWeedFound"); - groundquests.sendSignal(self, "hasDisposedOfWeeds"); - } - else if (priCommand.equalsIgnoreCase("nym_weed_signals_no_disposal")) - { - groundquests.sendSignal(self, "tallStalkWeedFound"); - groundquests.sendSignal(self, "yellowPodWeedFound"); - groundquests.sendSignal(self, "floweringCactiWeedFound"); - groundquests.sendSignal(self, "lowGrowingWeedsFound"); - groundquests.sendSignal(self, "paddleCactiWeedFound"); - } - else if (priCommand.equalsIgnoreCase("remove_sale_flag") && !secCommand.equals("")) - { - obj_id secCmd = utils.stringToObjId(secCommand); - if (!isValidId(secCmd)) - { - sendSystemMessageTestingOnly(self, "invalid object"); - } - utils.removeScriptVar(secCmd, "soldAsJunk"); - removeObjVar(secCmd, "soldAsJunk"); - sendSystemMessageTestingOnly(self, "Done"); - } - } - } - return SCRIPT_CONTINUE; - } - public int spawnTreasure(obj_id self, dictionary params) throws InterruptedException - { - obj_id map = self; - if ((params == null) || (params.isEmpty())) - { - return SCRIPT_CONTINUE; - } - obj_id player = params.getObjId("player"); - int treasureLevel = 90; - sendSystemMessage(player, SID_SYS_FOUND); - location playerLocation = getLocation(player); - playerLocation.y = getHeightAtLocation(playerLocation.x, playerLocation.z); - sendSystemMessage(self, "Creating Chest", null); - obj_id treasureChest = createObject(DUMMY_CHEST, playerLocation); - if (isValidId(treasureChest)) - { - setObjVar(treasureChest, "owner", player); - setOwner(treasureChest, player); - String invis = stealth.getInvisBuff(player); - if (invis != null) - { - stealth.checkForAndMakeVisibleNoRecourse(player); - } - attachScript(treasureChest, SCRIPT_DUMMY_CHEST); - setObjVar(treasureChest, "treasureLevel", treasureLevel); - String loot_table = LOOT_TABLE_81_90; - setObjVar(treasureChest, "loot_table", loot_table); - String type = TREASURE_GUARDS; - int mobLevel = TREASURE_GUARD_LEVEL; - int groupModifier = GROUP_MODIFIER; - int count = ENEMY_COUNT; - int dataTableIdx = DATATABLE_IDX; - boolean verifiedAllVars = verifyVariablesNotNull(loot_table, type, mobLevel, groupModifier, count, dataTableIdx); - if (!verifiedAllVars) - { - sendSystemMessage(self, "The treasure chest didn't get all the correct data.", null); - return SCRIPT_CONTINUE; - } - dictionary outparams = new dictionary(); - outparams.put("loot_table", loot_table); - outparams.put("count", count); - outparams.put("type", type); - outparams.put("mobLevel", mobLevel); - outparams.put("location", playerLocation); - outparams.put("player", player); - outparams.put("boss_mob", BOSS_MOB); - sendSystemMessage(self, "Spawning Guards", null); - messageTo(treasureChest, "spawnTreasureGuards", outparams, 0, false); - } - return SCRIPT_CONTINUE; - } - public boolean verifyVariablesNotNull(String loot_table, String type, int mobLevel, int groupModifier, int count, int datTableIdx) throws InterruptedException - { - if (loot_table == null || loot_table.equals("")) - { - return false; - } - if (type == null || type.equals("")) - { - return false; - } - if (mobLevel <= 0) - { - return false; - } - if (groupModifier < 0) - { - return false; - } - if (count < 2) - { - return false; - } - if (datTableIdx < 0) - { - return false; - } - return true; - } - public boolean setCitySkillTrainers(obj_id self, int city_id) throws InterruptedException - { - if (!isValidId(self) || !exists(self)) - { - return false; - } - if (!cityExists(city_id)) - { - return false; - } - location poiStartLocation = getLocation(self); - float yaw = getYaw(self); - String[] arrayOfAllTrianerTemplates = dataTableGetStringColumn(CITY_SKILL_TRAINERS, "TEMPLATE"); - String[] arrayOfAllTrianerStrings = dataTableGetStringColumn(CITY_SKILL_TRAINERS, "STRING"); - sendSystemMessage(self, "Number of Trainers Being Placed: " + arrayOfAllTrianerTemplates.length, null); - if (arrayOfAllTrianerTemplates.length != arrayOfAllTrianerStrings.length) - { - return false; - } - for (int i = 0; i < arrayOfAllTrianerTemplates.length; i++) - { - location poiLocation = utils.getRandomAwayLocation(poiStartLocation, 5.f, 10.f); - obj_id poi = createObject(arrayOfAllTrianerTemplates[i], poiLocation); - if (isValidId(poi) && exists(poi)) - { - setYaw(poi, yaw); - setObjVar(poi, "creator", self); - setName(poi, arrayOfAllTrianerStrings[i]); - int flags = SF_COST_CITY_LOW | SF_SKILL_TRAINER; - citySetStructureInfo(city_id, poi, flags, true); - setObjVar(poi, "city_id", city_id); - } - sendSystemMessage(self, arrayOfAllTrianerStrings[i] + " placed.", null); - } - return true; - } - public boolean destroyCitySkillTrainers(obj_id self, int city_id) throws InterruptedException - { - obj_id[] structures = cityGetStructureIds(city_id); - for (int i = 0; i < structures.length; i++) - { - if (structures[i].isLoaded()) - { - if (!city.isNormalStructure(city_id, structures[i])) - { - destroyObject(structures[i]); - } - } - } - return true; - } - public obj_id findTarget(obj_id self) throws InterruptedException - { - obj_id intendedTarget = getIntendedTarget(self); - obj_id lookAtTarget = getLookAtTarget(self); - obj_id finalTarget = null; - if (isIdValid(intendedTarget)) - { - finalTarget = intendedTarget; - } - else if (isIdValid(lookAtTarget)) - { - finalTarget = lookAtTarget; - } - else - { - finalTarget = self; - } - if (!isIdNull(finalTarget)) - { - return finalTarget; - } - return self; - } - public int getAdjustedLotCount(String template) throws InterruptedException - { - if (template == null || template.equals("")) - { - return -1; - } - String fp_template = player_structure.getFootprintTemplate(template); - if (fp_template == null || fp_template.equals("")) - { - return -2; - } - int idx = player_structure.getStructureTableIndex(template); - if (idx == -1) - { - return -3; - } - int ignore_lots = dataTableGetInt(player_structure.PLAYER_STRUCTURE_DATATABLE, idx, player_structure.DATATABLE_COL_NO_LOT_REQ); - if (ignore_lots != 1) - { - int struct_lots = (getNumberOfLots(fp_template) / 4) - dataTableGetInt(player_structure.PLAYER_STRUCTURE_DATATABLE, idx, player_structure.DATATABLE_COL_LOT_REDUCTION); - if (struct_lots < 1) - { - struct_lots = -99; - } - return struct_lots; - } - return -69; - } - public boolean isDeluxSarlacc(obj_id sarlacc) throws InterruptedException - { - if (!isValidId(sarlacc) || !exists(sarlacc)) - { - return false; - } - if (!hasObjVar(sarlacc, house_pet.SARLACC_CURRENT_PHASE)) - { - return false; - } - if (!hasObjVar(sarlacc, house_pet.SARLACC_BORN)) - { - return false; - } - if (!hasObjVar(sarlacc, house_pet.SARLACC_PHASE_START)) - { - return false; - } - if (!hasObjVar(sarlacc, house_pet.SARLACC_FEEDING_ITERATION)) - { - return false; - } - if (!hasObjVar(sarlacc, house_pet.SARLACC_LAST_FED)) - { - return false; - } - return true; - } - public boolean isMassiffBowl(obj_id massifBowl) throws InterruptedException - { - if (!isValidId(massifBowl) || !exists(massifBowl)) - { - return false; - } - if (!hasObjVar(massifBowl, house_pet.MASSIFF_CURRENT_PHASE)) - { - return false; - } - if (!hasObjVar(massifBowl, house_pet.CHILD_OBJ_ID)) - { - return false; - } - if (!hasObjVar(massifBowl, house_pet.MASSIFF_LAST_FED)) - { - return false; - } - return true; - } - public String getListOfFoodItems(obj_id sarlacc) throws InterruptedException - { - if (!isValidId(sarlacc)) - { - debugSpeakMsg(sarlacc, "sarlacc invalid"); - return null; - } - if (!hasObjVar(sarlacc, house_pet.SARLACC_FEED_ARRAY)) - { - debugSpeakMsg(sarlacc, "sarlacc doesnt have array objvar."); - return null; - } - String logData = ""; - String[] feedingList = getStringArrayObjVar(sarlacc, house_pet.SARLACC_FEED_ARRAY); - debugSpeakMsg(sarlacc, "List Length: " + feedingList.length); - if (feedingList != null && feedingList.length > 0) - { - for (int i = 0; i < feedingList.length; i++) - { - debugSpeakMsg(sarlacc, "Fed Item: " + i + " " + feedingList[i]); - logData += " Fed Item " + i + ": " + feedingList[i] + ". "; - } - debugSpeakMsg(sarlacc, "Data: " + logData); - } - return logData; - } - public obj_id getCurrentAdvancedCamp(obj_id player) throws InterruptedException - { - obj_id[] objects = getNonCreaturesInRange(player, 25.0f); - if (objects == null || objects.length == 0) - { - return null; - } - for (int i = 0; i < objects.length; i++) - { - if (hasScript(objects[i], "item.camp.camp_advanced")) - { - sendSystemMessageTestingOnly(player, "found script."); - if (isInTriggerVolume(objects[i], "campsite", player)) - { - return objects[i]; - } - else - { - sendSystemMessageTestingOnly(player, "no objects found."); - } - } - } - return null; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/jmichener_test.java b/sku.0/sys.server/compiled/game/script/working/jmichener_test.java deleted file mode 100644 index 00e102bcb..000000000 --- a/sku.0/sys.server/compiled/game/script/working/jmichener_test.java +++ /dev/null @@ -1,146 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import java.util.StringTokenizer; -import java.lang.Math; -import script.library.ai_lib; -import script.library.buff; -import script.library.beast_lib; -import script.library.create; -import script.library.expertise; -import script.library.groundquests; -import script.library.guild; -import script.library.incubator; -import script.library.instance; -import script.library.npe; -import script.library.player_structure; -import script.library.pet_lib; -import script.library.skill; -import script.library.skill_template; -import script.library.space_combat; -import script.library.space_flags; -import script.library.space_quest; -import script.library.static_item; -import script.library.sui; -import script.library.transition; -import script.library.trial; -import script.library.utils; - -public class jmichener_test extends script.base_script -{ - public jmichener_test() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - obj_id player = self; - if (isGod(player)) - { - StringTokenizer st = new java.util.StringTokenizer(text); - int tokens = st.countTokens(); - String command = null; - if (st.hasMoreTokens()) - { - command = st.nextToken(); - } - if (command.equals("list_player_buffs")) - { - int[] playerBuffs = buff.getAllBuffs(player); - String[] strPlayerBuffs = new String[playerBuffs.length]; - for (int i = 0; i < playerBuffs.length; i++) - { - strPlayerBuffs[i] = buff.getBuffNameFromCrc(playerBuffs[i]); - sendSystemMessageTestingOnly(player, strPlayerBuffs[i]); - } - return SCRIPT_CONTINUE; - } - if (command.equals("remove_player_buffs")) - { - buff.removeAllBuffs(player); - sendSystemMessageTestingOnly(player, "All buffs have been removed from player"); - return SCRIPT_CONTINUE; - } - if (command.equals("remove_entertainer_invis_buff")) - { - buff.removeBuff(player, "col_ent_invis_buff_tracker"); - sendSystemMessageTestingOnly(player, "Entertainer Timer Buff Removed(Build-A-Buff collection)"); - return SCRIPT_CONTINUE; - } - if (command.equals("check_has_entertainer_invis_buff")) - { - if (buff.hasBuff(player, "col_ent_invis_buff_tracker")) - { - sendSystemMessageTestingOnly(player, "player has buff: 'col_ent_invis_buff_tracker'."); - } - else - { - sendSystemMessageTestingOnly(player, "player does NOT have buff: 'col_ent_invis_buff_tracker'."); - } - return SCRIPT_CONTINUE; - } - if (command.equals("remove_heroic_sd_invis_buff")) - { - buff.removeBuff(player, "col_sd_invis_buff_tracker"); - sendSystemMessageTestingOnly(player, "Heroic SD Taxi Buff Removed"); - return SCRIPT_CONTINUE; - } - if (command.equals("check_has_heroic_sd_invis_buff")) - { - if (buff.hasBuff(player, "col_sd_invis_buff_tracker")) - { - sendSystemMessageTestingOnly(player, "player has buff: 'col_sd_invis_buff_tracker'."); - } - else - { - sendSystemMessageTestingOnly(player, "player does NOT have buff: 'col_sd_invis_buff_tracker'."); - } - return SCRIPT_CONTINUE; - } - if (command.equals("bypass_harvest_roll")) - { - utils.setScriptVar(player, "qa.resource_roll_bypass", "testing"); - sendSystemMessageTestingOnly(player, "resource roll has been bypassed - drop rate for exceptionals is 100%"); - } - if (command.equals("remove_bypass_harvest_roll")) - { - utils.removeScriptVar(player, "qa.resource_roll_bypass"); - sendSystemMessageTestingOnly(player, "resource roll has been negated - drop rate for exceptionals is no longer bypassed"); - } - if (command.equals("durni")) - { - location myLoc = getLocation(self); - create.object("durni", myLoc, true); - sendSystemMessageTestingOnly(player, "you created a durni"); - } - if (command.equals("stop_regen")) - { - float QARegenRate = getActionRegenRate(player); - setObjVar(player, "QARegenRate", QARegenRate); - getActionRegenRate(player, 0); - sendSystemMessageTestingOnly(player, "Your Regen Rate has been set to Zero!"); - } - if (command.equals("restore_regen")) - { - float myStoredRegen = getFloatObjVar(player, "QARegenRate"); - getActionRegenRate(player, myStoredRegen); - removeObjVar(self, "QARegenRate"); - if (!hasObjVar(player, "QARegenRate")) - { - sendSystemMessageTestingOnly(player, "Your Action Regen Rate has been restored"); - } - else - { - sendSystemMessageTestingOnly(player, "Problem - Regen Rate was not restored!"); - } - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/justin/test_scriptvar.java b/sku.0/sys.server/compiled/game/script/working/justin/test_scriptvar.java deleted file mode 100644 index 8a2246ac9..000000000 --- a/sku.0/sys.server/compiled/game/script/working/justin/test_scriptvar.java +++ /dev/null @@ -1,55 +0,0 @@ -package script.working.justin; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class test_scriptvar extends script.base_script -{ - public test_scriptvar() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - deltadictionary vars = self.getScriptVars(); - vars.put("test", "value"); - debugServerConsoleMsg(self, "On attach, added test/value to script vars"); - return SCRIPT_CONTINUE; - } - public int OnDetach(obj_id self) throws InterruptedException - { - deltadictionary vars = self.getScriptVars(); - String s = vars.getString("test"); - debugServerConsoleMsg(self, "OnDetach, getting test " + s); - return SCRIPT_CONTINUE; - } - public String test_console(String params) throws InterruptedException - { - debugServerConsoleMsg(obj_id.NULL_ID, "test_console"); - int weather = 0; - try - { - Integer i = new Integer(params); - weather = i.intValue(); - } - catch(NumberFormatException err) - { - weather = 0; - } - setWeatherData(weather, 20, 20); - return "Weather set to " + params; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("makeWaypoint")) - { - obj_id waypoint = createWaypointInDatapad(self, getLocation(self)); - setWaypointName(waypoint, "test waypoint"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/justin/utilities.java b/sku.0/sys.server/compiled/game/script/working/justin/utilities.java deleted file mode 100644 index e29439039..000000000 --- a/sku.0/sys.server/compiled/game/script/working/justin/utilities.java +++ /dev/null @@ -1,205 +0,0 @@ -package script.working.justin; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.create; -import script.library.quests; -import script.library.chat; -import script.library.factions; -import script.library.utils; -import script.library.fs_quests; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileWriter; -import java.io.InputStream; -import java.lang.Math; -import java.lang.Runtime; - -public class utilities extends script.base_script -{ - public utilities() - { - } - public void usage(obj_id self) throws InterruptedException - { - chat.chat(self, "Usagement!: utility []"); - chat.chat(self, "commands: "); - chat.chat(self, "grantSkills - grant all skills to yourself"); - chat.chat(self, "quest - execute a quest command dammit!!?"); - chat.chat(self, " activate - activate a quest named from player.quests datatable"); - chat.chat(self, " clear - clear all quest bits"); - chat.chat(self, "spawn - spawn a creature from creatures.tab"); - chat.chat(self, "faction - unlock fs branch using the fs_quests library. E.g. force_sensitive_combat_prowess_ranged_speed"); - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.startsWith("utility")) - { - java.util.StringTokenizer st = new java.util.StringTokenizer(text); - st.nextToken(); - String cmd = st.nextToken(); - if (cmd.equals("grantSkills")) - { - grantSkill(self, "combat_unarmed_master"); - obj_id pInv = utils.getInventoryContainer(self); - if (isIdValid(pInv)) - { - createObject("object/tangible/terminal/terminal_character_builder.iff", pInv, ""); - } - } - else if (cmd.equals("completed")) - { - String arg1 = st.nextToken(); - if (arg1 != null) - { - Object[] params = new Object[3]; - params[0] = self; - params[1] = arg1; - params[2] = new Boolean(true); - script_entry.runScripts("OnForceSensitiveQuestCompleted", params); - } - } - else if (cmd.equals("showOff")) - { - chat.chat(self, "Hi there BANDIT!!!"); - } - else if (cmd.equals("quest")) - { - String arg1 = st.nextToken(); - if (arg1 != null) - { - if (arg1.equals("activate")) - { - String arg2 = st.nextToken(); - if (arg2 != null) - { - int questId = questGetQuestId(arg2); - questActivateQuest(questId, self, null); - } - } - else if (arg1.equals("clear")) - { - String arg2 = st.nextToken(); - if (arg2 != null) - { - int questId = questGetQuestId(arg2); - questClearQuest(questId, self); - } - } - } - } - else if (cmd.equals("faction")) - { - String arg1 = st.nextToken(); - if (arg1 != null) - { - String arg2 = st.nextToken(); - if (arg2 != null) - { - int points = utils.stringToInt(arg2); - factions.setFactionStanding(self, arg1, points); - chat.chat(self, "set faction standing for " + arg1 + " to " + points); - } - else - { - usage(self); - } - } - else - { - usage(self); - } - } - else if (cmd.equals("requestLocation")) - { - requestLocation(self, "testrequest", getLocation(self), 512.0f, 128.0f, true, true); - } - else if (cmd.equals("spawn")) - { - String arg1 = st.nextToken(); - if (arg1 != null) - { - location l = getLocation(self); - l.x += 2; - obj_id creature = create.createCreature(arg1, l, true); - } - } - else if (cmd.equals("makeFsVillageEligible")) - { - fs_quests.makeVillageEligible(self); - } - else if (cmd.equals("makeFsVillageIneligible")) - { - removeObjVar(self, fs_quests.VAR_VILLAGE_ELIGIBLE); - } - else if (cmd.equals("unlock")) - { - String arg1 = st.nextToken(); - if (arg1 != null) - { - boolean success = fs_quests.unlockBranch(self, arg1); - if (!success) - { - chat.chat(self, "could not unlock " + arg1); - } - else - { - chat.chat(self, arg1 + " has been unlocked"); - } - } - } - else if (cmd.equals("rad2deg")) - { - String arg1 = st.nextToken(); - if (arg1 != null) - { - float rads = utils.stringToFloat(arg1); - float degs = (float)Math.toDegrees(rads); - chat.chat(self, "" + degs); - } - } - else if (cmd.equals("cover")) - { - chat.chat(self, "calling setCreatureCoverVisibility(" + self + ", true)"); - setCreatureCoverVisibility(self, false); - } - else if (cmd.equals("uncover")) - { - setCreatureCoverVisibility(self, true); - } - else if (cmd.equals("getcover")) - { - if (getCreatureCoverVisibility(self)) - { - chat.chat(self, "I am visible"); - } - else - { - chat.chat(self, "I am not visible"); - } - } - else - { - usage(self); - } - } - return SCRIPT_CONTINUE; - } - public int OnLocationReceived(obj_id self, String locationId, obj_id locationObject, location locationLocation, float locationRadius) throws InterruptedException - { - LOG("testlocation", "locationId=" + locationId); - chat.chat(self, "locationId=" + locationId); - chat.chat(self, "locationObject = " + locationObject); - destroyObject(locationObject); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/kai/magic.java b/sku.0/sys.server/compiled/game/script/working/kai/magic.java deleted file mode 100644 index afcf0122b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/kai/magic.java +++ /dev/null @@ -1,436 +0,0 @@ -package script.working.kai; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.weapons; -import script.library.player_structure; -import script.library.utils; -import java.util.StringTokenizer; -import script.library.loot; -import script.library.ai_lib; -import script.library.stealth; -import script.library.buff; -import script.library.dot; - -public class magic extends script.base_script -{ - public magic() - { - } - public void printTokens(StringTokenizer st) throws InterruptedException - { - LOG("LOG_CHANNEL", "tokens -> " + st.countTokens() + " nextToken ->" + st.nextToken()); - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (speaker != self) - { - return SCRIPT_CONTINUE; - } - if (!hasObjVar(speaker, "kai")) - { - return SCRIPT_CONTINUE; - } - if (text.startsWith("where")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - sendSystemMessageTestingOnly(self, getName(target) + " is at " + (getLocation(target)).toString()); - } - if (text.startsWith("enemycheck")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - sendSystemMessageTestingOnly(self, getName(target) + " isEnemy=" + pvpIsEnemy(self, target) + ", canAttack=" + pvpCanAttack(self, target)); - } - if (text.startsWith("testclass")) - { - boolean rslt = utils.testItemClassRequirements(self, getLookAtTarget(self), false, "trap."); - sendSystemMessageTestingOnly(self, "Pass Class requirements: " + rslt); - } - if (text.startsWith("getowner")) - { - obj_id owner = getOwner(getLookAtTarget(self)); - sendSystemMessageTestingOnly(self, "Owner for " + getName(getLookAtTarget(self)) + " is " + getName(owner)); - } - if (text.startsWith("getpl")) - { - StringTokenizer st = new StringTokenizer(text); - printTokens(st); - String lvl = ""; - int level = 1; - if (st.hasMoreTokens()) - { - level = utils.stringToInt(st.nextToken()); - } - sendSystemMessageTestingOnly(self, "Level " + level + " gives power of " + stealth.getPowerLevel(level, false)); - } - obj_id inv = utils.getInventoryContainer(self); - if (text.startsWith("getsv")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - deltadictionary dd = target.getScriptVars(); - sendSystemMessageTestingOnly(self, dd.toString()); - } - if (text.startsWith("hurt")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - hit_result hit = new hit_result(); - hit.damage = 1000; - hit.hitLocation = 0; - doDamage(target, self, hit); - } - if (text.startsWith("dodot")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - sendSystemMessageTestingOnly(self, "APPLY DOT=" + dot.applyBleedingEffect(self, target, "bleed777", 0, 5000, 15)); - } - if (text.startsWith("mycontainer")) - { - sendSystemMessageTestingOnly(self, "MyContainer=" + getTopMostContainer(self)); - } - if (text.startsWith("spy1")) - { - buff.applyBuff(self, "invis_sp_buff_invis_1"); - return SCRIPT_CONTINUE; - } - if (text.startsWith("smug")) - { - sendSystemMessageTestingOnly(self, "Applied=" + buff.applyBuff(self, "invis_sm_buff_invis_1")); - return SCRIPT_CONTINUE; - } - if (text.startsWith("act")) - { - sendSystemMessageTestingOnly(self, "action Up!"); - setMaxAttrib(self, ACTION, 10000); - setAttrib(self, ACTION, 10000); - return SCRIPT_CONTINUE; - } - if (text.startsWith("steal")) - { - if (stealth.canSteal(self, getLookAtTarget(self))) - { - stealth.steal(self, getLookAtTarget(self)); - } - } - if (text.startsWith("gettab")) - { - String bleh = stealth.getStealableTemplateFromTable(self); - sendSystemMessageTestingOnly(self, bleh); - } - if (text.startsWith("dtype")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - sendSystemMessageTestingOnly(self, "No target."); - return SCRIPT_CONTINUE; - } - weapons.setWeaponData(target); - } - if (text.startsWith("cleaninvis")) - { - utils.removeScriptVar(self, stealth.INVIS_UPKEEP_MSG_DISPATCHED); - } - if (text.startsWith("loc")) - { - sendSystemMessageTestingOnly(self, "Location is" + (getLocation(getLookAtTarget(self))).toString()); - } - if (text.startsWith("regen")) - { - sendSystemMessageTestingOnly(self, "Regen multiplier is 0"); - } - if (text.startsWith("getname")) - { - sendSystemMessageTestingOnly(self, "Name is: '" + getName(getLookAtTarget(self)) + "'"); - } - if (text.startsWith("getcount")) - { - sendSystemMessageTestingOnly(self, "Count is: '" + getCount(getLookAtTarget(self)) + "'"); - } - if (text.startsWith("getcommands")) - { - String[] commands = getCommandListingForPlayer(getLookAtTarget(self)); - sendSystemMessageTestingOnly(self, "Commands:"); - for (int i = 0; i < commands.length; i++) - { - sendSystemMessageTestingOnly(self, "'" + commands[i] + "'"); - } - } - if ((toLower(text)).startsWith("incapcount")) - { - int num = 0; - if (hasObjVar(getLookAtTarget(self), "combat.intIncapacitationCount")) - { - num = getIntObjVar(self, "combat.intIncapacitationCount"); - } - sendSystemMessageTestingOnly(self, "# of timers incap'd = " + num); - } - if ((toLower(text)).startsWith("damage")) - { - StringTokenizer st = new StringTokenizer(text); - if (st.countTokens() != 3) - { - return SCRIPT_CONTINUE; - } - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - return SCRIPT_CONTINUE; - } - String command = st.nextToken(); - String attribStr = st.nextToken(); - String amountStr = st.nextToken(); - attribute[] attrib = getAttribs(target); - int amount = utils.stringToInt(amountStr); - if (attribStr.equals("health")) - { - attrib[HEALTH] = new attribute(attrib[HEALTH].getType(), (attrib[HEALTH].getValue() - amount)); - } - else if (attribStr.equals("action")) - { - attrib[ACTION] = new attribute(attrib[ACTION].getType(), (attrib[ACTION].getValue() - amount)); - } - else if (attribStr.equals("mind")) - { - attrib[MIND] = new attribute(attrib[MIND].getType(), (attrib[MIND].getValue() - amount)); - } - else if (attribStr.equals("all")) - { - for (int i = 0; i < attrib.length; i += NUM_ATTRIBUTES_PER_GROUP) - { - attrib[i] = new attribute(attrib[i].getType(), (attrib[i].getValue() - amount)); - } - } - else - { - return SCRIPT_CONTINUE; - } - for (int j = 0; j < attrib.length; j += NUM_ATTRIBUTES_PER_GROUP) - { - if (attrib[j].getValue() < 1) - { - attrib[j] = new attribute(attrib[j].getType(), 1); - } - } - if (setAttribs(target, attrib)) - { - sendSystemMessageTestingOnly(self, "...target successully damaged..."); - } - return SCRIPT_CONTINUE; - } - if (text.startsWith("getniche")) - { - sendSystemMessageTestingOnly(self, "Niche for " + getLookAtTarget(self) + " = " + ai_lib.aiGetNiche(getLookAtTarget(self))); - } - if (text.startsWith("whichgroup")) - { - sendSystemMessageTestingOnly(self, "Group Object for " + getLookAtTarget(self) + " = " + getGroupObject(getLookAtTarget(self))); - } - if (text.startsWith("mobtest")) - { - sendSystemMessageTestingOnly(self, "isMob(" + getLookAtTarget(self) + ") = " + isMob(getLookAtTarget(self))); - } - if (text.startsWith("listdp")) - { - obj_id dp = utils.getPlayerDatapad(self); - obj_id[] things = getContents(dp); - for (int i = 0; i < things.length; i++) - { - sendSystemMessageTestingOnly(self, "Item[" + i + "] = " + things[i] + ", " + getTemplateName(things[i]) + ")"); - obj_id[] thingcontents = getContents(things[i]); - for (int x = 0; x < thingcontents.length; x++) - { - sendSystemMessageTestingOnly(self, "--Item[" + x + "] = " + thingcontents[x] + ", " + getTemplateName(thingcontents[x]) + ")"); - } - } - } - if (text.equals("packHouse")) - { - player_structure.packBuilding(self, getLookAtTarget(self)); - sendSystemMessageTestingOnly(self, "Did i crash"); - } - if (text.startsWith("cleandp")) - { - obj_id dp = utils.getPlayerDatapad(self); - obj_id[] things = getContents(dp); - for (int i = 0; i < things.length; i++) - { - destroyObject(things[i]); - } - sendSystemMessageTestingOnly(self, "DP cleaned."); - } - if (text.startsWith("sockets")) - { - setSkillModSockets(utils.stringToObjId("10590100"), 4); - } - if (text.startsWith("wcreate")) - { - StringTokenizer st = new StringTokenizer(text); - printTokens(st); - String name = ""; - if (st.hasMoreTokens()) - { - name = st.nextToken(); - } - float num = 1.0f; - if (st.hasMoreTokens()) - { - num = utils.stringToFloat(st.nextToken()); - } - LOG("weapons", "Creating weapon " + name + " at " + num + " capacity."); - weapons.createWeapon(name, speaker, weapons.VIA_SCHEMATIC, num); - return SCRIPT_CONTINUE; - } - if ((toLower(text)).equals("grant all weapon schematics")) - { - LOG("weapons", "Granting schematics"); - weapons.grantOrDenyAllWeaponSchematics("all", getLookAtTarget(self), weapons.VIA_SCHEMATIC, true); - return SCRIPT_CONTINUE; - } - if ((toLower(text)).equals("revoke all weapon schematics")) - { - LOG("weapons", "Revoking schematics"); - weapons.grantOrDenyAllWeaponSchematics("all", getLookAtTarget(self), weapons.VIA_SCHEMATIC, false); - return SCRIPT_CONTINUE; - } - if ((toLower(text)).equals("lootdata")) - { - LOG("loot", "Fetching loot data for object "); - obj_id item = getLookAtTarget(self); - if (!isIdValid(item)) - { - LOG("loot", "No valid lookat target to get loot data for..." + item); - return SCRIPT_CONTINUE; - } - dictionary weaponCraftingData = loot.getComponentData(item); - if (weaponCraftingData == null) - { - LOG("loot", "Couldn't find data for ..." + item); - return SCRIPT_CONTINUE; - } - LOG("loot", "Object loot data for " + item + " as follows:"); - LOG("loot", "---------------------------------------------"); - LOG("loot", weaponCraftingData.toString()); - return SCRIPT_CONTINUE; - } - if ((toLower(text)).startsWith("makelootweapon")) - { - LOG("loot", "Creating loot weapon for object "); - obj_id item = getLookAtTarget(self); - if (!isIdValid(item)) - { - LOG("loot", "No valid lookat target to transform into a loot item..." + item); - return SCRIPT_CONTINUE; - } - StringTokenizer st = new StringTokenizer(text); - printTokens(st); - String level = "1"; - if (st.hasMoreTokens()) - { - level = st.nextToken(); - } - int lev = utils.stringToInt(level); - if (lev < 1 || lev > 350) - { - LOG("loot", "Invalid level. Use 1 - 350"); - return SCRIPT_CONTINUE; - } - if (loot.randomizeWeapon(item, lev)) - { - LOG("loot", "Weapon " + item + " has been re-rolled as a level " + lev + " loot item."); - } - else - { - LOG("loot", "Weapon could not be initialized as a loot drop."); - } - } - if ((toLower(text)).startsWith("makelootarmor")) - { - LOG("loot", "Creating loot armor for object "); - obj_id item = getLookAtTarget(self); - if (!isIdValid(item)) - { - LOG("loot", "No valid lookat target to transform into a loot item..." + item); - return SCRIPT_CONTINUE; - } - StringTokenizer st = new StringTokenizer(text); - printTokens(st); - String level = "1"; - if (st.hasMoreTokens()) - { - level = st.nextToken(); - } - int lev = utils.stringToInt(level); - if (lev < 1 || lev > 350) - { - LOG("loot", "Invalid level. Use 1 - 350"); - return SCRIPT_CONTINUE; - } - if (loot.randomizeArmor(item, lev)) - { - LOG("loot", "Armor " + item + " has been re-rolled as a level " + lev + " loot item."); - } - else - { - LOG("loot", "Armor could not be initialized as a loot drop."); - } - } - if ((toLower(text)).startsWith("makelootcomponent")) - { - LOG("loot", "Creating loot component for object "); - obj_id item = getLookAtTarget(self); - if (!isIdValid(item)) - { - LOG("loot", "No valid lookat target to transform into a loot item..." + item); - return SCRIPT_CONTINUE; - } - StringTokenizer st = new StringTokenizer(text); - printTokens(st); - String level = "1"; - if (st.hasMoreTokens()) - { - level = st.nextToken(); - } - int lev = utils.stringToInt(level); - if (lev < 1 || lev > 350) - { - LOG("loot", "Invalid level. Use 1 - 350"); - return SCRIPT_CONTINUE; - } - if (loot.randomizeComponent(item, lev, utils.getInventoryContainer(self))) - { - LOG("loot", "Component " + item + " has been re-rolled as a level " + lev + " loot item."); - } - else - { - LOG("loot", "Component could not be initialized as a loot drop."); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/kai/particlebrowser.java b/sku.0/sys.server/compiled/game/script/working/kai/particlebrowser.java deleted file mode 100644 index b29b6f59f..000000000 --- a/sku.0/sys.server/compiled/game/script/working/kai/particlebrowser.java +++ /dev/null @@ -1,1383 +0,0 @@ -package script.working.kai; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.sui; -import script.library.utils; -import java.util.StringTokenizer; - -public class particlebrowser extends script.base_script -{ - public particlebrowser() - { - } - public static final String[] particles = new String[] - { - "a1-lighting.prt", - "a10-lighting.prt", - "a2-lighting.prt", - "a3-lighting.prt", - "a4-lighting.prt", - "a5-lighting.prt", - "a6-lighting.prt", - "a7-lighting.prt", - "a8-lighting.prt", - "a9-lighting.prt", - "blast_deflect.prt", - "footfall_2.prt", - "force_lightning.ltn", - "force_lightning_dark01.ltn", - "force_lightning_dark02.ltn", - "force_lightning_dark03.ltn", - "force_lightning_dark04.ltn", - "force_lightning_dark05.ltn", - "force_lightning_dark06.ltn", - "force_lightning_dark07.ltn", - "force_lightning_dark08.ltn", - "force_lightning_dark09.ltn", - "force_lightning_dark10.ltn", - "force_lightning_light01.ltn", - "force_lightning_light02.ltn", - "force_lightning_light03.ltn", - "force_lightning_light04.ltn", - "force_lightning_light05.ltn", - "force_lightning_light06.ltn", - "force_lightning_light07.ltn", - "force_lightning_light08.ltn", - "force_lightning_light09.ltn", - "force_lightning_light10.ltn", - "gunblast.prt", - "icon_heal.msh", - "info_disk.msh", - "must_dustdevil.prt", - "must_dustdevil_2.prt", - "must_dustdevil_3.prt", - "must_floating_embers.prt", - "must_jedi_rock.prt", - "must_jedi_rock_10.prt", - "must_jedi_rock_2.prt", - "must_jedi_rock_3.prt", - "must_jedi_rock_base.prt", - "must_jedi_rock_base2.prt", - "must_lava_bubble.prt", - "must_lava_falls01.prt", - "must_lava_falls_ribbon_15x45.prt", - "must_lava_falls_ribbon_15x80.prt", - "must_lava_falls_ribbon_20x175.prt", - "must_lava_falls_ribbon_20x37.prt", - "must_lava_falls_ribbon_20x45.prt", - "must_lava_falls_ribbon_20x56.prt", - "must_lava_falls_ribbon_20x75.prt", - "must_lava_falls_ribbon_25x111.prt", - "must_lava_falls_ribbon_25x220.prt", - "must_lava_falls_ribbon_25x50.prt", - "must_lava_falls_ribbon_25x65.prt", - "must_lava_falls_ribbon_30x140.prt", - "must_lava_falls_ribbon_30x40.prt", - "must_lava_falls_ribbon_40x114.prt", - "must_lava_falls_ribbon_40x220.prt", - "must_lava_fire.prt", - "must_lava_fire_base.prt", - "must_lava_flare.prt", - "must_lava_flare_crater.prt", - "must_lava_flare_interior.prt", - "must_lava_flare_small.prt", - "must_lighing_attack_clouds.prt", - "must_lightning_1.prt", - "must_lightning_2.prt", - "must_lightning_3.prt", - "must_lightning_attack.prt", - "must_smoke_plume01.prt", - "must_smoke_plume02.prt", - "must_steam_clouds.prt", - "must_steam_geyser.prt", - "must_steam_geyser_medium.prt", - "must_steam_geyser_medium_yellow.prt", - "must_steam_geyser_small.prt", - "must_steam_geyser_small_yellow.prt", - "must_steam_geyser_yellow.prt", - "particles.txt", - "path_arrow.msh", - "path_end.msh", - "pt_acid_trails.prt", - "pt_aiming_player.prt", - "pt_airport_race_light.prt", - "pt_airport_race_light_group.prt", - "pt_allum_mine_car_empty_s01.prt", - "pt_allum_mine_car_full_s01.prt", - "pt_animal_control.ltn", - "pt_animal_under_jedi_control.prt", - "pt_animating_gobi.prt", - "pt_atom_bolt.prt", - "pt_atom_bolt_rotate.prt", - "pt_aurora.prt", - "pt_avatar_selection_light.prt", - "pt_bacta_tank_lg_bubbles.prt", - "pt_ball_electric_bolt_green.prt", - "pt_ball_electric_bolt_green_sm.prt", - "pt_beam_acid.prt", - "pt_beam_flame_thrower.prt", - "pt_beam_flame_thrower_blue.prt", - "pt_beam_lightning.prt", - "pt_bezerk_player.prt", - "pt_bike_thruster.prt", - "pt_bike_thruster_2.prt", - "pt_birds_flock.prt", - "pt_birds_flock1.prt", - "pt_birds_flock_02.prt", - "pt_blast_deflect.prt", - "pt_blast_wave.prt", - "pt_blast_wave_build_up.prt", - "pt_bleeding_player.prt", - "pt_blinded_player.prt", - "pt_bls_1_blue_hit_creature_01.prt", - "pt_bls_1_blue_hit_other_01.prt", - "pt_bls_1_blue_miss_creature_01.prt", - "pt_bls_1_blue_miss_nothing_01.prt", - "pt_bls_1_blue_miss_other_01.prt", - "pt_bls_1_blue_miss_terrain.prt", - "pt_bls_1_blue_miss_water_01.prt", - "pt_bls_1_blue_muz_flash_01.prt", - "pt_bls_1_green_hit_creature_01.prt", - "pt_bls_1_green_hit_other_01.prt", - "pt_bls_1_green_miss_creature_01.prt", - "pt_bls_1_green_miss_nothing_01.prt", - "pt_bls_1_green_miss_other_01.prt", - "pt_bls_1_green_miss_terrain.prt", - "pt_bls_1_green_miss_water_01.prt", - "pt_bls_1_green_muz_flash_01.prt", - "pt_bls_1_red_hit_creature_01.prt", - "pt_bls_1_red_hit_other_01.prt", - "pt_bls_1_red_hit_water_01.prt", - "pt_bls_1_red_miss_creature_01.prt", - "pt_bls_1_red_miss_nothing_01.prt", - "pt_bls_1_red_miss_other_01.prt", - "pt_bls_1_red_miss_terrain.prt", - "pt_bls_1_red_miss_water_01.prt", - "pt_bls_1_red_muz_flash_01.prt", - "pt_bls_slug_trail.prt", - "pt_bolt_acid.prt", - "pt_bolt_black.prt", - "pt_bolt_blue.prt", - "pt_bolt_blue2green_pulse.prt", - "pt_bolt_blue3red_pulse.prt", - "pt_bolt_blue_gradient.prt", - "pt_bolt_blue_thin.prt", - "pt_bolt_bothan_bola.prt", - "pt_bolt_crossbow.prt", - "pt_bolt_disruptor.prt", - "pt_bolt_fireball.prt", - "pt_bolt_flechette.prt", - "pt_bolt_force_choke.ltn", - "pt_bolt_force_choke.prt", - "pt_bolt_green.prt", - "pt_bolt_ink_fire.prt", - "pt_bolt_ink_hit.prt", - "pt_bolt_ion_blaster.prt", - "pt_bolt_lightning.prt", - "pt_bolt_proton_carbine.prt", - "pt_bolt_proton_rifle.prt", - "pt_bolt_red.prt", - "pt_bolt_scatter.prt", - "pt_bolt_stun.prt", - "pt_bolt_taper_blue.prt", - "pt_bolt_taper_green.prt", - "pt_bolt_taper_red.prt", - "pt_bolt_turret_red.prt", - "pt_bolt_underslug_rotary_carbine.prt", - "pt_bubble_trail.prt", - "pt_bug_gun_bolt.prt", - "pt_bug_gun_fire.prt", - "pt_bug_gun_fire_2.prt", - "pt_bunker_allum_mine_car_01.prt", - "pt_bunker_allum_mine_car_sparks.prt", - "pt_bunker_allum_mine_hallway_vent_steam.prt", - "pt_bunker_allum_mine_large_steam_gravity.prt", - "pt_bunker_allum_mine_lift_01.prt", - "pt_burning_smokeandembers_large.prt", - "pt_burning_smokeandembers_md.prt", - "pt_burning_smoking_thruster_2.prt", - "pt_burning_smoking_thruster_3.prt", - "pt_burning_thruster.prt", - "pt_burning_thruster_2.prt", - "pt_burning_thruster_3.prt", - "pt_burning_thruster_sm.prt", - "pt_buzzing_insects_large.prt", - "pt_buzzing_insects_small.prt", - "pt_campfire_s01.prt", - "pt_campfire_smokeless_s01.prt", - "pt_candle_flame.prt", - "pt_cavein_dust_floor.prt", - "pt_cavein_dust_roof.prt", - "pt_center_star.prt", - "pt_chiss_backpack_mist.prt", - "pt_chiss_fog_backpack.prt", - "pt_chiss_fog_backpack_base.prt", - "pt_chiss_fog_backpack_hack.prt", - "pt_chiss_fog_backpack_headfog.prt", - "pt_chiss_fog_backpack_original.prt", - "pt_chiss_fog_backpack_spray.prt", - "pt_clone_compiler.prt", - "pt_clouds.prt", - "pt_cloud_cards_sparse.prt", - "pt_cloud_sparse.prt", - "pt_contrail_01.prt", - "pt_contrail_02.prt", - "pt_contrail_03.prt", - "pt_contrail_04.prt", - "pt_cover_player.prt", - "pt_cryoban_grenade.prt", - "pt_dath_mistyfalls_waterfall1.prt", - "pt_dath_mistyfalls_waterfall2.prt", - "pt_debuff_action.prt", - "pt_debuff_health.prt", - "pt_debuff_state.prt", - "pt_detector.prt", - "pt_disease_grenade.prt", - "pt_disease_grenade_hit.prt", - "pt_disease_player.prt", - "pt_distant_ships.prt", - "pt_distant_ships_imperial.prt", - "pt_distant_ships_rebel.prt", - "pt_distant_ships_sound_gunboat.prt", - "pt_distant_ships_sound_shuttle.prt", - "pt_distant_ships_sound_skyhopper.prt", - "pt_distant_ships_sound_supplyship.prt", - "pt_distant_ships_sound_tiefighter.prt", - "pt_distant_ships_sound_xwing.prt", - "pt_dizzy_player.prt", - "pt_door_force_field.prt", - "pt_drag_player.prt", - "pt_drain_force.ltn", - "pt_droideka_shield.prt", - "pt_dust_storm.prt", - "pt_dust_storm_heavy.prt", - "pt_dust_storm_heavy_a1.prt", - "pt_dust_storm_light.prt", - "pt_electricity.prt", - "pt_electric_2_sword.swh", - "pt_electric_sword.swh", - "pt_electric_trails.prt", - "pt_enraging_spur.prt", - "pt_entertainer_colorlights.prt", - "pt_entertainer_colorlights_a1.prt", - "pt_entertainer_colorlights_a2.prt", - "pt_entertainer_dazzle.prt", - "pt_entertainer_dazzle_a1.prt", - "pt_entertainer_dazzle_a2.prt", - "pt_entertainer_distract.prt", - "pt_entertainer_distract_a1.prt", - "pt_entertainer_distract_a2.prt", - "pt_entertainer_firejets.prt", - "pt_entertainer_firejets_a1.prt", - "pt_entertainer_firejets_a2.prt", - "pt_entertainer_glowstick.prt", - "pt_entertainer_ribbon_stick_double.prt", - "pt_entertainer_ribbon_stick_double_fancy.prt", - "pt_entertainer_ribbon_stick_double_sparky.prt", - "pt_entertainer_ribbon_stick_single.prt", - "pt_entertainer_ribbon_stick_single_fancy.prt", - "pt_entertainer_ribbon_stick_single_sparky.prt", - "pt_entertainer_smokebomb.prt", - "pt_entertainer_smokebomb_a1.prt", - "pt_entertainer_smokebomb_a2.prt", - "pt_entertainer_sparkler.prt", - "pt_entertainer_special_1.prt", - "pt_entertainer_special_2.prt", - "pt_entertainer_special_3.prt", - "pt_entertainer_special_4.prt", - "pt_entertainer_special_5.prt", - "pt_entertainer_special_6.prt", - "pt_entertainer_spotlight.prt", - "pt_entertainer_spotlight_a1.prt", - "pt_entertainer_spotlight_a2.prt", - "pt_entertainer_torch.prt", - "pt_entertainer_trailing_sparks.prt", - "pt_entertainer_ventriloquism.prt", - "pt_entertainer_ventriloquism_a1.prt", - "pt_entertainer_ventriloquism_a2.prt", - "pt_explosion_md.prt", - "pt_explosion_md_sound.prt", - "pt_falling_dirt.prt", - "pt_falling_dirt_loop.prt", - "pt_falling_dust.prt", - "pt_falling_dust_loop.prt", - "pt_falling_leaf.prt", - "pt_falling_rock.prt", - "pt_falling_rock_loop.prt", - "pt_find_path_end.prt", - "pt_find_path_glow.prt", - "pt_fireworks_01.prt", - "pt_fireworks_02.prt", - "pt_fireworks_03.prt", - "pt_fireworks_04.prt", - "pt_fireworks_05.prt", - "pt_fireworks_complete_s01_blast_blue.prt", - "pt_fireworks_complete_s02_trail_blast.prt", - "pt_fireworks_complete_s03_trail_shockwave.prt", - "pt_fireworks_complete_s04_ring.prt", - "pt_fireworks_complete_s05_ring_double.prt", - "pt_fireworks_complete_s10_chandelier.prt", - "pt_fireworks_complete_s11_blast_sphere.prt", - "pt_fireworks_complete_s18_flocking.prt", - "pt_fireworks_ground_01.prt", - "pt_fireworks_ground_02.prt", - "pt_fireworks_launch.prt", - "pt_fireworks_rocket_launch_s01.prt", - "pt_fireworks_s001.prt", - "pt_fireworks_secondary_blast_01.prt", - "pt_fireworks_secondary_blast_02.prt", - "pt_fireworks_secondary_blast_sphere_01.prt", - "pt_fireworks_secondary_chaser.prt", - "pt_fireworks_secondary_flash.prt", - "pt_fireworks_secondary_hanging_sparkles.prt", - "pt_fireworks_secondary_hanging_sparkles_cords.prt", - "pt_fireworks_secondary_shape_ornament.prt", - "pt_fireworks_secondary_shockwave.prt", - "pt_fireworks_secondary_shockwave2.prt", - "pt_fireworks_secondary_spiral.prt", - "pt_fireworks_secondary_spiral_01.prt", - "pt_fireworks_secondary_streaks.prt", - "pt_fireworks_secondary_trail_blast.prt", - "pt_fireworks_secondary_twirl.prt", - "pt_fireworks_trailing_sparks.prt", - "pt_fireworks_trailing_sparks_01.prt", - "pt_fireworks_trailing_sparks_01_streaks_sparkling.prt", - "pt_fireworks_trailing_sparks_02.prt", - "pt_fireworks_trailing_sparks_02_short_gen.prt", - "pt_fireworks_trailing_sparks_02_short_gen_green.prt", - "pt_fireworks_trailing_sparks_02_short_gen_trailing_sparks.prt", - "pt_fireworks_trailing_sparks_03.prt", - "pt_fireworks_trailing_sparks_04.prt", - "pt_fireworks_trailing_sparks_05.prt", - "pt_fireworks_trailing_sparks_05_second.prt", - "pt_fireworks_trailing_sparks_18.prt", - "pt_fireworks_trail_01.prt", - "pt_fireworks_trail_01_blue.prt", - "pt_fireworks_trail_01_green.prt", - "pt_fireworks_trail_01_red.prt", - "pt_fireworks_trail_01_violet.prt", - "pt_fireworks_trail_02.prt", - "pt_fireworks_trail_02_sparks.prt", - "pt_fireworks_trail_launch.prt", - "pt_firework_launch.prt", - "pt_flaming_sword.prt", - "pt_flare.prt", - "pt_flash_bomb.prt", - "pt_flash_shield.prt", - "pt_flickering_light_electricblue.prt", - "pt_flickering_light_flamecolored.prt", - "pt_flickering_light_green.prt", - "pt_flickering_light_orange.prt", - "pt_flickering_light_red.prt", - "pt_flocking_ant.prt", - "pt_flocking_bat.prt", - "pt_flocking_bees.prt", - "pt_flocking_beetles.prt", - "pt_flocking_black_red_beetle.prt", - "pt_flocking_bluefish.prt", - "pt_flocking_boweevils.prt", - "pt_flocking_butterflies.prt", - "pt_flocking_butterflies_01.prt", - "pt_flocking_butterflies_02.prt", - "pt_flocking_butterflies_03.prt", - "pt_flocking_butterflies_04.prt", - "pt_flocking_butterflies_a1.prt", - "pt_flocking_butterflies_a2.prt", - "pt_flocking_butterflies_s1.prt", - "pt_flocking_centipede.prt", - "pt_flocking_centipede_green.prt", - "pt_flocking_centipede_yellow.prt", - "pt_flocking_cricket.prt", - "pt_flocking_desert_worm.prt", - "pt_flocking_desert_worm_rotate.prt", - "pt_flocking_dragonfly_01.prt", - "pt_flocking_dragonfly_01_large.prt", - "pt_flocking_dragonfly_02.prt", - "pt_flocking_dragonfly_02_large.prt", - "pt_flocking_dragonfly_03.prt", - "pt_flocking_dragonfly_03_large.prt", - "pt_flocking_fish_2x4cage.prt", - "pt_flocking_flying_lava_fish.prt", - "pt_flocking_flying_lava_fish_flaming.prt", - "pt_flocking_flying_narwhal.prt", - "pt_flocking_flying_picketts_flock.prt", - "pt_flocking_frog.prt", - "pt_flocking_frog_s1.prt", - "pt_flocking_glowzees.prt", - "pt_flocking_greenfish.prt", - "pt_flocking_green_beetle.prt", - "pt_flocking_greyfish.prt", - "pt_flocking_hermitcrab.prt", - "pt_flocking_moth.prt", - "pt_flocking_moth_white.prt", - "pt_flocking_snails.prt", - "pt_flocking_willowisp.prt", - "pt_flocking_willowisp_single.prt", - "pt_flying_lava_fish_flock.prt", - "pt_fog.prt", - "pt_fog_barrier.prt", - "pt_fog_kashyyyk.prt", - "pt_fog_kashyyyk_deadforest.prt", - "pt_force_absorb.prt", - "pt_force_absorb_trigger.prt", - "pt_force_armor.prt", - "pt_force_armor_block.prt", - "pt_force_avoid_incapacitation.prt", - "pt_force_channel_force.prt", - "pt_force_choke.prt", - "pt_force_feedback.prt", - "pt_force_feedback_block.prt", - "pt_force_feedback_trigger.prt", - "pt_force_healingdamage_hit.ltn", - "pt_force_heal_self.prt", - "pt_force_intimidate.ltn", - "pt_force_knockdown.ltn", - "pt_force_knockdown.prt", - "pt_force_lightning_end.prt", - "pt_force_lightning_end_blast.prt", - "pt_force_lightning_end_clearaway.prt", - "pt_force_lightning_end_collect.prt", - "pt_force_lightning_end_small.prt", - "pt_force_lightning_end_wave.prt", - "pt_force_lightning_start.prt", - "pt_force_lightning_start_light.prt", - "pt_force_lightning_start_small.prt", - "pt_force_meditate.prt", - "pt_force_regain_consciousness.prt", - "pt_force_resist_bleed.prt", - "pt_force_resist_disease.prt", - "pt_force_resist_poison.prt", - "pt_force_resist_states.prt", - "pt_force_shield.prt", - "pt_force_speed.prt", - "pt_force_speed_activate.prt", - "pt_force_speed_moves.prt", - "pt_force_throw.ltn", - "pt_force_throw.prt", - "pt_force_throw_old.ltn", - "pt_force_throw_old.prt", - "pt_force_transfer_force.ltn", - "pt_force_weaken.prt", - "pt_force_weaken_hit.ltn", - "pt_force_weaken_hit.prt", - "pt_fountain_corl_brazier_round_s01.prt", - "pt_fountain_corl_circle_s01.prt", - "pt_fountain_corl_rectangle_s01.prt", - "pt_fountain_corl_statue_contemplate_s01.prt", - "pt_fountain_corl_statue_contemplate_s01_pee_pee.prt", - "pt_fountain_corl_statue_heroic_s01.prt", - "pt_fountain_naboo_style_1.prt", - "pt_fragmentation_grenade.prt", - "pt_frn_all_glowing_light_s3.prt", - "pt_geyser_01_l0.prt", - "pt_geyser_01_l1.prt", - "pt_geyser_01_l2.prt", - "pt_geyser_01_l3.prt", - "pt_geyser_center.prt", - "pt_glop_grenade.prt", - "pt_green_gunk_spurt.prt", - "pt_green_hanging_smoke.prt", - "pt_green_refrigerator_steam.prt", - "pt_green_steam.prt", - "pt_grievious_cellspawn.prt", - "pt_grievious_powerup.prt", - "pt_grievious_sparkplug.prt", - "pt_gunblast.prt", - "pt_haireffect_bouquetbouffant.prt", - "pt_haireffect_dark_jedi.prt", - "pt_haireffect_electricafro.prt", - "pt_haireffect_glamorous.prt", - "pt_haireffect_imperial_coin.prt", - "pt_haireffect_loverboy.prt", - "pt_haireffect_mosparkyhawk.prt", - "pt_haireffect_natureboy.prt", - "pt_haireffect_phonytail.prt", - "pt_haireffect_pussyface03.prt", - "pt_haireffect_rebel_coin.prt", - "pt_haireffect_scare_do.prt", - "pt_haireffect_shampooed.prt", - "pt_haireffect_sloshed.prt", - "pt_haireffect_ureeka.prt", - "pt_haireffect_warhorns.prt", - "pt_haireffect_weve_got_the_beat.prt", - "pt_heal.prt", - "pt_healingdamage_creature_fire.prt", - "pt_healingdamage_creature_hit.prt", - "pt_healingwounds_creature_fire.prt", - "pt_healingwounds_creature_hit.prt", - "pt_healing_grenade.prt", - "pt_healing_tree.prt", - "pt_healing_tree_start.prt", - "pt_healing_tree_swh.swh", - "pt_heal_1.prt", - "pt_heal_2.prt", - "pt_heal_action_buff.prt", - "pt_heal_aoe.prt", - "pt_heal_health_buff.prt", - "pt_heal_health_buff_1.prt", - "pt_heal_health_buff_2.prt", - "pt_heal_mind_buff.prt", - "pt_heal_over_time.prt", - "pt_heal_over_time_1.prt", - "pt_heal_over_time_2.prt", - "pt_heal_resist_disease.prt", - "pt_heal_resist_poison.prt", - "pt_heal_resist_states.prt", - "pt_heal_resuscitate.prt", - "pt_heal_revive.prt", - "pt_heal_speed_buff.prt", - "pt_heal_state.prt", - "pt_heal_wound.prt", - "pt_heavy_particle_beam.ltn", - "pt_heavy_particle_beam_end.prt", - "pt_heavy_particle_beam_start.prt", - "pt_hit_flash_cannon_elite_flash,prt.prt", - "pt_hit_rancor_rock.prt", - "pt_hit_simian_ape_rock.prt", - "pt_hit_simian_monkey_rock.prt", - "pt_hovering_landspeeder.prt", - "pt_immobilized_player.prt", - "pt_imperial_detonator.prt", - "pt_imperial_detonator_a1.prt", - "pt_info_tie_fighter_xwing_circle.prt", - "pt_insect_and_bile_grenade.prt", - "pt_intimidate_creature_fire.prt", - "pt_intimidate_creature_hit.prt", - "pt_intro_shuttle_debris.prt", - "pt_intro_shuttle_debris2.prt", - "pt_intro_shuttle_debris3.prt", - "pt_intro_shuttle_large_sparks.prt", - "pt_intro_shuttle_sparks.prt", - "pt_intro_trailing_sparks.prt", - "pt_invisible_particle.prt", - "pt_jar_of_bats.prt", - "pt_jar_of_bees.prt", - "pt_jar_of_butterflies.prt", - "pt_jar_of_flies.prt", - "pt_jar_of_glowzees.prt", - "pt_jar_of_moths.prt", - "pt_jar_of_snakes.prt", - "pt_jedi_force_lightning.prt", - "pt_jetpack_thruster.prt", - "pt_jumping_fish_s01.prt", - "pt_jumping_fish_s02.prt", - "pt_jumping_fish_s03.prt", - "pt_kash_birds_flock_rryatt.prt", - "pt_lair_evil_fire_large_green.prt", - "pt_lair_evil_fire_large_red.prt", - "pt_lair_evil_fire_small.prt", - "pt_lair_med_burn.prt", - "pt_lair_med_damage.prt", - "pt_landspeeder_thruster.prt", - "pt_landspeeder_thruster_faint.prt", - "pt_large_beam.prt", - "pt_large_beam_warm_up.prt", - "pt_laser_blue.prt", - "pt_laser_green.prt", - "pt_laser_red.prt", - "pt_lava_additive_smoke.prt", - "pt_lava_cannon.prt", - "pt_lava_cannon_ground_collision.prt", - "pt_lava_player_burning.prt", - "pt_leaf_water.prt", - "pt_level_up.prt", - "pt_lg_blast_dirt.prt", - "pt_lg_explosion.prt", - "pt_lightening.prt", - "pt_lightning_cannon.ltn", - "pt_lightning_cannon.swh", - "pt_lightning_cannon_end.prt", - "pt_lightning_cannon_hit.prt", - "pt_lightning_cannon_hit_secondary.prt", - "pt_lightning_cannon_hit_spread.prt", - "pt_lightning_nebulae_start.prt", - "pt_lightsaber_graze.prt", - "pt_lightsaber_strike.prt", - "pt_lightsaber_strike_heavy.prt", - "pt_light_blink_blue.prt", - "pt_light_blink_green.prt", - "pt_light_blink_orange.prt", - "pt_light_blink_yellow.prt", - "pt_light_constant_blue.prt", - "pt_light_indoor_glow.prt", - "pt_light_lightning_cannon.prt", - "pt_light_pulse_blue.prt", - "pt_light_sm_lamp_blue.prt", - "pt_light_sm_lamp_gold.prt", - "pt_light_streetlamp_blue.prt", - "pt_light_streetlamp_gold.prt", - "pt_light_streetlamp_green.prt", - "pt_light_streetlamp_red.prt", - "pt_lok_lava_bubblingareaprt.prt", - "pt_lok_lava_drop.prt", - "pt_lok_lava_spirt.prt", - "pt_lok_lava_spirt_random.prt", - "pt_lok_volcano.prt", - "pt_lok_volcano_smoke.prt", - "pt_lok_volcano_smoke_sm.prt", - "pt_magic_sparks.prt", - "pt_md_explosion_a1.prt", - "pt_md_explosion_a2.prt", - "pt_md_explosion_a3.prt", - "pt_md_explosion_a5.prt", - "pt_md_explosion_dirt.prt", - "pt_md_explosion_dirt_2.prt", - "pt_medic_healing_energy.prt", - "pt_medic_healing_energy_area.prt", - "pt_miasma_fog_chiss_orange.prt", - "pt_miasma_fog_chiss_orange_end.prt", - "pt_miasma_of_fog_gray.prt", - "pt_miasma_of_fog_greenish.prt", - "pt_miasma_of_fog_mustard.prt", - "pt_miasma_of_fog_orange.prt", - "pt_miasma_of_fog_red.prt", - "pt_mind_blast.ltn", - "pt_mine_explosion.prt", - "pt_mine_warning.prt", - "pt_mist_2_trail.prt", - "pt_mist_trail.prt", - "pt_music_flourish01.prt", - "pt_music_flourish03.prt", - "pt_music_flourish05.prt", - "pt_music_flourish07.prt", - "pt_music_flourish09.prt", - "pt_music_flourish11.prt", - "pt_music_flourish13.prt", - "pt_music_flourish15.prt", - "pt_music_flourish_01.prt", - "pt_music_flourish_high_01.prt", - "pt_music_flourish_low_01.prt", - "pt_music_flourish_low_03.prt", - "pt_music_flourish_low_05.prt", - "pt_music_flourish_low_07.prt", - "pt_music_flourish_low_09.prt", - "pt_music_flourish_medium_01.prt", - "pt_music_flourish_sequence_01.prt", - "pt_music_loop_01.prt", - "pt_music_loop_boring.prt", - "pt_music_loop_entertaining.prt", - "pt_music_loop_slow_01.prt", - "pt_music_not_listening_to.prt", - "pt_music_paused.prt", - "pt_mustafar_crystal_destruction.prt", - "pt_mustafar_crystal_drain.prt", - "pt_mustafar_crystal_drain_base.prt", - "pt_mustafar_crystal_drain_dot.prt", - "pt_mustafar_crystal_drain_flare.prt", - "pt_mustafar_crystal_drain_soul.prt", - "pt_mustafar_crystal_drain_soul_swoosh.swh", - "pt_mustafar_distant_volcano_01.prt", - "pt_mustafar_distant_volcano_02.prt", - "pt_mustafar_distant_volcano_03.prt", - "pt_newbie_airport_sign.prt", - "pt_newbie_arrow.prt", - "pt_newbie_bombed_spot.prt", - "pt_newbie_bomb_debris.prt", - "pt_newbie_hanging_smoke.prt", - "pt_newbie_refrigerator_steam.prt", - "pt_newbie_siren.prt", - "pt_newbie_spotlight.prt", - "pt_newbie_steam.prt", - "pt_newbie_wall_mech_lights_blue.prt", - "pt_newbie_wall_mech_lights_red.prt", - "pt_newbie_wall_mech_lights_yellow.prt", - "pt_noise_maker_grenade.prt", - "pt_obi_wan_appear.prt", - "pt_obi_wan_disappear.prt", - "pt_onfire_player.prt", - "pt_partydroid_bubbles.prt", - "pt_partydroid_confetti_bombs.prt", - "pt_partydroid_doves.prt", - "pt_partydroid_dryice.prt", - "pt_partydroid_electricfloor.prt", - "pt_partydroid_electricfog.prt", - "pt_partydroid_foam.prt", - "pt_partydroid_fogmachine.prt", - "pt_partydroid_lasers.prt", - "pt_partydroid_mindbloom.prt", - "pt_poison_grenade.prt", - "pt_poison_grenade_hit.prt", - "pt_poison_player.prt", - "pt_poi_broken_electronics.prt", - "pt_poi_droid_weld_sparks.prt", - "pt_poi_electricity_2x2.prt", - "pt_poi_pillar_electricity.prt", - "pt_pollen.prt", - "pt_probot_delivery.prt", - "pt_proton_grenade.prt", - "pt_psg_hit_mark_1.prt", - "pt_psg_hit_mark_2.prt", - "pt_psg_hit_mark_3.prt", - "pt_psg_on_mark_1.prt", - "pt_psg_on_mark_2.prt", - "pt_psg_on_mark_3.prt", - "pt_rainbow_bolt.swh", - "pt_rainbow_sword.swh", - "pt_rain_drop.prt", - "pt_rain_sheet_heavy.prt", - "pt_rain_sheet_light.prt", - "pt_rain_sheet_verylight.prt", - "pt_rallied_player.prt", - "pt_ring_trail.prt", - "pt_rocket_1_muz_flash.prt", - "pt_rocket_barrage.prt", - "pt_rocket_barrage_wind_up.prt", - "pt_rocket_smoke.prt", - "pt_rocket_tracer.prt", - "pt_rocket_trail_black_smoke.prt", - "pt_rotating_starfield.prt", - "pt_skill_level_up.prt", - "pt_skill_up.prt", - "pt_skill_up_base.prt", - "pt_sky_battle_tie_bomber_vs_bwing.prt", - "pt_sky_battle_tie_bomber_vs_bwing_2.prt", - "pt_sky_battle_tie_bomber_vs_bwing_3.prt", - "pt_sky_battle_tie_interceptor_vs_awing.prt", - "pt_sky_battle_tie_interceptor_vs_awing_2.prt", - "pt_sky_battle_tie_interceptor_vs_awing_3.prt", - "pt_sky_battle_tie_vs_player_shuttle.prt", - "pt_sky_battle_tie_vs_xwing.prt", - "pt_sky_battle_tie_vs_xwing_2.prt", - "pt_sky_battle_tie_vs_xwing_3.prt", - "pt_sky_battle_x_wing_vs_lambda_shuttle.prt", - "pt_slg_1_hit_creature.prt", - "pt_slg_1_hit_other_01.prt", - "pt_slg_1_miss_creature.prt", - "pt_slg_1_miss_nothing_01.prt", - "pt_slg_1_miss_other_01.prt", - "pt_slg_1_miss_terrain.prt", - "pt_slg_1_miss_water.prt", - "pt_slg_1_muz_flash_01.prt", - "pt_slime_drop_nosound.prt", - "pt_slime_drop_sound.prt", - "pt_smoke.prt", - "pt_smoke_large.prt", - "pt_smoke_puff.prt", - "pt_smoke_puff_sm.prt", - "pt_smoke_small.prt", - "pt_smoke_tr.prt", - "pt_smoking_thruster_heavy.prt", - "pt_smoking_thruster_light.prt", - "pt_sm_explosion.prt", - "pt_sonic_pulse.prt", - "pt_sound_location.prt", - "pt_sound_veh_distant_skyhopper.prt", - "pt_sparking_blast_md.prt", - "pt_sparking_blast_thruster.prt", - "pt_sparkling_thruster.prt", - "pt_sparkling_trail.prt", - "pt_sparks_fountatin.prt", - "pt_sparks_large.prt", - "pt_sparks_small.prt", - "pt_special_attack_aim.prt", - "pt_special_attack_bleed.prt", - "pt_special_attack_bleed_trail.prt", - "pt_special_attack_blind.prt", - "pt_special_attack_concuss.prt", - "pt_special_attack_concuss_trail.prt", - "pt_special_attack_cone.prt", - "pt_special_attack_confusion.prt", - "pt_special_attack_confusion_trail.prt", - "pt_special_attack_cover.prt", - "pt_special_attack_defensive_bonus.prt", - "pt_special_attack_defensive_bonus_trail.prt", - "pt_special_attack_disable.prt", - "pt_special_attack_dizzy.prt", - "pt_special_attack_fastblast.prt", - "pt_special_attack_intimidate.prt", - "pt_special_attack_knockdown.prt", - "pt_special_attack_knockdown_trail.prt", - "pt_special_attack_overcharge.prt", - "pt_special_attack_overcharge_trail.prt", - "pt_special_attack_pointblank.prt", - "pt_special_attack_power.prt", - "pt_special_attack_power_trail.prt", - "pt_special_attack_slow.prt", - "pt_special_attack_slow_trail.prt", - "pt_special_attack_snipe.prt", - "pt_special_attack_startle.prt", - "pt_special_attack_stun.prt", - "pt_special_attack_stun_trail.prt", - "pt_special_attack_volley_fire.prt", - "pt_special_attack_warcry.prt", - "pt_special_hit_bleed.prt", - "pt_special_hit_blind.prt", - "pt_special_hit_concuss.prt", - "pt_special_hit_confusion.prt", - "pt_special_hit_dizzy.prt", - "pt_special_hit_heavy.prt", - "pt_special_hit_light.prt", - "pt_special_hit_medium.prt", - "pt_special_hit_power.prt", - "pt_special_hit_slow.prt", - "pt_special_hit_startle.prt", - "pt_special_hit_stun.prt", - "pt_spit_green_lg.prt", - "pt_spit_green_sm.prt", - "pt_spit_green_spray_sm.prt", - "pt_spit_hit_green.prt", - "pt_spit_hit_red.prt", - "pt_spit_hit_yellow.prt", - "pt_spit_red_lg.prt", - "pt_spit_red_sm.prt", - "pt_spit_red_spray_sm.prt", - "pt_spit_toxicgreen_lg.prt", - "pt_spit_toxicgreen_sm.prt", - "pt_spit_toxicgreen_spray_sm.prt", - "pt_spit_yellow_lg.prt", - "pt_spit_yellow_sm.prt", - "pt_spit_yellow_spray_sm.prt", - "pt_splash.prt", - "pt_sp_placeholder.prt", - "pt_states_circle.prt", - "pt_state_all.prt", - "pt_state_all_new.prt", - "pt_state_berserk.prt", - "pt_state_berserk_temp.prt", - "pt_state_berserk_tr.prt", - "pt_state_bleeding.prt", - "pt_state_bleeding_circle.prt", - "pt_state_bleeding_old.prt", - "pt_state_bleeding_tr.prt", - "pt_state_blind.prt", - "pt_state_cantattack.prt", - "pt_state_cantmove.prt", - "pt_state_centered.prt", - "pt_state_dazed.prt", - "pt_state_diseased.prt", - "pt_state_diseased_circle.prt", - "pt_state_diseased_old.prt", - "pt_state_diseased_tr.prt", - "pt_state_dizzy.prt", - "pt_state_intimidated.prt", - "pt_state_knockdown.prt", - "pt_state_knockdown_tr.prt", - "pt_state_onfire.prt", - "pt_state_onfire_tr.prt", - "pt_state_placeholder.prt", - "pt_state_poisoned.prt", - "pt_state_poisoned_tr.prt", - "pt_state_slowedattack.prt", - "pt_state_slowedmove.prt", - "pt_state_stunned.prt", - "pt_state_warcry.prt", - "pt_steam.prt", - "pt_steam_rise.prt", - "pt_steam_rise_2x2.prt", - "pt_stunned_player.prt", - "pt_survey.prt", - "pt_survey_gas_sample.prt", - "pt_survey_liquid_sample.prt", - "pt_survey_lumber_sample.prt", - "pt_survey_mineral_sample.prt", - "pt_survey_moisture_sample.prt", - "pt_survey_tool_liquid.prt", - "pt_survey_tool_lumber.prt", - "pt_survey_tool_mineral.prt", - "pt_survey_tool_moisture.prt", - "pt_sword_brightglow.prt", - "pt_sword_glint", - "pt_sword_glint.prt", - "pt_sword_glow.prt", - "pt_takeoff_radius.prt", - "pt_tar_bubbles.prt", - "pt_tar_spirt.prt", - "pt_taunt_creature_fire.prt", - "pt_taunt_creature_hit.prt", - "pt_thermal_detonator.prt", - "pt_throw_rancor_rock.prt", - "pt_throw_simian_ape_rock.prt", - "pt_throw_simian_monkey_rock.prt", - "pt_trailing_ambient_butterfly.prt", - "pt_trailing_animal_under_jedi_control.prt", - "pt_trailing_beam_flame_thrower.prt", - "pt_trailing_beam_flame_thrower_blue.prt", - "pt_trailing_beam_flame_thrower_drops.prt", - "pt_trailing_beam_flame_thrower_drops_blue.prt", - "pt_trailing_beetle_stink.prt", - "pt_trailing_birds.prt", - "pt_trailing_blast_wave.prt", - "pt_trailing_bolt_fireball_drops.prt", - "pt_trailing_bolt_scatter.prt", - "pt_trailing_bolt_stun.prt", - "pt_trailing_bug_gun_fire.prt", - "pt_trailing_cloud.prt", - "pt_trailing_cloud_2.prt", - "pt_trailing_cloud_card_01.prt", - "pt_trailing_cryoban_ice_shards.prt", - "pt_trailing_distant_air_speeder_1.prt", - "pt_trailing_distant_air_speeder_2.prt", - "pt_trailing_distant_air_taxi.prt", - "pt_trailing_distant_assaultship.prt", - "pt_trailing_distant_a_wing.prt", - "pt_trailing_distant_b_wing.prt", - "pt_trailing_distant_freighter_a.prt", - "pt_trailing_distant_freighter_b.prt", - "pt_trailing_distant_freighter_c.prt", - "pt_trailing_distant_lambda_shuttle.prt", - "pt_trailing_distant_supplyship.prt", - "pt_trailing_distant_tie_bomber.prt", - "pt_trailing_distant_tie_bombers2.prt", - "pt_trailing_distant_tie_bombers3.prt", - "pt_trailing_distant_tie_fighter.prt", - "pt_trailing_distant_tie_fighters2.prt", - "pt_trailing_distant_tie_fighters3.prt", - "pt_trailing_distant_tie_interceptor.prt", - "pt_trailing_distant_tie_interceptors2.prt", - "pt_trailing_distant_tie_interceptors3.prt", - "pt_trailing_distant_transport.prt", - "pt_trailing_distant_x_wing.prt", - "pt_trailing_dust_storm.prt", - "pt_trailing_dust_storm_light.prt", - "pt_trailing_entertainer_distract.prt", - "pt_trailing_entertainer_distract_a2.prt", - "pt_trailing_entertainer_distract_fullsmoke.prt", - "pt_trailing_entertainer_firejets.prt", - "pt_trailing_entertainer_firejets_a1.prt", - "pt_trailing_entertainer_firejets_a1_sparks.prt", - "pt_trailing_entertainer_firejets_a2.prt", - "pt_trailing_entertainer_firejets_a2_burst.prt", - "pt_trailing_entertainer_firejets_a2_sparks.prt", - "pt_trailing_entertainer_ventriloquism.prt", - "pt_trailing_entertainer_ventriloquism_a1.prt", - "pt_trailing_entertainer_ventriloquism_a2.prt", - "pt_trailing_falling_dust.prt", - "pt_trailing_falling_dust_2.prt", - "pt_trailing_falling_leaf.prt", - "pt_trailing_find_path_glow.prt", - "pt_trailing_firework_lg_streaked_sparks_blue.prt", - "pt_trailing_firework_lg_streaked_sparks_red.prt", - "pt_trailing_firework_lg_streaked_sparks_whte.prt", - "pt_trailing_fish_splash.prt", - "pt_trailing_flocking_desert_worm.prt", - "pt_trailing_flocking_flying_lava_fish.prt", - "pt_trailing_force_absorb.prt", - "pt_trailing_force_absorb_trigger.prt", - "pt_trailing_force_armor.prt", - "pt_trailing_force_channel_force.prt", - "pt_trailing_force_healingdamage_hit.prt", - "pt_trailing_force_healing_self.prt", - "pt_trailing_force_lightning_end_blast.prt", - "pt_trailing_force_meditate.prt", - "pt_trailing_force_regain_consciousness.prt", - "pt_trailing_force_shield.prt", - "pt_trailing_force_speed.prt", - "pt_trailing_force_throw.prt", - "pt_trailing_fragmentation_dust.prt", - "pt_trailing_glop_grenade.prt", - "pt_trailing_glop_grenade_spray.prt", - "pt_trailing_grenade.prt", - "pt_trailing_haireffect_glamorous.prt", - "pt_trailing_haireffect_sloshed.prt", - "pt_trailing_haireffect_weve_got_the_beat.prt", - "pt_trailing_healingdamage_creature.prt", - "pt_trailing_healingdamage_creature_hit.prt", - "pt_trailing_healingwounds_creature.prt", - "pt_trailing_healingwounds_creature_hit.prt", - "pt_trailing_insect_and_bile.prt", - "pt_trailing_intimidate_creature.prt", - "pt_trailing_intimidate_creature_hit.prt", - "pt_trailing_jedi_force_lightning.prt", - "pt_trailing_jumping_fish01.prt", - "pt_trailing_jumping_fish02.prt", - "pt_trailing_jumping_fish03.prt", - "pt_trailing_leaves.prt", - "pt_trailing_lightsaber_strike_3.prt", - "pt_trailing_md_explosion_a4_smoke.prt", - "pt_trailing_md_explosion_a4_smoke_2.prt", - "pt_trailing_md_explosion_dirt.prt", - "pt_trailing_mustafar_crystal_drain.prt", - "pt_trailing_partydroid_confetti_bombs.prt", - "pt_trailing_partydroid_electricfog.prt", - "pt_trailing_partydroid_electricring4.prt", - "pt_trailing_partydroid_lasers.prt", - "pt_trailing_partydroid_mindbloom.prt", - "pt_trailing_partydroid_mindbloom_twinkles.prt", - "pt_trailing_poi_coil_electricity.prt", - "pt_trailing_poi_electricity_2x2.prt", - "pt_trailing_poi_explosion.prt", - "pt_trailing_psg_hit_mark_1.prt", - "pt_trailing_psg_hit_mark_2.prt", - "pt_trailing_psg_hit_mark_3.prt", - "pt_trailing_psg_on_mark_1.prt", - "pt_trailing_psg_on_mark_2.prt", - "pt_trailing_psg_on_mark_3.prt", - "pt_trailing_rocket_barrage.prt", - "pt_trailing_rocket_barrage_falling_rocket.prt", - "pt_trailing_rocket_barrage_wind_up.prt", - "pt_trailing_rocket_tracer.prt", - "pt_trailing_shooting_sparks.prt", - "pt_trailing_siren_sm.prt", - "pt_trailing_sky_battle_tie_bolts.prt", - "pt_trailing_sky_battle_tie_vs_x-wing.prt", - "pt_trailing_sky_battle_tie_vs_x-wing_2.prt", - "pt_trailing_sky_battle_tie_vs_x-wing_2_fire.prt", - "pt_trailing_sky_battle_tie_vs_x-wing_3.prt", - "pt_trailing_sky_battle_tie_vs_x-wing_3_poof.prt", - "pt_trailing_sky_battle_tie_vs_x-wing_3_poof_trails.prt", - "pt_trailing_smokeandembers_weightless_lg_a1.prt", - "pt_trailing_smokeandembers_weightless_lg_a2.prt", - "pt_trailing_smokeandembers_weightless_lg_a4.prt", - "pt_trailing_smoke_asteroids.prt", - "pt_trailing_smoke_grey.prt", - "pt_trailing_smoke_grey_burning.prt", - "pt_trailing_smoke_weightless_lg.prt", - "pt_trailing_sparks.prt", - "pt_trailing_sparks_blue.prt", - "pt_trailing_sparks_green.prt", - "pt_trailing_sparks_red.prt", - "pt_trailing_sparks_weightless.prt", - "pt_trailing_sparks_weightless_lg.prt", - "pt_trailing_survey_gas_sample.prt", - "pt_trailing_survey_gas_sample_a1.prt", - "pt_trailing_survey_liquid_sample.prt", - "pt_trailing_survey_liquid_sample_a1.prt", - "pt_trailing_survey_lumber_sample_.prt", - "pt_trailing_survey_mineral_sample_.prt", - "pt_trailing_survey_moisture_sample.prt", - "pt_trailing_tar_bubbles.prt", - "pt_trailing_tar_bubbles_group.prt", - "pt_trailing_tar_spirt.prt", - "pt_trailing_taunt_creature.prt", - "pt_trailing_taunt_creature_hit.prt", - "pt_trailing_ui_force_effect.prt", - "pt_trailing_water_rings.prt", - "pt_trailing_webber_spray.prt", - "pt_trailing_whitesparks_lg.prt", - "pt_trailing_whitesparks_med.prt", - "pt_tranquilizing_dart.prt", - "pt_transport_thruster.prt", - "pt_transport_thruster02.prt", - "pt_tr_entertainer_special_2.prt", - "pt_tr_entertainer_special_5.prt", - "pt_turret_0_miss_terrain.prt", - "pt_turtle_floating.prt", - "pt_turtle_floating_swimming.prt", - "pt_ui_firecracker.prt", - "pt_ui_firecracker_explosion.prt", - "pt_ui_fog.prt", - "pt_ui_force_effect.prt", - "pt_ui_force_lightning_effect.prt", - "pt_ui_gloppy.prt", - "pt_ui_gloppy_01.prt", - "pt_ui_gloppy_02.prt", - "pt_ui_halo.prt", - "pt_ui_lines.prt", - "pt_ui_rotating_lines.prt", - "pt_ui_scanlines.prt", - "pt_ui_sparkly.prt", - "pt_ui_sparkly2.prt", - "pt_ui_sparks.prt", - "pt_ui_subtle_glow.prt", - "pt_vehicle_dust_trail.prt", - "pt_vehicle_water_trail.prt", - "pt_warcry_player.prt", - "pt_waterbugs.prt", - "pt_waterfalling_200m.prt", - "pt_waterfallling_slow.prt", - "pt_waterfall_crest.prt", - "pt_waterfall_kashyyyk_10x4.prt", - "pt_waterfall_kashyyyk_20x20.prt", - "pt_waterfall_kashyyyk_20x33.prt", - "pt_waterfall_kashyyyk_20x43.prt", - "pt_waterfall_kashyyyk_20x50.prt", - "pt_waterfall_kashyyyk_5x30.prt", - "pt_waterfall_kashyyyk_5x50.prt", - "pt_waterfall_kashyyyk_all_s01.prt", - "pt_waterfall_mist.prt", - "pt_waterfall_mist_med.prt", - "pt_waterfall_mist_small.prt", - "pt_waterfall_spray.prt", - "pt_waterfall_spray_small.prt", - "pt_waterfall_whitewater_s02_l0.prt", - "pt_waterfall_whitewater_s02_l1.prt", - "pt_water_drop_base.prt", - "pt_water_drop_multi.prt", - "pt_water_drop_nosound.prt", - "pt_water_drop_sound.prt", - "pt_water_rings.prt", - "pt_waypoint_ai_s01_blue.prt", - "pt_waypoint_ai_s01_cyan.prt", - "pt_waypoint_ai_s01_green.prt", - "pt_waypoint_ai_s01_orange.prt", - "pt_waypoint_ai_s01_red.prt", - "pt_waypoint_ai_s01_violet.prt", - "pt_waypoint_ai_s01_white.prt", - "pt_waypoint_ai_s01_yellow.prt", - "pt_waypoint_ai_s02_blue.prt", - "pt_waypoint_ai_s02_cyan.prt", - "pt_waypoint_ai_s02_green.prt", - "pt_waypoint_ai_s02_orange.prt", - "pt_waypoint_ai_s02_red.prt", - "pt_waypoint_ai_s02_violet.prt", - "pt_waypoint_ai_s02_white.prt", - "pt_waypoint_ai_s02_yellow.prt", - "pt_waypoint_blue.prt", - "pt_waypoint_green.prt", - "pt_waypoint_orange.prt", - "pt_waypoint_red.prt", - "pt_waypoint_white.prt", - "pt_waypoint_yellow.prt", - "pt_weather_asteroid_shower.prt", - "pt_weather_asteroid_shower_single.prt", - "pt_webber.prt", - "pt_whitesparks_lg.prt", - "pt_whitesparks_med.prt", - "pt_whitesparks_small.prt", - "pt_wind_up.prt", - "pt_wp_bolt_carbine.prt", - "pt_wp_bolt_mode1.prt", - "pt_wp_bolt_mode2.prt", - "pt_wp_bolt_mode3.prt", - "pt_wp_bolt_pistol.prt", - "pt_wp_bolt_rifle.prt", - "pt_wp_hit_acid.prt", - "pt_wp_hit_carbine.prt", - "pt_wp_hit_cold.prt", - "pt_wp_hit_electric.prt", - "pt_wp_hit_energy.prt", - "pt_wp_hit_heat.prt", - "pt_wp_hit_kinetic.prt", - "pt_wp_hit_launcher.prt", - "pt_wp_hit_mode1.prt", - "pt_wp_hit_mode2.prt", - "pt_wp_hit_mode3.prt", - "pt_wp_hit_pistol.prt", - "pt_wp_hit_rifle.prt", - "pt_wp_hit_ring.prt", - "pt_wp_miss_creature.prt", - "pt_wp_miss_nothing.prt", - "pt_wp_miss_other.prt", - "pt_wp_miss_terrain.prt", - "pt_wp_miss_water.prt", - "pt_wp_muzzle_carbine.prt", - "pt_wp_muzzle_mode1.prt", - "pt_wp_muzzle_mode2.prt", - "pt_wp_muzzle_mode3.prt", - "pt_wp_muzzle_pistol.prt", - "pt_wp_muzzle_rifle.prt", - "pt_wp_pistol_launcher_pistol_bolt.prt", - "pt_wp_pistol_launcher_pistol_trailing_flock.prt", - "pt_wp_pistol_launcher_pistol_trailing_smoke.prt", - "skill_up_swh.swh", - "space_info_disk.msh", - "sw_acid_spray_green.swh", - "sw_basic_bloody_red.swh", - "sw_basic_subtle_red.swh", - "sw_basic_white.swh", - "sw_bowcaster_color_bands_green.swh", - "sw_bubble_bolt.swh", - "sw_color_bands.swh", - "sw_color_bands_blue.swh", - "sw_color_bands_purple.swh", - "sw_color_bands_subtle.swh", - "sw_entertainer_purple.swh", - "sw_entertainer_sparkly.swh", - "sw_flaming_sword.swh", - "sw_glowing_streaked_blur_purple.swh", - "sw_glowstick.swh", - "sw_light_saber_red.swh", - "sw_light_saber_white.swh", - "sw_lines.swh", - "sw_lines_nightsister.swh", - "sw_metalpolearm.swh", - "sw_mode1.swh", - "sw_mode2.swh", - "sw_mode3.swh", - "sw_polearm_brown.swh", - "sw_polearm_dark_brown.swh", - "sw_red_ribbon.swh", - "sw_rings_bolt.swh", - "sw_simple_punch_white.swh", - "sw_smoke_animated.swh", - "sw_soft_white.swh", - "sw_sparkling_sword.swh", - "sw_stoneknife.swh", - "sw_streaked.swh", - "sw_streaked_blur_purple.swh", - "sw_streaked_glow.swh", - "sw_streaky_glow_coolwhite.swh", - "sw_trailing_find_path_glow.swh", - "sw_vibroaxe.swh", - "sw_vibrolance.swh", - "sw_woodpolearm_color_bands.swh", - "test_dustpoof.prt", - "test_flamethrower.prt", - "pt_artillerystrike.prt", - "pt_aerialstrike.prt", - "pt_acidfield_medium.prt", - "pt_firefield_medium.prt", - "pt_poisonfield_medium.prt", - "pt_electricalfield_medium.prt", - "pt_lavafield_medium.prt", - "pt_webbomb.prt", - "pt_razornet.prt", - "pt_mancatcher.prt", - "pt_spiketrap.prt", - "pt_tanglebomb.prt", - "pt_razorwire.prt", - "pt_orbitalstrike.prt", - "pt_phosporous_grenade.prt", - "pt_shii_cho_strike.prt", - "pt_focused_strike.prt", - "pt_atarufocus.prt", - "pt_centeredstrike.prt", - "pt_centerofbeing.prt", - "pt_force_lightning_start_forcebolt.prt", - "pt_maskashi_focus.prt", - "pt_maskashi_focus_base.prt", - "pt_grenade_shock.prt", - "pt_grenade_compression.prt", - "pt_grenade_seismic.prt", - "ui_waypoint.spr" - }; - public void cleanScriptVars(obj_id player) throws InterruptedException - { - obj_id self = getSelf(); - utils.removeScriptVarTree(player, "particlebrowser"); - utils.removeScriptVarTree(self, "particlebrowser"); - setObjVar(player, "particlebrowser", true); - } - public void closeOldWindow(obj_id player) throws InterruptedException - { - String playerPath = "particlebrowser."; - if (utils.hasScriptVar(player, "particlebrowser.pid")) - { - int oldpid = utils.getIntScriptVar(player, "particlebrowser.pid"); - forceCloseSUIPage(oldpid); - utils.removeScriptVar(player, "particlebrowser.pid"); - } - } - public void setWindowPid(obj_id player, int pid) throws InterruptedException - { - if (pid > -1) - { - utils.setScriptVar(player, "particlebrowser.pid", pid); - } - } - public void showWindow(obj_id player, Vector items) throws InterruptedException - { - closeOldWindow(player); - int pid = sui.listbox(player, player, "Select Particle", sui.OK_CANCEL, "Particle Browser", items, "msgParticleBrowser", true); - sui.showSUIPage(pid); - setWindowPid(player, pid); - } - public void showWindow(obj_id player, String[] items) throws InterruptedException - { - closeOldWindow(player); - int pid = sui.listbox(player, player, "Select Particle", sui.OK_CANCEL, "Particle Browser", items, "msgParticleBrowser", true); - sui.showSUIPage(pid); - setWindowPid(player, pid); - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (speaker != self) - { - return SCRIPT_CONTINUE; - } - text = toLower(text); - if (text.startsWith("showparticles")) - { - String filter = "all"; - String filter2 = "all"; - StringTokenizer st = new StringTokenizer(text); - int tokenCount = st.countTokens(); - if (tokenCount > 1) - { - st.nextToken(); - filter = st.nextToken(); - } - else if (utils.hasScriptVar(speaker, "particlebrowser.filter")) - { - filter = utils.getStringScriptVar(speaker, "particlebrowser.filter"); - } - if (tokenCount > 2) - { - filter2 = st.nextToken(); - } - else if (utils.hasScriptVar(speaker, "particlebrowser.filter2")) - { - filter2 = utils.getStringScriptVar(speaker, "particlebrowser.filter2"); - } - if (filter.length() < 1) - { - filter = "all"; - } - if (filter2.length() < 1) - { - filter2 = "all"; - } - utils.setScriptVar(speaker, "particlebrowser.filter", filter); - utils.setScriptVar(speaker, "particlebrowser.filter2", filter2); - Vector itms = new Vector(); - for (int i = 0; i < particles.length; i++) - { - if ((filter.equals("all") || particles[i].indexOf(filter) > -1) && (filter2.equals("all") || particles[i].indexOf(filter2) > -1)) - { - itms.add(particles[i]); - } - } - sendSystemMessageTestingOnly(speaker, "Found " + itms.size() + " particles that fit your filters of '" + filter + "' and '" + filter2); - showWindow(speaker, itms); - utils.setBatchScriptVar(speaker, "particlebrowser", itms); - } - return SCRIPT_CONTINUE; - } - public int msgParticleBrowser(obj_id self, dictionary params) throws InterruptedException - { - if ((params == null) || (params.isEmpty())) - { - return SCRIPT_CONTINUE; - } - obj_id player = sui.getPlayerId(params); - int btn = sui.getIntButtonPressed(params); - int idx = sui.getListboxSelectedRow(params); - if (btn == sui.BP_CANCEL) - { - cleanScriptVars(player); - closeOldWindow(player); - return SCRIPT_CONTINUE; - } - Vector itms = utils.getResizeableStringBatchScriptVar(player, "particlebrowser"); - if (idx >= itms.size()) - { - cleanScriptVars(player); - closeOldWindow(player); - return SCRIPT_CONTINUE; - } - utils.setScriptVar(player, "particlebrowser.index", idx); - String particle = (String)itms.get(idx); - obj_id target = getLookAtTarget(player); - if (!isIdValid(target)) - { - target = self; - } - playClientEffectLoc(target, "appearance/" + particle, getLocation(target), 0.0f); - sendSystemMessageTestingOnly(player, "Playing particle " + particle); - int startIdx = 0; - if (utils.hasScriptVar(player, "particlebrowser.index")) - { - - } - - { - startIdx = utils.getIntScriptVar(player, "particlebrowser.index"); - } - while (startIdx > 0) - { - itms.add(itms.get(0)); - itms.removeElementAt(0); - startIdx--; - } - utils.setBatchScriptVar(player, "particlebrowser", itms); - showWindow(player, itms); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/rdelashmit/city_test.java b/sku.0/sys.server/compiled/game/script/working/rdelashmit/city_test.java deleted file mode 100644 index 049e5baeb..000000000 --- a/sku.0/sys.server/compiled/game/script/working/rdelashmit/city_test.java +++ /dev/null @@ -1,119 +0,0 @@ -package script.working.rdelashmit; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class city_test extends script.base_script -{ - public city_test() - { - } - public obj_id getPlayerByName(obj_id actor, String name) throws InterruptedException - { - java.util.StringTokenizer st = new java.util.StringTokenizer(name); - String compareName = toLower(st.nextToken()); - obj_id[] players = getPlayerCreaturesInRange(actor, 128.0f); - if (players != null) - { - for (int i = 0; i < players.length; ++i) - { - java.util.StringTokenizer st2 = new java.util.StringTokenizer(getName(players[i])); - String playerName = toLower(st2.nextToken()); - if (compareName.equals(playerName)) - { - return players[i]; - } - } - } - return obj_id.NULL_ID; - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "city test script attached."); - return SCRIPT_CONTINUE; - } - public int OnCityChanged(obj_id self, int oldCityId, int newCityId) throws InterruptedException - { - if (oldCityId != 0) - { - debugSpeakMsg(self, "Leaving city " + cityGetName(oldCityId)); - } - if (newCityId != 0) - { - debugSpeakMsg(self, "Entering city " + cityGetName(newCityId)); - } - return SCRIPT_CONTINUE; - } - public void registerCloningFacilities() throws InterruptedException - { - int[] cityIds = getAllCityIds(); - for (int i = 0; i < cityIds.length; ++i) - { - int cityId = cityIds[i]; - location cityLoc = cityGetLocation(cityId); - location cloneLoc = cityGetCloneLoc(cityId); - location cloneRespawn = cityGetCloneRespawn(cityId); - obj_id cloneId = cityGetCloneId(cityId); - if (isIdValid(cloneId)) - { - obj_id planet = getPlanetByName(cityLoc.area); - if (isIdValid(planet)) - { - dictionary params = new dictionary(); - params.put("id", cloneId); - params.put("loc", cloneLoc); - params.put("respawn", cloneRespawn); - messageTo(planet, "registerCloningFacility", params, 1.0f, false); - } - } - } - } - public void dumpInfo(obj_id self, int cityId) throws InterruptedException - { - debugSpeakMsg(self, "City name=" + cityGetName(cityId) + " hall=" + cityGetCityHall(cityId) + " loc=" + cityGetLocation(cityId) + " radius=" + cityGetRadius(cityId) + " leader=" + cityGetLeader(cityId) + " incomeTax=" + cityGetIncomeTax(cityId) + " propertyTax=" + cityGetPropertyTax(cityId) + " salesTax=" + cityGetSalesTax(cityId) + " cloneLoc=" + cityGetCloneLoc(cityId) + " cloneRespawn=" + cityGetCloneRespawn(cityId) + " cloneId=" + cityGetCloneId(cityId)); - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (speaker != self) - { - return SCRIPT_CONTINUE; - } - if (text.startsWith("city ")) - { - java.util.StringTokenizer st = new java.util.StringTokenizer(text); - st.nextToken(); - int cityId = getCityAtLocation(getLocation(speaker), 0); - String tok = st.nextToken(); - if (tok.equals("create")) - { - createCity(st.nextToken(), speaker, getLocation(speaker), 128, speaker, 1, 2, 3, new location(), 0, false, new location(), new location(), obj_id.NULL_ID); - } - else if (tok.equals("destroy")) - { - removeCity(cityId); - } - else if (tok.equals("info")) - { - dumpInfo(speaker, getCityAtLocation(getLocation(speaker), 0)); - } - else if (tok.equals("militia")) - { - citySetCitizenInfo(cityId, speaker, getName(speaker), speaker, 1); - } - else if (tok.equals("citizen")) - { - citySetCitizenInfo(cityId, speaker, getName(speaker), speaker, 0); - } - else if (tok.equals("register")) - { - registerCloningFacilities(); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/rdelashmit/guild_test.java b/sku.0/sys.server/compiled/game/script/working/rdelashmit/guild_test.java deleted file mode 100644 index a9031d27d..000000000 --- a/sku.0/sys.server/compiled/game/script/working/rdelashmit/guild_test.java +++ /dev/null @@ -1,105 +0,0 @@ -package script.working.rdelashmit; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.guild; - -public class guild_test extends script.base_script -{ - public guild_test() - { - } - public obj_id getPlayerByName(obj_id actor, String name) throws InterruptedException - { - java.util.StringTokenizer st = new java.util.StringTokenizer(name); - String compareName = toLower(st.nextToken()); - obj_id[] players = getPlayerCreaturesInRange(actor, 128.0f); - if (players != null) - { - for (int i = 0; i < players.length; ++i) - { - java.util.StringTokenizer st2 = new java.util.StringTokenizer(getName(players[i])); - String playerName = toLower(st2.nextToken()); - if (compareName.equals(playerName)) - { - return players[i]; - } - } - } - return obj_id.NULL_ID; - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "guild test script attached."); - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (speaker != self) - { - return SCRIPT_CONTINUE; - } - if (text.startsWith("guild ")) - { - java.util.StringTokenizer st = new java.util.StringTokenizer(text); - st.nextToken(); - int guildId = getGuildId(speaker); - String tok = st.nextToken(); - if (tok.equals("create")) - { - guild.create(speaker, st.nextToken(), st.nextToken()); - } - else if (tok.equals("disband")) - { - guild.disband(guildId, speaker); - } - else if (tok.equals("info")) - { - guild.dumpInfo(guildId, speaker); - } - else if (tok.equals("accept")) - { - guild.accept(guildId, speaker, st.nextToken()); - } - else if (tok.equals("kick")) - { - guild.kick(guildId, speaker, st.nextToken()); - } - else if (tok.equals("title")) - { - guild.title(guildId, speaker, st.nextToken(), st.nextToken()); - } - else if (tok.equals("namechange")) - { - guild.nameChange(guildId, speaker, st.nextToken(), st.nextToken()); - } - else if (tok.equals("allegiance")) - { - guild.allegiance(speaker, st.nextToken()); - } - else if (tok.equals("war")) - { - guild.war(guildId, speaker, st.nextToken()); - } - else if (tok.equals("peace")) - { - guild.peace(guildId, speaker, st.nextToken()); - } - else if (tok.equals("maintain_update")) - { - messageTo(getMasterGuildObject(), "forceUpdateGuilds", null, 0, false); - } - else if (tok.equals("maintain_namechange")) - { - messageTo(getMasterGuildObject(), "forceUpdateGuildNameChanges", null, 0, false); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/rdelashmit/new_ship_launch.java b/sku.0/sys.server/compiled/game/script/working/rdelashmit/new_ship_launch.java deleted file mode 100644 index 74ededf06..000000000 --- a/sku.0/sys.server/compiled/game/script/working/rdelashmit/new_ship_launch.java +++ /dev/null @@ -1,193 +0,0 @@ -package script.working.rdelashmit; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; -import script.library.space_utils; -import script.library.space_transition; - -public class new_ship_launch extends script.base_script -{ - public new_ship_launch() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equalsIgnoreCase("beginLaunch")) - { - obj_id scd = space_utils.hasUsableShip(self); - if (isIdValid(scd)) - { - obj_id ship = space_transition.getShipFromShipControlDevice(scd); - if (isIdValid(ship)) - { - beginLaunch(self, ship, new location(100.f, 0.f, 100.f, "space_tatooine")); - } - } - } - else if (text.equalsIgnoreCase("confirmLaunch")) - { - confirmLaunch(self); - } - else if (text.equalsIgnoreCase("finishLaunch")) - { - finishLaunch(self); - } - return SCRIPT_CONTINUE; - } - public void beginLaunch(obj_id player, obj_id ship, location destination) throws InterruptedException - { - Vector potentialPassengers = null; - Vector shipStartLocations = space_transition.getShipStartLocations(ship); - if (shipStartLocations != null && shipStartLocations.size() > 0) - { - obj_id playerBuilding = getTopMostContainer(player); - obj_id group = getGroupObject(player); - if (isIdValid(group)) - { - obj_id[] groupMembers = getGroupMemberIds(group); - for (int i = 0; i < groupMembers.length; ++i) - { - obj_id groupMember = groupMembers[i]; - if (groupMember != player && exists(groupMember) && getTopMostContainer(groupMember) == playerBuilding) - { - potentialPassengers = utils.addElement(potentialPassengers, groupMember); - } - } - } - } - Vector launchees = null; - launchees = utils.addElement(launchees, player); - utils.setScriptVar(player, "launch.launchees", launchees); - utils.setScriptVar(player, "launch.ship", ship); - utils.setScriptVar(player, "launch.destination", destination); - if (potentialPassengers != null) - { - for (int i = 0; i < potentialPassengers.size(); ++i) - { - dictionary params = new dictionary(); - params.put("launcher", player); - messageTo(((obj_id)potentialPassengers.get(i)), "inviteForPobShipLaunch", params, 0, false); - } - } - else - { - finishLaunch(player); - } - } - public int inviteForPobShipLaunch(obj_id self, dictionary params) throws InterruptedException - { - obj_id launcher = params.getObjId("launcher"); - prose_package pp = new prose_package(); - pp.actor.set(getName(launcher)); - pp.stringId = new string_id("space/space_interaction", "invite_for_launch"); - sendSystemMessageProse(self, pp); - utils.setScriptVar(self, "launch.launcher", launcher); - return SCRIPT_CONTINUE; - } - public void confirmLaunch(obj_id player) throws InterruptedException - { - obj_id launcher = utils.getObjIdScriptVar(player, "launch.launcher"); - if (isIdValid(launcher)) - { - dictionary params = new dictionary(); - params.put("launchee", player); - messageTo(launcher, "confirmForPobShipLaunch", params, 0, false); - } - utils.removeScriptVar(player, "launch.launcher"); - } - public int confirmForPobShipLaunch(obj_id self, dictionary params) throws InterruptedException - { - obj_id launchee = params.getObjId("launchee"); - Vector launchees = utils.getResizeableObjIdArrayScriptVar(self, "launch.launchees"); - if (launchees != null) - { - launchees = utils.addElement(launchees, launchee); - utils.setScriptVar(self, "launch.launchees", launchees); - prose_package pp = new prose_package(); - pp.actor.set(getName(launchee)); - pp.stringId = new string_id("space/space_interaction", "confirm_for_launch"); - sendSystemMessageProse(self, pp); - } - return SCRIPT_CONTINUE; - } - public void finishLaunch(obj_id player) throws InterruptedException - { - Vector launchees = utils.getResizeableObjIdArrayScriptVar(player, "launch.launchees"); - obj_id ship = utils.getObjIdScriptVar(player, "launch.ship"); - location destination = utils.getLocationScriptVar(player, "launch.destination"); - location groundLoc = getLocation(getTopMostContainer(player)); - Vector groupMembersToWarp = utils.addElement(null, player); - Vector groupMemberStartIndex = utils.addElement(null, 0); - Vector shipStartLocations = space_transition.getShipStartLocations(ship); - if (shipStartLocations != null && shipStartLocations.size() > 0) - { - int startIndex = 0; - obj_id playerBuilding = getTopMostContainer(player); - obj_id group = getGroupObject(player); - if (isIdValid(group)) - { - obj_id[] groupMembers = getGroupMemberIds(group); - for (int i = 1; i < launchees.size(); ++i) - { - obj_id launchee = ((obj_id)launchees.get(i)); - boolean ok = false; - for (int j = 0; j < groupMembers.length; ++j) - { - if (groupMembers[j] == launchee && exists(launchee) && getTopMostContainer(launchee) == playerBuilding) - { - ok = true; - } - } - if (ok) - { - startIndex = getNextStartIndex(shipStartLocations, startIndex); - if (startIndex <= shipStartLocations.size()) - { - groupMembersToWarp = utils.addElement(groupMembersToWarp, ((obj_id)launchees.get(i))); - groupMemberStartIndex = utils.addElement(groupMemberStartIndex, startIndex); - } - } - } - } - } - launch(groupMembersToWarp, groupMemberStartIndex, ship, destination, groundLoc); - } - public void launch(Vector players, Vector playerStartIndex, obj_id ship, location destination, location groundLoc) throws InterruptedException - { - for (int i = 0; i < players.size(); ++i) - { - launch(((obj_id)players.get(i)), ((Integer)playerStartIndex.get(i)).intValue(), ship, destination, groundLoc); - } - } - public void launch(obj_id player, int playerStartIndex, obj_id ship, location destination, location groundLoc) throws InterruptedException - { - utils.removeScriptVar(player, "launch.ship"); - utils.removeScriptVar(player, "launch.destination"); - utils.removeScriptVar(player, "launch.launcher"); - utils.removeScriptVar(player, "launch.launchees"); - space_transition.setLaunchInfo(player, ship, playerStartIndex, groundLoc); - warpPlayer(player, destination.area, destination.x, destination.y, destination.z, null, destination.x, destination.y, destination.z); - } - public int getNextStartIndex(Vector shipStartLocations, int lastStartIndex) throws InterruptedException - { - int startIndex = lastStartIndex + 1; - if (startIndex > shipStartLocations.size()) - { - for (startIndex = 1; startIndex <= shipStartLocations.size(); ++startIndex) - { - if (((location)shipStartLocations.get(startIndex - 1)).cell != null) - { - break; - } - } - } - return startIndex; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/rdelashmit/ship_faction_debug.java b/sku.0/sys.server/compiled/game/script/working/rdelashmit/ship_faction_debug.java deleted file mode 100644 index bf1e49e09..000000000 --- a/sku.0/sys.server/compiled/game/script/working/rdelashmit/ship_faction_debug.java +++ /dev/null @@ -1,91 +0,0 @@ -package script.working.rdelashmit; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.space_transition; - -public class ship_faction_debug extends script.base_script -{ - public ship_faction_debug() - { - } - public static final String[] factionStrings = - { - "aynat", - "beta_neutral", - "blacksun", - "borvo", - "civilian", - "corsec", - "hutt", - "imperial", - "jabba", - "merchant", - "nym", - "pirate", - "rebel", - "rebel_suspect", - "rsf", - "smuggler", - "spynet", - "station", - "true_neutral", - "unattackable", - "valarian" - }; - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equalsIgnoreCase("targetfactioninfo")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - sendSystemMessageTestingOnly(self, "Target something, then say targetfactioninfo again."); - } - else - { - sendSystemMessageTestingOnly(self, "Target Faction Info for " + target); - int faction = shipGetSpaceFaction(target); - int[] allies = shipGetSpaceFactionAllies(target); - int[] enemies = shipGetSpaceFactionEnemies(target); - boolean isAggro = shipGetSpaceFactionIsAggro(target); - boolean isEnemy = pvpIsEnemy(target, space_transition.getContainingShip(self)); - sendSystemMessageTestingOnly(self, "Faction: " + faction + " (" + getFactionString(faction) + ")"); - if (allies != null) - { - for (int i = 0; i < allies.length; ++i) - { - sendSystemMessageTestingOnly(self, "AlliedFaction: " + allies[i] + " (" + getFactionString(allies[i]) + ")"); - } - } - if (enemies != null) - { - for (int i = 0; i < enemies.length; ++i) - { - sendSystemMessageTestingOnly(self, "EnemyFaction: " + enemies[i] + " (" + getFactionString(enemies[i]) + ")"); - } - } - sendSystemMessageTestingOnly(self, "IsAggro: " + isAggro + " isEnemy: " + isEnemy); - } - return SCRIPT_OVERRIDE; - } - return SCRIPT_CONTINUE; - } - public String getFactionString(int faction) throws InterruptedException - { - for (int i = 0; i < factionStrings.length; ++i) - { - if (getStringCrc(factionStrings[i]) == faction) - { - return factionStrings[i]; - } - } - return "<< unknown >>"; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/reecetest.java b/sku.0/sys.server/compiled/game/script/working/reecetest.java deleted file mode 100644 index efbc40dd7..000000000 --- a/sku.0/sys.server/compiled/game/script/working/reecetest.java +++ /dev/null @@ -1,971 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.ai_lib; -import script.library.battlefield; -import script.library.bio_engineer; -import script.library.buff; -import script.library.create; -import script.library.dot; -import script.library.features; -import script.library.hq; -import script.library.locations; -import script.library.mustafar; -import script.library.pclib; -import script.library.pet_lib; -import script.library.prose; -import script.library.player_structure; -import script.library.regions; -import script.library.skill; -import script.library.utils; -import script.library.space_crafting; -import script.library.space_transition; - -public class reecetest extends script.base_script -{ - public reecetest() - { - } - public static final int SPAWN_TEMPLATE_CHECK_DISTANCE = 128; - public static final int SPAWN_CHECK_TEMPLATE_LIMIT = 140; - public static final int SPAWN_THEATER_CHECK_DISTANCE = 200; - public static final int SPAWN_CHECK_DISTANCE = 64; - public static final int SPAWN_CHECK_LIMIT = 15; - public static final int SPAWN_CHECK_THEATER_LIMIT = 1; - public int checkDifficulty(obj_id self, dictionary params) throws InterruptedException - { - int intRawDifficulty = getLevel(self); - sendSystemMessageTestingOnly(self, "getLevel returned " + intRawDifficulty); - if (intRawDifficulty == 0) - { - sendSystemMessageTestingOnly(self, "you lost your difficulty!"); - deltadictionary dctScriptVars = self.getScriptVars(); - sendSystemMessageTestingOnly(self, "Scriptvars are " + dctScriptVars.toString()); - } - messageTo(self, "checkDifficulty", null, 3, false); - return SCRIPT_CONTINUE; - } - public void setupJediTrainer(obj_id self) throws InterruptedException - { - final String[] TRAINER_TYPES = - { - "trainer_brawler" - }; - String strPrimaryCategory = "trainer"; - String strSecondaryCategory = TRAINER_TYPES[rand(0, TRAINER_TYPES.length - 1)]; - map_location[] mapLocations = getPlanetaryMapLocations(strPrimaryCategory, strSecondaryCategory); - if ((mapLocations == null) || (mapLocations.length == 0)) - { - location locTest = getLocation(self); - LOG("DESIGNER_FATAL", "JEDI : For planet " + locTest.area + ", primary category : " + strPrimaryCategory + " and secondary category " + strSecondaryCategory + " No planetary map location was found"); - return; - } - int intRoll = rand(0, mapLocations.length - 1); - location locHome = getLocation(self); - location locTest = new location(); - locTest.x = mapLocations[intRoll].getX(); - locTest.z = mapLocations[intRoll].getY(); - locTest.area = locHome.area; - setObjVar(self, "jedi.locTrainerLocation", locTest); - return; - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (objSpeaker != self) - { - return SCRIPT_CONTINUE; - } - if (strText.equals("name")) - { - obj_id target = getLookAtTarget(self); - if (target != null) - { - String creatureName = getCreatureName(target); - sendSystemMessageTestingOnly(self, "creatureName = " + creatureName); - } - } - if (strText.equals("level")) - { - obj_id target = getLookAtTarget(self); - if (target != null) - { - ai_lib.creatureLevelUp(target, self); - } - } - if (strText.equals("stats")) - { - sendSystemMessageTestingOnly(self, "Action = " + getMaxAttrib(self, ACTION) + " Mind = " + getMaxAttrib(self, MIND)); - sendSystemMessageTestingOnly(self, "Stamina = " + getMaxAttrib(self, STAMINA) + " Constitution = " + getMaxAttrib(self, CONSTITUTION)); - } - if (strText.equals("cef1")) - { - playClientEffectObj(self, "clienteffect/mustafar/som_force_crystal_drain.cef", self, ""); - sendSystemMessageTestingOnly(self, "CEF 1 !!!!!!!!!"); - } - if (strText.equals("cef2")) - { - playClientEffectObj(self, "clienteffect/mustafar/som_force_crystal_buff.cef", self, ""); - sendSystemMessageTestingOnly(self, "CEF 2 !!!!!!!!!"); - } - if (strText.equals("cef3")) - { - playClientEffectObj(self, "clienteffect/mustafar/som_force_crystal_destruction.cef", self, ""); - sendSystemMessageTestingOnly(self, "CEF 3 !!!!!!!!!"); - } - if (strText.equals("cef4")) - { - playClientEffectObj(self, "clienteffect/mustafar/som_dark_jedi_laugh.cef", self, ""); - sendSystemMessageTestingOnly(self, "CEF 4 !!!!!!!!!"); - } - if (strText.equals("test")) - { - obj_id dungeon = getTopMostContainer(self); - obj_id crystal = utils.getObjIdScriptVar(dungeon, "crystal"); - messageTo(crystal, "crystalTest1", null, 1, false); - sendSystemMessageTestingOnly(self, "TEST !!!!!!!!!"); - } - if (strText.equals("test2")) - { - obj_id target = getLookAtTarget(self); - if (target != null) - { - messageTo(target, "crystalTest2", null, 1, false); - } - sendSystemMessageTestingOnly(self, "TEST2 !!!!!!!!!"); - } - if (strText.equals("attach")) - { - attachScript(self, "theme_park.dungeon.mustafar_trials.obiwan_finale.obiwan_quest_monitor"); - if (hasScript(self, "theme_park.dungeon.mustafar_trials.obiwan_finale.obiwan_quest_monitor")) - { - sendSystemMessageTestingOnly(self, "script attached"); - } - } - if (strText.equals("detach")) - { - if (detachScript(self, "theme_park.dungeon.mustafar_trials.obiwan_finale.obiwan_quest_monitor")) - { - sendSystemMessageTestingOnly(self, "script detatched"); - } - } - if (strText.equals("fireone")) - { - attachScript(self, "theme_park.dungeon.mustafar_trials.obiwan_finale.obiwan_quest_monitor"); - sendSystemMessageTestingOnly(self, "fireone"); - if (mustafar.canCallObiwan(self)) - { - mustafar.callObiwan(self, true); - sendSystemMessageTestingOnly(self, "callingObiwan"); - } - else - { - setObjVar(self, "waitingOnObiwan", 1); - messageTo(self, "recallObiwanDelay", null, 180, false); - sendSystemMessageTestingOnly(self, "recallObiwanDelay"); - } - sendSystemMessageTestingOnly(self, "firetwo"); - } - if (strText.equals("firetwo")) - { - sendSystemMessageTestingOnly(self, "firetwo"); - utils.setScriptVar(self, "sawObiwanAtLauncher", 1); - } - if (strText.equals("hittem")) - { - sendSystemMessageTestingOnly(self, "hittem"); - obj_id target = getLookAtTarget(self); - if (target != null) - { - obj_id weapon = getCurrentWeapon(self); - hit_result cbtHitData = new hit_result(); - cbtHitData.success = true; - cbtHitData.baseRoll = 50; - cbtHitData.finalRoll = 100; - cbtHitData.hitLocation = rand(0, 5); - cbtHitData.canSee = true; - cbtHitData.damage = 5000; - cbtHitData.bleedingChance = 0; - doDamage(self, target, weapon, cbtHitData); - } - } - if (strText.equals("cbuff")) - { - buff.applyBuff(self, "crystal_buff"); - sendSystemMessageTestingOnly(self, "I C'BUFFED YA!"); - } - if (strText.equals("dbuff")) - { - buff.removeAllBuffs(self); - sendSystemMessageTestingOnly(self, "I D'BUFFED YA!"); - } - if (strText.equals("reforce")) - { - sendSystemMessageTestingOnly(self, "reforce start"); - obj_id target = getLookAtTarget(self); - if (target != null) - { - messageTo(target, "specialForcePowerAttackWindup", null, rand(10, 20), false); - } - sendSystemMessageTestingOnly(self, "reforce done"); - } - if (strText.equals("bossman")) - { - obj_id target = getLookAtTarget(self); - if (target != null) - { - if (utils.hasScriptVar(target, "dungeon")) - { - sendSystemMessageTestingOnly(self, "got dungeon objid. going to spawn BOSS."); - obj_id dungeon = utils.getObjIdScriptVar(target, "dungeon"); - spawnContents(dungeon, "boss", 1); - } - } - } - if (strText.equals("currentScene")) - { - String scene = getCurrentSceneName(); - sendSystemMessageTestingOnly(self, "current scene name is: " + scene); - } - if (strText.equals("locations")) - { - for (int i = 0; i < 4; i++) - { - location here = getLocation(self); - location spawnLoc = locations.getGoodLocationAroundLocation(here, 1f, 1f, 4f, 4f); - if (spawnLoc == null) - { - sendSystemMessageTestingOnly(self, " spawnLoc was NULL "); - spawnLoc = here; - } - sendSystemMessageTestingOnly(self, "found location #" + i + " and it was at: " + spawnLoc); - } - } - if (strText.equals("expansion")) - { - if (features.hasTrialsOfObiwanExpansion(self)) - { - sendSystemMessageTestingOnly(self, " YEE HAW! GOT MUSTAFAR"); - } - else - { - sendSystemMessageTestingOnly(self, "No mustafar expansion detected"); - } - if (features.hasEpisode3PreOrderDigitalDownload(self)) - { - sendSystemMessageTestingOnly(self, " YEE HAW! EP3 Preorder"); - } - else - { - sendSystemMessageTestingOnly(self, "No EP3 pre-order expansion detected"); - } - } - if (strText.equals("petcount")) - { - obj_id target = getLookAtTarget(self); - if (target != null) - { - int petcount = pet_lib.getMaxStoredPets(target); - sendSystemMessageTestingOnly(self, " Got pet count. It was: " + petcount); - } - } - if (strText.equals("patroller")) - { - location here = getLocation(self); - obj_id spawn = create.object("fbase_stormtrooper", here); - obj_id base = player_structure.getStructure(self); - String[] base_cells = getCellNames(base); - location[] locs = new location[base_cells.length]; - for (int i = 0; i < base_cells.length; i++) - { - locs[i] = getGoodLocation(base, base_cells[i]); - } - ai_lib.setPatrolPath(spawn, locs); - } - if (strText.equals("conditionon")) - { - obj_id target = getLookAtTarget(self); - if (target != null) - { - hq.activateHackAlarms(target, true); - hq.activateDestructAlarms(target, true); - sendSystemMessageTestingOnly(self, "alarm!"); - } - } - if (strText.equals("conditionoff")) - { - obj_id target = getLookAtTarget(self); - if (target != null) - { - hq.activateHackAlarms(target, false); - hq.activateDestructAlarms(target, false); - sendSystemMessageTestingOnly(self, "alarm! off"); - } - } - if (strText.equals("respawnalarms")) - { - obj_id target = getLookAtTarget(self); - if (target != null) - { - hq.cleanupBaseAlarmUnits(target); - hq.spawnAlarmUnits(target); - sendSystemMessageTestingOnly(self, "alarm! RESPAWN!"); - } - } - if (strText.equals("disableobj")) - { - obj_id target = getLookAtTarget(self); - sendSystemMessageTestingOnly(self, "disabled objective! target is: " + target); - if (target != null) - { - hq.disableObjective(target); - sendSystemMessageTestingOnly(self, "disabled objective!"); - } - } - if (strText.equals("startcountdown")) - { - obj_id target = getLookAtTarget(self); - sendSystemMessageTestingOnly(self, "startcountdown detected! target is: " + target); - if (target != null) - { - float delay = 300f + 300f * 1; - int minutes = Math.round(delay / 60f); - obj_id[] players = player_structure.getPlayersInBuilding(getTopMostContainer(target)); - if (players != null && players.length > 0) - { - for (int i = 0; i < players.length; i++) - { - sendSystemMessageProse(players[i], prose.getPackage(new string_id("faction/faction_hq/faction_hq_response", "terminal_response40"), minutes)); - } - } - int stamp = getGameTime() + Math.round(delay); - utils.setScriptVar(target, "countdownInProgress", stamp); - dictionary d = new dictionary(); - d.put("player", self); - d.put("cnt", minutes); - messageTo(target, "handleCountdown", d, 10f, false); - } - } - if (strText.equals("accountCheck")) - { - obj_id target = getLookAtTarget(self); - if (target != null) - { - int pBits = getSubscriptionFeatureBits(target); - sendSystemMessageTestingOnly(self, "CHECKING ACCOUNT TYPE Got account bits. They came back as: " + pBits); - if ((utils.isFreeTrial(target))) - { - sendSystemMessageTestingOnly(self, "It would appear that this IS a free trial account, per results from utils.isFreeTrial"); - } - else - { - sendSystemMessageTestingOnly(self, "It would appear that this IS NOT a free trial account, per results from utils.isFreeTrial"); - } - obj_id playerObject = getPlayerObject(target); - if (playerObject != null) - { - pBits = getSubscriptionFeatureBits(playerObject); - sendSystemMessageTestingOnly(self, "Running same checks on PLAYER ACCOUNT OBJECT. Got account bits came back as: " + pBits); - if ((utils.isFreeTrial(playerObject))) - { - sendSystemMessageTestingOnly(self, "testing PLAYER ACCOUNT OBJ, this IS a free trial account, per results from utils.isFreeTrial"); - } - else - { - sendSystemMessageTestingOnly(self, "testing PLAYER ACCOUNT OBJ, this IS NOT a free trial account, per results from utils.isFreeTrial"); - } - } - } - } - if (strText.equals("reloadtest")) - { - obj_id ship = space_transition.getContainingShip(self); - if (!isIdValid(ship)) - { - return SCRIPT_CONTINUE; - } - int[] slots = space_crafting.getShipInstalledSlots(ship); - for (int i = 0; i < slots.length; i++) - { - if (space_crafting.isMissileSlot(ship, slots[i])) - { - setShipWeaponAmmoCurrent(ship, slots[i], 1); - } - else if (space_crafting.isCounterMeasureSlot(ship, slots[i])) - { - setShipWeaponAmmoCurrent(ship, slots[i], 1); - } - } - sendSystemMessageTestingOnly(self, "unloaded!"); - } - if (strText.equals("zaprear")) - { - obj_id ship = space_transition.getContainingShip(self); - if (!isIdValid(ship)) - { - return SCRIPT_CONTINUE; - } - setShipShieldHitpointsBackCurrent(ship, 5.0f); - sendSystemMessageTestingOnly(self, "BANG! Rear Shields ZAPPED! Should be at 5.0f units"); - } - if (strText.equals("gettime")) - { - long now = System.currentTimeMillis(); - long curTime = ((now / 1000) - 1072224000); - int currentTime = (int)curTime + 3600; - sendSystemMessageTestingOnly(self, "Set timestamp to: " + currentTime); - } - if (strText.equals("getlots")) - { - sendSystemMessageTestingOnly(self, "Got getlots command"); - obj_id playerObject = getPlayerObject(self); - int lots = getAccountNumLots(playerObject); - sendSystemMessageTestingOnly(self, "Current Lots Count is " + lots); - } - if (strText.equals("getcell")) - { - String currentCell = getCellName(self); - sendSystemMessageTestingOnly(self, "DEBUG - currentCell is: " + currentCell); - location locTest = getLocation(self); - if (isIdValid(locTest.cell)) - { - sendSystemMessageTestingOnly(self, "DEBUG - current cell information via locTest IS: " + locTest.cell); - currentCell = getCellName(locTest.cell); - sendSystemMessageTestingOnly(self, "DEBUG - currentCell via second method IS: " + currentCell); - } - else - { - sendSystemMessageTestingOnly(self, "DEBUG - current cell information via locTest IS NOT VALID "); - } - } - if (strText.equals("goSlow")) - { - obj_id objMount = getMountId(self); - setBaseRunSpeed(objMount, 6.0f); - sendSystemMessageTestingOnly(self, "Jogging"); - } - if (strText.equals("slowMe")) - { - setBaseRunSpeed(self, 1.0f); - } - if (strText.equals("fastMe")) - { - setBaseRunSpeed(self, 6.0f); - } - if (strText.equals("getScriptVars")) - { - deltadictionary dctScriptVars = self.getScriptVars(); - sendSystemMessageTestingOnly(self, "Scriptvars are " + dctScriptVars.toString()); - } - if (strText.equals("basereset")) - { - sendSystemMessageTestingOnly(self, "Received baseReset command."); - obj_id target = getLookAtTarget(self); - if (target != null) - { - sendSystemMessageTestingOnly(self, "Sending message to target. Obj_id target is: " + target); - messageTo(target, "handleManualSpawnResetTest", null, 3, false); - } - } - else if (strText.equals("getStats")) - { - obj_id objTarget = getLookAtTarget(self); - if (objTarget != null) - { - int intConstitution = getConst(objTarget); - int intHealth = getHealth(objTarget); - sendSystemMessageTestingOnly(self, "Const=" + intConstitution + " Health=" + intHealth); - int intStamina = getStam(objTarget); - int intAction = getAction(objTarget); - sendSystemMessageTestingOnly(self, "Stamina=" + intStamina + " Action=" + intAction); - int intWillPower = getWill(objTarget); - int intMind = getMind(objTarget); - sendSystemMessageTestingOnly(self, "WillPower=" + intWillPower + " Mind=" + intMind); - } - } - if (strText.equals("damage")) - { - obj_id objTarget = getLookAtTarget(self); - if (objTarget != null) - { - obj_id objWeapon = getCurrentWeapon(self); - hit_result cbtHitData = new hit_result(); - cbtHitData.success = true; - cbtHitData.baseRoll = 50; - cbtHitData.finalRoll = 100; - cbtHitData.hitLocation = rand(0, 5); - cbtHitData.canSee = true; - cbtHitData.damage = 200; - cbtHitData.bleedingChance = 1; - doDamage(self, objTarget, objWeapon, cbtHitData); - sendSystemMessageTestingOnly(self, "200 damage done to target"); - debugSpeakMsg(objTarget, "ow!"); - } - } - if (strText.equals("music")) - { - playMusic(self, "sound/music_int_complete_rebel.snd"); - } - if (strText.equals("badWeapon")) - { - obj_id objWeapon = createObject("object/weapon/ranged/rifle/rifle_dlt20a.iff", getLocation(self)); - setWeaponAttackSpeed(objWeapon, 1.5f); - } - if (strText.equals("checkFlags")) - { - obj_id objTarget = getLookAtTarget(self); - if (isIdValid(objTarget)) - { - sendSystemMessageTestingOnly(self, "NPC is: " + objTarget); - sendSystemMessageTestingOnly(self, "InvulnerableFlag is: " + isInvulnerable(objTarget)); - sendSystemMessageTestingOnly(self, "pvpCanAttack is: " + pvpCanAttack(self, objTarget)); - } - } - if (strText.equals("combatr2")) - { - debugServerConsoleMsg(self, "entered combatr2 module"); - obj_id inventoryContainer = getObjectInSlot(self, "inventory"); - if (!isIdValid(inventoryContainer)) - { - debugServerConsoleMsg(self, "looks like the objid of the player inventory is invalid"); - } - obj_id deed = createObject("object/tangible/deed/pet_deed/deed_r2_basic.iff", inventoryContainer, "SLOT_INVENTORY"); - if (!isIdValid(deed)) - { - debugServerConsoleMsg(self, "failed to create the deed object"); - } - int powerLevel = 50; - final String CREATURE_NAME = "r2_crafted"; - dictionary creatureDict = dataTableGetRow(create.CREATURE_TABLE, "r2_crafted"); - setObjVar(deed, "creature_attribs.type", "r2_crafted"); - setObjVar(deed, "creature_attribs.level", 30); - setObjVar(deed, "creature_attribs.maxHealth", 4000); - setObjVar(deed, "creature_attribs.maxConstitution", 0); - setObjVar(deed, "creature_attribs.general_protection", 2000); - setObjVar(deed, "creature_attribs.toHitChance", 81); - setObjVar(deed, "creature_attribs.defenseValue", 81); - setObjVar(deed, "creature_attribs.minDamage", 61); - setObjVar(deed, "creature_attribs.maxDamage", 284); - setObjVar(deed, "creature_attribs.aggroBonus", 0.0f); - setObjVar(deed, "creature_attribs.critChance", 0.0f); - setObjVar(deed, "creature_attribs.critSave", 0.0f); - setObjVar(deed, "creature_attribs.scale", 1.0f); - setObjVar(deed, "creature_attribs.stateResist", 0.0f); - setObjVar(deed, "crafting_components.cmbt_module", 600.0f); - setObjVar(deed, "dataModuleRating", 12); - setObjVar(deed, "ai.pet.hasContainer", 12); - setObjVar(deed, "ai.pet.isRepairDroid", true); - setObjVar(deed, "craftingStationSpace", true); - setObjVar(deed, "craftingStationWeapon", true); - setObjVar(deed, "craftingStationFood", true); - } - if (strText.equals("combatprobot")) - { - debugServerConsoleMsg(self, "entered probot module"); - obj_id inventoryContainer = getObjectInSlot(self, "inventory"); - if (!isIdValid(inventoryContainer)) - { - debugServerConsoleMsg(self, "looks like the objid of the player inventory is invalid"); - } - obj_id object = createObject("object/tangible/deed/pet_deed/deed_probot_basic.iff", inventoryContainer, "SLOT_INVENTORY"); - if (!isIdValid(object)) - { - debugServerConsoleMsg(self, "failed to create the deed object"); - } - int powerLevel = 50; - final String CREATURE_NAME = "probot"; - dictionary creatureDict = dataTableGetRow(create.CREATURE_TABLE, "r2_crafted"); - setObjVar(object, "creature_attribs.type", "probot"); - for (int attribNum = HEALTH; attribNum <= WILLPOWER; attribNum++) - { - int minAttrib = creatureDict.getInt(create.MINATTRIBNAMES[attribNum]); - int maxAttrib = creatureDict.getInt(create.MAXATTRIBNAMES[attribNum]); - int attribRange = maxAttrib - minAttrib; - int newAttribValue = (int)((attribRange * powerLevel) / 1000) + minAttrib; - setObjVar(object, "creature_attribs." + create.MAXATTRIBNAMES[attribNum], newAttribValue); - } - int toHitChance = creatureDict.getInt("toHitChance"); - float minToHit = toHitChance + (toHitChance * bio_engineer.CREATURE_MIN_TO_HIT_MOD); - float maxToHit = toHitChance + (toHitChance * bio_engineer.CREATURE_MAX_TO_HIT_MOD); - setObjVar(object, "creature_attribs.toHitChance", toHitChance); - obj_id creatureWeapon = getCurrentWeapon(object); - if (!isIdValid(creatureWeapon)) - { - debugServerConsoleMsg(self, "failed to get the obj_id of the creature's current weapon. Uh oh!"); - } - float wpnSpeed = (float)creatureDict.getInt("attackSpeed"); - float minWpnSpeed = wpnSpeed + (wpnSpeed * bio_engineer.CREATURE_MIN_WEAPON_SPEED_MOD); - float maxWpnSpeed = wpnSpeed + (wpnSpeed * bio_engineer.CREATURE_MAX_WEAPON_SPEED_MOD); - setObjVar(object, "creature_attribs.attackSpeed", wpnSpeed); - int minDamage = creatureDict.getInt("minDamage"); - int maxDamage = creatureDict.getInt("maxDamage"); - float minMinDamage = minDamage + (minDamage * bio_engineer.CREATURE_MIN_DAMAGE_MOD); - float maxMinDamage = minDamage + (minDamage * bio_engineer.CREATURE_MAX_DAMAGE_MOD); - float minMaxDamage = maxDamage + (maxDamage * bio_engineer.CREATURE_MIN_DAMAGE_MOD); - float maxMaxDamage = maxDamage + (maxDamage * bio_engineer.CREATURE_MAX_DAMAGE_MOD); - minDamage = (int)(minMinDamage + (((maxMinDamage - minMinDamage) * powerLevel) / 1000)); - maxDamage = (int)(minMaxDamage + (((maxMaxDamage - minMaxDamage) * powerLevel) / 1000)); - setObjVar(object, "creature_attribs.minDamage", minDamage); - setObjVar(object, "creature_attribs.maxDamage", maxDamage); - setObjVar(object, "crafting_components.cmbt_module", 600.0f); - } - return SCRIPT_CONTINUE; - } - public location getGoodMissionLocation(location locSpawnLocation, obj_id objPlayer) throws InterruptedException - { - int intSize = 72; - location locGoodLocation = locations.getGoodLocationAroundLocation(locSpawnLocation, intSize, intSize, 300, 300, false, true); - if (locGoodLocation == null) - { - locGoodLocation = locations.getGoodLocationAroundLocation(getLocation(objPlayer), intSize, intSize, 400, 400, false, true); - if (locGoodLocation == null) - { - return null; - } - } - if (locations.isInMissionCity(locGoodLocation)) - { - locGoodLocation = locations.getGoodLocationAroundLocation(getLocation(objPlayer), intSize, intSize, 400, 400, false, true); - if (locGoodLocation == null) - { - return null; - } - if (locations.isInMissionCity(locGoodLocation)) - { - return null; - } - } - region rgnBattlefield = battlefield.getBattlefield(locGoodLocation); - if (rgnBattlefield != null) - { - return null; - } - if (locations.isInMissionCity(locGoodLocation)) - { - return null; - } - return locGoodLocation; - } - public boolean checkTemplatesInRange(obj_id objPlayer, location locHome, boolean boolCheckForTheaters, String strObjectType) throws InterruptedException - { - boolean boolLogFailures = true; - boolean boolVerboseMode = true; - float fltDistance = rand(120, 200); - obj_id[] objTemplates = getObjectsInRange(locHome, fltDistance); - if (objTemplates == null) - { - return true; - } - else - { - if (boolCheckForTheaters) - { - obj_id[] objLairs = getAllObjectsWithTemplate(locHome, fltDistance, "object/tangible/lair/npc_lair.iff"); - if (objLairs != null) - { - sendSystemMessageTestingOnly(objPlayer, "Non null objLairs.. length is " + objLairs.length); - if (objLairs.length > 0) - { - String strSpam = objPlayer + " Too many lairs in the area, kicking out, area was " + locHome + " number of lairs is " + objLairs.length; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - } - if (strObjectType != null) - { - int intIndex = strObjectType.indexOf("theater"); - if (intIndex > -1) - { - objLairs = getAllObjectsWithTemplate(locHome, 200, "object/creature/planet/bothan_male.iff"); - int intCount = utils.countSubStringObjVars(objLairs, "spawing.lairType", "theater"); - if (intCount > 0) - { - String strSpam = objPlayer + " theaters in range is " + intCount + " too many at location " + locHome; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - } - } - obj_id[] objTheaters = getAllObjectsWithObjVar(locHome, 200, "isScenario"); - if (objTheaters != null) - { - if (objTheaters.length > 0) - { - String strSpam = objPlayer + " too many scenarios neat " + locHome + " count was " + objTheaters.length; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - } - } - if (objTemplates.length > SPAWN_CHECK_TEMPLATE_LIMIT) - { - if (boolLogFailures) - { - String strSpam = objPlayer + " found too many normal templates in range of " + locHome + " count was " + objTemplates.length; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - } - return false; - } - } - return true; - } - public boolean canSpawn(obj_id objPlayer, location locSpawnLocation, boolean boolCheckForTheaters, String strObjectType) throws InterruptedException - { - boolean boolLogFailures = true; - boolean boolVerboseMode = true; - if (!isSpawningAllowed(locSpawnLocation)) - { - String strSpam = objPlayer + " spawning not allowed on " + locSpawnLocation.area; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - int intServerSpawnLimit = getServerSpawnLimit(); - String strSpam = ""; - location locCurrentLocation = getLocation(objPlayer); - if (locCurrentLocation.area == "tutorial") - { - strSpam = objPlayer + " canSpawn failed: spawning disabled in tutorial"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - region[] rgnCities = getRegionsWithMunicipalAtPoint(locCurrentLocation, regions.MUNI_TRUE); - if (rgnCities != null) - { - strSpam = objPlayer + " canSpawn failed: spawning not allowed in cities"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - region rgnBattlefield = battlefield.getBattlefield(locCurrentLocation); - if (rgnBattlefield != null) - { - strSpam = objPlayer + " canSpawn failed: spawning disabled in battlefields"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - rgnCities = getRegionsWithGeographicalAtPoint(locCurrentLocation, regions.GEO_CITY); - if (rgnCities != null) - { - strSpam = objPlayer + " canSpawn failed: spawning not allowed in cities"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - obj_id objMasterSpawner = getPlanetByName(locCurrentLocation.area); - if (hasObjVar(objMasterSpawner, "boolSpawnerIsOn")) - { - boolean boolSpawnerIsOn; - boolSpawnerIsOn = getBooleanObjVar(objMasterSpawner, "boolSpawnerIsOn"); - if (boolSpawnerIsOn == false) - { - strSpam = objPlayer + " canSpawn failed: spawning is disabled"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return boolSpawnerIsOn; - } - } - if (locCurrentLocation.cell != obj_id.NULL_ID) - { - strSpam = objPlayer + " canSpawn failed: spawnig is disabled in cells"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - if (hasObjVar(objPlayer, "spawning.locSpawnLocation")) - { - int intSpawnedTemplates = 0; - if (hasObjVar(objPlayer, "spawning.intSpawnedTemplates")) - { - intSpawnedTemplates = getIntObjVar(objPlayer, "spawning.intSpawnedTemplates"); - } - if (intSpawnedTemplates >= SPAWN_CHECK_LIMIT) - { - location locLastSpawnLocation = getLocationObjVar(objPlayer, "spawning.locSpawnLocation"); - float fltDistance = utils.getDistance(locLastSpawnLocation, locCurrentLocation); - if (fltDistance < SPAWN_CHECK_DISTANCE) - { - strSpam = objPlayer + " You need to move before we spawn more stuff"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - strSpam = objPlayer + " The minimum check distance is: " + SPAWN_CHECK_DISTANCE; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - strSpam = objPlayer + " Your distance is: " + fltDistance; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - } - } - if (locSpawnLocation != null) - { - rgnCities = getRegionsWithMunicipalAtPoint(locSpawnLocation, regions.MUNI_TRUE); - if (rgnCities != null) - { - strSpam = " spawn location is in a city, returning false from canspawn"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - rgnCities = getRegionsWithGeographicalAtPoint(locSpawnLocation, regions.GEO_CITY); - if (rgnCities != null) - { - strSpam = "location is in a city2, returning false from canspawn"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - rgnBattlefield = battlefield.getBattlefield(locSpawnLocation); - if (rgnBattlefield != null) - { - strSpam = "location is in a battlefield, returning false from canspawn"; - sendSpawnSpam(objPlayer, boolLogFailures, boolVerboseMode, strSpam); - return false; - } - if (!checkTemplatesInRange(objPlayer, locSpawnLocation, boolCheckForTheaters, strObjectType)) - { - return false; - } - } - return true; - } - public void sendSpawnSpam(obj_id self, boolean boolLogFailures, boolean boolVerboseMode, String strSpam) throws InterruptedException - { - sendSystemMessageTestingOnly(self, strSpam); - return; - } - public boolean isSpawningAllowed(location locTest) throws InterruptedException - { - return true; - } - public int gmCreateSpecificResource(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException - { - String strClass = params; - if ((strClass == null) || (strClass.equals(""))) - { - sendSystemMessageTestingOnly(self, "Bad class passed in, syntax is /gmCreateClassResource class"); - return SCRIPT_CONTINUE; - } - obj_id rtype = pickRandomNonDepeletedResource(strClass); - if (!isIdValid(rtype)) - { - sendSystemMessageTestingOnly(self, "No id found"); - sendSystemMessageTestingOnly(self, "Type was " + strClass); - return SCRIPT_CONTINUE; - } - String crateTemplate = getResourceContainerForType(rtype); - if (!crateTemplate.equals("")) - { - obj_id pInv = utils.getInventoryContainer(self); - if (pInv != null) - { - obj_id crate = createObject(crateTemplate, pInv, ""); - if (addResourceToContainer(crate, rtype, 100000, self)) - { - sendSystemMessageTestingOnly(self, "Resource of class " + params + " added"); - return SCRIPT_CONTINUE; - } - } - } - return SCRIPT_CONTINUE; - } - public int gmCreateClassResource(obj_id self, obj_id target, String params, float defaultTime) throws InterruptedException - { - String strClass = params; - if ((strClass == null) || (strClass.equals(""))) - { - sendSystemMessageTestingOnly(self, "Bad class passed in, syntax is /gmCreateClassResource class"); - return SCRIPT_CONTINUE; - } - obj_id rtype = pickRandomNonDepeletedResource(strClass); - if (!isIdValid(rtype)) - { - sendSystemMessageTestingOnly(self, "Bad class passed in, syntax is /gmCreateClassResource class"); - return SCRIPT_CONTINUE; - } - String crateTemplate = getResourceContainerForType(rtype); - if (!crateTemplate.equals("")) - { - obj_id pInv = utils.getInventoryContainer(self); - if (pInv != null) - { - obj_id crate = createObject(crateTemplate, pInv, ""); - if (addResourceToContainer(crate, rtype, 100000, self)) - { - sendSystemMessageTestingOnly(self, "Resource of class " + params + " added"); - return SCRIPT_CONTINUE; - } - } - } - return SCRIPT_CONTINUE; - } - public void spawnContents(obj_id dungeon, String spawnType, int numberOfCopies) throws InterruptedException - { - obj_id self = getSelf(); - sendSystemMessageTestingOnly(self, "//***// spawnContents: ////>>>> entered. SpawnType requested was: " + spawnType); - String[] spawnTypeColumnData = dataTableGetStringColumnNoDefaults(mustafar.CONST_TBL_EVENT_DATA, "dataType"); - if (spawnTypeColumnData.length == 0) - { - return; - } - for (int i = 0; i < spawnTypeColumnData.length; i++) - { - if (spawnTypeColumnData[i].equals(spawnType)) - { - dictionary dict = dataTableGetRow(mustafar.CONST_TBL_EVENT_DATA, i); - sendSystemMessageTestingOnly(self, "spawnContents:Retrieving info for row(" + i + ")"); - int locx = dict.getInt("locx"); - int locy = dict.getInt("locy"); - int locz = dict.getInt("locz"); - location myself = getLocation(dungeon); - String scene = myself.area; - obj_id cell = getCellId(dungeon, "mainroom"); - float yaw = dict.getFloat("yaw"); - String script = dict.getString("script"); - location spawnLoc = new location(locx, locy, locz, scene, cell); - String object = dict.getString("object"); - if ((dict.getString("dataType")).equals("setpiece")) - { - sendSystemMessageTestingOnly(self, "//***// spawnContents: ////>>>> Going to try to spawn a 'setpiece'"); - obj_id item = createObjectInCell(object, dungeon, "mainroom", spawnLoc); - if (!isIdValid(item)) - { - sendSystemMessageTestingOnly(self, "spawnContents: Tried to create invalid item(" + object + ")"); - return; - } - setYaw(item, yaw); - if (!script.equals("none")) - { - attachScript(item, script); - } - utils.setScriptVar(item, "dungeon", dungeon); - sendSystemMessageTestingOnly(self, "spawnContents: Created object(" + object + "/" + item + ") with script(" + script); - } - else if (!(dict.getString("dataType")).equals("location") && !(dict.getString("dataType")).equals("forcePowerAttack")) - { - sendSystemMessageTestingOnly(self, "//***// spawnContents: ////>>>> Going to try to spawn a creature of some kind"); - sendSystemMessageTestingOnly(self, "//***// spawnContents: ////>>>> Going to try to spawn a creature. SERIOUSLY!"); - if (numberOfCopies < 1) - { - numberOfCopies = 1; - } - sendSystemMessageTestingOnly(self, "//***// spawnContents: ////>>>> numberOfCopies is: " + numberOfCopies); - for (int j = 0; j < numberOfCopies; j++) - { - sendSystemMessageTestingOnly(self, "//***// spawnContents: ////>>>> spawn loop 1"); - obj_id creature = create.object(object, spawnLoc); - sendSystemMessageTestingOnly(self, "//***// spawnContents: ////>>>> creature spawned objId is: " + creature); - if (!isIdValid(creature)) - { - sendSystemMessageTestingOnly(self, "spawnContents: Tried to create invalid creature(" + object + ")"); - return; - } - if (!script.equals("none")) - { - attachScript(creature, script); - } - utils.setScriptVar(creature, "dungeon", dungeon); - sendSystemMessageTestingOnly(self, "spawnContents: Created object(" + object + "/" + creature + ") with script(" + script); - } - } - } - } - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/requestloctest.java b/sku.0/sys.server/compiled/game/script/working/requestloctest.java deleted file mode 100644 index 57c28afbf..000000000 --- a/sku.0/sys.server/compiled/game/script/working/requestloctest.java +++ /dev/null @@ -1,264 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.locations; -import script.library.utils; - -public class requestloctest extends script.base_script -{ - public requestloctest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - if (!isGod(self)) - { - sendSystemMessage(self, "You are not authorized to use this script.", ""); - detachScript(self, "working.requestloctest"); - } - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (!isGod(self)) - { - return SCRIPT_CONTINUE; - } - int stringCheck = text.indexOf("get_location_32"); - if (stringCheck > -1) - { - boolean checkSlope = true; - boolean checkWater = true; - stringCheck = text.indexOf("allow_slope"); - if (stringCheck > -1) - { - checkSlope = false; - } - stringCheck = text.indexOf("allow_water"); - if (stringCheck > -1) - { - checkWater = false; - } - location here = getLocation(self); - requestLocation(self, "get_location_32", here, 500.0f, 32.0f, checkWater, checkSlope); - sendSystemMessage(self, "requestingLocation: get_location_32 - water: " + checkWater + ", slope: " + checkSlope, ""); - return SCRIPT_OVERRIDE; - } - stringCheck = text.indexOf("get_location_48"); - if (stringCheck > -1) - { - boolean checkSlope = true; - boolean checkWater = true; - stringCheck = text.indexOf("allow_slope"); - if (stringCheck > -1) - { - checkSlope = false; - } - stringCheck = text.indexOf("allow_water"); - if (stringCheck > -1) - { - checkWater = false; - } - location here = getLocation(self); - requestLocation(self, "get_location_48", here, 500.0f, 48.0f, checkWater, checkSlope); - sendSystemMessage(self, "requestingLocation: get_location_48 - water: " + checkWater + ", slope: " + checkSlope, ""); - return SCRIPT_OVERRIDE; - } - stringCheck = text.indexOf("get_location_64"); - if (stringCheck > -1) - { - boolean checkSlope = true; - boolean checkWater = true; - stringCheck = text.indexOf("allow_slope"); - if (stringCheck > -1) - { - checkSlope = false; - } - stringCheck = text.indexOf("allow_water"); - if (stringCheck > -1) - { - checkWater = false; - } - location here = getLocation(self); - requestLocation(self, "get_location_64", here, 500.0f, 64.0f, checkWater, checkSlope); - sendSystemMessage(self, "requestingLocation: get_location_64 - water: " + checkWater + ", slope: " + checkSlope, ""); - return SCRIPT_OVERRIDE; - } - stringCheck = text.indexOf("get_location_80"); - if (stringCheck > -1) - { - boolean checkSlope = true; - boolean checkWater = true; - stringCheck = text.indexOf("allow_slope"); - if (stringCheck > -1) - { - checkSlope = false; - } - stringCheck = text.indexOf("allow_water"); - if (stringCheck > -1) - { - checkWater = false; - } - location here = getLocation(self); - requestLocation(self, "get_location_80", here, 500.0f, 80.0f, checkWater, checkSlope); - sendSystemMessage(self, "requestingLocation: get_location_80 - water: " + checkWater + ", slope: " + checkSlope, ""); - return SCRIPT_OVERRIDE; - } - stringCheck = text.indexOf("get_location_96"); - if (stringCheck > -1) - { - boolean checkSlope = true; - boolean checkWater = true; - stringCheck = text.indexOf("allow_slope"); - if (stringCheck > -1) - { - checkSlope = false; - } - stringCheck = text.indexOf("allow_water"); - if (stringCheck > -1) - { - checkWater = false; - } - location here = getLocation(self); - requestLocation(self, "get_location_96", here, 500.0f, 96.0f, checkWater, checkSlope); - sendSystemMessage(self, "requestingLocation: get_location_96 - water: " + checkWater + ", slope: " + checkSlope, ""); - return SCRIPT_OVERRIDE; - } - stringCheck = text.indexOf("clear_last_location"); - if (stringCheck > -1) - { - if (hasObjVar(self, "locTest.objects")) - { - Vector locObjects = getResizeableObjIdArrayObjVar(self, "locTest.objects"); - if (locObjects != null && locObjects.size() > 0) - { - int lastObjectIndx = locObjects.size() - 1; - obj_id locObject = ((obj_id)locObjects.get(lastObjectIndx)); - utils.removeElementAt(locObjects, lastObjectIndx); - setObjVar(self, "locTest.objects", locObjects); - if (isIdValid(locObject)) - { - locations.destroyLocationObject(locObject); - } - } - } - if (hasObjVar(self, "locTest.waypoints")) - { - Vector locWaypoints = getResizeableObjIdArrayObjVar(self, "locTest.waypoints"); - if (locWaypoints != null && locWaypoints.size() > 0) - { - int lastWaypointIndx = locWaypoints.size() - 1; - obj_id locWaypoint = ((obj_id)locWaypoints.get(lastWaypointIndx)); - utils.removeElementAt(locWaypoints, lastWaypointIndx); - setObjVar(self, "locTest.waypoints", locWaypoints); - if (isIdValid(locWaypoint)) - { - destroyWaypointInDatapad(locWaypoint, self); - } - } - } - return SCRIPT_OVERRIDE; - } - stringCheck = text.indexOf("clear_all_locations"); - if (stringCheck > -1) - { - getRidOfLocObjects(self); - return SCRIPT_OVERRIDE; - } - stringCheck = text.indexOf("detach_script"); - if (stringCheck > -1) - { - getRidOfLocObjects(self); - detachScript(self, "working.requestloctest"); - return SCRIPT_OVERRIDE; - } - stringCheck = text.indexOf("help"); - if (stringCheck > -1) - { - String msg1 = "Type get_location_32, get_location_48, get_location_64, get_location_80, or get_location_96 to request a location."; - String msg1b = " Include allow_slope or allow_water to not block for slope or for water."; - String msg2 = " Type clear_last_location or clear_all_locations to clear reserved location objects."; - String msg3 = " Type detach_script to clear current reserved location objects and detach this script."; - sendSystemMessage(self, msg1 + msg1b + msg2 + msg3, ""); - return SCRIPT_OVERRIDE; - } - return SCRIPT_CONTINUE; - } - public int OnLocationReceived(obj_id self, String locationId, obj_id locationObject, location locationLocation, float locationRadius) throws InterruptedException - { - if (!isIdValid(locationObject)) - { - sendSystemMessage(self, "locationObject was invalid for search location: " + locationLocation + " locationId: " + locationId, ""); - return SCRIPT_CONTINUE; - } - if (locationLocation == null) - { - sendSystemMessage(self, "locationLocation was null (??!!?) for search location: " + locationLocation + " locationId: " + locationId, ""); - return SCRIPT_CONTINUE; - } - Vector locObjects = new Vector(); - locObjects.setSize(0); - if (hasObjVar(self, "locTest.objects")) - { - locObjects = getResizeableObjIdArrayObjVar(self, "locTest.objects"); - } - utils.addElement(locObjects, locationObject); - setObjVar(self, "locTest.objects", locObjects); - obj_id waypoint = createWaypointInDatapad(self, locationLocation); - setWaypointName(waypoint, locationId); - setWaypointActive(waypoint, true); - Vector locWaypoints = new Vector(); - locWaypoints.setSize(0); - if (hasObjVar(self, "locTest.waypoints")) - { - locWaypoints = getResizeableObjIdArrayObjVar(self, "locTest.waypoints"); - } - utils.addElement(locWaypoints, waypoint); - setObjVar(self, "locTest.waypoints", locWaypoints); - sendSystemMessage(self, "OnLocationReceived parameters - Id: " + locationId + ", location: " + locationLocation + ", object: " + locationObject + ", radius:" + locationRadius, ""); - return SCRIPT_CONTINUE; - } - public void getRidOfLocObjects(obj_id self) throws InterruptedException - { - if (hasObjVar(self, "locTest.objects")) - { - Vector locObjects = getResizeableObjIdArrayObjVar(self, "locTest.objects"); - removeObjVar(self, "locTest.objects"); - if (locObjects != null && locObjects.size() > 0) - { - for (int i = 0; i < locObjects.size(); i++) - { - obj_id locObject = ((obj_id)locObjects.get(i)); - if (isIdValid(locObject)) - { - locations.destroyLocationObject(locObject); - } - } - } - } - if (hasObjVar(self, "locTest.waypoints")) - { - Vector locWaypoints = getResizeableObjIdArrayObjVar(self, "locTest.waypoints"); - removeObjVar(self, "locTest.waypoints"); - if (locWaypoints != null && locWaypoints.size() > 0) - { - for (int i = 0; i < locWaypoints.size(); i++) - { - obj_id locWaypoint = ((obj_id)locWaypoints.get(i)); - if (isIdValid(locWaypoint)) - { - destroyWaypointInDatapad(locWaypoint, self); - } - } - } - } - return; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/royscript.java b/sku.0/sys.server/compiled/game/script/working/royscript.java deleted file mode 100644 index f1468897d..000000000 --- a/sku.0/sys.server/compiled/game/script/working/royscript.java +++ /dev/null @@ -1,41 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.pclib; -import script.library.factions; -import script.library.player_structure; -import script.library.skill; - -public class royscript extends script.base_script -{ - public royscript() - { - } - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - String[] strCommands = split(strText, ' '); - if (strCommands[0].equals("setupImperialFaction")) - { - factions.addFactionStanding(self, factions.FACTION_IMPERIAL, 3000); - sendSystemMessageTestingOnly(self, "Done"); - } - if (strCommands[0].equals("makeInteresting")) - { - setCondition(getLookAtTarget(self), CONDITION_INTERESTING); - sendSystemMessageTestingOnly(self, "Set condition"); - } - if (strCommands[0].equals("setYaw")) - { - setYaw(self, 90); - sendSystemMessageTestingOnly(self, "Set condition"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/scriptvars.java b/sku.0/sys.server/compiled/game/script/working/scriptvars.java deleted file mode 100644 index c985dbdf2..000000000 --- a/sku.0/sys.server/compiled/game/script/working/scriptvars.java +++ /dev/null @@ -1,23 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class scriptvars extends script.base_script -{ - public scriptvars() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - deltadictionary dctScriptVars = self.getScriptVars(); - debugSpeakMsg(self, "ScriptVars are " + dctScriptVars.toString()); - detachScript(self, "working.scriptvars"); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/steve/myscript.java b/sku.0/sys.server/compiled/game/script/working/steve/myscript.java deleted file mode 100644 index 2b4d0571b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/steve/myscript.java +++ /dev/null @@ -1,1974 +0,0 @@ -package script.working.steve; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.ai_lib; -import script.library.armor; -import script.library.buff; -import script.library.combat; -import script.library.create; -import script.library.factions; -import script.library.fs_dyn_village; -import script.library.fs_quests; -import script.library.jedi; -import script.library.pclib; -import script.library.player_structure; -import script.library.quests; -import script.library.skill; -import script.library.space_utils; -import script.library.sui; -import script.library.utils; -import script.library.community_crafting; - -public class myscript extends script.base_script -{ - public myscript() - { - } - public int[] anArrayFunc() throws InterruptedException - { - return new int[5]; - } - public int OnAttach(obj_id self) throws InterruptedException - { - boolean result; - int intArrayIndex; - obj_id other = null; - if (other == self) - { - } - else - { - other = self; - } - debugServerConsoleMsg(self, "about to crash in C!"); - debugServerConsoleMsg(null, "crashing in C!"); - debugServerConsoleMsg(self, "after crash in C!"); - messageTo(self, "myMessageHandler", null, 0, true); - - debugServerConsoleMsg(null, "in debug mode"); - - debugConsoleMsg(self, "myscript reload attached!"); - debugConsoleMsg(self, "current objvars:"); - listObjvars(self, self); - debugConsoleMsg(self, "adding objvars"); - debugConsoleMsg(self, "integer"); - result = setObjVar(self, "idata", 111); - if (result) - { - debugConsoleMsg(self, "ok"); - } - else - { - debugConsoleMsg(self, "fail"); - } - debugConsoleMsg(self, "float"); - result = setObjVar(self, "fdata", 666.999f); - if (result) - { - debugConsoleMsg(self, "ok"); - } - else - { - debugConsoleMsg(self, "fail"); - } - debugConsoleMsg(self, "string"); - result = setObjVar(self, "sdata", "winona"); - if (result) - { - debugConsoleMsg(self, "ok"); - } - else - { - debugConsoleMsg(self, "fail"); - } - debugConsoleMsg(self, "obj_id"); - result = setObjVar(self, "oid_data", self); - if (result) - { - debugConsoleMsg(self, "ok"); - } - else - { - debugConsoleMsg(self, "fail"); - } - debugConsoleMsg(self, "obj_id array"); - obj_id[] oidaData = new obj_id[3]; - oidaData[0] = self; - oidaData[1] = self; - oidaData[2] = self; - result = setObjVar(self, "oidArray_data", oidaData); - if (result) - { - debugConsoleMsg(self, "ok"); - } - else - { - debugConsoleMsg(self, "fail"); - } - debugConsoleMsg(self, "sublist"); - result = setObjVar(self, "item1", 123); - result = setObjVar(self, "item2", 123.456f); - result = setObjVar(self, "sublist.sub item", "yadayada"); - if (result) - { - debugConsoleMsg(self, "result:"); - listObjvars(self, self); - } - else - { - debugConsoleMsg(self, "setObjVar failed!"); - } - debugConsoleMsg(self, "leaving OnAttach"); - return SCRIPT_CONTINUE; - } - public int OnDetach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "Bye bye!"); - return SCRIPT_CONTINUE; - } - public int OnInitialize(obj_id self) throws InterruptedException - { - debugServerConsoleMsg(self, "I'm initialized!"); - return SCRIPT_CONTINUE; - } - public int OnAddedToWorld(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "I'm in the world!"); - return SCRIPT_CONTINUE; - } - public int OnLogout(obj_id self) throws InterruptedException - { - debugServerConsoleMsg(self, "I'm logging out!"); - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - debugServerConsoleMsg(self, "From myscript.script OnSpeaking: " + text); - if (text.equals("newdewd")) - { - location mylocation = getLocation(self); - createObject("creature/fodder", mylocation); - } - else if (text.equals("testlib")) - { - } - else if (text.equals("testweapon")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - obj_id weapon = getCurrentWeapon(target); - debugSpeakMsg(self, "Weapon " + weapon + " damage = " + getAverageDamage(weapon)); - } - else if (text.equals("testattach")) - { - attachScript(self, "steve.dummy"); - } - else if (text.equals("testdetach")) - { - detachScript(self, "steve.myscript"); - setObjVar(self, "item1", 0); - removeObjVar(self, "item2"); - } - else if (text.equals("quest")) - { - messageTo(self, "spawnBoxDestroyed", null, 0, true); - } - else if (text.equals("broadcast")) - { - debugServerConsoleMsg(self, "broadcasting message"); - dictionary params = new dictionary(); - } - else if (text.equals("messageTo")) - { - debugServerConsoleMsg(self, "testing messageTo"); - dictionary params = new dictionary(); - params.put("slef", self); - messageTo(self, "myMessageHandler", params, 0.5f, false); - } - else if (text.equals("damagehouse")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - deltadictionary scriptvars = target.getScriptVars(); - obj_id house = scriptvars.getObjId("player_structure.parent"); - if (isIdValid(house)) - { - int maxhp = getMaxHitpoints(house); - int current = getHitpoints(house); - int hp = current - (int)(maxhp * .1f); - if (hp < 0) - { - hp = 0; - } - debugSpeakMsg(self, "setting house hp from " + current + " to " + hp); - player_structure.damageStructure(house, current - hp); - } - else - { - debugSpeakMsg(self, "Can't find scriptvar player_structure.parent"); - } - } - else - { - debugSpeakMsg(self, "No lookat target"); - } - } - else if (text.equals("makemejedi")) - { - setJediState(self, JEDI_STATE_JEDI); - setMaxForcePower(self, 100); - } - else if (text.equals("makemeoldjedi")) - { - setJediState(self, JEDI_STATE_JEDI); - setMaxForcePower(self, 100); - removeObjVar(self, "jedi.skillsNeeded"); - grantSkill(self, "jedi_padawan_novice"); - grantSkill(self, "jedi_padawan_saber_01"); - grantSkill(self, "jedi_padawan_saber_02"); - grantSkill(self, "jedi_padawan_saber_03"); - grantSkill(self, "jedi_padawan_saber_04"); - grantSkill(self, "jedi_padawan_force_power_01"); - grantSkill(self, "jedi_padawan_force_power_02"); - grantSkill(self, "jedi_padawan_force_power_03"); - removeObjVar(self, "jedi.state"); - } - else if (text.equals("isjedi")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - if (isJedi(target)) - { - debugSpeakMsg(self, "jedi"); - } - else - { - debugSpeakMsg(self, "not jedi"); - } - } - else if (text.equals("getjedistate")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - } - else if (text.equals("getjedi")) - { - dictionary result = requestJedi(IGNORE_JEDI_STAT, IGNORE_JEDI_STAT, 1, 1000, IGNORE_JEDI_STAT, IGNORE_JEDI_STAT, IGNORE_JEDI_STAT); - if (result != null) - { - obj_id[] id = result.getObjIdArray("id"); - String[] name = result.getStringArray("name"); - location[] loc = result.getLocationArray("location"); - String[] scene = result.getStringArray("scene"); - int[] visibility = result.getIntArray("visibility"); - int[] bountyValue = result.getIntArray("bountyValue"); - int[] level = result.getIntArray("level"); - int[] hoursAlive = result.getIntArray("hoursAlive"); - int[] state = result.getIntArray("state"); - obj_id[][] bounties = (obj_id[][])(result.get("bounties")); - boolean[] online = result.getBooleanArray("online"); - if (id != null && id.length > 0) - { - for (int i = 0; i < id.length; ++i) - { - debugConsoleMsg(self, "Player " + name[i]); - debugConsoleMsg(self, "\tid = " + id[i]); - debugConsoleMsg(self, "\tloc = " + loc[i]); - debugConsoleMsg(self, "\tscene = " + scene[i]); - debugConsoleMsg(self, "\tvisibility = " + visibility[i]); - debugConsoleMsg(self, "\tbounty value = " + bountyValue[i]); - debugConsoleMsg(self, "\tlevel = " + level[i]); - debugConsoleMsg(self, "\thours alive = " + hoursAlive[i]); - debugConsoleMsg(self, "\tstate = " + state[i]); - debugConsoleMsg(self, "\tonline = " + online[i]); - } - } - else - { - debugConsoleMsg(self, "No jedi"); - } - } - else - { - debugConsoleMsg(self, "Error getting jedi"); - } - } - else if (text.equals("testjedivisibility")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - if (isJedi(target)) - { - setJediVisibility(target, 5000); - debugSpeakMsg(self, "visiblity set to " + getJediVisibility(target)); - } - else - { - debugSpeakMsg(self, "not jedi"); - } - } - else if (text.equals("testlocation")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - debugSpeakMsg(self, "Target location = " + getLocation(target)); - } - else if (text.equals("testdistance")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - location targetPos = getLocation(target); - location myPos = getLocation(self); - float distance = getDistance(myPos, targetPos); - debugSpeakMsg(self, "distance = " + distance); - float dx = myPos.x - targetPos.x; - float dz = myPos.z - targetPos.z; - distance = (float)(Math.sqrt(dx * dx + dz * dz)); - debugSpeakMsg(self, "2d distance = " + distance); - } - else - { - debugSpeakMsg(self, "no target"); - } - } - else if (text.equals("isgod")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - if (isGod(target)) - { - debugConsoleMsg(self, "yes, level = " + getGodLevel(self)); - } - else - { - debugConsoleMsg(self, "no"); - } - } - else if (text.equals("testskillmodmod")) - { - addSkillModModifier(self, "themodmodmod", "winona", 50, 120, false, false); - messageTo(self, "abortSkillModMod", null, 30, false); - } - else if (text.equals("testmakecrafted")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - setCraftedId(target, target); - } - } - else if (text.equals("testmakeuncrafted")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - setCraftedId(target, null); - } - } - else if (text.equals("testjedislot")) - { - addJediSlot(self); - } - else if (text.equals("testhasjedi")) - { - debugSpeakMsg(self, "hasJediSlot = " + hasJediSlot(self)); - } - else if (text.equals("damageme")) - { - damage(self, DAMAGE_KINETIC, HIT_LOCATION_BODY, 100); - } - else if (text.equals("hurt")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - damage(target, DAMAGE_KINETIC, HIT_LOCATION_BODY, 100); - } - else if (text.equals("testincap")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - int health = getMaxAttrib(target, HEALTH); - damage(target, DAMAGE_KINETIC, HIT_LOCATION_BODY, health * 4); - } - else if (text.equals("whackhealth")) - { - int health = getMaxAttrib(self, HEALTH) + 100; - setAttrib(self, HEALTH, -health); - } - else if (text.equals("whackaction")) - { - int action = getMaxAttrib(self, ACTION) + 100; - setAttrib(self, ACTION, -action); - } - else if (text.equals("whackmind")) - { - int mind = getMaxAttrib(self, MIND) + 100; - setAttrib(self, MIND, -mind); - } - else if (text.equals("killme")) - { - setObjVar(self, "killme", true); - int health = getMaxAttrib(self, HEALTH); - damage(self, DAMAGE_KINETIC, HIT_LOCATION_BODY, health * 4); - } - else if (text.equals("maxstats")) - { - for (int i = 0; i < NUM_ATTRIBUTES; ++i) - { - setAttrib(self, i, getMaxAttrib(self, i)); - } - int force = getMaxForcePower(self); - if (force > 0) - { - setForcePower(self, force); - } - setShockWound(self, 0); - } - else if (text.equals("testxp")) - { - dictionary params = new dictionary(); - params.put("xp_type", "scout"); - params.put("amt", 13); - params.put("verbose", true); - messageTo(self, "grantUnmodifiedExperienceOnSelf", params, 0.1f, false); - } - else if (text.equals("makemerebel")) - { - factions.setFactionStanding(self, factions.FACTION_REBEL, 5000); - } - else if (text.equals("makemeimperial")) - { - factions.setFactionStanding(self, factions.FACTION_IMPERIAL, 500); - } - else if (text.equals("clearallmods")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - removeAllAttribModifiers(target); - } - else if (text.equals("testforceregen")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target) && getMaxForcePower(target) > 0) - { - int maxforce = getForcePower(target); - int force = getMaxForcePower(target); - float regen = getForcePowerRegenRate(target); - int skill = getSkillStatisticModifier(target, "jedi_force_power_regen"); - int penalty = utils.getIntScriptVar(target, "jedi.regenPenalty"); - setObjVar(self, "testregenresult.maxforce", maxforce); - setObjVar(self, "testregenresult.force", force); - setObjVar(self, "testregenresult.regen", regen); - setObjVar(self, "testregenresult.skill", skill); - setObjVar(self, "testregenresult.penalty", penalty); - setObjVar(self, "testregenresult.notajedi", false); - } - else - { - setObjVar(self, "testregenresult.notajedi", true); - } - } - else if (text.equals("resetforceregen")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target) && getMaxForcePower(target) > 0) - { - jedi.recalculateForcePower(target); - } - } - else if (text.equals("testgetname")) - { - String myname = getPlayerName(self); - debugSpeakMsg(self, "my name = " + myname); - String otherName = getPlayerName(obj_id.getObjId(28000016)); - debugSpeakMsg(self, "other name = " + otherName); - } - else if (text.equals("testobjvar")) - { - boolean result = hasObjVar(self, ""); - result = hasObjVar(self, "winona"); - debugSpeakMsg(self, "winona = " + result); - result = hasObjVar(self, "sdata"); - debugSpeakMsg(self, "sdata = " + result); - } - else if (text.equals("testcreate")) - { - location myLocation = getLocation(self); - obj_id result = createObject("asdasfasdfa", myLocation); - result = createObject("object/tangible/terminal/terminal_mission_scout.iff", myLocation); - } - else if (text.equals("testtheater")) - { - location mypos = getLocation(self); - String[] templates = new String[100]; - location[] positions = new location[100]; - float x, z; - double arc = Math.PI * 2.0 / 100.0; - for (int i = 0; i < 100; ++i) - { - templates[i] = "object/tangible/wearables/dress/nightsister_dress.iff"; - x = (float)(Math.cos(arc * i)) * 20.0f; - z = (float)(Math.sin(arc * i)) * 20.0f; - positions[i] = new location(x, 0, z); - } - obj_id theater = createTheater("datatables/theater/test.iff", mypos, "steve.theater_test"); - if (isIdValid(theater)) - { - (theater.getScriptVars()).put("creator", self); - (getScriptVars()).put("theater", theater); - } - else - { - debugSpeakMsg(self, "Error creating theater"); - } - } - else if (text.equals("testfindtheater")) - { - debugSpeakMsg(self, "Theater fred = " + findTheater("fred")); - debugSpeakMsg(self, "Theater alpha = " + findTheater("alpha")); - debugSpeakMsg(self, "Theater beta = " + findTheater("beta")); - debugSpeakMsg(self, "Theater gamma = " + findTheater("gamma")); - debugSpeakMsg(self, "Theater delta = " + findTheater("delta")); - debugSpeakMsg(self, "Theater epsilon = " + findTheater("epsilon")); - } - else if (text.equals("destroytheater")) - { - obj_id theater = getObjIdObjVar(self, "player_theater"); - if (isIdValid(theater)) - { - destroyObject(theater); - removeObjVar(self, "player_theater"); - } - } - else if (text.equals("testplayertheater")) - { - boolean result = assignTheaterToPlayer(self, "datatables/theater/test.iff", getLocation(self), null, TLT_none); - debugSpeakMsg(self, "assign theater result = " + result); - } - else if (text.equals("testdestroyplayertheater")) - { - obj_id theater = getLastSpawnedTheater(self); - if (isIdValid(theater)) - { - destroyObject(theater); - debugSpeakMsg(self, "destroyed theater " + theater); - } - else - { - debugSpeakMsg(self, "No theater"); - } - } - else if (text.equals("testdietheater")) - { - setObjVar(self, "testdietheater", true); - setObjVar(self, "killme", true); - int health = getMaxAttrib(self, HEALTH); - damage(self, DAMAGE_KINETIC, HIT_LOCATION_BODY, health * 4); - } - else if (text.equals("getspawnedtheater")) - { - debugSpeakMsg(self, "my last spawned theater = " + getLastSpawnedTheater(self)); - } - else if (text.equals("testspeed")) - { - debugSpeakMsg(self, "My run speed = " + getRunSpeed(self)); - } - else if (text.equals("testschematic")) - { - draft_schematic schematicData = getSchematicData("object/draft_schematic/community_crafting/village_shields.iff"); - String[] scripts = schematicData.getScripts(); - if (scripts != null) - { - for (int i = 0; i < scripts.length; ++i) - { - debugSpeakMsg(self, "Script = " + scripts[i]); - } - } - else - { - debugSpeakMsg(self, "No scripts!"); - } - } - else if (text.equals("makecommunitycrafting")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - boolean result = community_crafting.setMasterSchematic(target, "object/draft_schematic/community_crafting/village_defenses.iff", true, true, true, null); - debugSpeakMsg(self, "community crafting result = " + result); - } - } - else if (text.equals("endcommunitycrafting")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - boolean result = community_crafting.finalizeItem(target, true); - debugSpeakMsg(self, "finalize result = " + result); - } - } - else if (text.equals("clearcommunitycrafting")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - boolean result = community_crafting.cleanup(target); - debugSpeakMsg(self, "cleanup result = " + result); - } - } - else if (text.equals("joincommunitycrafting")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - boolean result = community_crafting.grantSchematicToPlayer(target, self); - debugSpeakMsg(self, "join community crafting result = " + result); - } - } - else if (text.equals("logmasterobject")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - int schematic = community_crafting.getSchematic(target); - if (schematic != 0) - { - utils.setScriptVar(self, "master_community_crafter", target); - debugSpeakMsg(self, "OK"); - } - else - { - debugSpeakMsg(self, "Target not master object"); - } - } - } - else if (text.equals("makecommunitynpc")) - { - obj_id masterObject = utils.getObjIdScriptVar(self, "master_community_crafter"); - if (isIdValid(masterObject)) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target) && target != masterObject) - { - setObjVar(target, community_crafting.OBJVAR_COMMUNITY_CRAFTING_TRACKER, masterObject); - debugSpeakMsg(self, "OK, reset the servers"); - } - else - { - debugSpeakMsg(self, "No target"); - } - } - else - { - debugSpeakMsg(self, "No master object"); - } - } - else if (text.equals("givecommunityingredient")) - { - obj_id masterObject = utils.getObjIdScriptVar(self, "master_community_crafter"); - if (isIdValid(masterObject)) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - boolean result = community_crafting.addIngredient(masterObject, self, target); - debugSpeakMsg(self, "Ingredient result = " + result); - } - else - { - debugSpeakMsg(self, "No target"); - } - } - else - { - debugSpeakMsg(self, "No master object"); - } - } - else if (text.equals("getgot")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - int type = getGameObjectType(target); - debugSpeakMsg(self, "GOT = " + Integer.toHexString(type)); - } - } - else if (text.equals("testdoublesort")) - { - int[] values = new int[50]; - obj_id[] ids = new obj_id[50]; - for (int i = 0; i < values.length; ++i) - { - values[i] = rand(1, 999999); - } - community_crafting.doubleSort(values, ids); - int j; - for (j = 0; j < values.length - 1; ++j) - { - if (values[j] < values[j + 1]) - { - break; - } - } - if (j == values.length - 1) - { - debugSpeakMsg(self, "OK"); - } - else - { - debugSpeakMsg(self, "FAIL!"); - } - } - else if (text.equals("testvillageaccess")) - { - fs_quests.makeVillageEligible(self); - debugSpeakMsg(self, "I should be able to enter the village now"); - } - else if (text.startsWith("setvillagephase")) - { - String phaseString = text.substring(("setvillagephase").length()); - phaseString = phaseString.trim(); - int phase = Integer.parseInt(phaseString); - if (phase >= 1 && phase <= 4) - { - debugSpeakMsg(self, "Setting phase to " + phase); - fs_dyn_village.setNextPhaseAuth(getLookAtTarget(self), phase); - } - else - { - debugSpeakMsg(self, "Error, phaseString = " + phaseString); - } - } - else if (text.equals("testdt")) - { - final String DATATABLE_CRAFTING_QUESTS = "datatables/quest/force_sensitive/community_crafting.iff"; - final String DATATABLE_CQ_PHASE = "phase"; - final String DATATABLE_CQ_SCHEMATIC = "schematic"; - final String DATATABLE_CQ_PRIZE = "prize"; - final String DATATABLE_CQ_TRACK_QUANTITY = "track_quantity"; - final String DATATABLE_CQ_TRACK_QUALTITY = "track_quality"; - final String DATATABLE_CQ_TRACK_SLOTS = "track_slots"; - final String DATATABLE_CQ_MIN_INGREDIENTS = "min_ingredients"; - int row = dataTableSearchColumnForInt(2, DATATABLE_CQ_PHASE, DATATABLE_CRAFTING_QUESTS); - if (row >= 0) - { - String schematic = dataTableGetString(DATATABLE_CRAFTING_QUESTS, row, DATATABLE_CQ_SCHEMATIC); - String prize = dataTableGetString(DATATABLE_CRAFTING_QUESTS, row, DATATABLE_CQ_PRIZE); - boolean trackQuantity = dataTableGetInt(DATATABLE_CRAFTING_QUESTS, row, DATATABLE_CQ_TRACK_QUANTITY) != 0; - boolean trackQuality = dataTableGetInt(DATATABLE_CRAFTING_QUESTS, row, DATATABLE_CQ_TRACK_QUALTITY) != 0; - boolean trackSlots = dataTableGetInt(DATATABLE_CRAFTING_QUESTS, row, DATATABLE_CQ_TRACK_SLOTS) != 0; - int minIngredients = dataTableGetInt(DATATABLE_CRAFTING_QUESTS, row, DATATABLE_CQ_MIN_INGREDIENTS); - debugConsoleMsg(self, "schematic = " + schematic); - debugConsoleMsg(self, "prize = " + prize); - debugConsoleMsg(self, "trackQuantity = " + trackQuantity); - debugConsoleMsg(self, "trackQuality = " + trackQuality); - debugConsoleMsg(self, "trackSlots = " + trackSlots); - debugConsoleMsg(self, "minIngredients = " + minIngredients); - } - else - { - debugConsoleMsg(self, "No row 2"); - } - } - else if (text.equals("testgivequest")) - { - debugSpeakMsg(self, "Activating quest"); - quests.activate("fs_phase_2_craft_defenses_01", self, self); - } - else if (text.equals("testhasquest")) - { - debugSpeakMsg(self, "isActive = " + quests.isActive("fs_phase_2_craft_defenses_01", self)); - } - else if (text.equals("clearccquests")) - { - clearCompletedQuest(self, quests.getQuestId("fs_phase_2_craft_defenses_01")); - clearCompletedQuest(self, quests.getQuestId("fs_phase_3_craft_shields_01")); - } - else if (text.equals("completeccquest")) - { - messageTo(self, "handleCommunityCraftingMinimumQuantityMet", null, 0.1f, false); - } - else if (text.equals("testamicraftingorquesting")) - { - final String QUEST_NAME = "fs_phase_3_craft_shields_01"; - obj_id masterId = obj_id.getObjId(18000045); - if (community_crafting.getNumPlayersCrafting(masterId) >= community_crafting.MAX_PLAYERS_PER_PROJECT) - { - debugSpeakMsg(self, "Yes, there are too many players crafting"); - } - else if (community_crafting.isSessionActive(masterId) && community_crafting.isPlayerCrafting(masterId, self)) - { - debugSpeakMsg(self, "Yes, I am crafting"); - } - else if (quests.isActive(QUEST_NAME, self)) - { - debugSpeakMsg(self, "Yes, I have the quest active"); - } - else if (quests.isComplete(QUEST_NAME, self)) - { - debugSpeakMsg(self, "Yes, I have the quest complete"); - } - else if (fs_quests.hasQuestAccepted(self)) - { - debugSpeakMsg(self, "Yes, I have a quest for this phase already"); - } - else - { - debugSpeakMsg(self, "No, I should be able to join the quest"); - } - } - else if (text.equals("makeendrine")) - { - obj_id inventory = utils.getInventoryContainer(self); - obj_id endrine = createObject("object/tangible/loot/quest/endrine.iff", inventory, ""); - if (isValidId(endrine)) - { - setObjVar(endrine, "crafting_components.res_malleability", rand(500, 1000)); - setObjVar(endrine, "crafting_components.res_quality", rand(500, 1000)); - setObjVar(endrine, "crafting_components.res_toughness", rand(500, 1000)); - } - } - else if (text.equals("makerudric")) - { - obj_id inventory = utils.getInventoryContainer(self); - obj_id rudric = createObject("object/tangible/loot/quest/rudric.iff", inventory, ""); - if (isValidId(rudric)) - { - setObjVar(rudric, "crafting_components.res_conductivity", rand(500, 1000)); - setObjVar(rudric, "crafting_components.res_decay_resist", rand(500, 1000)); - setObjVar(rudric, "crafting_components.res_quality", rand(500, 1000)); - setObjVar(rudric, "crafting_components.res_shock_resistance", rand(500, 1000)); - } - } - else if (text.equals("makeardanium")) - { - obj_id inventory = utils.getInventoryContainer(self); - obj_id ardanium = createObject("object/tangible/loot/quest/ardanium_ii.iff", inventory, ""); - if (isValidId(ardanium)) - { - setObjVar(ardanium, "crafting_components.res_potential_energy", rand(500, 1000)); - setObjVar(ardanium, "crafting_components.res_quality", rand(500, 1000)); - } - } - else if (text.equals("makeostrine")) - { - obj_id inventory = utils.getInventoryContainer(self); - obj_id ostrine = createObject("object/tangible/loot/quest/ostrine.iff", inventory, ""); - if (isValidId(ostrine)) - { - setObjVar(ostrine, "crafting_components.malleability", rand(500, 1000)); - setObjVar(ostrine, "crafting_components.res_quality", rand(500, 1000)); - } - } - else if (text.equals("testremotecreate")) - { - obj_id object = createObject("object/tangible/loot/quest/endrine.iff", new location(1000, 0, 1000)); - debugSpeakMsg(self, "Created object " + object); - } - else if (text.equals("testremotetheater")) - { - debugSpeakMsg(self, "Create remote theater result = " + createRemoteTheater("datatables/theater/test2.iff", "fred")); - } - else if (text.equals("destroy")) - { - obj_id object = getLookAtTarget(self); - if (isIdValid(object)) - { - destroyObject(object); - } - } - else if (text.equals("testgetobjects")) - { - obj_id[] objects = getNonCreaturesInRange(getLocation(self), 100.0f); - if (objects != null) - { - for (int i = 0; i < objects.length; ++i) - { - debugConsoleMsg(self, "" + objects[i]); - } - } - } - else if (text.equals("testneedschematics")) - { - debugSpeakMsg(self, "isActive test = " + quests.isActive("fs_phase_3_craft_shields_01", self)); - debugSpeakMsg(self, "isCrafting test = " + community_crafting.isPlayerCrafting(obj_id.getObjId(71000022), self)); - } - else if (text.equals("acceptquest2")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - quests.activate("fs_phase_2_craft_defenses_01", self, target); - debugSpeakMsg(self, "Activated phase 2 crafting quest"); - } - } - else if (text.equals("acceptquest3")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - quests.activate("fs_phase_3_craft_shields_01", self, target); - debugSpeakMsg(self, "Activated phase 3 crafting quest"); - } - } - else if (text.equals("testenemycamps")) - { - final String DT_TABLE_POI_NAME = "datatables/theater/fs_quest_combat3/fs_quest_combat3.iff"; - Vector camps = script.library.fs_counterstrike.getAllCampHintsFromDT(); - Vector phaseLocs = (Vector)(camps.get(0)); - Vector phaseNames = (Vector)(camps.get(1)); - for (int i = 0; i < phaseLocs.size() && i < 4; i++) - { - if (createRemoteTheater(DT_TABLE_POI_NAME, (location)phaseLocs.get(i), "steve.theater_test", self, (String)phaseNames.get(i), TLT_getGoodLocation)) - { - debugSpeakMsg(self, "OK for remote theater " + phaseNames.get(i)); - } - } - } - else if (text.equals("testenemy")) - { - debugSpeakMsg(self, "faction # = " + factions.getFactionNumber("sith_shadow")); - debugSpeakMsg(self, "isenemy = " + pvpIsEnemy(obj_id.getObjId(215000087), getLookAtTarget(self))); - } - else if (text.equals("testoverload")) - { - debugSpeakMsg(self, "created overload object " + createObjectInInventoryAllowOverload("object/tangible/parrot_cage/parrot_cage.iff", self)); - } - else if (text.equals("nt1")) - { - debugSpeakMsg(self, "creating theater"); - location theaterLoc = getLocation(self); - theaterLoc.z -= 10.0; - boolean created = assignTheaterToPlayer(self, "datatables/theater/fs_quest_sad/theater1.iff", theaterLoc, "ahunter.my_script"); - debugSpeakMsg(self, "result = " + created); - } - else if (text.equals("nt2")) - { - debugSpeakMsg(self, "creating theater"); - location theaterLoc = getLocation(self); - theaterLoc.z -= 10.0; - boolean created = assignTheaterToPlayer(self, "datatables/theater/fs_quest_sad/theater2.iff", theaterLoc, "ahunter.my_script"); - debugSpeakMsg(self, "result = " + created); - } - else if (text.equals("testscriptvars")) - { - debugSpeakMsg(self, "testing script vars"); - utils.setScriptVar(self, "foo.sub1", "bar"); - utils.setScriptVar(self, "foo.sub2", "bar2"); - debugSpeakMsg(self, "hasfoo = " + utils.hasScriptVar(self, "foo")); - messageTo(self, "handleTestScriptVars", null, 0.5f, false); - } - else if (text.equals("testrand")) - { - int[] counts = new int[100]; - for (int i = 0; i < 200; ++i) - { - ++counts[rand(0, 99)]; - } - for (int i = 0; i < counts.length; ++i) - { - debugServerConsoleMsg(self, "counts[" + i + "] = " + counts[i]); - } - } - else if (text.equals("getyaw")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - debugSpeakMsg(self, "Yaw = " + getYaw(target)); - } - } - else if (text.equals("testcontentsloaded")) - { - obj_id building = getTopMostContainer(self); - if (!isIdValid(building) || !player_structure.isBuilding(building)) - { - debugSpeakMsg(self, "My topmost container " + building + " is not a building"); - } - else - { - debugSpeakMsg(self, "Contents loaded result = " + areAllContentsLoaded(building)); - } - } - else if (text.equals("startphase23bug")) - { - final String QUEST_2_MAIN = "fs_phase_2_craft_defenses_main"; - final String QUEST_2_STEP_01 = "fs_phase_2_craft_defenses_01"; - final String QUEST_2_STEP_02 = "fs_phase_2_craft_defenses_02"; - final String QUEST_2_SCRIPT = "quest.force_sensitive.fs_craft_village_defenses"; - final String QUEST_3_MAIN = "fs_phase_3_craft_shields_main"; - final String QUEST_3_STEP_01 = "fs_phase_3_craft_shields_01"; - final String QUEST_3_STEP_02 = "fs_phase_3_craft_shields_02"; - final String QUEST_3_SCRIPT = "quest.force_sensitive.fs_craft_village_shields"; - final String[] QUESTS = - { - QUEST_2_MAIN, - QUEST_2_STEP_01, - QUEST_2_STEP_02, - QUEST_3_MAIN, - QUEST_3_STEP_01, - QUEST_3_STEP_02 - }; - String oldQuest = QUEST_2_STEP_02; - String questScript = QUEST_2_SCRIPT; - if (hasObjVar(self, "phase3")) - { - oldQuest = QUEST_3_STEP_02; - questScript = QUEST_3_SCRIPT; - } - for (int i = 0; i < QUESTS.length; ++i) - { - int id = quests.getQuestId(QUESTS[i]); - if (isQuestActive(self, id)) - { - deactivateQuest(self, id); - } - if (isQuestComplete(self, id)) - { - clearCompletedQuest(self, id); - } - } - } - else if (text.equals("testphase23bug")) - { - final String QUEST_2_MAIN = "fs_phase_2_craft_defenses_main"; - final String QUEST_2_STEP_01 = "fs_phase_2_craft_defenses_01"; - final String QUEST_2_STEP_02 = "fs_phase_2_craft_defenses_02"; - final String QUEST_2_SCRIPT = "quest.force_sensitive.fs_craft_village_defenses"; - final String QUEST_3_MAIN = "fs_phase_3_craft_shields_main"; - final String QUEST_3_STEP_01 = "fs_phase_3_craft_shields_01"; - final String QUEST_3_STEP_02 = "fs_phase_3_craft_shields_02"; - final String QUEST_3_SCRIPT = "quest.force_sensitive.fs_craft_village_shields"; - final String[] QUESTS = - { - QUEST_2_MAIN, - QUEST_2_STEP_01, - QUEST_2_STEP_02, - QUEST_3_MAIN, - QUEST_3_STEP_01, - QUEST_3_STEP_02 - }; - for (int i = 0; i < QUESTS.length; ++i) - { - int id = quests.getQuestId(QUESTS[i]); - if (isQuestActive(self, id)) - { - debugConsoleMsg(self, "quest " + QUESTS[i] + " active"); - } - if (isQuestComplete(self, id)) - { - debugConsoleMsg(self, "quest " + QUESTS[i] + " complete"); - } - } - } - else if (text.equals("testccprize")) - { - dictionary params = new dictionary(); - params.addInt(community_crafting.REWARD_PRIZE, (1664865686)); - params.addInt(community_crafting.REWARD_PRIZE_SLOT, 0); - params.addInt(community_crafting.REWARD_PRIZE_TYPE, 0); - params.put(community_crafting.REWARD_PRIZE_SCRIPT, "quest.force_sensitive.fs_grant_assembly_5"); - messageTo(self, community_crafting.MSG_HANDLER_PRIZE_WON, params, 0.1f, true); - } - else if (text.equals("finishcraftingquest")) - { - messageTo(self, community_crafting.MSG_HANDLER_MIN_QUANTITY_MET, null, 0.1f, true); - } - else if (text.equals("testloot")) - { - obj_id target = getLookAtTarget(self); - if (isValidId(target)) - { - obj_id inventory = utils.getInventoryContainer(target); - if (isIdValid(inventory)) - { - obj_id item = createObject("object/tangible/loot/quest/endrine.iff", inventory, ""); - if (isIdValid(item)) - { - debugSpeakMsg(self, "Put item in inventory"); - setPosture(target, POSTURE_DEAD); - setObjVar(target, "readyToLoot", true); - attachScript(target, "corpse.ai_corpse"); - } - else - { - debugSpeakMsg(self, "Error 1"); - } - } - else - { - debugSpeakMsg(self, "Error 2"); - } - } - } - else if (text.equals("die")) - { - obj_id target = getLookAtTarget(self); - if (isValidId(target) && (getGameObjectType(target) & GOT_creature) != 0) - { - damage(target, DAMAGE_ENERGY, HIT_LOCATION_BODY, Integer.MAX_VALUE - 500); - } - } - else if (text.equals("testobjectsinrange")) - { - obj_id[] objects = getPlayerCreaturesInRange(getLocation(getLastSpawnedTheater(self)), 64); - if (objects != null) - { - debugSpeakMsg(self, "Found objects"); - for (int i = 0; i < objects.length; ++i) - { - debugConsoleMsg(self, "object " + i + " = " + objects[i]); - } - } - else - { - debugSpeakMsg(self, "No objects in range"); - } - } - else if (text.equals("testlos")) - { - messageTo(self, "handleTestLos", null, 0.1f, false); - } - else if (text.equals("testfx")) - { - obj_id[] clients = null; - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - clients = new obj_id[2]; - clients[0] = self; - clients[1] = target; - } - else - { - clients = new obj_id[1]; - clients[0] = self; - } - playClientEffectObj(clients, "clienteffect/pl_force_shield_hit.cef", self, ""); - } - else if (text.equals("testattribbonus")) - { - obj_id target = obj_id.getObjId(55000058); - if (exists(target) && getContainedBy(target) != self) - { - setAttributeBonus(target, HEALTH, 25); - setAttributeBonus(target, ACTION, 32); - debugSpeakMsg(self, "modded target"); - } - } - else if (text.equals("testweaponrange")) - { - obj_id weapon = getCurrentWeapon(self); - range_info info = getWeaponRangeInfo(weapon); - if (info != null) - { - info.minRange = 10.0f; - info.maxRange = 80.0f; - setWeaponRangeInfo(weapon, info); - } - } - else if (text.equals("testgetcomplexity")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - debugSpeakMsg(self, "target complexity = " + getComplexity(target)); - } - } - else if (text.equals("testsetcomplexity")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - setComplexity(target, getComplexity(target) * 2.0f); - } - } - else if (text.equals("getcell")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - location loc = getLocation(target); - String cell = getCellName(loc.cell); - debugSpeakMsg(self, "target in cell " + cell); - } - else if (text.equals("testmoveup")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - location loc = getLocation(target); - loc.y += 10; - setLocation(target, loc); - } - else if (text.equals("testmovedown")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - location loc = getLocation(target); - loc.y -= 10; - setLocation(target, loc); - } - else if (text.equals("testforceslope")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - addSlowDownEffect(self, target, 30.0f, 90.0f, 75.0f, 120.0f); - } - } - else if (text.equals("testnpcmove")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - messageTo(target, "startMoving", null, 0.1f, false); - } - } - else if (text.equals("testnpcstop")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - messageTo(target, "stopMoving", null, 0.1f, false); - } - } - else if (text.equals("testarmorloot")) - { - obj_id shirt = createObject("object/tangible/wearables/shirt/shirt_s34.iff", getLocation(self)); - if (isIdValid(shirt)) - { - armor.setArmorDataPercent(shirt, AL_basic, AC_battle, 0.5f, 0.7f); - armor.setArmorSpecialProtectionPercent(shirt, 0, 0.3f); - } - } - else if (text.equals("testarmorloot2")) - { - obj_id shirt = createObject("object/tangible/wearables/shirt/shirt_s34.iff", getLocation(self)); - if (isIdValid(shirt)) - { - armor.setAbsoluteArmorData(shirt, AL_basic, AC_battle, 1000, 7500); - } - } - else if (text.equals("testarmorloot3")) - { - obj_id target = createObject("object/tangible/component/armor/armor_layer_generic.iff", getLocation(self)); - if (isIdValid(target)) - { - armor.initializeArmor(target, 0, 0); - armor.setAbsoluteArmorSpecialProtection(target, 8, 75); - debugSpeakMsg(self, "armor created"); - } - else - { - debugSpeakMsg(self, "armor NOT created"); - } - } - else if (text.equals("testbiolink")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - setBioLink(target, self); - } - } - else if (text.equals("testbiolinkpending")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - setBioLink(target, null); - } - } - else if (text.equals("makecrafted")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - setCraftedId(target, self); - setCrafter(target, self); - } - } - else if (text.equals("testcrafter")) - { - obj_id crafter = getCrafter(obj_id.getObjId(74000293)); - debugSpeakMsg(self, "crafter = " + crafter); - } - else if (text.equals("testbelt")) - { - obj_id psg = getObjectInSlot(self, combat.PSG_SLOT_LOCATION); - debugSpeakMsg(self, "obj in belt slot = " + psg + ", GOT = " + getGameObjectType(psg)); - } - else if (text.equals("testpsgfx")) - { - obj_id psg = combat.getPsgArmor(self); - obj_id target = getLookAtTarget(self); - if (isIdValid(psg) && isIdValid(target)) - { - int psgLevel = armor.getArmorLevel(psg); - if (psgLevel < 0 || psgLevel >= armor.PSG_HIT_EFFECTS.length) - { - psgLevel = 0; - } - transform attackerTransform = getTransform_o2w(target); - vector defenderVector = space_utils.getVector(self); - transform finalTransform = space_utils.faceTransformToVector(attackerTransform, defenderVector); - String fx = armor.PSG_STARTUP_EFFECTS[psgLevel]; - fx = armor.PSG_HIT_EFFECTS[psgLevel]; - debugSpeakMsg(self, "Playing psg fx " + fx); - debugSpeakMsg(self, "Psg transform = " + finalTransform); - playClientEffectObj(self, fx, self, "", finalTransform); - } - else - { - debugSpeakMsg(self, "Not wearing psg"); - } - } - else if (text.equals("testdrainactionmind")) - { - drainAttributes(self, 50, 100); - } - else if (text.equals("testdatatable")) - { - debugSpeakMsg(self, "reading datatable row"); - dictionary actionData = dataTableGetRow("datatables/combat/non_combat_data.iff", "bactaToss"); - if (actionData != null) - { - debugSpeakMsg(self, "Success"); - } - else - { - debugSpeakMsg(self, "Fail"); - } - } - else if (text.equals("testnpcregen")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - int health = getHealth(target); - setHealth(target, health / 2); - } - } - else if (text.equals("testbuff")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - debugSpeakMsg(self, "Applying buff, result = " + buff.applyBuff(target, "frogBuff", 15)); - } - else if (text.equals("testunbuff")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - debugSpeakMsg(self, "Removing buff, result = " + buff.removeBuff(target, "frogBuff")); - } - else if (text.equals("testgetbuffs")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - int[] buffs = buff.getAllBuffs(target); - if (buffs != null && buffs.length > 0) - { - for (int i = 0; i < buffs.length; ++i) - { - debugSpeakMsg(self, "Buff = " + buff.getBuffNameFromCrc(buffs[i])); - } - } - else - { - debugSpeakMsg(self, "No buffs"); - } - } - else if (text.equals("stopai")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - stop(target); - } - } - else if (text.equals("testdodamage")) - { - combat_engine.hit_result hitResult = new combat_engine.hit_result(); - hitResult.hitLocation = HIT_LOCATION_BODY; - hitResult.damage = 100; - doDamage(self, self, getCurrentWeapon(self), hitResult); - } - else if (text.equals("testoldspawn")) - { - location loc = getLocation(self); - obj_id id = create.object("gnort", loc); - debugSpeakMsg(self, "Spawned id " + id); - } - else if (text.equals("spawngnorts")) - { - location base = getLocation(self); - for (int i = 0; i < 100; ++i) - { - float x = rand(-50.0f, 50.0f); - float z = rand(-50.0f, 50.0f); - create.object("gnort", new location(base.x + x, base.y, base.z + z)); - } - } - else if (text.equals("testpatrol")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - String[] scripts = getScriptList(target); - if (scripts != null) - { - } - location targetLoc = getLocation(target); - location[] path = new location[4]; - for (int i = 0; i < 4; ++i) - { - path[i] = new location(targetLoc); - } - path[0].x += 25.0f; - path[1].x += 25.0f; - path[1].z += 25.0f; - path[2].x += 50.0f; - path[2].z += 25.0f; - path[3].x += 50.0f; - patrol(target, path); - } - } - else if (text.equals("testcreatepathpoints")) - { - location pos = getLocation(self); - pos.z += 10.0f; - pos.x -= 25.0f; - obj_id[] points = new obj_id[10]; - for (int i = 0; i < 10; ++i) - { - points[i] = createObject("object/path_waypoint/path_waypoint.iff", pos); - if (isIdValid(points[i])) - { - setObjVar(points[i], "pathfinding.waypoint.name", "pathpoint" + i); - setObjVar(points[i], "pathfinding.waypoint.type", 7); - persistObject(points[i]); - } - pos.x -= 25.0f; - if (i % 2 == 0) - { - pos.z -= 20.0f; - } - else - { - pos.z += 20.0f; - } - } - setObjVar(points[0], "pathpoints", points); - } - else if (text.equals("testfixpathpoints")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - obj_id[] points = getObjIdArrayObjVar(target, "pathpoints"); - if (points != null) - { - for (int i = 0; i < points.length; ++i) - { - setObjVar(points[i], "pathfinding.waypoint.name", "pathpoint" + i); - setObjVar(points[i], "pathfinding.waypoint.type", 7); - } - } - } - } - else if (text.equals("testdeletepathpoints")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - obj_id[] points = getObjIdArrayObjVar(target, "pathpoints"); - if (points != null) - { - for (int i = 0; i < points.length; ++i) - { - destroyObject(points[i]); - } - } - } - } - else if (text.equals("testpatrolpathpoints")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - String[] path = new String[10]; - for (int i = 0; i < 10; ++i) - { - path[i] = "pathpoint" + i; - } - patrol(target, path); - } - } - else if (text.equals("removescripts")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - String[] scripts = getScriptList(target); - if (scripts != null) - { - for (int i = 0; i < scripts.length; ++i) - { - if (scripts[i].indexOf(obj_id.SCRIPT_PREFIX) == 0) - { - scripts[i] = scripts[i].substring(obj_id.SCRIPT_PREFIX.length()); - } - detachScript(target, scripts[i]); - } - } - } - } - else if (text.equals("testobjvarlist")) - { - obj_var_list stomach = getObjVarList(self, "stomach"); - if (stomach != null) - { - obj_var ov = stomach.getObjVar("drink"); - if (ov != null) - { - debugSpeakMsg(self, "Short - yes"); - } - else - { - debugSpeakMsg(self, "Short - no"); - } - ov = stomach.getObjVar("stomach.drink"); - if (ov != null) - { - debugSpeakMsg(self, "Long - yes"); - } - else - { - debugSpeakMsg(self, "Long - no"); - } - } - } - else if (text.equals("testgetspeed")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - float walk = getWalkSpeed(target); - float run = getRunSpeed(target); - debugSpeakMsg(self, "walk = " + walk + ", run = " + run); - } - } - else if (text.equals("getweaponinfo")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - obj_id weapon = getDefaultWeapon(target); - if (isIdValid(weapon)) - { - int minDamage = getWeaponMinDamage(weapon); - int maxDamage = getWeaponMaxDamage(weapon); - debugSpeakMsg(self, "Weapon min damage = " + minDamage + ", max Damage = " + maxDamage); - String template = getTemplateName(weapon); - debugSpeakMsg(self, "Weapon template = " + template); - } - else - { - debugSpeakMsg(self, "no weapon?"); - } - } - } - else if (text.equals("testhate")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - obj_id[] hatelist = getHateList(target); - if (hatelist != null && hatelist.length > 0) - { - for (int i = 0; i < hatelist.length; ++i) - { - debugSpeakMsg(self, "hate " + hatelist[i]); - } - } - else - { - debugSpeakMsg(self, "no hate"); - } - } - else if (text.equals("testnumai")) - { - debugSpeakMsg(self, "Num ai on server = " + getNumAI()); - } - else if (text.equals("testmoveto")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - ai_lib.aiPathTo(target, getLocation(self)); - } - } - else if (text.equals("sethomelocation")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - setHomeLocation(target, getLocation(target)); - } - } - else if (text.equals("testtrial")) - { - obj_id target = getTopMostContainer(self); - messageTo(target, "beginSpawn", null, 0, false); - } - else if (text.equals("cleartrial")) - { - obj_id target = getTopMostContainer(self); - dictionary params = new dictionary(); - params.put("command", "clearEventArea"); - messageTo(target, "remoteCommand", params, 0, false); - } - else if (text.equals("teststartcombat")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target) && target != self) - { - startCombat(self, target); - } - } - else if (text.equals("teststopcombat")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target) && target != self) - { - stopCombat(target); - stopCombat(self); - } - } - else if (text.equals("testsuspendmove")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - boolean suspended = hasSuspendedMovement(target); - if (!suspended) - { - debugSpeakMsg(self, "Suspended movement result = " + suspendMovement(target)); - } - else - { - debugSpeakMsg(self, "Can't suspended movement, already suspended"); - } - } - } - else if (text.equals("testresumemove")) - { - obj_id target = getLookAtTarget(self); - if (isIdValid(target)) - { - boolean suspended = hasSuspendedMovement(target); - if (suspended) - { - debugSpeakMsg(self, "Resume movement result = " + resumeMovement(target)); - } - else - { - debugSpeakMsg(self, "Can't resume movement, none suspended"); - } - } - } - else if (text.equals("getregenrates")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - int[] attribs = - { - HEALTH, - ACTION, - MIND - }; - float[] values = new float[3]; - for (int i = 0; i < attribs.length; ++i) - { - values[i] = getRegenRate(target, attribs[i]); - debugSpeakMsg(self, "attrib " + i + " regen = " + values[i]); - } - } - else if (text.equals("testregenrates")) - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - setRegenRate(target, HEALTH, 2.69f); - } - return SCRIPT_CONTINUE; - } - public int OnLogin(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "ONLOGIN TRIGGERED"); - if (hasObjVar(self, "testdietheater")) - { - removeObjVar(self, "testdietheater"); - unassignTheaterFromPlayer(self); - messageTo(self, "testdietheater", null, 6, false); - } - return SCRIPT_CONTINUE; - } - public int OnImmediateLogout(obj_id self) throws InterruptedException - { - return SCRIPT_CONTINUE; - } - public int OnUnloadedFromMemory(obj_id self) throws InterruptedException - { - return SCRIPT_CONTINUE; - } - public int handleWarningShotTest(obj_id self, dictionary params) throws InterruptedException - { - obj_id target = getLookAtTarget(self); - if (!isIdValid(target)) - { - target = self; - } - debugSpeakMsg(self, "Skill mod = " + getEnhancedSkillStatisticModifier(target, "private_defense_penalty")); - return SCRIPT_CONTINUE; - } - public int handleTestLos(obj_id self, dictionary params) throws InterruptedException - { - obj_id target = getLookAtTarget(self); - if (isValidId(target)) - { - if (canSee(self, target)) - { - debugSpeakMsg(self, "yes"); - } - else - { - debugSpeakMsg(self, "no"); - } - } - messageTo(self, "handleTestLos", null, 0.1f, false); - return SCRIPT_CONTINUE; - } - public int handleCloneRespawn(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "HANDLECLONERESPAWN TRIGGERED"); - return SCRIPT_CONTINUE; - } - public int testdietheater(obj_id self, dictionary params) throws InterruptedException - { - obj_id theater = getLastSpawnedTheater(self); - if (isIdValid(theater)) - { - destroyObject(theater); - debugSpeakMsg(self, "I've destroyed my theater " + theater); - } - else - { - debugSpeakMsg(self, "testdietheater, unable to get last theater"); - } - return SCRIPT_CONTINUE; - } - public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException - { - if (hasObjVar(self, "killme")) - { - removeObjVar(self, "killme"); - pclib.killPlayer(self, self); - } - return SCRIPT_CONTINUE; - } - public int OnCreatureDamaged(obj_id self, obj_id attacker, obj_id weapon, int[] damage) throws InterruptedException - { - for (int i = 0; i < 9; ++i) - { - setAttrib(self, i, getMaxAttrib(self, i)); - } - int force = getMaxForcePower(self); - if (force > 0) - { - setForcePower(self, force); - } - setShockWound(self, 0); - return SCRIPT_CONTINUE; - } - public int OnSkillModsChanged(obj_id self, String[] modNames, int[] modValues) throws InterruptedException - { - if (modNames != null && modValues != null && modNames.length == modValues.length) - { - for (int i = 0; i < modNames.length; ++i) - { - debugSpeakMsg(self, "skillmods changed, " + modNames[i] + " = " + modValues[i]); - } - } - return SCRIPT_CONTINUE; - } - public int handleTestScriptVars(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "deleting script vars"); - utils.removeScriptVar(self, "foo"); - debugSpeakMsg(self, "has foo = " + utils.hasScriptVar(self, "foo")); - debugSpeakMsg(self, "has foo.sub1 = " + utils.hasScriptVar(self, "foo.sub1")); - return SCRIPT_CONTINUE; - } - public int startSpeedTest(obj_id self, dictionary params) throws InterruptedException - { - location myPos = getLocation(self); - (getScriptVars()).put("speedtest_start", myPos); - messageTo(self, "stopSpeedTest", null, 30.0f, false); - return SCRIPT_CONTINUE; - } - public int stopSpeedTest(obj_id self, dictionary params) throws InterruptedException - { - location myPos = getLocation(self); - location startPos = (getScriptVars()).getLocation("speedtest_start"); - float distance = myPos.distance(startPos); - debugSpeakMsg(self, "My speed = " + distance / 30.0f); - return SCRIPT_CONTINUE; - } - public int handleTheaterCreated(obj_id self, dictionary params) throws InterruptedException - { - obj_id theater = params.getObjId("theater"); - String theaterName = getTheaterName(theater); - debugSpeakMsg(self, "My theater " + theaterName + ", id " + theater + " has been created"); - return SCRIPT_CONTINUE; - } - public int destroyTheater(obj_id self, dictionary params) throws InterruptedException - { - obj_id theater = params.getObjId("theater"); - if (isIdValid(theater)) - { - debugSpeakMsg(self, "Destroying theater " + theater); - destroyObject(theater); - } - else - { - debugSpeakMsg(self, "destroyTheater got bad id"); - } - return SCRIPT_CONTINUE; - } - public int abortSkillModMod(obj_id self, dictionary params) throws InterruptedException - { - removeAttribOrSkillModModifier(self, "themodmodmod"); - return SCRIPT_CONTINUE; - } - public void listObjvars(obj_id self, obj_id object) throws InterruptedException - { - obj_var_list list = getObjVarList(object, null); - if (list != null) - { - debugConsoleMsg(self, list.toString()); - } - else - { - debugConsoleMsg(self, "no objvars on me"); - } - } - public String myFunc() throws InterruptedException - { - return new String(""); - } - public dictionary myOtherFunc() throws InterruptedException - { - return null; - } - public int myMessageHandler(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "in my message handler"); - if (params != null) - { - debugServerConsoleMsg(self, "params = " + params); - Object slef = params.get("slef"); - if (slef != null) - { - debugServerConsoleMsg(self, "slef class is " + slef.getClass()); - obj_id o_slef = (obj_id)slef; - if (o_slef != null) - { - debugServerConsoleMsg(self, "slef converted to obj_id"); - } - else - { - debugServerConsoleMsg(self, "cannot convert slef"); - } - obj_id d_slef = params.getObjId("slef"); - if (d_slef != null) - { - debugServerConsoleMsg(self, "dictionary converted to obj_id"); - } - else - { - debugServerConsoleMsg(self, "dictionary cannot convert to obj_id"); - } - } - else - { - debugServerConsoleMsg(self, "can't find slef"); - } - } - else - { - debugServerConsoleMsg(self, "null params"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/steve/theater_test.java b/sku.0/sys.server/compiled/game/script/working/steve/theater_test.java deleted file mode 100644 index 0a990e8ff..000000000 --- a/sku.0/sys.server/compiled/game/script/working/steve/theater_test.java +++ /dev/null @@ -1,55 +0,0 @@ -package script.working.steve; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class theater_test extends script.base_script -{ - public theater_test() - { - } - public int OnTheaterCreated(obj_id self, obj_id[] objects, obj_id player, obj_id creator) throws InterruptedException - { - debugServerConsoleMsg(self, "OnTheaterCreated enter"); - if (isIdValid(creator)) - { - dictionary params = new dictionary(); - params.put("theater", self); - messageTo(creator, "handleTheaterCreated", params, 0.1f, false); - } - else if (isIdValid(player)) - { - persistObject(self); - setObjVar(player, "player_theater", self); - debugSpeakMsg(player, "Theater " + self + " active"); - } - else - { - debugServerConsoleMsg(self, "Theater missing creator"); - } - if (objects != null) - { - if (objects.length == 0) - { - debugServerConsoleMsg(self, "OnTheaterCreated no objects"); - } - for (int i = 0; i < objects.length; ++i) - { - if (isIdValid(objects[i])) - { - messageTo(objects[i], "startHandler", null, 1, false); - } - } - } - else - { - debugServerConsoleMsg(self, "OnTheaterCreated null objects"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/steve/theater_test2.java b/sku.0/sys.server/compiled/game/script/working/steve/theater_test2.java deleted file mode 100644 index 86498ef38..000000000 --- a/sku.0/sys.server/compiled/game/script/working/steve/theater_test2.java +++ /dev/null @@ -1,20 +0,0 @@ -package script.working.steve; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class theater_test2 extends script.base_script -{ - public theater_test2() - { - } - public int startHandler(obj_id self, dictionary params) throws InterruptedException - { - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/steve/veteran_npc.java b/sku.0/sys.server/compiled/game/script/working/steve/veteran_npc.java deleted file mode 100644 index b9ed9f761..000000000 --- a/sku.0/sys.server/compiled/game/script/working/steve/veteran_npc.java +++ /dev/null @@ -1,53 +0,0 @@ -package script.working.steve; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.veteran_deprecated; - -public class veteran_npc extends script.base_script -{ - public veteran_npc() - { - } - public int OnInitialize(obj_id self) throws InterruptedException - { - setCondition(self, CONDITION_CONVERSABLE); - return SCRIPT_CONTINUE; - } - public int OnStartNpcConversation(obj_id self, obj_id conversant) throws InterruptedException - { - string_id greeting = null; - string_id[] responses = null; - if (veteran_deprecated.canGetReward(conversant)) - { - greeting = new string_id(veteran_deprecated.VETERAN_STRING_TABLE, "greeting"); - responses = new string_id[2]; - responses[0] = new string_id(veteran_deprecated.VETERAN_STRING_TABLE, "get_award"); - responses[1] = new string_id(veteran_deprecated.VETERAN_STRING_TABLE, "not_now"); - } - else - { - greeting = new string_id(veteran_deprecated.VETERAN_STRING_TABLE, "go_away"); - responses = new string_id[1]; - responses[0] = new string_id(veteran_deprecated.VETERAN_STRING_TABLE, "damn"); - } - npcStartConversation(conversant, self, "veteran", greeting, responses); - return SCRIPT_CONTINUE; - } - public int OnNpcConversationResponse(obj_id self, String conversation, obj_id conversant, string_id response) throws InterruptedException - { - debugServerConsoleMsg(null, "OnNpcConversationResponse response = " + response); - if (response.equals(new string_id(veteran_deprecated.VETERAN_STRING_TABLE, "get_award"))) - { - veteran_deprecated.requestVeteranRewards(conversant); - } - npcEndConversation(conversant); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/broadcast_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/broadcast_test.java deleted file mode 100644 index 61f75ea73..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/broadcast_test.java +++ /dev/null @@ -1,24 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class broadcast_test extends script.base_script -{ - public broadcast_test() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("broadcast")) - { - sendSystemMessageGalaxyTestingOnly("Broadcasting now, speaker is " + objSpeaker + ", self is " + self); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/container_broadcast_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/container_broadcast_test.java deleted file mode 100644 index c25c980fb..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/container_broadcast_test.java +++ /dev/null @@ -1,25 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class container_broadcast_test extends script.base_script -{ - public container_broadcast_test() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("breakContainer")) - { - makeContainerStateInconsistentTestOnly(objSpeaker); - sendSystemMessageGalaxyTestingOnly("Here's the OnHearSpeech system message."); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/dismount_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/dismount_test.java deleted file mode 100644 index c9bddde34..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/dismount_test.java +++ /dev/null @@ -1,29 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class dismount_test extends script.base_script -{ - public dismount_test() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("dismounttest")) - { - LOG("mounts", "dismount_test: begin"); - LOG("mounts", "self = " + self); - obj_id mountId = getMountId(self); - LOG("mounts", "getMountId() returned " + mountId); - dismountCreature(self); - LOG("mounts", "dismount_test: end"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/flytext_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/flytext_test.java deleted file mode 100644 index 2d192215b..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/flytext_test.java +++ /dev/null @@ -1,28 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class flytext_test extends script.base_script -{ - public flytext_test() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("flytext_test")) - { - showFlyText(self, new string_id("ui", "game_exit"), 2.0f, new color(0, 255, 0, 0)); - } - else if (strText.equals("flytextprivate_test")) - { - showFlyTextPrivate(self, objSpeaker, new string_id("ui", "game_exit"), 1.0f, new color(0, 0, 255, 0)); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/mood_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/mood_test.java deleted file mode 100644 index bf19d2d46..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/mood_test.java +++ /dev/null @@ -1,31 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.ai_lib; -import script.library.create; - -public class mood_test extends script.base_script -{ - public mood_test() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("mood_test")) - { - location speakerLocation = getLocation(objSpeaker); - obj_id goodGuy = create.object("commoner", speakerLocation); - ai_lib.setDefaultCalmMood(goodGuy, "npc_sad"); - obj_id badGuy = create.object("patron_human_female_01", speakerLocation); - ai_lib.setDefaultCalmMood(badGuy, "npc_sad"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/mount_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/mount_test.java deleted file mode 100644 index a5487512c..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/mount_test.java +++ /dev/null @@ -1,29 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class mount_test extends script.base_script -{ - public mount_test() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("mounttest")) - { - boolean mpmResult = makePetMountable(self); - updateMountWearableVisuals(self); - boolean mcResult = mountCreature(objSpeaker, self); - dismountCreature(objSpeaker); - obj_id mountId = getMountId(objSpeaker); - int canMakePetMountable = couldPetBeMadeMountable(self); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/posture_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/posture_test.java deleted file mode 100644 index 40cf0a8ed..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/posture_test.java +++ /dev/null @@ -1,40 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class posture_test extends script.base_script -{ - public posture_test() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("posture_kneel")) - { - setPostureClientImmediate(self, POSTURE_CROUCHED); - } - else if (strText.equals("posture_stand")) - { - setPostureClientImmediate(self, POSTURE_UPRIGHT); - } - else if (strText.equals("posture_prone")) - { - setPostureClientImmediate(self, POSTURE_PRONE); - } - else if (strText.equals("posture_sit")) - { - setPostureClientImmediate(self, POSTURE_SITTING); - } - else if (strText.equals("posture_incapacitated")) - { - setPostureClientImmediate(self, POSTURE_INCAPACITATED); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/rank_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/rank_test.java deleted file mode 100644 index 779609037..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/rank_test.java +++ /dev/null @@ -1,20 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class rank_test extends script.base_script -{ - public rank_test() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/scale_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/scale_test.java deleted file mode 100644 index f10880198..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/scale_test.java +++ /dev/null @@ -1,29 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class scale_test extends script.base_script -{ - public scale_test() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("scaletest")) - { - float bothanDefaultScale = getDefaultScaleFromObjectTemplate("object/creature/player/bothan_male.iff"); - LOG("scaletest", "bothan default scale: " + Float.toString(bothanDefaultScale)); - float humanDefaultScale = getDefaultScaleFromObjectTemplate("object/creature/player/human_male.iff"); - LOG("scaletest", "human default scale: " + Float.toString(humanDefaultScale)); - float wookieeDefaultScale = getDefaultScaleFromObjectTemplate("object/creature/player/wookiee_male.iff"); - LOG("scaletest", "wookiee default scale: " + Float.toString(wookieeDefaultScale)); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/sit_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/sit_test.java deleted file mode 100644 index 9bd7157f2..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/sit_test.java +++ /dev/null @@ -1,108 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class sit_test extends script.base_script -{ - public sit_test() - { - } - public String[] strSplit(String strText) throws InterruptedException - { - obj_id self = null; - int intIndex = 0; - int intI = 0; - intIndex = strText.indexOf(" "); - String strText1 = ""; - String strText2 = ""; - if (intIndex < 0) - { - String[] strReturn = new String[1]; - strReturn[0] = strText; - return strReturn; - } - else - { - while (intI < strText.length()) - { - if (intI < intIndex) - { - strText1 = strText1 + strText.charAt(intI); - } - if (intI > intIndex) - { - strText2 = strText2 + strText.charAt(intI); - } - intI = intI + 1; - } - } - String[] strReturn = new String[2]; - strReturn[0] = strText1; - strReturn[1] = strText2; - return strReturn; - } - public obj_id getObjectIdFromString(String objectIdAsString) throws InterruptedException - { - Long lngId = null; - try - { - lngId = new Long(objectIdAsString); - } - catch(NumberFormatException err) - { - return null; - } - return obj_id.getObjId(lngId.longValue()); - } - public void dumpStringArray(obj_id id, String[] array) throws InterruptedException - { - if (array == null) - { - debugServerConsoleMsg(id, "string array is null."); - } - else - { - debugServerConsoleMsg(id, "string entry count: " + array.length); - for (int i = 0; i < array.length; ++i) - { - debugServerConsoleMsg(id, "string [" + i + "]: [" + array[i] + "]."); - } - } - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("sit_version")) - { - debugSpeakMsg(self, "sit_test: version 0.1"); - } - else - { - String[] strings = strSplit(strText); - dumpStringArray(self, strings); - if ((strings.length == 2) && (strings[0].equals("sitOn"))) - { - obj_id chairId = getObjectIdFromString(strings[1]); - if (chairId != null) - { - debugServerConsoleMsg(self, "calling sitOnObject() C code."); - sitOnObject(objSpeaker, chairId, 0); - } - else - { - debugServerConsoleMsg(self, "objectId retrieval failed for object id [" + strings[1] + "]."); - } - } - else - { - debugServerConsoleMsg(self, "sitOn search criteria not met [" + ((strings.length == 2) ? "true" : "false") + "] [" + ((strings[0].equals("sitOn")) ? "true" : "false") + "]."); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/stack_overflow_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/stack_overflow_test.java deleted file mode 100644 index c5838e1d6..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/stack_overflow_test.java +++ /dev/null @@ -1,46 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class stack_overflow_test extends script.base_script -{ - public stack_overflow_test() - { - } - public void doJavaStackOverflow1(int param) throws InterruptedException - { - int a = param * 5 - 3; - doJavaStackOverflow2(a); - } - public void doJavaStackOverflow2(int param) throws InterruptedException - { - int b = param * 3 - 2; - doJavaStackOverflow1(b); - } - public void doJavaOutOfMemory() throws InterruptedException - { - Vector x = new Vector(); - while (true) - { - x.add(new int[1000000]); - } - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("doJavaStackOverflow")) - { - doJavaStackOverflow1(1); - } - else if (strText.equals("doJavaOutOfMemory")) - { - doJavaOutOfMemory(); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/vcdping_test.java b/sku.0/sys.server/compiled/game/script/working/tfiala/vcdping_test.java deleted file mode 100644 index 13b109de6..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/vcdping_test.java +++ /dev/null @@ -1,33 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.callable; -import script.library.utils; - -public class vcdping_test extends script.base_script -{ - public vcdping_test() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - obj_id controlDevice = callable.getCallableCD(self); - if (!isIdValid(controlDevice)) - { - return SCRIPT_CONTINUE; - } - if (strText.equals("deleteVehicleCurrent")) - { - LOG("vcdping-debug", "vcdping-test.OnHearSpeech(): clearing callable.current"); - callable.setCallableCD(controlDevice, null); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/tfiala/wound_me.java b/sku.0/sys.server/compiled/game/script/working/tfiala/wound_me.java deleted file mode 100644 index e3c0e6ed9..000000000 --- a/sku.0/sys.server/compiled/game/script/working/tfiala/wound_me.java +++ /dev/null @@ -1,20 +0,0 @@ -package script.working.tfiala; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class wound_me extends script.base_script -{ - public wound_me() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/toad/access.java b/sku.0/sys.server/compiled/game/script/working/toad/access.java deleted file mode 100644 index 67229f5db..000000000 --- a/sku.0/sys.server/compiled/game/script/working/toad/access.java +++ /dev/null @@ -1,54 +0,0 @@ -package script.working.toad; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class access extends script.base_script -{ - public access() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (text.equals("access list")) - { - obj_id room = getContainedBy(self); - String[] aList = permissionsGetAllowed(room); - sendSystemMessageTestingOnly(self, "You're looking in Room " + room); - int number = aList.length; - sendSystemMessageTestingOnly(self, "There are " + number + " entries."); - if (number == 0) - { - return SCRIPT_CONTINUE; - } - for (int i = 0; i < number; i++) - { - String name = aList[i]; - sendSystemMessageTestingOnly(self, i + ". " + name); - } - } - if (text.equals("ban list")) - { - obj_id room = getContainedBy(self); - String[] aList = permissionsGetBanned(room); - sendSystemMessageTestingOnly(self, "You're looking in Room " + room); - int number = aList.length; - sendSystemMessageTestingOnly(self, "There are " + number + " entries."); - if (number == 0) - { - return SCRIPT_CONTINUE; - } - for (int i = 0; i < number; i++) - { - String name = aList[i]; - sendSystemMessageTestingOnly(self, i + ". " + name); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/toad/dungeon_logging.java b/sku.0/sys.server/compiled/game/script/working/toad/dungeon_logging.java deleted file mode 100644 index 252204b27..000000000 --- a/sku.0/sys.server/compiled/game/script/working/toad/dungeon_logging.java +++ /dev/null @@ -1,56 +0,0 @@ -package script.working.toad; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.datatable; - -public class dungeon_logging extends script.base_script -{ - public dungeon_logging() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - if (hasObjVar(self, "dungeonOff")) - { - return SCRIPT_CONTINUE; - } - location here = getLocation(self); - float yaw = getYaw(self); - obj_id room = here.cell; - obj_id top = getTopMostContainer(self); - String roomName = getRoomName(top, room); - String spawnLoc = text + " @ " + here + " yaw " + yaw; - String table = "datatables/spawning/dungeon/naboo/robot_dungeon.tab"; - dictionary dctRow = new dictionary(); - dctRow.put("spawns", text); - dctRow.put("loc_x", here.x); - dctRow.put("loc_y", here.y); - dctRow.put("loc_z", here.z); - dctRow.put("room", roomName); - dctRow.put("yaw", yaw); - datatable.serverDataTableAddRow(table, dctRow); - return SCRIPT_CONTINUE; - } - public String getRoomName(obj_id building, obj_id cell) throws InterruptedException - { - String[] allCells = getCellNames(building); - int numberOfCells = allCells.length; - for (int i = 0; i < numberOfCells; i++) - { - String cellName = allCells[i]; - obj_id thisCell = getCellId(building, cellName); - if (thisCell == cell) - { - return cellName; - } - } - return "no_match"; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/toad/emperors_retreat_elevators.java b/sku.0/sys.server/compiled/game/script/working/toad/emperors_retreat_elevators.java deleted file mode 100644 index a2531b4c6..000000000 --- a/sku.0/sys.server/compiled/game/script/working/toad/emperors_retreat_elevators.java +++ /dev/null @@ -1,47 +0,0 @@ -package script.working.toad; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class emperors_retreat_elevators extends script.base_script -{ - public emperors_retreat_elevators() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - if (!hasObjVar(self, "elevators")) - { - location here = getLocation(self); - obj_id elevator = getCellId(self, "empelevator"); - obj_id backelevator = getCellId(self, "backelevator"); - here.x = 12.88f; - here.y = .6f; - here.z = -35.47f; - here.cell = elevator; - obj_id elevatorTerminalA = createObject("object/tangible/terminal/terminal_elevator.iff", here); - here.y = 20f; - obj_id elevatorTerminalB = createObject("object/tangible/terminal/terminal_elevator.iff", here); - here.x = -52.49f; - here.y = .2f; - here.z = -12.33f; - here.cell = backelevator; - obj_id elevatorTerminalC = createObject("object/tangible/terminal/terminal_elevator.iff", here); - setYaw(elevatorTerminalC, 90); - here.y = -9.8f; - obj_id elevatorTerminalD = createObject("object/tangible/terminal/terminal_elevator.iff", here); - setYaw(elevatorTerminalD, 90); - setObjVar(self, "elevators", "done"); - return SCRIPT_CONTINUE; - } - else - { - return SCRIPT_CONTINUE; - } - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/toad/get_location.java b/sku.0/sys.server/compiled/game/script/working/toad/get_location.java deleted file mode 100644 index 7ca7e6116..000000000 --- a/sku.0/sys.server/compiled/game/script/working/toad/get_location.java +++ /dev/null @@ -1,29 +0,0 @@ -package script.working.toad; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class get_location extends script.base_script -{ - public get_location() - { - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - int stringCheck = text.indexOf("here"); - if (stringCheck > -1) - { - location here = getLocation(self); - float yaw = getYaw(self); - String spawnLoc = text + " @ " + here + " yaw " + yaw; - sendSystemMessageTestingOnly(self, spawnLoc); - return SCRIPT_OVERRIDE; - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/toad/msg_test_receiver.java b/sku.0/sys.server/compiled/game/script/working/toad/msg_test_receiver.java deleted file mode 100644 index 4955834a2..000000000 --- a/sku.0/sys.server/compiled/game/script/working/toad/msg_test_receiver.java +++ /dev/null @@ -1,32 +0,0 @@ -package script.working.toad; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class msg_test_receiver extends script.base_script -{ - public msg_test_receiver() - { - } - public int immediate_message(obj_id self, dictionary params) throws InterruptedException - { - String message = params.getString("message"); - obj_id sender = params.getObjId("sender"); - debugSpeakMsg(self, message); - messageTo(sender, "gotImmediate", null, 0, true); - return SCRIPT_CONTINUE; - } - public int delayed_message(obj_id self, dictionary params) throws InterruptedException - { - String message = params.getString("message"); - obj_id sender = params.getObjId("sender"); - debugSpeakMsg(self, "Despite the delay, I " + message); - messageTo(sender, "gotDelayed", null, 0, true); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/toad/msg_test_sender.java b/sku.0/sys.server/compiled/game/script/working/toad/msg_test_sender.java deleted file mode 100644 index f7002b77f..000000000 --- a/sku.0/sys.server/compiled/game/script/working/toad/msg_test_sender.java +++ /dev/null @@ -1,89 +0,0 @@ -package script.working.toad; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; - -public class msg_test_sender extends script.base_script -{ - public msg_test_sender() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - location here = getLocation(self); - here.x = here.x + 4; - obj_id receiver = createObject("object/tangible/container/drum/tatt_drum_1.iff", here); - setObjVar(self, "receiver", receiver); - attachScript(receiver, "toad.msg_test_receiver"); - return SCRIPT_CONTINUE; - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - obj_id receiver = getObjIdObjVar(self, "receiver"); - if (receiver == null) - { - debugSpeakMsg(self, "Receiver is invalid, please make a new test case"); - return SCRIPT_CONTINUE; - } - if (!hasObjVar(speaker, "gm")) - { - return SCRIPT_CONTINUE; - } - if (text.equals("self message")) - { - String messageToMe = "Got my own Message."; - dictionary boom = new dictionary(); - boom.put("message", messageToMe); - messageTo(self, "messageForMe", boom, 5, true); - debugSpeakMsg(self, "I sent Myself a message"); - return SCRIPT_CONTINUE; - } - if (text.equals("instant message")) - { - String message = "Got Instant Message"; - dictionary stuff = new dictionary(); - stuff.put("message", message); - stuff.put("sender", self); - messageTo(receiver, "immediate_message", stuff, 0, true); - debugSpeakMsg(self, "Sent Immediate Message"); - return SCRIPT_CONTINUE; - } - int stringCheck = text.indexOf("delayMessage"); - if (stringCheck > -1) - { - String time = text.substring(text.indexOf(" ") + 1, text.length()); - int delay = utils.stringToInt(time); - String delayedMessage = "Got a delayed Message"; - dictionary things = new dictionary(); - things.put("message", delayedMessage); - things.put("sender", self); - messageTo(receiver, "delayed_message", things, delay, true); - debugSpeakMsg(self, "I sent a delayed Message"); - return SCRIPT_CONTINUE; - } - return SCRIPT_CONTINUE; - } - public int messageForMe(obj_id self, dictionary params) throws InterruptedException - { - String message = params.getString("message"); - debugSpeakMsg(self, message); - return SCRIPT_CONTINUE; - } - public int gotImmediate(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "Instant Message Went Through"); - return SCRIPT_CONTINUE; - } - public int gotDelayed(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "Delayed Message Went through"); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/toad/sizetest.java b/sku.0/sys.server/compiled/game/script/working/toad/sizetest.java deleted file mode 100644 index b6f6cea14..000000000 --- a/sku.0/sys.server/compiled/game/script/working/toad/sizetest.java +++ /dev/null @@ -1,82 +0,0 @@ -package script.working.toad; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.create; -import script.library.utils; - -public class sizetest extends script.base_script -{ - public sizetest() - { - } - public static final String datatable = "datatables/mob/creatures.iff"; - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - int stringCheck = text.indexOf("testsize "); - if (stringCheck > -1) - { - String toCreate = text.substring(text.indexOf(" ") + 1, text.length()); - String[] column = dataTableGetStringColumn(datatable, "template"); - dictionary creatureDict = utils.dataTableGetRow(datatable, toCreate); - if (creatureDict == null) - { - return SCRIPT_OVERRIDE; - } - float min = creatureDict.getFloat("minScale"); - float max = creatureDict.getFloat("maxScale"); - float small = min; - float big = max; - String alternate = ""; - String templateName = creatureDict.getString("template"); - if (templateName.indexOf(".iff") == -1) - { - return SCRIPT_OVERRIDE; - } - int hueCheck = templateName.indexOf("_hue"); - if (hueCheck > -1) - { - alternate = templateName.substring(0, hueCheck - 1); - alternate = alternate + ".iff"; - } - else - { - alternate = templateName.substring(0, text.indexOf(".") - 1); - alternate = alternate + "_hue.iff"; - } - int x = 0; - for (x = 0; x < column.length; x++) - { - if (column[x].equals(templateName) || column[x].equals(alternate)) - { - min = dataTableGetFloat(datatable, x, "minScale"); - max = dataTableGetFloat(datatable, x, "maxScale"); - if (min < small) - { - small = min; - } - if (max > big) - { - big = max; - } - } - } - location here = getLocation(self); - here.x = here.x + 2; - obj_id guy = create.object(toCreate, here); - setScale(guy, big); - debugSpeakMsg(guy, "I'm set to " + big); - here.x = here.x + 2; - obj_id guy2 = create.object(toCreate, here); - setScale(guy2, small); - debugSpeakMsg(guy2, "I'm set to " + small); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/toad/top.java b/sku.0/sys.server/compiled/game/script/working/toad/top.java deleted file mode 100644 index 8311ca2cd..000000000 --- a/sku.0/sys.server/compiled/game/script/working/toad/top.java +++ /dev/null @@ -1,41 +0,0 @@ -package script.working.toad; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.regions; - -public class top extends script.base_script -{ - public top() - { - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (!hasObjVar(speaker, "gm")) - { - return SCRIPT_CONTINUE; - } - if (text.equals("test")) - { - location here = getLocation(self); - obj_id bldg = getTopMostContainer(self); - debugSpeakMsg(self, "I'm contained by " + bldg); - location there = getLocation(bldg); - location target = new location(); - region[] rgnFoos = getRegionsWithGeographicalAtPoint(there, regions.GEO_CITY); - if (rgnFoos == null) - { - debugSpeakMsg(self, "NULL FOOS"); - return SCRIPT_CONTINUE; - } - region quest = rgnFoos[0]; - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/toad/wearable_test.java b/sku.0/sys.server/compiled/game/script/working/toad/wearable_test.java deleted file mode 100644 index 5f39a3ca8..000000000 --- a/sku.0/sys.server/compiled/game/script/working/toad/wearable_test.java +++ /dev/null @@ -1,94 +0,0 @@ -package script.working.toad; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.create; -import script.library.hue; - -public class wearable_test extends script.base_script -{ - public wearable_test() - { - } - public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException - { - if (speaker != self) - { - return SCRIPT_CONTINUE; - } - location here = getLocation(self); - if (text.equals("test")) - { - here.x = here.x + 2; - obj_id npc1 = createObject("object/mobile/human_male.iff", here); - here.x = here.x + 2; - obj_id npc2 = createObject("object/mobile/human_male.iff", here); - here.x = here.x + 2; - obj_id npc3 = createObject("object/mobile/human_female.iff", here); - here.x = here.x + 2; - obj_id npc4 = createObject("object/mobile/human_female.iff", here); - dressNpc(npc1, "datatables/npc_customization/clothing/all_shirts_pants.iff"); - dressNpc(npc2, "datatables/npc_customization/clothing/all_shirts_pants.iff"); - dressNpc(npc3, "datatables/npc_customization/clothing/all_shirts_pants.iff"); - dressNpc(npc4, "datatables/npc_customization/clothing/all_shirts_pants.iff"); - } - if (text.equals("jacket")) - { - here.x = here.x + 2; - obj_id npc1 = createObject("object/mobile/human_male.iff", here); - here.x = here.x + 2; - obj_id npc2 = createObject("object/mobile/human_male.iff", here); - here.x = here.x + 2; - obj_id npc3 = createObject("object/mobile/human_female.iff", here); - here.x = here.x + 2; - obj_id npc4 = createObject("object/mobile/human_female.iff", here); - dressNpc(npc1, "datatables/npc_customization/clothing/shirt_pants_jacket.iff"); - dressNpc(npc2, "datatables/npc_customization/clothing/shirt_pants_jacket.iff"); - dressNpc(npc3, "datatables/npc_customization/clothing/shirt_pants_jacket.iff"); - dressNpc(npc4, "datatables/npc_customization/clothing/shirt_pants_jacket.iff"); - } - return SCRIPT_CONTINUE; - } - public void dressNpc(obj_id npc, String clothesTable) throws InterruptedException - { - clothesTable = clothesTable; - int columns = dataTableGetNumColumns(clothesTable); - if (columns == 0) - { - clothesTable = "datatables/npc_customization/townperson_male_clothes.iff"; - columns = dataTableGetNumColumns(clothesTable); - } - int intX = 1; - while (intX <= columns) - { - String[] clothesList = dataTableGetStringColumnNoDefaults(clothesTable, intX - 1); - int clothesNum = rand(0, clothesList.length - 1); - String clothes = clothesList[clothesNum]; - int columnNum = intX - 1; - if (clothes == null) - { - debugServerConsoleMsg(npc, "LIBRARY.CREATE DRESSNPC ERROR: row was " + clothesNum + " and column was " + columnNum); - } - else if (clothes.equals("")) - { - debugServerConsoleMsg(npc, "LIBRARY.CREATE DRESSNPC ERROR: row was " + clothesNum + " and column was " + columnNum); - } - else - { - obj_id newClothes = createObject(clothes, npc, ""); - if (newClothes == null) - { - debugServerConsoleMsg(npc, "LIBRARY.CREATE DRESSNPC ERROR: unable to create " + clothes + " for npc " + getName(npc) + " objid: " + npc); - } - } - intX = intX + 1; - } - hue.randomizeObject(npc); - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/ubertest.java b/sku.0/sys.server/compiled/game/script/working/ubertest.java deleted file mode 100644 index 56ade614f..000000000 --- a/sku.0/sys.server/compiled/game/script/working/ubertest.java +++ /dev/null @@ -1,55 +0,0 @@ -package script.working; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.factions; -import script.library.regions; - -public class ubertest extends script.base_script -{ - public ubertest() - { - } - public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException - { - if (strText.equals("uber")) - { - obj_id objLair = createObject("object/tangible/lair/uber_lair.iff", getLocation(self)); - setObjVar(objLair, "spawning.lairType", "imperial_uber_lair_01"); - messageTo(objLair, "handle_Spawn_Setup_Complete", null, 0, false); - } - if (strText.equals("cleanup")) - { - obj_id[] objStuff = getObjectsInRange(getLocation(self), 200); - for (int intI = 0; intI < objStuff.length; intI++) - { - if (objStuff[intI] != self) - { - destroyObject(objStuff[intI]); - } - } - } - if (strText.equals("imperial")) - { - factions.awardFactionStanding(self, "Imperial", 500); - debugSpeakMsg(self, "granted"); - } - return SCRIPT_CONTINUE; - } - public int testMessage(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "Got message"); - return SCRIPT_CONTINUE; - } - public int OnAssignMission(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "Asssigning missions"); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/vthakkar/distance_test.java b/sku.0/sys.server/compiled/game/script/working/vthakkar/distance_test.java deleted file mode 100644 index 3735e9407..000000000 --- a/sku.0/sys.server/compiled/game/script/working/vthakkar/distance_test.java +++ /dev/null @@ -1,83 +0,0 @@ -package script.working.vthakkar; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.create; -import script.library.utils; - -public class distance_test extends script.base_script -{ - public distance_test() - { - } - - public int checkDistance(obj_id self, dictionary params) throws InterruptedException - { - if (utils.hasScriptVar(self, "vthakkar.distance.actor") && utils.hasScriptVar(self, "vthakkar.distance.time")) - { - float time = utils.getFloatScriptVar(self, "vthakkar.distance.time"); - obj_id actor = utils.getObjIdScriptVar(self, "vthakkar.distance.actor"); - float distance = getDistance(self, actor); - if (distance < 0) - { - utils.removeScriptVarTree(self, "vthakkar.distance"); - return SCRIPT_CONTINUE; - } - location me = getLocation(self); - location him = getLocation(actor); - int mx = (int)me.x; - int my = (int)me.y; - int mz = (int)me.z; - int hx = (int)him.x; - int hy = (int)him.y; - int hz = (int)him.z; - sendSystemMessageTestingOnly(self, ("D: " + distance + " M: " + mx + " " + my + " " + mz + " " + " H: " + hx + " " + hy + " " + hz)); - messageTo(self, "checkDistance", null, time, false); - } - return SCRIPT_CONTINUE; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - java.util.StringTokenizer st = new java.util.StringTokenizer(text); - String arg = st.nextToken(); - if (arg.equals("startDistance") && st.countTokens() == 2) - { - float time = utils.stringToFloat(st.nextToken()); - obj_id actor = utils.stringToObjId(st.nextToken()); - utils.setScriptVar(self, "vthakkar.distance.actor", actor); - utils.setScriptVar(self, "vthakkar.distance.time", time); - messageTo(self, "checkDistance", null, time, false); - } - else if (arg.equals("resetDistance")) - { - if (st.countTokens() == 0) - { - utils.removeScriptVarTree(self, "vthakkar.distance"); - } - else - { - obj_id actor = utils.stringToObjId(st.nextToken()); - utils.removeScriptVarTree(actor, "vthakkar.distance"); - } - } - else if (arg.equals("create")) - { - if (st.countTokens() == 1) - { - String creature = st.nextToken(); - obj_id actor = create.createCreature(creature, getLocation(self), true); - utils.setScriptVar(self, "vthakkar.distance.actor", actor); - utils.setScriptVar(self, "vthakkar.distance.time", 0.2f); - messageTo(self, "checkDistance", null, 0.2f, false); - } - } - return SCRIPT_CONTINUE; - } - -} diff --git a/sku.0/sys.server/compiled/game/script/working/vthakkar/npe_test.java b/sku.0/sys.server/compiled/game/script/working/vthakkar/npe_test.java deleted file mode 100644 index 2cb6d0632..000000000 --- a/sku.0/sys.server/compiled/game/script/working/vthakkar/npe_test.java +++ /dev/null @@ -1,290 +0,0 @@ -package script.working.vthakkar; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; -import script.library.space_dungeon; -import script.library.npe; - -public class npe_test extends script.base_script -{ - public npe_test() - { - } - - public boolean checkGod(obj_id self) throws InterruptedException - { - if (isGod(self)) - { - sendSystemMessageTestingOnly(self, "Please turn off god mode when moving between npe locations. God mode and instances do not get along"); - return true; - } - return false; - } - public int OnSpeaking(obj_id self, String text) throws InterruptedException - { - java.util.StringTokenizer st = new java.util.StringTokenizer(text); - String arg = st.nextToken(); - if (arg.equals("npeHelp")) - { - sendSystemMessageTestingOnly(self, "Commands:"); - sendSystemMessageTestingOnly(self, "setupNpe, gotoHangar, gotoTurret, gotoSpaceStation, gotoOrdSpaceFromSharedStation, gotoOrdStationFromOrdSpace, gotoOrdSpaceFromOrdStation, gotoSharedStationFromOrdSpace, gotoStaging, finishNpe"); - sendSystemMessageTestingOnly(self, "These commands must be run in order, and finished before starting again!"); - sendSystemMessageTestingOnly(self, "There is a lot of cleanup that gets done in the between steps"); - } - else if (arg.equals("gotoTurret")) - { - if (checkGod(self)) - { - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Going to turret..."); - npe.movePlayerFromHangarToFalcon(self); - } - else if (arg.equals("gotoSpaceStation")) - { - if (checkGod(self)) - { - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Going to space station..."); - npe.movePlayerFromFalconToSharedStation(self); - } - else if (arg.equals("gotoOrdSpaceFromSharedStation")) - { - if (checkGod(self)) - { - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Going to ord space..."); - npe.movePlayerFromSharedStationToOrdMantellSpace(self, new location(0, 0, 0)); - } - else if (arg.equals("gotoOrdStationFromOrdSpace")) - { - if (checkGod(self)) - { - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Going to space station..."); - npe.movePlayerFromOrdMantellSpaceToOrdMantellDungeon(self); - } - else if (arg.equals("gotoOrdSpaceFromOrdStation")) - { - if (checkGod(self)) - { - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Going to ord space..."); - npe.movePlayerFromOrdMantellDungeonToOrdMantellSpace(self, new location(0, 0, 0)); - } - else if (arg.equals("gotoSharedStationFromOrdSpace")) - { - if (checkGod(self)) - { - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Going to space station..."); - npe.movePlayerFromOrdMantellSpaceToSharedStation(self); - } - else if (arg.equals("finishNpe")) - { - if (checkGod(self)) - { - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Going to post staging area..."); - npe.movePlayerFromSharedStationToFinishLocation(self); - } - else if (arg.equals("count")) - { - obj_id[] tempArray; - tempArray = getObjectsInRange(self, 20000); - sendSystemMessageTestingOnly(self, "Found " + tempArray.length + " objects"); - tempArray = getCreaturesInRange(self, 20000); - sendSystemMessageTestingOnly(self, "Found " + tempArray.length + " creatures"); - tempArray = getNonCreaturesInRange(self, 20000); - sendSystemMessageTestingOnly(self, "Found " + tempArray.length + " non creatures"); - tempArray = getNPCsInRange(self, 10000); - sendSystemMessageTestingOnly(self, "Found " + tempArray.length + " NPCs"); - tempArray = getPlayerCreaturesInRange(self, 20000); - sendSystemMessageTestingOnly(self, "Found " + tempArray.length + " player creatures"); - } - else if (arg.equals("countType")) - { - String type = st.nextToken(); - if (type == null || type.equals("")) - { - return SCRIPT_CONTINUE; - } - obj_id[] tempArray; - int counter = 0; - tempArray = getObjectsInRange(self, 20000); - for (int i = 0; i < tempArray.length; ++i) - { - if (type.equals(getTemplateName(tempArray[i]))) - { - ++counter; - sendSystemMessageTestingOnly(self, "" + counter + ": " + tempArray[i]); - } - } - sendSystemMessageTestingOnly(self, "Found " + counter + " objects"); - } - else if (arg.equals("getAllWorldObjects")) - { - obj_id[] tempArray; - int counter = 0; - tempArray = getObjectsInRange(self, 20000); - for (int i = 0; i < tempArray.length; ++i) - { - String template = getTemplateName(tempArray[i]); - location loc = getLocation(tempArray[i]); - if (loc.cell == null || loc.cell == obj_id.NULL_ID) - { - debugConsoleMsg(self, loc.x + " " + loc.y + " " + loc.z + " " + template); - ++counter; - } - } - sendSystemMessageTestingOnly(self, "Found " + counter + " objects"); - } - else if (arg.equals("makeNpeDungeons")) - { - String currentScene = getCurrentSceneName(); - if (!currentScene.equals("dungeon1")) - { - sendSystemMessageTestingOnly(self, "You should be on dungeon1 to run this command, you're on: " + currentScene); - return SCRIPT_CONTINUE; - } - sendSystemMessageTestingOnly(self, "Creating dungeon objects..."); - createObject("object/building/general/npe_space_station.iff", new location(-5000, 0, -1000)); - createObject("object/building/general/npe_space_station.iff", new location(0, 0, -1000)); - createObject("object/building/general/npe_space_station.iff", new location(5000, 0, -1000)); - createObject("object/building/general/npe_space_dungeon.iff", new location(-6000, 0, -3000)); - createObject("object/building/general/npe_space_dungeon.iff", new location(-3000, 0, -3000)); - createObject("object/building/general/npe_space_dungeon.iff", new location(3000, 0, -3000)); - createObject("object/building/general/npe_space_dungeon.iff", new location(6000, 0, -3000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-7000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-6000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-5000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-4000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-3000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-2000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-1000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(0, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(7000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(6000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(5000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(4000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(3000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(2000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(1000, 0, -4000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-7000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-6000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-5000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-4000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-3000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-2000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(-1000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(0, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(7000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(6000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(5000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(4000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(3000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(2000, 0, -5000)); - createObject("object/building/general/npe_hangar_2.iff", new location(1000, 0, -5000)); - } - else if (arg.equals("setTutorial") && st.countTokens() == 1) - { - String val = st.nextToken(); - boolean tutVal = false; - if (val.equals("true")) - { - tutVal = true; - } - sendSystemMessageTestingOnly(self, "Setting tutorial bit to " + tutVal); - setCompletedTutorial(self, tutVal); - } - else if (arg.equals("getWorkingSkill")) - { - sendSystemMessageTestingOnly(self, "Your current working skill is " + getWorkingSkill(self)); - } - else if (arg.equals("getClusterLock") && st.countTokens() == 2) - { - String manager = st.nextToken(); - String regex = st.nextToken(); - sendSystemMessageTestingOnly(self, "Acquiring cluster lock"); - getClusterWideData(manager, regex, true, self); - } - else if (arg.equals("releaseClusterLock") && st.countTokens() == 2) - { - String manager = st.nextToken(); - int lock = utils.stringToInt(st.nextToken()); - sendSystemMessageTestingOnly(self, "Releasing cluster lock"); - releaseClusterWideDataLock(manager, lock); - } - else if (arg.equals("enableUI")) - { - sendSystemMessageTestingOnly(self, "Enabling NPE UI"); - newbieTutorialEnableHudElement(self, "radar", true, 0); - newbieTutorialEnableHudElement(self, "chatbox", true, 0); - } - else if (arg.equals("getConfig") && st.countTokens() == 2) - { - String section = st.nextToken(); - String key = st.nextToken(); - String value = getConfigSetting(section, key); - if (value != null) - { - sendSystemMessageTestingOnly(self, "Config setting for " + section + ":" + key + " is " + value); - } - else - { - sendSystemMessageTestingOnly(self, "Didn't find a config setting for " + section + ":" + key); - } - } - else if (arg.equals("getPlayers") && st.countTokens() == 5) - { - float x = utils.stringToFloat(st.nextToken()); - float y = utils.stringToFloat(st.nextToken()); - float z = utils.stringToFloat(st.nextToken()); - String scene = st.nextToken(); - int range = utils.stringToInt(st.nextToken()); - location loc = new location(x, y, z, scene); - obj_id[] players_range = getPlayerCreaturesInRange(loc, range); - for (int i = 0; i < players_range.length; ++i) - { - if (isIdValid(players_range[i])) - { - sendSystemMessageTestingOnly(self, "Got player " + players_range[i] + " " + getPlayerFullName(players_range[i])); - } - } - sendSystemMessageTestingOnly(self, "Found " + players_range.length + " players"); - } - else if (arg.equals("getSceneName")) - { - String scene = getCurrentSceneName(); - if (scene != null) - { - sendSystemMessageTestingOnly(self, "Current scene name is " + scene); - } - } - else if (arg.equals("gotoTutorial")) - { - sendSystemMessageTestingOnly(self, "Back to tutorial with ya!"); - sendPlayerToTutorial(self); - } - return SCRIPT_CONTINUE; - } - public int OnClusterWideDataResponse(obj_id self, String manage_name, String name, int request_id, String[] element_name_list, dictionary[] data, int lock_key) throws InterruptedException - { - sendSystemMessageTestingOnly(self, "OnClusterWideDataResponse: " + manage_name + ", name: " + name + ", lock key: " + lock_key); - return SCRIPT_CONTINUE; - } - -} diff --git a/sku.0/sys.server/compiled/game/script/working/wwallace/create_space_weapons.java b/sku.0/sys.server/compiled/game/script/working/wwallace/create_space_weapons.java deleted file mode 100644 index 6834e6bc4..000000000 --- a/sku.0/sys.server/compiled/game/script/working/wwallace/create_space_weapons.java +++ /dev/null @@ -1,113 +0,0 @@ -package script.working.wwallace; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.create; -import script.library.utils; -import script.library.skill; - -public class create_space_weapons extends script.base_script -{ - public create_space_weapons() - { - } - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - obj_id objInventory = utils.getInventoryContainer(self); - String[] strCommands = split(strText, ' '); - if (strCommands[0].equals("createWeapons")) - { - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_armek_sw4.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_armek_sw7.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_borstel_rg9.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_corellian_1d.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_corellian_ag1g_laser.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_corellian_ag2g_quad_laser.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_gyrhil_auto_blaster.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_gyrhil_r9x.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_incom_blaster.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_incom_disruptor.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_incom_quad_blaster.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_incom_shredder.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_seinar_disruptor.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_seinar_ion_cannon.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_seinar_linked_cannon.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_seinar_ls1.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_seinar_ls72.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_slayn_ioncannon.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_subpro_tripleblaster.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_subpro_tripleblaster_mark2.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_taim_heavy_laser.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_taim_ix4.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_taim_kx5.iff", objInventory); - createObjectOverloaded("object/tangible/ship/components/weapon/wpn_taim_kx9.iff", objInventory); - } - if (strCommands[0].equals("grantPilotSkills")) - { - skill.grantSkill(self, "pilot_rebel_navy"); - skill.grantSkill(self, "pilot_rebel_navy_novice"); - skill.grantSkill(self, "pilot_rebel_navy_master"); - skill.grantSkill(self, "pilot_rebel_navy_starships_01"); - skill.grantSkill(self, "pilot_rebel_navy_starships_02"); - skill.grantSkill(self, "pilot_rebel_navy_starships_03"); - skill.grantSkill(self, "pilot_rebel_navy_starships_04"); - skill.grantSkill(self, "pilot_rebel_navy_weapons_01"); - skill.grantSkill(self, "pilot_rebel_navy_weapons_02"); - skill.grantSkill(self, "pilot_rebel_navy_weapons_03"); - skill.grantSkill(self, "pilot_rebel_navy_weapons_04"); - skill.grantSkill(self, "pilot_rebel_navy_procedures_01"); - skill.grantSkill(self, "pilot_rebel_navy_procedures_02"); - skill.grantSkill(self, "pilot_rebel_navy_procedures_03"); - skill.grantSkill(self, "pilot_rebel_navy_procedures_04"); - skill.grantSkill(self, "pilot_rebel_navy_droid_01"); - skill.grantSkill(self, "pilot_rebel_navy_droid_02"); - skill.grantSkill(self, "pilot_rebel_navy_droid_03"); - skill.grantSkill(self, "pilot_rebel_navy_droid_04"); - skill.grantSkill(self, "pilot_imperial_navy"); - skill.grantSkill(self, "pilot_imperial_navy_novice"); - skill.grantSkill(self, "pilot_imperial_navy_master"); - skill.grantSkill(self, "pilot_imperial_navy_starships_01"); - skill.grantSkill(self, "pilot_imperial_navy_starships_02"); - skill.grantSkill(self, "pilot_imperial_navy_starships_03"); - skill.grantSkill(self, "pilot_imperial_navy_starships_04"); - skill.grantSkill(self, "pilot_imperial_navy_weapons_01"); - skill.grantSkill(self, "pilot_imperial_navy_weapons_02"); - skill.grantSkill(self, "pilot_imperial_navy_weapons_03"); - skill.grantSkill(self, "pilot_imperial_navy_weapons_04"); - skill.grantSkill(self, "pilot_imperial_navy_procedures_01"); - skill.grantSkill(self, "pilot_imperial_navy_procedures_02"); - skill.grantSkill(self, "pilot_imperial_navy_procedures_03"); - skill.grantSkill(self, "pilot_imperial_navy_procedures_04"); - skill.grantSkill(self, "pilot_imperial_navy_droid_01"); - skill.grantSkill(self, "pilot_imperial_navy_droid_02"); - skill.grantSkill(self, "pilot_imperial_navy_droid_03"); - skill.grantSkill(self, "pilot_imperial_navy_droid_04"); - skill.grantSkill(self, "pilot_neutral"); - skill.grantSkill(self, "pilot_neutral_novice"); - skill.grantSkill(self, "pilot_neutral_master"); - skill.grantSkill(self, "pilot_neutral_starships_01"); - skill.grantSkill(self, "pilot_neutral_starships_02"); - skill.grantSkill(self, "pilot_neutral_starships_03"); - skill.grantSkill(self, "pilot_neutral_starships_04"); - skill.grantSkill(self, "pilot_neutral_weapons_01"); - skill.grantSkill(self, "pilot_neutral_weapons_02"); - skill.grantSkill(self, "pilot_neutral_weapons_03"); - skill.grantSkill(self, "pilot_neutral_weapons_04"); - skill.grantSkill(self, "pilot_neutral_procedures_01"); - skill.grantSkill(self, "pilot_neutral_procedures_02"); - skill.grantSkill(self, "pilot_neutral_procedures_03"); - skill.grantSkill(self, "pilot_neutral_procedures_04"); - skill.grantSkill(self, "pilot_neutral_droid_01"); - skill.grantSkill(self, "pilot_neutral_droid_02"); - skill.grantSkill(self, "pilot_neutral_droid_03"); - skill.grantSkill(self, "pilot_neutral_droid_04"); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/wwallace/dungeon_teleport.java b/sku.0/sys.server/compiled/game/script/working/wwallace/dungeon_teleport.java deleted file mode 100644 index 6be144845..000000000 --- a/sku.0/sys.server/compiled/game/script/working/wwallace/dungeon_teleport.java +++ /dev/null @@ -1,32 +0,0 @@ -package script.working.wwallace; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; - -public class dungeon_teleport extends script.base_script -{ - public dungeon_teleport() - { - } - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - String[] strCommands = split(strText, ' '); - if (strCommands[0].equals("teleport")) - { - obj_id top = getTopMostContainer(self); - String whereTo = strCommands[1]; - location randomLoc = getGoodLocation(top, whereTo); - obj_id cell = getCellId(top, whereTo); - utils.warpPlayer(self, randomLoc); - return SCRIPT_CONTINUE; - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/wwallace/grievous_test.java b/sku.0/sys.server/compiled/game/script/working/wwallace/grievous_test.java deleted file mode 100644 index 862b6c108..000000000 --- a/sku.0/sys.server/compiled/game/script/working/wwallace/grievous_test.java +++ /dev/null @@ -1,514 +0,0 @@ -package script.working.wwallace; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.create; -import script.library.combat; -import script.library.sui; -import script.library.utils; -import script.library.money; -import script.library.pet_lib; -import script.library.ai_lib; -import script.library.skill; -import script.library.hue; -import script.library.space_transition; -import script.library.datatable; -import script.library.xp; -import script.library.space_combat; -import script.library.space_create; -import script.library.armor; -import script.library.weapons; - -public class grievous_test extends script.base_script -{ - public grievous_test() - { - } - public static final String SKILL_TBL = "datatables/skill/skills.iff"; - public static final float CRAFTED_QUALITY = 0.85f; - public static final float CONDITION = 1.0f; - public static final float GENERAL_PROTECTION = 0.94f; - public static final String[] BRAWLER = - { - "combat_brawler_novice", - "combat_brawler_unarmed_01", - "combat_brawler_unarmed_02", - "combat_brawler_unarmed_03", - "combat_brawler_unarmed_04", - "combat_brawler_1handmelee_01", - "combat_brawler_1handmelee_02", - "combat_brawler_1handmelee_03", - "combat_brawler_1handmelee_04", - "combat_brawler_2handmelee_01", - "combat_brawler_2handmelee_02", - "combat_brawler_2handmelee_03", - "combat_brawler_2handmelee_04", - "combat_brawler_polearm_01", - "combat_brawler_polearm_02", - "combat_brawler_polearm_03", - "combat_brawler_polearm_04", - "combat_brawler_master" - }; - public static final String[] MARKSMAN = - { - "combat_marksman_novice", - "combat_marksman_rifle_01", - "combat_marksman_rifle_02", - "combat_marksman_rifle_03", - "combat_marksman_rifle_04", - "combat_marksman_pistol_01", - "combat_marksman_pistol_02", - "combat_marksman_pistol_03", - "combat_marksman_pistol_04", - "combat_marksman_carbine_01", - "combat_marksman_carbine_02", - "combat_marksman_carbine_03", - "combat_marksman_carbine_04", - "combat_marksman_support_01", - "combat_marksman_support_02", - "combat_marksman_support_03", - "combat_marksman_support_04", - "combat_marksman_master" - }; - public static final String[] COMMANDO = - { - "combat_commando_novice", - "combat_commando_heavyweapon_accuracy_01", - "combat_commando_heavyweapon_accuracy_02", - "combat_commando_heavyweapon_accuracy_03", - "combat_commando_heavyweapon_accuracy_04", - "combat_commando_heavyweapon_speed_01", - "combat_commando_heavyweapon_speed_02", - "combat_commando_heavyweapon_speed_03", - "combat_commando_heavyweapon_speed_04", - "combat_commando_thrownweapon_01", - "combat_commando_thrownweapon_02", - "combat_commando_thrownweapon_03", - "combat_commando_thrownweapon_04", - "combat_commando_support_01", - "combat_commando_support_02", - "combat_commando_support_03", - "combat_commando_support_04", - "combat_commando_master" - }; - public static final String[] SCOUT = - { - "outdoors_scout_novice", - "outdoors_scout_movement_01", - "outdoors_scout_movement_02", - "outdoors_scout_movement_03", - "outdoors_scout_movement_04", - "outdoors_scout_tools_01", - "outdoors_scout_tools_02", - "outdoors_scout_tools_03", - "outdoors_scout_tools_04", - "outdoors_scout_harvest_01", - "outdoors_scout_harvest_02", - "outdoors_scout_harvest_03", - "outdoors_scout_harvest_04", - "outdoors_scout_camp_01", - "outdoors_scout_camp_02", - "outdoors_scout_camp_03", - "outdoors_scout_camp_04", - "outdoors_scout_master" - }; - public static final String[] BOUNTY_HUNTER = - { - "combat_bountyhunter_novice", - "combat_bountyhunter_investigation_01", - "combat_bountyhunter_investigation_02", - "combat_bountyhunter_investigation_03", - "combat_bountyhunter_investigation_04", - "combat_bountyhunter_droidcontrol_01", - "combat_bountyhunter_droidcontrol_02", - "combat_bountyhunter_droidcontrol_03", - "combat_bountyhunter_droidcontrol_04", - "combat_bountyhunter_droidresponse_01", - "combat_bountyhunter_droidresponse_02", - "combat_bountyhunter_droidresponse_03", - "combat_bountyhunter_droidresponse_04", - "combat_bountyhunter_support_01", - "combat_bountyhunter_support_02", - "combat_bountyhunter_support_03", - "combat_bountyhunter_support_04", - "combat_bountyhunter_master" - }; - public static final String[] CARBINEER = - { - "combat_carbine_novice", - "combat_carbine_accuracy_01", - "combat_carbine_accuracy_02", - "combat_carbine_accuracy_03", - "combat_carbine_accuracy_04", - "combat_carbine_speed_01", - "combat_carbine_speed_02", - "combat_carbine_speed_03", - "combat_carbine_speed_04", - "combat_carbine_ability_01", - "combat_carbine_ability_02", - "combat_carbine_ability_03", - "combat_carbine_ability_04", - "combat_carbine_support_01", - "combat_carbine_support_02", - "combat_carbine_support_03", - "combat_carbine_support_04", - "combat_carbine_master" - }; - public static final String[] TKA = - { - "combat_unarmed_novice", - "combat_unarmed_accuracy_01", - "combat_unarmed_accuracy_02", - "combat_unarmed_accuracy_03", - "combat_unarmed_accuracy_04", - "combat_unarmed_speed_01", - "combat_unarmed_speed_02", - "combat_unarmed_speed_03", - "combat_unarmed_speed_04", - "combat_unarmed_ability_01", - "combat_unarmed_ability_02", - "combat_unarmed_ability_03", - "combat_unarmed_ability_04", - "combat_unarmed_support_01", - "combat_unarmed_support_02", - "combat_unarmed_support_03", - "combat_unarmed_support_04", - "combat_unarmed_master" - }; - public static final String[] PIKEMAN = - { - "combat_polearm_novice", - "combat_polearm_accuracy_01", - "combat_polearm_accuracy_02", - "combat_polearm_accuracy_03", - "combat_polearm_accuracy_04", - "combat_polearm_speed_01", - "combat_polearm_speed_02", - "combat_polearm_speed_03", - "combat_polearm_speed_04", - "combat_polearm_ability_01", - "combat_polearm_ability_02", - "combat_polearm_ability_03", - "combat_polearm_ability_04", - "combat_polearm_support_01", - "combat_polearm_support_02", - "combat_polearm_support_03", - "combat_polearm_support_04", - "combat_polearm_master" - }; - public static final String[] MEDIC = - { - "science_medic_novice", - "science_medic_injury_01", - "science_medic_injury_02", - "science_medic_injury_03", - "science_medic_injury_04", - "science_medic_injury_speed_01", - "science_medic_injury_speed_02", - "science_medic_injury_speed_03", - "science_medic_injury_speed_04", - "science_medic_ability_01", - "science_medic_ability_02", - "science_medic_ability_03", - "science_medic_ability_04", - "science_medic_crafting_01", - "science_medic_crafting_02", - "science_medic_crafting_03", - "science_medic_crafting_04", - "science_medic_master" - }; - public static final String[] DOCTOR = - { - "science_doctor_novice", - "science_doctor_wound_speed_01", - "science_doctor_wound_speed_02", - "science_doctor_wound_speed_03", - "science_doctor_wound_speed_04", - "science_doctor_wound_01", - "science_doctor_wound_02", - "science_doctor_wound_03", - "science_doctor_wound_04", - "science_doctor_ability_01", - "science_doctor_ability_02", - "science_doctor_ability_03", - "science_doctor_ability_04", - "science_doctor_support_01", - "science_doctor_support_02", - "science_doctor_support_03", - "science_doctor_support_04", - "science_doctor_master" - }; - public static final String[] ARMOR_SET_RECON = - { - "marauder/armor_marauder_s02_bicep_l.iff", - "marauder/armor_marauder_s02_bicep_r.iff", - "marauder/armor_marauder_s02_boots.iff", - "marauder/armor_marauder_s02_bracer_l.iff", - "marauder/armor_marauder_s02_bracer_r.iff", - "marauder/armor_marauder_s02_chest_plate.iff", - "marauder/armor_marauder_s02_gloves.iff", - "marauder/armor_marauder_s02_helmet.iff", - "marauder/armor_marauder_s02_leggings.iff" - }; - public static final String[] ARMOR_SET_BATTLE = - { - "marauder/armor_marauder_s01_bicep_l.iff", - "marauder/armor_marauder_s01_bicep_r.iff", - "marauder/armor_marauder_s01_boots.iff", - "marauder/armor_marauder_s01_bracer_l.iff", - "marauder/armor_marauder_s01_bracer_r.iff", - "marauder/armor_marauder_s01_chest_plate.iff", - "marauder/armor_marauder_s01_gloves.iff", - "marauder/armor_marauder_s01_helmet.iff", - "marauder/armor_marauder_s01_leggings.iff" - }; - public static final String[] ARMOR_SET_BATTLE_2 = - { - "ris/armor_ris_bicep_l.iff", - "ris/armor_ris_bracer_l.iff", - "ris/armor_ris_gloves.iff", - "ris/armor_ris_bicep_r.iff", - "ris/armor_ris_bracer_r.iff", - "ris/armor_ris_helmet.iff", - "ris/armor_ris_boots.iff", - "ris/armor_ris_chest_plate.iff", - "ris/armor_ris_leggings.iff" - }; - public static final String[] ARMOR_SET_BATTLE_3 = - { - "padded/armor_padded_s01_bicep_l.iff", - "padded/armor_padded_s01_bicep_r.iff", - "padded/armor_padded_s01_boots.iff", - "padded/armor_padded_s01_bracer_l.iff", - "padded/armor_padded_s01_bracer_r.iff", - "padded/armor_padded_s01_chest_plate.iff", - "padded/armor_padded_s01_gloves.iff", - "padded/armor_padded_s01_helmet.iff", - "padded/armor_padded_s01_leggings.iff" - }; - public static final String[] ARMOR_SET_ASSAULT = - { - "bounty_hunter/armor_bounty_hunter_crafted_bicep_l.iff", - "bounty_hunter/armor_bounty_hunter_crafted_bicep_r.iff", - "bounty_hunter/armor_bounty_hunter_crafted_boots.iff", - "bounty_hunter/armor_bounty_hunter_crafted_bracer_l.iff", - "bounty_hunter/armor_bounty_hunter_crafted_bracer_r.iff", - "bounty_hunter/armor_bounty_hunter_crafted_chest_plate.iff", - "bounty_hunter/armor_bounty_hunter_crafted_gloves.iff", - "bounty_hunter/armor_bounty_hunter_crafted_helmet.iff", - "bounty_hunter/armor_bounty_hunter_crafted_leggings.iff" - }; - public static final String[] ARMOR_SET_ASSAULT_ITHORIAN = - { - "ithorian_sentinel/ith_armor_s03_bicep_l.iff", - "ithorian_sentinel/ith_armor_s03_chest_plate.iff", - "ithorian_sentinel/ith_armor_s03_bicep_r.iff", - "ithorian_sentinel/ith_armor_s03_gloves.iff", - "ithorian_sentinel/ith_armor_s03_boots.iff", - "ithorian_sentinel/ith_armor_s03_helmet.iff", - "ithorian_sentinel/ith_armor_s03_bracer_l.iff", - "ithorian_sentinel/ith_armor_s03_leggings.iff", - "ithorian_sentinel/ith_armor_s03_bracer_r.iff" - }; - public static final String ARMOR_SET_PREFIX = "object/tangible/wearables/armor/"; - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - String[] strCommands = split(strText, ' '); - obj_id pInv = utils.getInventoryContainer(self); - if (strCommands[0].equals("teleport")) - { - obj_id top = getTopMostContainer(self); - String whereTo = strCommands[1]; - location randomLoc = getGoodLocation(top, whereTo); - obj_id cell = getCellId(top, whereTo); - utils.warpPlayer(self, randomLoc); - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("spawnEncounter")) - { - location selfLoc = getLocation(self); - obj_id encounter = createObject("object/tangible/theme_park/myyydril/myyydril_grievous_encounter_manager.iff", selfLoc); - sendSystemMessageTestingOnly(self, "Encounter ID is " + encounter); - } - if (strCommands[0].equals("clearInv")) - { - obj_id[] contents = getInventoryAndEquipment(self); - for (int i = 0; i < contents.length; i++) - { - destroyObject(contents[i]); - } - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("makeCharacterOne")) - { - for (int i = 0; i < BRAWLER.length; i++) - { - skill.grantSkill(self, BRAWLER[i]); - } - for (int i = 0; i < TKA.length; i++) - { - skill.grantSkill(self, TKA[i]); - } - } - if (strCommands[0].equals("makeCharacterTwo")) - { - for (int i = 0; i < BRAWLER.length; i++) - { - skill.grantSkill(self, BRAWLER[i]); - } - for (int i = 0; i < PIKEMAN.length; i++) - { - skill.grantSkill(self, PIKEMAN[i]); - } - issueBattleArmorSet(self, ARMOR_SET_BATTLE); - weapons.createWeapon("object/weapon/melee/polearm/lance_massassi.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY); - } - if (strCommands[0].equals("makeCharacterThree")) - { - String[] allTemplates = new String[] - { - "bactainfusion", - "bactajab", - "bactashot", - "bactaspray", - "bactatoss", - "deuteriumtoss", - "disinfect", - "endorphineinjection", - "neurotoxin", - "nutrientinjection", - "stabilizer", - "thyroidrupture", - "traumatize" - }; - for (int i = 0; i < MEDIC.length; i++) - { - skill.grantSkill(self, MEDIC[i]); - } - for (int i = 0; i < DOCTOR.length; i++) - { - skill.grantSkill(self, DOCTOR[i]); - } - issueBattleArmorSet(self, ARMOR_SET_BATTLE_2); - obj_id stimd = createObject("object/tangible/medicine/instant_stimpack/stimpack_d.iff", pInv, ""); - if (isIdValid(stimd)) - { - setCount(stimd, 350); - setObjVar(stimd, "healing.power", 1200); - } - for (int i = 0; i < allTemplates.length; i++) - { - obj_id enh = createObject("object/tangible/medicine/enhancer/enhancer_" + allTemplates[i] + ".iff", pInv, ""); - if (isIdValid(enh)) - { - setCount(enh, 150); - setObjVar(enh, "healing.enhancement", 700); - } - } - } - if (strCommands[0].equals("makeCharacterFour")) - { - for (int i = 0; i < BRAWLER.length; i++) - { - skill.grantSkill(self, BRAWLER[i]); - } - for (int i = 0; i < MARKSMAN.length; i++) - { - skill.grantSkill(self, MARKSMAN[i]); - } - for (int i = 0; i < COMMANDO.length; i++) - { - skill.grantSkill(self, COMMANDO[i]); - } - issueAssaultArmorSet(self, ARMOR_SET_ASSAULT); - weapons.createWeapon("object/weapon/ranged/heavy/heavy_lightning_beam.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY); - } - if (strCommands[0].equals("makeCharacterFive")) - { - for (int i = 0; i < MARKSMAN.length; i++) - { - skill.grantSkill(self, MARKSMAN[i]); - } - for (int i = 0; i < CARBINEER.length; i++) - { - skill.grantSkill(self, CARBINEER[i]); - } - issueBattleArmorSet(self, ARMOR_SET_BATTLE_3); - weapons.createWeapon("object/weapon/ranged/carbine/carbine_elite.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY); - } - if (strCommands[0].equals("makeCharacterSix")) - { - for (int i = 0; i < MARKSMAN.length; i++) - { - skill.grantSkill(self, MARKSMAN[i]); - } - for (int i = 0; i < SCOUT.length; i++) - { - skill.grantSkill(self, SCOUT[i]); - } - for (int i = 0; i < BOUNTY_HUNTER.length; i++) - { - skill.grantSkill(self, BOUNTY_HUNTER[i]); - } - issueAssaultArmorSet(self, ARMOR_SET_ASSAULT_ITHORIAN); - weapons.createWeapon("object/weapon/ranged/carbine/carbine_czerka_dart.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY); - } - return SCRIPT_CONTINUE; - } - public void issueReconArmorSet(obj_id player, String[] armorPieces) throws InterruptedException - { - obj_id pInv = utils.getInventoryContainer(player); - for (int j = 0; j < armorPieces.length; ++j) - { - String armorTemplate = ARMOR_SET_PREFIX + armorPieces[j]; - obj_id armorItem = createObject(armorTemplate, pInv, ""); - if (isIdValid(armorItem)) - { - if (!isGameObjectTypeOf(armorItem, GOT_armor_foot) && !isGameObjectTypeOf(armorItem, GOT_armor_hand)) - { - armor.setArmorDataPercent(armorItem, 2, 0, GENERAL_PROTECTION, CONDITION); - armor.setArmorSpecialProtectionPercent(armorItem, armor.DATATABLE_RECON_LAYER, 1.0f); - } - } - } - } - public void issueBattleArmorSet(obj_id player, String[] armorPieces) throws InterruptedException - { - obj_id pInv = utils.getInventoryContainer(player); - for (int j = 0; j < armorPieces.length; ++j) - { - String armorTemplate = ARMOR_SET_PREFIX + armorPieces[j]; - obj_id armorItem = createObject(armorTemplate, pInv, ""); - if (isIdValid(armorItem)) - { - if (!isGameObjectTypeOf(armorItem, GOT_armor_foot) && !isGameObjectTypeOf(armorItem, GOT_armor_hand)) - { - armor.setArmorDataPercent(armorItem, 2, 1, GENERAL_PROTECTION, CONDITION); - } - } - } - } - public void issueAssaultArmorSet(obj_id player, String[] armorPieces) throws InterruptedException - { - obj_id pInv = utils.getInventoryContainer(player); - for (int j = 0; j < armorPieces.length; ++j) - { - String armorTemplate = ARMOR_SET_PREFIX + armorPieces[j]; - obj_id armorItem = createObject(armorTemplate, pInv, ""); - if (isIdValid(armorItem)) - { - if (!isGameObjectTypeOf(armorItem, GOT_armor_foot) && !isGameObjectTypeOf(armorItem, GOT_armor_hand)) - { - armor.setArmorDataPercent(armorItem, 2, 2, GENERAL_PROTECTION, CONDITION); - armor.setArmorSpecialProtectionPercent(armorItem, armor.DATATABLE_ASSAULT_LAYER, 1.0f); - } - } - } - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/wwallace/lamdatest.java b/sku.0/sys.server/compiled/game/script/working/wwallace/lamdatest.java deleted file mode 100644 index f37450810..000000000 --- a/sku.0/sys.server/compiled/game/script/working/wwallace/lamdatest.java +++ /dev/null @@ -1,50 +0,0 @@ -package script.working.wwallace; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.create; - -public class lamdatest extends script.base_script -{ - public lamdatest() - { - } - public int OnAttach(obj_id self) throws InterruptedException - { - debugSpeakMsg(self, "attached"); - detachScript(self, "ai.ai"); - detachScript(self, "ai.creature_combat"); - detachScript(self, "skeleton.humanoid"); - detachScript(self, "systems.combat.combat_actions"); - detachScript(self, "systems.combat.credit_for_kills"); - stop(self); - setName(self, "Stormtrooper Transport"); - setPosture(self, POSTURE_PRONE); - messageTo(self, "spawnSts", null, 17, true); - queueCommand(self, (-1465754503), self, "", COMMAND_PRIORITY_FRONT); - return SCRIPT_CONTINUE; - } - public int changePosture(obj_id self, dictionary params) throws InterruptedException - { - debugSpeakMsg(self, "upright"); - setPosture(self, POSTURE_UPRIGHT); - return SCRIPT_CONTINUE; - } - public int spawnSts(obj_id self, dictionary params) throws InterruptedException - { - location spawnLoc = getLocation(self); - create.createCreature("stormtrooper", spawnLoc, true); - create.createCreature("stormtrooper", spawnLoc, true); - create.createCreature("stormtrooper", spawnLoc, true); - create.createCreature("stormtrooper", spawnLoc, true); - create.createCreature("stormtrooper", spawnLoc, true); - messageTo(self, "changePosture", null, 5, false); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/wwallace/space_mining_test.java b/sku.0/sys.server/compiled/game/script/working/wwallace/space_mining_test.java deleted file mode 100644 index 1f3c15887..000000000 --- a/sku.0/sys.server/compiled/game/script/working/wwallace/space_mining_test.java +++ /dev/null @@ -1,161 +0,0 @@ -package script.working.wwallace; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.space_utils; -import script.library.space_combat; -import script.library.space_transition; -import script.library.space_crafting; -import script.library.create; -import script.library.utils; -import script.library.sui; -import script.library.space_create; - -public class space_mining_test extends script.base_script -{ - public space_mining_test() - { - } - public static final String SPACE_MINING_STF = "space_mining"; - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - String[] strCommands = split(strText, ' '); - obj_id objInventory = utils.getInventoryContainer(self); - if (strCommands[0].equalsIgnoreCase("letsGoMining")) - { - obj_id weapon1 = createObjectOverloaded("object/tangible/ship/components/weapon/wpn_mining_laser_mk2.iff", objInventory); - obj_id weapon2 = createObjectOverloaded("object/tangible/ship/components/weapon/wpn_tractor_pulse_gun.iff", objInventory); - obj_id newship = space_utils.createShipControlDevice(self, "xwing", true); - if (isIdValid(newship)) - { - obj_id ship = space_transition.getShipFromShipControlDevice(newship); - obj_id comp1 = shipUninstallComponent(self, ship, 12, objInventory); - destroyObject(comp1); - shipInstallComponent(self, ship, 12, weapon1); - obj_id comp2 = shipUninstallComponent(self, ship, 13, objInventory); - destroyObject(comp2); - shipInstallComponent(self, ship, 13, weapon2); - } - return SCRIPT_CONTINUE; - } - if (strCommands[0].equalsIgnoreCase("asteroidScan")) - { - location selfLocation = getLocation(self); - obj_id[] objectsInRange = getObjectsInRange(selfLocation, 10000.0f); - Vector entries = new Vector(); - entries.setSize(0); - Vector locations = new Vector(); - locations.setSize(0); - for (int i = 0; i < objectsInRange.length; i++) - { - if (hasObjVar(objectsInRange[i], "mining_asteroid.numShipsSpawned")) - { - sendSystemMessageTestingOnly(self, "Found asteroid within 10000 meters!"); - String strAsteroidType = getStringObjVar(objectsInRange[i], "strAsteroidType"); - location asteroid = getLocation(objectsInRange[i]); - locations = utils.addElement(locations, asteroid); - entries = utils.addElement(entries, "Found asteroid of type: " + strAsteroidType + " at location " + asteroid); - } - } - String prompt = "Asteroid Scan Results! Pick an asteroid and get a waypoint, yo."; - String title = "Asteroid Scan Results"; - utils.setScriptVar(self, "mining_scan.locations", locations); - int pid = sui.listbox(self, self, prompt, sui.OK_ONLY, title, entries, "handleGiveWaypoint", false, false); - if (pid > -1) - { - showSUIPage(pid); - } - return SCRIPT_CONTINUE; - } - return SCRIPT_CONTINUE; - } - public int handleGiveWaypoint(obj_id self, dictionary params) throws InterruptedException - { - int intButton = sui.getIntButtonPressed(params); - if (intButton == sui.BP_CANCEL) - { - return SCRIPT_CONTINUE; - } - int row = sui.getListboxSelectedRow(params); - location[] locations = utils.getLocationArrayScriptVar(self, "mining_scan.locations"); - location waypointLoc = locations[row]; - obj_id waypoint = createWaypointInDatapad(self, waypointLoc); - setName(waypoint, "Asteroids are here"); - return SCRIPT_CONTINUE; - } - public void launch(obj_id player, obj_id ship, obj_id[] membersApprovedByShipOwner, location warpLocation, location groundLoc) throws InterruptedException - { - space_transition.clearOvertStatus(ship); - Vector groupMembersToWarp = utils.addElement(null, player); - Vector groupMemberStartIndex = utils.addElement(null, 0); - utils.setScriptVar(player, "strLaunchPointName", "launching"); - Vector shipStartLocations = space_transition.getShipStartLocations(ship); - if (shipStartLocations != null && shipStartLocations.size() > 0) - { - int startIndex = 0; - location playerLoc = getLocation(player); - if (isIdValid(playerLoc.cell)) - { - obj_id group = getGroupObject(player); - if (isIdValid(group)) - { - obj_id[] groupMembers = getGroupMemberIds(group); - for (int i = 0; i < groupMembers.length; ++i) - { - if (groupMembers[i] != player && exists(groupMembers[i]) && getLocation(groupMembers[i]).cell == playerLoc.cell && groupMemberApproved(membersApprovedByShipOwner, groupMembers[i])) - { - startIndex = getNextStartIndex(shipStartLocations, startIndex); - if (startIndex <= shipStartLocations.size()) - { - groupMembersToWarp = utils.addElement(groupMembersToWarp, groupMembers[i]); - groupMemberStartIndex = utils.addElement(groupMemberStartIndex, startIndex); - } - else - { - string_id strSpam = new string_id("space/space_interaction", "no_space_expansion"); - sendSystemMessage(groupMembers[i], strSpam); - } - } - } - } - } - } - for (int i = 0; i < groupMembersToWarp.size(); ++i) - { - space_transition.setLaunchInfo(((obj_id)groupMembersToWarp.get(i)), ship, ((Integer)groupMemberStartIndex.get(i)).intValue(), groundLoc); - warpPlayer(((obj_id)groupMembersToWarp.get(i)), warpLocation.area, warpLocation.x, warpLocation.y, warpLocation.z, null, warpLocation.x, warpLocation.y, warpLocation.z); - } - } - public int getNextStartIndex(Vector shipStartLocations, int lastStartIndex) throws InterruptedException - { - int startIndex = lastStartIndex + 1; - if (startIndex > shipStartLocations.size()) - { - for (startIndex = 1; startIndex <= shipStartLocations.size(); ++startIndex) - { - if (((location)shipStartLocations.get(startIndex - 1)).cell != null) - { - break; - } - } - } - return startIndex; - } - public boolean groupMemberApproved(obj_id[] membersApprovedByShipOwner, obj_id memberToTest) throws InterruptedException - { - for (int i = 0; i < membersApprovedByShipOwner.length; ++i) - { - if (membersApprovedByShipOwner[i] == memberToTest) - { - return true; - } - } - return false; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/wwallace/space_resource_test.java b/sku.0/sys.server/compiled/game/script/working/wwallace/space_resource_test.java deleted file mode 100644 index 8ec6612ce..000000000 --- a/sku.0/sys.server/compiled/game/script/working/wwallace/space_resource_test.java +++ /dev/null @@ -1,77 +0,0 @@ -package script.working.wwallace; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; - -public class space_resource_test extends script.base_script -{ - public space_resource_test() - { - } - public static final String[] SPACE_RESOURCE_CONST = - { - "space_chemical_acid", - "space_chemical_cyanomethanic", - "space_chemical_petrochem", - "space_chemical_sulfuric", - "space_gas_methane", - "space_gas_organometallic", - "space_gem_crystal", - "space_gem_diamond", - "space_metal_carbonaceous", - "space_metal_ice", - "space_metal_iron", - "space_metal_obsidian", - "space_metal_silicaceous" - }; - public void makeResource(obj_id self, String rclass) throws InterruptedException - { - obj_id[] rtypes = getResourceTypes(rclass); - sendSystemMessageTestingOnly(self, "Types are..." + rtypes[0].toString()); - obj_id rtype = rtypes[0]; - if (!isIdValid(rtype)) - { - sendSystemMessageTestingOnly(self, "No id found"); - sendSystemMessageTestingOnly(self, "Type was " + rclass); - return; - } - String crateTemplate = getResourceContainerForType(rtype); - if (!crateTemplate.equals("")) - { - obj_id pInv = utils.getInventoryContainer(self); - if (pInv != null) - { - obj_id crate = createObject(crateTemplate, pInv, ""); - if (addResourceToContainer(crate, rtype, 100000, self)) - { - sendSystemMessageTestingOnly(self, "Resource of class " + rclass + " added"); - } - } - } - } - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - String[] strCommands = split(strText, ' '); - if (strCommands[0].equals("createSpaceResource")) - { - String rclass = strCommands[1]; - makeResource(self, rclass); - } - else if (strCommands[0].equals("allSpaceResources")) - { - String[] resourceList = SPACE_RESOURCE_CONST; - for (int i = 0; i < resourceList.length; i++) - { - makeResource(self, resourceList[i]); - } - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/wwallace/spawner_placer.java b/sku.0/sys.server/compiled/game/script/working/wwallace/spawner_placer.java deleted file mode 100644 index 296463d83..000000000 --- a/sku.0/sys.server/compiled/game/script/working/wwallace/spawner_placer.java +++ /dev/null @@ -1,42 +0,0 @@ -package script.working.wwallace; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.datatable; - -public class spawner_placer extends script.base_script -{ - public spawner_placer() - { - } - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - String[] strCommands = split(strText, ' '); - if (strCommands[0].equals("spawner")) - { - location here = getLocation(self); - float yaw = getYaw(self); - obj_id room = here.cell; - obj_id top = getTopMostContainer(self); - String roomName = getCellName(room); - String spawnLoc = strCommands[1] + " @ " + here + " yaw " + yaw; - String table = "datatables/spawning/dungeon/your_dungeon.tab"; - dictionary dctRow = new dictionary(); - dctRow.put("spawns", strCommands[1]); - dctRow.put("loc_x", here.x); - dctRow.put("loc_y", here.y); - dctRow.put("loc_z", here.z); - dctRow.put("room", roomName); - dctRow.put("yaw", yaw); - datatable.serverDataTableAddRow(table, dctRow); - return SCRIPT_CONTINUE; - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/wwallace/wwallace_test.java b/sku.0/sys.server/compiled/game/script/working/wwallace/wwallace_test.java deleted file mode 100644 index 4970cd3a9..000000000 --- a/sku.0/sys.server/compiled/game/script/working/wwallace/wwallace_test.java +++ /dev/null @@ -1,525 +0,0 @@ -package script.working.wwallace; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.create; -import script.library.combat; -import script.library.sui; -import script.library.utils; -import script.library.money; -import script.library.pet_lib; -import script.library.ai_lib; -import script.library.skill; -import script.library.hue; -import script.library.space_transition; -import script.library.datatable; -import script.library.xp; -import script.library.space_crafting; -import script.library.space_create; - -public class wwallace_test extends script.base_script -{ - public wwallace_test() - { - } - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - String[] strCommands = split(strText, ' '); - if (strCommands[0].equalsIgnoreCase("setup")) - { - obj_id building = getTopMostContainer(self); - setObjVar(building, "tester", self); - messageTo(building, "setupArea", null, 0, false); - } - if (strCommands[0].equalsIgnoreCase("start")) - { - obj_id building = getTopMostContainer(self); - setObjVar(building, "tester", self); - messageTo(building, "startEncounter", null, 0, false); - } - if (strCommands[0].equalsIgnoreCase("end")) - { - obj_id building = getTopMostContainer(self); - messageTo(building, "endEncounter", null, 0, false); - } - if (strCommands[0].equalsIgnoreCase("cleanup")) - { - obj_id building = getTopMostContainer(self); - messageTo(building, "cleanUpArea", null, 0, false); - } - if (strCommands[0].equals("cleanUpYo")) - { - sendSystemMessageTestingOnly(self, "Cleaning up encounters...."); - obj_id[] objectsInRange = getObjectsInRange(getLocation(self), 200.0f); - for (int i = 0; i < objectsInRange.length; i++) - { - if (hasObjVar(objectsInRange[i], "grievous_encounter.active")) - { - obj_id powerCell = objectsInRange[i]; - destroyObject(powerCell); - } - } - } - if (strCommands[0].equals("checkPermissions")) - { - obj_id dungeon = getTopMostContainer(self); - String cellName = strCommands[1]; - obj_id cell = getCellId(dungeon, cellName); - sendSystemMessageTestingOnly(self, "Cell " + cell + " is public: " + permissionsIsPublic(cell)); - } - if (strCommands[0].equals("spawner")) - { - location here = getLocation(self); - float yaw = getYaw(self); - obj_id room = here.cell; - obj_id top = getTopMostContainer(self); - String roomName = getCellName(room); - String spawnLoc = strCommands[1] + " @ " + here + " yaw " + yaw; - String table = "datatables/spawning/dungeon/republic_facility.tab"; - dictionary dctRow = new dictionary(); - dctRow.put("spawns", strCommands[1]); - dctRow.put("loc_x", here.x); - dctRow.put("loc_y", here.y); - dctRow.put("loc_z", here.z); - dctRow.put("room", roomName); - dctRow.put("yaw", yaw); - datatable.serverDataTableAddRow(table, dctRow); - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("schematicTest")) - { - grantSchematic(self, "object/draft_schematic/weapon/knife_naktra_crystal_false.iff"); - } - if (strCommands[0].equals("prtTest")) - { - playClientEffectObj(self, "appearance/pt_grievious_powerup.prt", self, ""); - } - if (strCommands[0].equals("damageYou")) - { - obj_id target = getLookAtTarget(self); - setHitpoints(target, 0); - } - if (strCommands[0].equals("scene")) - { - String scene = getCurrentSceneName(); - debugSpeakMsg(self, "Scene is " + scene); - } - if (strCommands[0].equals("id")) - { - obj_id objPlayerShip = getPilotedShip(self); - debugSpeakMsg(self, "My ID is " + self + " and my inventory is " + utils.getInventoryContainer(self)); - debugSpeakMsg(self, "Furthermore, my ship ID is " + objPlayerShip); - } - if (strCommands[0].equals("cargoHoldYes")) - { - obj_id objShip = getPilotedShip(self); - } - if (strCommands[0].equals("clearCargo")) - { - obj_id objPlayerShip = getPilotedShip(self); - obj_id objs[] = getShipCargoHoldContentsResourceTypes(objPlayerShip); - int amounts[] = getShipCargoHoldContentsAmounts(objPlayerShip); - for (int i = 0; i < objs.length; i++) - { - setShipCargoHoldContent(objPlayerShip, objs[i], 0); - } - } - if (strCommands[0].equals("cargoCheck")) - { - obj_id objPlayerShip = getPilotedShip(self); - int contents = getShipCargoHoldContentsCurrent(objPlayerShip); - int max = getShipCargoHoldContentsMaximum(objPlayerShip); - sendSystemMessageTestingOnly(self, "CARGO: " + contents + " / " + max); - } - if (strCommands[0].equals("stopRunning")) - { - setLocomotion(self, 0); - } - if (strCommands[0].equalsIgnoreCase("yt2400")) - { - debugSpeakMsg(self, " getting on board!"); - obj_id objShip = getLookAtTarget(self); - if (!isIdValid(objShip)) - { - sendSystemMessageTestingOnly(self, "No look at target"); - return SCRIPT_CONTINUE; - } - obj_id[] objCells = getContents(objShip); - if ((objCells == null) || (objCells.length == 0)) - { - sendSystemMessageTestingOnly(self, "ship doesn't have an interior"); - return SCRIPT_CONTINUE; - } - obj_id objCell = objCells[0]; - location locTest = new location(); - locTest.cell = objCell; - setLocation(self, locTest); - } - if (strCommands[0].equalsIgnoreCase("leave")) - { - location locTest = new location(); - locTest.area = "tatooine"; - setLocation(self, locTest); - } - if (strCommands[0].equals("nukeAll")) - { - obj_id[] objTestObjects = getObjectsInRange(self, 1000); - if (objTestObjects != null) - { - for (int intI = 0; intI < objTestObjects.length; intI++) - { - destroyObject(objTestObjects[intI]); - } - } - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("loco")) - { - int loco = getLocomotion(self); - sendSystemMessageTestingOnly(self, "Locomotion state = " + loco); - } - if (strCommands[0].equals("cell")) - { - obj_id objShip = getTopMostContainer(self); - obj_id[] objCells = getContents(objShip); - obj_id objCell = objCells[0]; - location locTest = new location(); - locTest.cell = objCell; - setLocation(self, locTest); - } - if (strCommands[0].equals("bridgeMe")) - { - obj_id objShip = getLookAtTarget(self); - if (!isIdValid(objShip)) - { - sendSystemMessageTestingOnly(self, "No look at target"); - return SCRIPT_CONTINUE; - } - obj_id[] objCells = getContents(objShip); - obj_id objCell = objCells[13]; - location locTest = new location(); - locTest.cell = objCell; - setLocation(self, locTest); - } - if (strCommands[0].equals("makeTutorial")) - { - location locTest = getLocation(self); - locTest.z = locTest.z + 250f; - obj_id[] objTestObjects = getAllObjectsWithTemplate(getLocation(self), 320000, "object/building/general/npe_hangar_1.iff"); - obj_id objStation = null; - if ((objTestObjects == null) || (objTestObjects.length == 0)) - { - objStation = createObject("object/building/general/npe_hangar_1.iff", getLocation(self)); - persistObject(objStation); - } - else - { - objStation = objTestObjects[0]; - } - obj_id[] objCells = getContents(objStation); - if ((objCells == null) || (objCells.length == 0)) - { - sendSystemMessageTestingOnly(self, "ship doesn't have an interior"); - return SCRIPT_CONTINUE; - } - obj_id objCell = objCells[0]; - location locDestination = getGoodLocation(objStation, "hanger"); - locDestination.x = -.5f; - locDestination.y = -3; - locDestination.z = -72.2f; - setLocation(self, locDestination); - sendSystemMessageTestingOnly(self, "station is " + objStation); - } - if (strCommands[0].equals("loc")) - { - location loc = getLocation(self); - sendSystemMessageTestingOnly(self, "X = " + loc.x + " Y = " + loc.y + "Z = " + loc.z + " AREA = " + loc.area + " CELL = " + loc.cell); - } - if (strCommands[0].equals("teleport")) - { - obj_id top = getTopMostContainer(self); - String whereTo = strCommands[1]; - location randomLoc = getGoodLocation(top, whereTo); - obj_id cell = getCellId(top, whereTo); - utils.warpPlayer(self, randomLoc); - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("makeCreditChip")) - { - obj_id objContainer = utils.getInventoryContainer(self); - space_create.makeCreditChip(objContainer, 100); - } - if (strCommands[0].equals("engineReadout")) - { - String strDataTable = "datatables/ship/components/engine_balance_readout.tab"; - String[] strHeaderTypes = - { - "f" - }; - String[] strHeaders = - { - "speed" - }; - boolean boolTest = datatable.createDataTable(strDataTable, strHeaders, strHeaderTypes); - if (!boolTest) - { - sendSystemMessageTestingOnly(self, "No datatable made"); - return SCRIPT_CONTINUE; - } - dictionary dctRow = new dictionary(1); - for (int i = 0; i < 1000; i++) - { - float speed = space_crafting.getBellValue(58.8f, 0.1f); - dctRow.put("speed", speed); - datatable.serverDataTableAddRow(strDataTable, dctRow); - } - } - if (strCommands[0].equals("topMostContainer")) - { - debugSpeakMsg(self, "topmost is" + getTopMostContainer(self)); - } - if (strCommands[0].equals("fillInventory")) - { - debugSpeakMsg(self, "AHH!"); - for (int i = 0; i < 60; i++) - { - obj_id playerInv = utils.getInventoryContainer(self); - obj_id newComponent = create.object("object/tangible/ship/components/weapon/wpn_incom_light_blaster.iff", playerInv, false, false); - } - } - if (strCommands[0].equals("noXp")) - { - xp.grant(self, "shipwright", +23356); - } - if (strCommands[0].equals("makeRebelPilot")) - { - skill.grantSkill(self, "pilot_rebel_navy_novice"); - skill.grantSkill(self, "pilot_rebel_navy_starships_01"); - skill.grantSkill(self, "pilot_rebel_navy_starships_02"); - skill.grantSkill(self, "pilot_rebel_navy_starships_03"); - skill.grantSkill(self, "pilot_rebel_navy_starships_04"); - skill.grantSkill(self, "pilot_rebel_navy_weapons_01"); - skill.grantSkill(self, "pilot_rebel_navy_weapons_02"); - skill.grantSkill(self, "pilot_rebel_navy_weapons_03"); - skill.grantSkill(self, "pilot_rebel_navy_weapons_04"); - skill.grantSkill(self, "pilot_rebel_navy_procedures_01"); - skill.grantSkill(self, "pilot_rebel_navy_procedures_02"); - skill.grantSkill(self, "pilot_rebel_navy_procedures_03"); - skill.grantSkill(self, "pilot_rebel_navy_procedures_04"); - skill.grantSkill(self, "pilot_rebel_navy_droid_01"); - skill.grantSkill(self, "pilot_rebel_navy_droid_02"); - skill.grantSkill(self, "pilot_rebel_navy_droid_03"); - skill.grantSkill(self, "pilot_rebel_navy_droid_04"); - skill.grantSkill(self, "pilot_rebel_navy_master"); - } - if (strCommands[0].equals("giveMeMass")) - { - obj_id pcd[] = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - setChassisComponentMassMaximum(ship, 10000000.0f); - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("colorShip")) - { - obj_id pcd[] = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - if (isIdValid(ship)) - { - String index = "/shared_owner/index_color_1"; - sui.colorize(self, self, ship, index, "handleColorize"); - String index2 = "/shared_owner/index_color_2"; - sui.colorize(self, self, ship, index2, "handleColorize"); - } - return SCRIPT_CONTINUE; - } - if (strCommands[0].equals("stimpack")) - { - obj_id playerInv = utils.getInventoryContainer(self); - obj_id newComponent = create.object("object/tangible/medicine/instant_stimpack/stimpack_a.iff", playerInv, false, false); - setObjVar(newComponent, "healing.power", 250); - setCount(newComponent, 5); - } - if (strCommands[0].equals("hurtMyself")) - { - int maxHealth = getMaxHealth(self); - int newHealth = maxHealth / 2; - setHealth(self, newHealth); - } - if (strCommands[0].equals("pattern0")) - { - debugSpeakMsg(self, "Pattern 0"); - obj_id[] pcd = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - String index = "/shared_owner/index_texture_1"; - hue.setRangedIntCustomVar(ship, index, 0); - } - if (strCommands[0].equals("pattern1")) - { - obj_id[] pcd = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - String index = "/shared_owner/index_texture_1"; - hue.setRangedIntCustomVar(ship, index, 1); - } - if (strCommands[0].equals("pattern2")) - { - obj_id[] pcd = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - String index = "/shared_owner/index_texture_1"; - hue.setRangedIntCustomVar(ship, index, 2); - } - if (strCommands[0].equals("pattern3")) - { - obj_id[] pcd = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - String index = "/shared_owner/index_texture_1"; - hue.setRangedIntCustomVar(ship, index, 3); - } - if (strCommands[0].equals("pattern4")) - { - obj_id[] pcd = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - String index = "/shared_owner/index_texture_1"; - hue.setRangedIntCustomVar(ship, index, 4); - } - if (strCommands[0].equals("pattern5")) - { - obj_id[] pcd = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - String index = "/shared_owner/index_texture_1"; - hue.setRangedIntCustomVar(ship, index, 5); - } - if (strCommands[0].equals("pattern6")) - { - obj_id[] pcd = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - String index = "/shared_owner/index_texture_1"; - hue.setRangedIntCustomVar(ship, index, 6); - } - if (strCommands[0].equals("moveShip")) - { - debugSpeakMsg(self, "Understood command"); - obj_id[] pcd = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - location x = getLocation(self); - setLocation(ship, x); - debugSpeakMsg(self, "Ship ID = " + ship); - } - if (strCommands[0].equals("unstickMe")) - { - debugSpeakMsg(self, "Unsticking self."); - location x = getLocation(self); - x.x += -1; - x.y += -1; - x.z += -1; - setLocation(self, x); - } - if (strCommands[0].equals("getShipId")) - { - obj_id[] pcd = space_transition.findShipControlDevicesForPlayer(self); - obj_id ship = space_transition.getShipFromShipControlDevice(pcd[0]); - String chassis = getShipChassisType(ship); - debugSpeakMsg(self, "Ship ID = " + ship); - debugSpeakMsg(self, "Chassis = " + chassis); - } - if (strCommands[0].equals("wwallaceValidateLoot")) - { - String strDataTable = "datatables/ship/components/loot_validation.tab"; - String[] strHeaderTypes = - { - "s", - "s", - "s" - }; - String[] strHeaders = - { - "objectTemplate", - "didItCreate", - "validStats" - }; - boolean boolTest = datatable.createDataTable(strDataTable, strHeaders, strHeaderTypes); - if (!boolTest) - { - sendSystemMessageTestingOnly(self, "No datatable made"); - return SCRIPT_CONTINUE; - } - String[] strTables = new String[1]; - strTables = new String[8]; - strTables[0] = "armor"; - strTables[1] = "booster"; - strTables[2] = "capacitor"; - strTables[3] = "droid_interface"; - strTables[4] = "engine"; - strTables[5] = "reactor"; - strTables[6] = "shield"; - strTables[7] = "weapon"; - for (int intM = 0; intM < strTables.length; intM++) - { - debugSpeakMsg(self, "Now doing " + strTables[intM]); - String strFileName = "datatables/ship/components/" + strTables[intM] + ".iff"; - String[] strTemplates = dataTableGetStringColumn(strFileName, "strType"); - for (int intI = 0; intI < strTemplates.length; intI++) - { - dictionary dctRow = new dictionary(2); - String created = ""; - obj_id objTest = null; - try - { - objTest = createObject(strTemplates[intI], getLocation(self)); - created = "yes"; - } - catch(Throwable err) - { - LOG("space_error", "OBJECT " + strTemplates[intM] + " in " + strFileName + " does not create!!!"); - created = "no"; - } - destroyObject(objTest); - dctRow.put("objectTemplate", strTemplates[intI]); - dctRow.put("didItCreate", created); - datatable.serverDataTableAddRow(strDataTable, dctRow); - } - } - } - return SCRIPT_CONTINUE; - } - public int handleColorize(obj_id self, dictionary params) throws InterruptedException - { - int bp = sui.getIntButtonPressed(params); - if (bp == sui.BP_CANCEL) - { - return SCRIPT_CONTINUE; - } - obj_id player = sui.getPlayerId(params); - if (!isIdValid(player)) - { - return SCRIPT_CONTINUE; - } - String template = utils.getTemplateFilenameNoPath(self); - String index = "/shared_owner/index_color_1"; - if (index != null && !index.equals("") && !index.equals("none")) - { - int idx = sui.getColorPickerIndex(params); - if (idx > -1) - { - obj_id ship = getPilotedShip(player); - if (isIdValid(ship)) - { - hue.setColor(ship, index, idx); - } - } - } - return SCRIPT_CONTINUE; - } - public int delayTeleport(obj_id self, dictionary params) throws InterruptedException - { - obj_id newbieHall = getObjIdObjVar(self, "newbieHallId"); - location randomLoc = getGoodLocation(newbieHall, "r13"); - utils.warpPlayer(self, randomLoc); - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/wwallace/yt1300_helper.java b/sku.0/sys.server/compiled/game/script/working/wwallace/yt1300_helper.java deleted file mode 100644 index 20d92cb18..000000000 --- a/sku.0/sys.server/compiled/game/script/working/wwallace/yt1300_helper.java +++ /dev/null @@ -1,55 +0,0 @@ -package script.working.wwallace; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -public class yt1300_helper extends script.base_script -{ - public yt1300_helper() - { - } - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - String[] strCommands = split(strText, ' '); - if (strCommands[0].equalsIgnoreCase("getInYT1300")) - { - obj_id objShip = getLookAtTarget(self); - if (!isIdValid(objShip)) - { - sendSystemMessageTestingOnly(self, "No look at target"); - return SCRIPT_CONTINUE; - } - obj_id[] objCells = getContents(objShip); - if ((objCells == null) || (objCells.length == 0)) - { - sendSystemMessageTestingOnly(self, "ship doesn't have an interior"); - return SCRIPT_CONTINUE; - } - obj_id objCell = getCellId(objShip, "storage6"); - location locTest = new location(); - locTest.cell = objCell; - setLocation(self, locTest); - } - if (strCommands[0].equalsIgnoreCase("unstickYT1300")) - { - obj_id ship = getTopMostContainer(self); - obj_id objCell = getCellId(ship, "storage6"); - location locTest = new location(); - locTest.cell = objCell; - setLocation(self, locTest); - return SCRIPT_CONTINUE; - } - if (strCommands[0].equalsIgnoreCase("leave")) - { - location locTest = new location(); - locTest.area = "tatooine"; - setLocation(self, locTest); - } - return SCRIPT_CONTINUE; - } -} diff --git a/sku.0/sys.server/compiled/game/script/working/wwallace/zone_distro.java b/sku.0/sys.server/compiled/game/script/working/wwallace/zone_distro.java deleted file mode 100644 index 94af2bf81..000000000 --- a/sku.0/sys.server/compiled/game/script/working/wwallace/zone_distro.java +++ /dev/null @@ -1,186 +0,0 @@ -package script.working.wwallace; - -import script.*; -import script.base_class.*; -import script.combat_engine.*; -import java.util.Arrays; -import java.util.Hashtable; -import java.util.Vector; -import script.base_script; - -import script.library.utils; -import script.library.datatable; -import script.library.objvar_mangle; - -public class zone_distro extends script.base_script -{ - public zone_distro() - { - } - public int OnSpeaking(obj_id self, String strText) throws InterruptedException - { - String[] strCommands = split(strText, ' '); - if (strCommands[0].equals("zoneDistro")) - { - String strDataTable = "datatables/space_zones/zone_distro.tab"; - String[] strHeaderTypes = - { - "s", - "s", - "s", - "s", - "s", - "s" - }; - String[] strHeaders = - { - "strMob", - "strZone", - "strSquad", - "strTreasure", - "strShipType", - "strTier" - }; - boolean boolTest = datatable.createDataTable(strDataTable, strHeaders, strHeaderTypes); - if (!boolTest) - { - sendSystemMessageTestingOnly(self, "No datatable made"); - return SCRIPT_CONTINUE; - } - String[] strZones = new String[1]; - strZones = new String[10]; - strZones[0] = "space_tatooine"; - strZones[1] = "space_corellia"; - strZones[2] = "space_dantooine"; - strZones[3] = "space_dathomir"; - strZones[4] = "space_endor"; - strZones[5] = "space_heavy1"; - strZones[6] = "space_lok"; - strZones[7] = "space_naboo"; - strZones[8] = "space_tatooine"; - strZones[9] = "space_yavin4"; - for (int intM = 0; intM < strZones.length; intM++) - { - debugSpeakMsg(self, "Now doing " + strZones[intM]); - String strFileName = "datatables/space_zones/buildout/" + strZones[intM] + ".iff"; - String[] strObjVars = dataTableGetStringColumn(strFileName, "strObjVars"); - String[] strObject = dataTableGetStringColumn(strFileName, "strObject"); - for (int intI = 0; intI < strObject.length; intI++) - { - if (strObject[intI].equals("object/tangible/space/content_infrastructure/basic_spawner.iff")) - { - obj_id objTest = createObject("object/weapon/ranged/rifle/rifle_dlt20a.iff", getLocation(self)); - try - { - setPackedObjvars(objTest, strObjVars[intI]); - } - catch(Throwable err) - { - LOG("space_error", "OBJVAR ENTRY " + intM + " in " + strFileName + " is TRUNCATED value is " + strObjVars); - } - dictionary dctRow = new dictionary(2); - String[] strSpawns = objvar_mangle.getMangledStringArrayObjVar(objTest, "strSpawns"); - if (strSpawns == null) - { - strSpawns = objvar_mangle.getBrokenMangledStringArrayObjVar(objTest, "strSpawns"); - if (strSpawns == null) - { - LOG("space", "FUCKED OBJVARS!@!@!@!@! ON " + objTest); - } - else - { - LOG("space", "BROKEN MANGLED OBJVAR GOTTEN"); - } - } - for (int i = 0; i < strSpawns.length; i++) - { - if (strSpawns[i].startsWith("squad_")) - { - String squadFile = "datatables/space_content/spawners/squads.iff"; - String spaceMobile = "datatables/space_mobile/space_mobile.iff"; - dictionary squad = dataTableGetRow(squadFile, strSpawns[i]); - for (int j = 1; j < 11; j++) - { - String temp = squad.getString("strShip" + j); - if (temp != null && !temp.equals("")) - { - dctRow.put("strMob", temp); - dctRow.put("strZone", strZones[intM]); - dctRow.put("strSquad", strSpawns[i]); - dictionary dctSpaceMobile = dataTableGetRow(spaceMobile, temp); - if (dctSpaceMobile == null) - { - LOG("space_error", "SPACE MOBILE IS NULL HERE" + ": SHIP IS" + strSpawns[i]); - } - else - { - String tier = dctSpaceMobile.getString("strPilot"); - if (tier == null) - { - tier = "NULL"; - } - String treasure = dctSpaceMobile.getString("strLootLookup"); - if (treasure == null) - { - treasure = "NULL"; - } - String shiptype = dctSpaceMobile.getString("strShip"); - if (shiptype == null) - { - shiptype = "NULL"; - } - dctRow.put("strTreasure", treasure); - dctRow.put("strShipType", shiptype); - dctRow.put("strTier", tier); - } - datatable.serverDataTableAddRow(strDataTable, dctRow); - } - } - } - else - { - if (strSpawns[i] != null && !strSpawns[i].equals("")) - { - String spaceMobile = "datatables/space_mobile/space_mobile.iff"; - dctRow.put("strMob", strSpawns[i]); - dctRow.put("strZone", strZones[intM]); - dictionary dctSpaceMobile = dataTableGetRow(spaceMobile, strSpawns[i]); - if (dctSpaceMobile == null) - { - LOG("space_error", "SPACE MOBILE IS NULL HERE" + ": SHIP IS" + strSpawns[i]); - } - else - { - String tier = dctSpaceMobile.getString("strPilot"); - if (tier == null) - { - tier = "NULL"; - } - String treasure = dctSpaceMobile.getString("strLootLookup"); - if (treasure == null) - { - treasure = "NULL"; - } - String shiptype = dctSpaceMobile.getString("strShip"); - if (shiptype == null) - { - shiptype = "NULL"; - } - dctRow.put("strTreasure", treasure); - dctRow.put("strShipType", shiptype); - dctRow.put("strTier", tier); - } - datatable.serverDataTableAddRow(strDataTable, dctRow); - } - } - } - datatable.serverDataTableAddRow(strDataTable, dctRow); - destroyObject(objTest); - } - LOG("space_error", "FINISHED WITH " + strZones[intM]); - } - } - } - return SCRIPT_CONTINUE; - } -}