Files
dsrc/sku.0/sys.server/compiled/game/script/terminal/terminal_kashyyyk_content.script
T

2415 lines
81 KiB
Plaintext

/* Title: terminal_kashyyyk_content.script
* Description: Kashyyyk Content Frog
*/
/***** INCLUDES ********************************************************/
include library.armor;
include library.factions;
include library.space_flags;
include library.sui;
include library.skill;
include library.utils;
include library.prose;
include library.money;
include library.resource;
include library.ai_lib;
include library.pet_lib;
include library.chat;
include library.create;
include library.space_utils;
include library.healing;
include library.consumable;
include library.player_stomach;
include library.weapons;
include library.buff;
include library.jedi;
include library.space_transition;
include library.features;
include library.groundquests;
include library.space_crafting;
/***** INHERITS ********************************************************/
//inherits terminal.base.terminal_add_use;
/***** CONSTANTS *******************************************************/
const int CASH_AMOUNT = 50000;
const int AMT = 100000;
const int FACTION_AMT = 250000;
const float CRAFTED_QUALITY = 0.85f; //quality of weapon as a percentage
const float CONDITION = 1.0f;
const float GENERAL_PROTECTION = 0.94f; //general protection on armor range from 0 - 1.0
const string SKILL_TBL = "datatables/skill/skills.iff";
const string SKILL_TERMINAL_TBL = "datatables/skill/skill_terminal.iff";
const string SKILL_LOADOUT_TBL = "datatables/skill/loadout.iff";
const string_id SID_TERMINAL_PROMPT = new string_id("skill_teacher","skill_terminal_prompt");
const string_id SID_TERMINAL_TITLE = new string_id("skill_teacher","skill_terminal_title");
const string_id SID_TERMINAL_DISABLED = new string_id("skill_teacher","skill_terminal_disabled");
const string_id SID_TERMINAL_DENIED = new string_id("skill_teacher","skill_terminal_denied");
const string_id SID_TERMINAL_MAX_SKILLS = new string_id("skill_teacher","skill_terminal_max_skills");
const string_id PROSE_GRANT_SKILL = new string_id("skill_teacher","skill_terminal_grant");
const string_id PROSE_GRANT_SKILL_FAIL = new string_id("skill_teacher","skill_terminal_grant_fail");
const string[] CHARACTER_BUILDER_OPTIONS = {
"Kachirho",
"Dead Forest",
"Myyydril Caverns",
"Hunting Grounds",
"Bocctyyy",
"Hracca",
"Rryatt Trail",
"Blackscale Slave Camp",
"Avatar Platform",
"Space Mining",
"Space Missions",
"Cybernetics"
};
const string[] KACHIRHO_OPTIONS = {
"Melee",
"Ranged",
"Healer",
};
const string[] SPACE_MINING_OPTIONS = {
"Rebel Pilot",
"Imperial Pilot",
"Neutral Pilot"
};
const string ARMOR_SET_PREFIX = "object/tangible/wearables/armor/";
const string[] ARMOR_SET_ASSAULT_1 = {
"composite/armor_composite_bicep_l.iff",
"composite/armor_composite_chest_plate.iff",
"composite/armor_composite_bicep_r.iff",
"composite/armor_composite_gloves.iff",
"composite/armor_composite_boots.iff",
"composite/armor_composite_helmet.iff",
"composite/armor_composite_bracer_l.iff",
"composite/armor_composite_leggings.iff",
"composite/armor_composite_bracer_r.iff"
};
const string[] ARMOR_SET_ASSAULT_2 = {
"chitin/armor_chitin_s01_bicep_l.iff",
"chitin/armor_chitin_s01_bicep_r.iff",
"chitin/armor_chitin_s01_boots.iff",
"chitin/armor_chitin_s01_bracer_l.iff",
"chitin/armor_chitin_s01_bracer_r.iff",
"chitin/armor_chitin_s01_chest_plate.iff",
"chitin/armor_chitin_s01_gloves.iff",
"chitin/armor_chitin_s01_helmet.iff",
"chitin/armor_chitin_s01_leggings.iff"
};
const string[] ARMOR_SET_ASSAULT_3 = {
"marauder/armor_marauder_s03_bicep_l.iff",
"marauder/armor_marauder_s03_bicep_r.iff",
"marauder/armor_marauder_s03_boots.iff",
"marauder/armor_marauder_s03_bracer_l.iff",
"marauder/armor_marauder_s03_bracer_r.iff",
"marauder/armor_marauder_s03_chest_plate.iff",
"marauder/armor_marauder_s03_gloves.iff",
"marauder/armor_marauder_s03_helmet.iff",
"marauder/armor_marauder_s03_leggings.iff"
};
const string[] ARMOR_SET_ASSAULT_4 = {
"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"
};
const string[] ARMOR_SET_BATTLE_1 = {
"bone/armor_bone_s01_bicep_l.iff",
"bone/armor_bone_s01_bicep_r.iff",
"bone/armor_bone_s01_boots.iff",
"bone/armor_bone_s01_bracer_l.iff",
"bone/armor_bone_s01_bracer_r.iff",
"bone/armor_bone_s01_chest_plate.iff",
"bone/armor_bone_s01_gloves.iff",
"bone/armor_bone_s01_helmet.iff",
"bone/armor_bone_s01_leggings.iff"
};
const string[] ARMOR_SET_BATTLE_2 = {
"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"
};
const 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"
};
const string[] ARMOR_SET_BATTLE_4 = {
"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"
};
const string[] ARMOR_SET_RECON_1 = {
"zam/armor_zam_wesell_helmet.iff",
"zam/armor_zam_wesell_boots.iff",
"zam/armor_zam_wesell_chest_plate.iff",
"zam/armor_zam_wesell_pants.iff",
"zam/armor_zam_wesell_gloves.iff"
};
const string[] ARMOR_SET_RECON_2 = {
"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"
};
const string[] ARMOR_SET_RECON_3 = {
"tantel/armor_tantel_skreej_bicep_l.iff",
"tantel/armor_tantel_skreej_chest_plate.iff",
"tantel/armor_tantel_skreej_bicep_r.iff",
"tantel/armor_tantel_skreej_boots.iff",
"tantel/armor_tantel_skreej_gloves.iff",
"tantel/armor_tantel_skreej_helmet.iff",
"tantel/armor_tantel_skreej_bracer_l.iff",
"tantel/armor_tantel_skreej_bracer_r.iff",
"tantel/armor_tantel_skreej_leggings.iff"
};
const string[] ARMOR_SET_RECON_4 = {
"ubese/armor_ubese_boots.iff",
"ubese/armor_ubese_jacket.iff",
"ubese/armor_ubese_bracer_l.iff",
"ubese/armor_ubese_bracer_r.iff",
"ubese/armor_ubese_pants.iff",
"ubese/armor_ubese_gloves.iff",
"ubese/armor_ubese_helmet.iff",
"ubese/armor_ubese_shirt.iff"
};
const 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"
};
const string[] ARMOR_SET_BATTLE_ITHORIAN = {
"ithorian_defender/ith_armor_s01_bicep_l.iff",
"ithorian_defender/ith_armor_s01_chest_plate.iff",
"ithorian_defender/ith_armor_s01_bicep_r.iff",
"ithorian_defender/ith_armor_s01_gloves.iff",
"ithorian_defender/ith_armor_s01_boots.iff",
"ithorian_defender/ith_armor_s01_helmet.iff",
"ithorian_defender/ith_armor_s01_bracer_l.iff",
"ithorian_defender/ith_armor_s01_leggings.iff",
"ithorian_defender/ith_armor_s01_bracer_r.iff"
};
const string[] ARMOR_SET_RECON_ITHORIAN = {
"ithorian_guardian/ith_armor_s02_bicep_l.iff",
"ithorian_guardian/ith_armor_s02_chest_plate.iff",
"ithorian_guardian/ith_armor_s02_bicep_r.iff",
"ithorian_guardian/ith_armor_s02_gloves.iff",
"ithorian_guardian/ith_armor_s02_boots.iff",
"ithorian_guardian/ith_armor_s02_helmet.iff",
"ithorian_guardian/ith_armor_s02_bracer_l.iff",
"ithorian_guardian/ith_armor_s02_leggings.iff",
"ithorian_guardian/ith_armor_s02_bracer_r.iff"
};
const string[] ARMOR_SET_ASSAULT_WOOKIEE = {
"kashyyykian_hunting/armor_kashyyykian_hunting_bracer_l.iff",
"kashyyykian_hunting/armor_kashyyykian_hunting_bracer_r.iff",
"kashyyykian_hunting/armor_kashyyykian_hunting_chest_plate.iff",
"kashyyykian_hunting/armor_kashyyykian_hunting_leggings.iff"
};
const string[] ARMOR_SET_BATTLE_WOOKIEE = {
"kashyyykian_black_mtn/armor_kashyyykian_black_mtn_bracer_l.iff",
"kashyyykian_black_mtn/armor_kashyyykian_black_mtn_bracer_r.iff",
"kashyyykian_black_mtn/armor_kashyyykian_black_mtn_chest_plate.iff",
"kashyyykian_black_mtn/armor_kashyyykian_black_mtn_leggings.iff"
};
const string[] ARMOR_SET_RECON_WOOKIEE = {
"kashyyykian_ceremonial/armor_kashyyykian_ceremonial_bracer_l.iff",
"kashyyykian_ceremonial/armor_kashyyykian_ceremonial_bracer_r.iff",
"kashyyykian_ceremonial/armor_kashyyykian_ceremonial_chest_plate.iff",
"kashyyykian_ceremonial/armor_kashyyykian_ceremonial_leggings.iff"
};
const string[] ARMOR_SET_ASSAULT_IMPERIAL = {
"assault_trooper/armor_assault_trooper_chest_plate.iff",
"assault_trooper/armor_assault_trooper_leggings.iff",
"assault_trooper/armor_assault_trooper_helmet.iff",
"assault_trooper/armor_assault_trooper_bicep_l.iff",
"assault_trooper/armor_assault_trooper_bicep_r.iff",
"assault_trooper/armor_assault_trooper_bracer_l.iff",
"assault_trooper/armor_assault_trooper_bracer_r.iff",
"assault_trooper/armor_assault_trooper_boots.iff",
"assault_trooper/armor_assault_trooper_gloves.iff"
};
const string[] ARMOR_SET_BATTLE_IMPERIAL = {
"stormtrooper/armor_stormtrooper_chest_plate.iff",
"stormtrooper/armor_stormtrooper_leggings.iff",
"stormtrooper/armor_stormtrooper_helmet.iff",
"stormtrooper/armor_stormtrooper_bicep_l.iff",
"stormtrooper/armor_stormtrooper_bicep_r.iff",
"stormtrooper/armor_stormtrooper_bracer_l.iff",
"stormtrooper/armor_stormtrooper_bracer_r.iff",
"stormtrooper/armor_stormtrooper_boots.iff",
"stormtrooper/armor_stormtrooper_gloves.iff"
};
const string[] ARMOR_SET_RECON_IMPERIAL = {
"scout_trooper/armor_scout_trooper_chest_plate.iff",
"scout_trooper/armor_scout_trooper_leggings.iff",
"scout_trooper/armor_scout_trooper_helmet.iff",
"scout_trooper/armor_scout_trooper_bicep_l.iff",
"scout_trooper/armor_scout_trooper_bicep_r.iff",
"scout_trooper/armor_scout_trooper_bracer_l.iff",
"scout_trooper/armor_scout_trooper_bracer_r.iff",
"scout_trooper/armor_scout_trooper_boots.iff",
"scout_trooper/armor_scout_trooper_gloves.iff"
};
const string[] ARMOR_SET_ASSAULT_REBEL = {
"rebel_assault/armor_rebel_assault_chest_plate.iff",
"rebel_assault/armor_rebel_assault_leggings.iff",
"rebel_assault/armor_rebel_assault_helmet.iff",
"rebel_assault/armor_rebel_assault_bicep_l.iff",
"rebel_assault/armor_rebel_assault_bicep_r.iff",
"rebel_assault/armor_rebel_assault_bracer_l.iff",
"rebel_assault/armor_rebel_assault_bracer_r.iff",
"rebel_assault/armor_rebel_assault_boots.iff",
"rebel_assault/armor_rebel_assault_gloves.iff"
};
const string[] ARMOR_SET_BATTLE_REBEL = {
"rebel_battle/armor_rebel_battle_chest_plate.iff",
"rebel_battle/armor_rebel_battle_leggings.iff",
"rebel_battle/armor_rebel_battle_helmet.iff",
"rebel_battle/armor_rebel_battle_bicep_l.iff",
"rebel_battle/armor_rebel_battle_bicep_r.iff",
"rebel_battle/armor_rebel_battle_bracer_l.iff",
"rebel_battle/armor_rebel_battle_bracer_r.iff",
"rebel_battle/armor_rebel_battle_boots.iff",
"rebel_battle/armor_rebel_battle_gloves.iff"
};
const string[] ARMOR_SET_RECON_REBEL = {
"marine/armor_marine_chest_plate_rebel.iff",
"marine/armor_marine_leggings.iff",
"marine/armor_marine_helmet.iff",
"marine/armor_marine_bicep_l.iff",
"marine/armor_marine_bicep_r.iff",
"marine/armor_marine_bracer_l.iff",
"marine/armor_marine_bracer_r.iff",
"marine/armor_marine_boots.iff",
"marine/armor_marine_gloves.iff"
};
const string[][] ARMOR_SETS_ASSAULT = {
ARMOR_SET_ASSAULT_1,
ARMOR_SET_ASSAULT_2,
ARMOR_SET_ASSAULT_3
};
const string[][] ARMOR_SETS_BATTLE = {
ARMOR_SET_BATTLE_1,
ARMOR_SET_BATTLE_2,
ARMOR_SET_BATTLE_3,
ARMOR_SET_BATTLE_4
};
const string[][] ARMOR_SETS_RECON = {
ARMOR_SET_RECON_1,
ARMOR_SET_RECON_2,
ARMOR_SET_RECON_3,
ARMOR_SET_RECON_4
};
const string[] CYBERNETIC_ITEMS = {
"object/tangible/wearables/cybernetic/s02/cybernetic_s02_arm_l.iff",
"object/tangible/wearables/cybernetic/s02/cybernetic_s02_arm_r.iff",
"object/tangible/wearables/cybernetic/s02/cybernetic_s02_legs.iff",
"object/tangible/wearables/cybernetic/s03/cybernetic_s03_arm_l.iff",
"object/tangible/wearables/cybernetic/s03/cybernetic_s03_arm_r.iff",
"object/tangible/wearables/cybernetic/s05/cybernetic_s05_arm_l.iff",
"object/tangible/wearables/cybernetic/s05/cybernetic_s05_arm_r.iff",
"object/tangible/wearables/cybernetic/s05/cybernetic_s05_legs.iff"
};
const 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"};
const 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"};
const string[] PISTOL = {
"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"};
const 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"};
const 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"};
const 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"};
const 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"};
const 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"};
const 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"};
const 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"};
const 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"};
const string[] REBEL_PILOT = {
"pilot_rebel_navy_novice",
"pilot_rebel_navy_starships_01",
"pilot_rebel_navy_starships_02",
"pilot_rebel_navy_starships_03",
"pilot_rebel_navy_starships_04",
"pilot_rebel_navy_weapons_01",
"pilot_rebel_navy_weapons_02",
"pilot_rebel_navy_weapons_03",
"pilot_rebel_navy_weapons_04",
"pilot_rebel_navy_procedures_01",
"pilot_rebel_navy_procedures_02",
"pilot_rebel_navy_procedures_03",
"pilot_rebel_navy_procedures_04",
"pilot_rebel_navy_droid_01",
"pilot_rebel_navy_droid_02",
"pilot_rebel_navy_droid_03",
"pilot_rebel_navy_droid_04",
"pilot_rebel_navy_master"};
const string[] IMPERIAL_PILOT = {
"pilot_imperial_navy_novice",
"pilot_imperial_navy_starships_01",
"pilot_imperial_navy_starships_02",
"pilot_imperial_navy_starships_03",
"pilot_imperial_navy_starships_04",
"pilot_imperial_navy_weapons_01",
"pilot_imperial_navy_weapons_02",
"pilot_imperial_navy_weapons_03",
"pilot_imperial_navy_weapons_04",
"pilot_imperial_navy_procedures_01",
"pilot_imperial_navy_procedures_02",
"pilot_imperial_navy_procedures_03",
"pilot_imperial_navy_procedures_04",
"pilot_imperial_navy_droid_01",
"pilot_imperial_navy_droid_02",
"pilot_imperial_navy_droid_03",
"pilot_imperial_navy_droid_04",
"pilot_imperial_navy_master"};
const string[] NEUTRAL_PILOT = {
"pilot_neutral_novice",
"pilot_neutral_starships_01",
"pilot_neutral_starships_02",
"pilot_neutral_starships_03",
"pilot_neutral_starships_04",
"pilot_neutral_weapons_01",
"pilot_neutral_weapons_02",
"pilot_neutral_weapons_03",
"pilot_neutral_weapons_04",
"pilot_neutral_procedures_01",
"pilot_neutral_procedures_02",
"pilot_neutral_procedures_03",
"pilot_neutral_procedures_04",
"pilot_neutral_droid_01",
"pilot_neutral_droid_02",
"pilot_neutral_droid_03",
"pilot_neutral_droid_04",
"pilot_neutral_master"};
const string[] allTemplates = {
"bactainfusion",
"bactajab",
"bactashot",
"bactaspray",
"bactatoss",
"deuteriumtoss",
"disinfect",
"endorphineinjection",
"neurotoxin",
"nutrientinjection",
"stabilizer",
"thyroidrupture",
"traumatize"};
/***** TRIGGERS ********************************************************/
boolean checkConfigSetting(string configString)
{
string enabled = toLower(getConfigSetting("CharacterBuilder", configString));
if (enabled == null)
return false;
if (enabled.equals("true") || enabled.equals("1"))
return true;
return false;
}
trigger OnObjectMenuRequest(obj_id player, menu_info mi)
{
menu_info_data data = mi.getMenuItemByType (menu_info_types.ITEM_USE);
if (data != null)
data.setServerNotify (true);
else
mi.addRootMenu (menu_info_types.ITEM_USE, new string_id("",""));
return SCRIPT_CONTINUE;
}
trigger OnObjectMenuSelect(obj_id player, int item)
{
if ( item == menu_info_types.ITEM_USE )
{
boolean enabled = features.hasEpisode3Expansion(player);
if (enabled == true)
startCharacterBuilder(player);
else
{
sendSystemMessageTestingOnly(player, "You must be enabled for Rage Of The Wookiees to use this");
}
}
return SCRIPT_CONTINUE;
}
void startCharacterBuilder(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired character option";
string title = "Character Builder Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, CHARACTER_BUILDER_OPTIONS, "handleOptionSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleOptionSelect()
{
if ( (params == null) || (params.isEmpty()) )
{
//cleanScriptVars(player);
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);
return SCRIPT_CONTINUE;
}
if ( idx == -1 || idx > CHARACTER_BUILDER_OPTIONS.length)
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
switch(idx)
{
case 0: // kachirho
handleKachirhoOption(player);
break;
case 1: // dead forest
handleDeadForestOption(player);
break;
case 2: // myyydril
handleMyyydrilOption(player);
break;
case 3: // hunting grounds
handleHuntingGroundsOption(player);
break;
case 4: // bocctyyy
if (isGod(player))
handleBocctyyyOption(player);
else
sendSystemMessage(player, SID_TERMINAL_DISABLED);
break;
case 5: // hracca
handleHraccaOption(player);
break;
case 6 : // rryatt
handleRryattOption(player);
break;
case 7: // blackscale slave camp
handleBlackscaleOption(player);
break;
case 8: // avatar
handleAvatarOption(player);
break;
case 9: //space mining
handleSpaceMiningOption(player);
break;
case 10: //space missions
handleSpaceMissionOption(player);
break;
case 11: //cybernetics
handleCyberneticsOption(player);
break;
default:
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
return SCRIPT_CONTINUE;
}
void cleanScriptVars(obj_id player)
{
obj_id self = getSelf();
utils.removeScriptVarTree(player, "character_builder");
utils.removeScriptVarTree(self, "character_builder");
setObjVar(player, "character_builder", true);
}
void closeOldWindow(obj_id player)
{
string playerPath = "character_builder.";
if ( utils.hasScriptVar(player, "character_builder.pid"))
{
int oldpid = utils.getIntScriptVar(player, "character_builder.pid");
forceCloseSUIPage (oldpid);
utils.removeScriptVar(player, "character_builder.pid");
}
}
void setWindowPid(obj_id player, int pid)
{
if (pid > -1) utils.setScriptVar(player, "character_builder.pid", pid);
}
//===================================================================
// Kachirho Section //==================================================
void handleKachirhoOption(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired testing option";
string title = "Kashyyyk Content Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, KACHIRHO_OPTIONS, "handleKachirhoSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleKachirhoSelect()
{
int idx = sui.getListboxSelectedRow(params);
obj_id player = sui.getPlayerId(params);
int btn = sui.getIntButtonPressed(params);
obj_id pInv = utils.getInventoryContainer(player);
int species = getSpecies(player);
if ( btn == sui.BP_CANCEL )
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
if (isIdValid(player))
{
switch(idx)
{
case 0: // melee
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
skill.grantSkill(player, BRAWLER[0]);
skill.grantSkill(player, BRAWLER[1]);
skill.grantSkill(player, BRAWLER[2]);
skill.grantSkill(player, BRAWLER[3]);
skill.grantSkill(player, BRAWLER[4]);
skill.grantSkill(player, BRAWLER[13]);
skill.grantSkill(player, BRAWLER[14]);
skill.grantSkill(player, BRAWLER[15]);
skill.grantSkill(player, BRAWLER[16]);
skill.grantSkill(player, PIKEMAN[0]);
skill.grantSkill(player, PIKEMAN[1]);
skill.grantSkill(player, PIKEMAN[2]);
skill.grantSkill(player, PIKEMAN[5]);
skill.grantSkill(player, PIKEMAN[6]);
skill.grantSkill(player, PIKEMAN[9]);
skill.grantSkill(player, PIKEMAN[10]);
skill.grantSkill(player, PIKEMAN[13]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_1);
obj_id weapon1 = weapons.createWeapon("object/weapon/melee/polearm/lance_kaminoan.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon1);
warpPlayer(player, "kashyyyk_main", -568, 0, -100, null, 0, 0, 0, "", false);
break;
case 1: // ranged
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
skill.grantSkill(player, MARKSMAN[0]);
skill.grantSkill(player, MARKSMAN[9]);
skill.grantSkill(player, MARKSMAN[10]);
skill.grantSkill(player, MARKSMAN[11]);
skill.grantSkill(player, MARKSMAN[12]);
skill.grantSkill(player, MARKSMAN[13]);
skill.grantSkill(player, MARKSMAN[14]);
skill.grantSkill(player, MARKSMAN[15]);
skill.grantSkill(player, MARKSMAN[16]);
skill.grantSkill(player, CARBINEER[0]);
skill.grantSkill(player, CARBINEER[1]);
skill.grantSkill(player, CARBINEER[2]);
skill.grantSkill(player, CARBINEER[5]);
skill.grantSkill(player, CARBINEER[6]);
skill.grantSkill(player, CARBINEER[9]);
skill.grantSkill(player, CARBINEER[10]);
skill.grantSkill(player, CARBINEER[13]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_3);
obj_id weapon2 = weapons.createWeapon("object/weapon/ranged/carbine/carbine_laser.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon2);
warpPlayer(player, "kashyyyk_main", -568, 0, -100, null, 0, 0, 0, "", false);
break;
case 2: // healer
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
skill.grantSkill(player, MEDIC[0]);
skill.grantSkill(player, MEDIC[1]);
skill.grantSkill(player, MEDIC[2]);
skill.grantSkill(player, MEDIC[3]);
skill.grantSkill(player, MEDIC[4]);
skill.grantSkill(player, MEDIC[9]);
skill.grantSkill(player, MEDIC[10]);
skill.grantSkill(player, MEDIC[11]);
skill.grantSkill(player, MEDIC[12]);
skill.grantSkill(player, DOCTOR[0]);
skill.grantSkill(player, DOCTOR[1]);
skill.grantSkill(player, DOCTOR[2]);
skill.grantSkill(player, DOCTOR[5]);
skill.grantSkill(player, DOCTOR[6]);
skill.grantSkill(player, DOCTOR[9]);
skill.grantSkill(player, DOCTOR[10]);
skill.grantSkill(player, DOCTOR[13]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, 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);
flagForDestruction(stimd);
}
for(int i = 0; i < allTemplates.length; i++)
{
obj_id enh = createObject("object/tangible/medicine/enhancer/enhancer_" + allTemplates[i] + ".iff", pInv, "");
flagForDestruction(enh);
if(isIdValid(enh))
{
setCount(enh, 150);
setObjVar(enh, "healing.enhancement", 700);
}
}
warpPlayer(player, "kashyyyk_main", -568, 0, -100, null, 0, 0, 0, "", false);
break;
}
}
return SCRIPT_CONTINUE;
}
void handleDeadForestOption(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired testing option";
string title = "Kashyyyk Content Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, KACHIRHO_OPTIONS, "handleDeadForestSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleDeadForestSelect()
{
int idx = sui.getListboxSelectedRow(params);
obj_id player = sui.getPlayerId(params);
int btn = sui.getIntButtonPressed(params);
obj_id pInv = utils.getInventoryContainer(player);
int species = getSpecies(player);
if ( btn == sui.BP_CANCEL )
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
if (isIdValid(player))
{
switch(idx)
{
case 0: // melee
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < BRAWLER.length; i++)
skill.grantSkill(player, BRAWLER[i]);
skill.grantSkill(player, PIKEMAN[0]);
skill.grantSkill(player, PIKEMAN[1]);
skill.grantSkill(player, PIKEMAN[2]);
skill.grantSkill(player, PIKEMAN[3]);
skill.grantSkill(player, PIKEMAN[5]);
skill.grantSkill(player, PIKEMAN[6]);
skill.grantSkill(player, PIKEMAN[7]);
skill.grantSkill(player, PIKEMAN[9]);
skill.grantSkill(player, PIKEMAN[10]);
skill.grantSkill(player, PIKEMAN[13]);
skill.grantSkill(player, PIKEMAN[14]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_1);
obj_id weapon1 = weapons.createWeapon("object/weapon/melee/polearm/lance_shock.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon1);
warpPlayer(player, "kashyyyk_dead_forest", 84, 26, -460, null, 0, 0, 0, "", false);
break;
case 1: // ranged
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MARKSMAN.length; i++)
skill.grantSkill(player, MARKSMAN[i]);
skill.grantSkill(player, CARBINEER[0]);
skill.grantSkill(player, CARBINEER[1]);
skill.grantSkill(player, CARBINEER[2]);
skill.grantSkill(player, CARBINEER[3]);
skill.grantSkill(player, CARBINEER[5]);
skill.grantSkill(player, CARBINEER[6]);
skill.grantSkill(player, CARBINEER[7]);
skill.grantSkill(player, CARBINEER[9]);
skill.grantSkill(player, CARBINEER[10]);
skill.grantSkill(player, CARBINEER[13]);
skill.grantSkill(player, CARBINEER[14]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_3);
obj_id weapon2 = weapons.createWeapon("object/weapon/ranged/carbine/carbine_geo.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon2);
warpPlayer(player, "kashyyyk_dead_forest", 84, 26, -460, null, 0, 0, 0, "", false);
break;
case 2: // healer
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MEDIC.length; i++)
skill.grantSkill(player, MEDIC[i]);
skill.grantSkill(player, DOCTOR[0]);
skill.grantSkill(player, DOCTOR[1]);
skill.grantSkill(player, DOCTOR[2]);
skill.grantSkill(player, DOCTOR[3]);
skill.grantSkill(player, DOCTOR[5]);
skill.grantSkill(player, DOCTOR[6]);
skill.grantSkill(player, DOCTOR[7]);
skill.grantSkill(player, DOCTOR[9]);
skill.grantSkill(player, DOCTOR[10]);
skill.grantSkill(player, DOCTOR[13]);
skill.grantSkill(player, DOCTOR[14]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, 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);
flagForDestruction(stimd);
}
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);
flagForDestruction(enh);
setObjVar(enh, "healing.enhancement", 700);
}
}
warpPlayer(player, "kashyyyk_dead_forest", 84, 26, -460, null, 0, 0, 0, "", false);
break;
}
}
return SCRIPT_CONTINUE;
}
void handleMyyydrilOption(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired testing option";
string title = "Kashyyyk Content Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, KACHIRHO_OPTIONS, "handleMyyydrilSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleMyyydrilSelect()
{
int idx = sui.getListboxSelectedRow(params);
obj_id player = sui.getPlayerId(params);
int btn = sui.getIntButtonPressed(params);
obj_id pInv = utils.getInventoryContainer(player);
int species = getSpecies(player);
if ( btn == sui.BP_CANCEL )
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
if (isIdValid(player))
{
switch(idx)
{
case 0: // melee
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < BRAWLER.length; i++)
skill.grantSkill(player, BRAWLER[i]);
for (int i = 0; i < PIKEMAN.length; i++)
skill.grantSkill(player, PIKEMAN[i]);
for (int i = 0; i < TKA.length; i++)
skill.grantSkill(player, TKA[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_1);
obj_id weapon1 = weapons.createWeapon("object/weapon/melee/polearm/lance_massassi.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon1);
warpPlayer(player, "kashyyyk_dead_forest", -242, 38, 302, null, 0, 0, 0, "", false);
break;
case 1: // ranged
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MARKSMAN.length; i++)
skill.grantSkill(player, MARKSMAN[i]);
for (int i = 0; i < CARBINEER.length; i++)
skill.grantSkill(player, CARBINEER[i]);
for (int i = 0; i < PISTOL.length; i++)
skill.grantSkill(player, PISTOL[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_3);
obj_id weapon2 = weapons.createWeapon("object/weapon/ranged/carbine/carbine_geo.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon2);
warpPlayer(player, "kashyyyk_dead_forest", -242, 38, 302, null, 0, 0, 0, "", false);
break;
case 2: // healer
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MEDIC.length; i++)
skill.grantSkill(player, MEDIC[i]);
for (int i = 0; i < DOCTOR.length; i++)
skill.grantSkill(player, DOCTOR[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_2);
obj_id stimd = createObject("object/tangible/medicine/instant_stimpack/stimpack_d.iff", pInv, "");
if(isIdValid(stimd))
{
flagForDestruction(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))
{
flagForDestruction(enh);
setCount(enh, 150);
setObjVar(enh, "healing.enhancement", 700);
}
}
warpPlayer(player, "kashyyyk_dead_forest", -242, 38, 302, null, 0, 0, 0, "", false);
break;
}
}
return SCRIPT_CONTINUE;
}
void handleHuntingGroundsOption(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired testing option";
string title = "Kashyyyk Content Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, KACHIRHO_OPTIONS, "handleHuntingGroundsSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleHuntingGroundsSelect()
{
int idx = sui.getListboxSelectedRow(params);
obj_id player = sui.getPlayerId(params);
int btn = sui.getIntButtonPressed(params);
obj_id pInv = utils.getInventoryContainer(player);
int species = getSpecies(player);
if ( btn == sui.BP_CANCEL )
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
if (isIdValid(player))
{
switch(idx)
{
case 0: // melee
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < BRAWLER.length; i++)
skill.grantSkill(player, BRAWLER[i]);
skill.grantSkill(player, PIKEMAN[0]);
skill.grantSkill(player, PIKEMAN[1]);
skill.grantSkill(player, PIKEMAN[2]);
skill.grantSkill(player, PIKEMAN[3]);
skill.grantSkill(player, PIKEMAN[4]);
skill.grantSkill(player, PIKEMAN[5]);
skill.grantSkill(player, PIKEMAN[6]);
skill.grantSkill(player, PIKEMAN[7]);
skill.grantSkill(player, PIKEMAN[8]);
skill.grantSkill(player, PIKEMAN[9]);
skill.grantSkill(player, PIKEMAN[10]);
skill.grantSkill(player, PIKEMAN[11]);
skill.grantSkill(player, PIKEMAN[13]);
skill.grantSkill(player, PIKEMAN[14]);
skill.grantSkill(player, PIKEMAN[15]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_1);
obj_id weapon1 = weapons.createWeapon("object/weapon/melee/polearm/lance_shock.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon1);
warpPlayer(player, "kashyyyk_hunting", 658, 8, 666, null, 0, 0, 0, "", false);
break;
case 1: // ranged
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MARKSMAN.length; i++)
skill.grantSkill(player, MARKSMAN[i]);
skill.grantSkill(player, CARBINEER[0]);
skill.grantSkill(player, CARBINEER[1]);
skill.grantSkill(player, CARBINEER[2]);
skill.grantSkill(player, CARBINEER[3]);
skill.grantSkill(player, CARBINEER[4]);
skill.grantSkill(player, CARBINEER[5]);
skill.grantSkill(player, CARBINEER[6]);
skill.grantSkill(player, CARBINEER[7]);
skill.grantSkill(player, CARBINEER[8]);
skill.grantSkill(player, CARBINEER[9]);
skill.grantSkill(player, CARBINEER[10]);
skill.grantSkill(player, CARBINEER[11]);
skill.grantSkill(player, CARBINEER[13]);
skill.grantSkill(player, CARBINEER[14]);
skill.grantSkill(player, CARBINEER[15]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_3);
obj_id weapon2 = weapons.createWeapon("object/weapon/ranged/carbine/carbine_geo.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon2);
warpPlayer(player, "kashyyyk_hunting", 658, 8, 666, null, 0, 0, 0, "", false);
break;
case 2: // healer
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MEDIC.length; i++)
skill.grantSkill(player, MEDIC[i]);
skill.grantSkill(player, DOCTOR[0]);
skill.grantSkill(player, DOCTOR[1]);
skill.grantSkill(player, DOCTOR[2]);
skill.grantSkill(player, DOCTOR[3]);
skill.grantSkill(player, DOCTOR[4]);
skill.grantSkill(player, DOCTOR[5]);
skill.grantSkill(player, DOCTOR[6]);
skill.grantSkill(player, DOCTOR[7]);
skill.grantSkill(player, DOCTOR[8]);
skill.grantSkill(player, DOCTOR[9]);
skill.grantSkill(player, DOCTOR[10]);
skill.grantSkill(player, DOCTOR[11]);
skill.grantSkill(player, DOCTOR[13]);
skill.grantSkill(player, DOCTOR[14]);
skill.grantSkill(player, DOCTOR[15]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_2);
obj_id stimd = createObject("object/tangible/medicine/instant_stimpack/stimpack_d.iff", pInv, "");
if(isIdValid(stimd))
{
flagForDestruction(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))
{
flagForDestruction(enh);
setCount(enh, 150);
setObjVar(enh, "healing.enhancement", 700);
}
}
warpPlayer(player, "kashyyyk_hunting", 658, 8, 666, null, 0, 0, 0, "", false);
break;
}
}
return SCRIPT_CONTINUE;
}
void handleBocctyyyOption(obj_id player)
{
}
void handleHraccaOption(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired testing option";
string title = "Kashyyyk Content Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, KACHIRHO_OPTIONS, "handleHraccaSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleHraccaSelect()
{
int idx = sui.getListboxSelectedRow(params);
obj_id player = sui.getPlayerId(params);
int btn = sui.getIntButtonPressed(params);
obj_id pInv = utils.getInventoryContainer(player);
int species = getSpecies(player);
if ( btn == sui.BP_CANCEL )
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
if (isIdValid(player))
{
switch(idx)
{
case 0: // melee
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < BRAWLER.length; i++)
skill.grantSkill(player, BRAWLER[i]);
for (int i = 0; i < PIKEMAN.length; i++)
skill.grantSkill(player, PIKEMAN[i]);
for (int i = 0; i < TKA.length; i++)
skill.grantSkill(player, TKA[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_1);
obj_id weapon1 = weapons.createWeapon("object/weapon/melee/polearm/lance_massassi.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon1);
groundquests.clearQuest(player, "ep3_hunt_johnson_seek_kint");
groundquests.grantQuest(player, "ep3_hunt_johnson_seek_kint");
warpPlayer(player, "kashyyyk_hunting", -88, 23, -245, null, 0, 0, 0, "", false);
break;
case 1: // ranged
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MARKSMAN.length; i++)
skill.grantSkill(player, MARKSMAN[i]);
for (int i = 0; i < CARBINEER.length; i++)
skill.grantSkill(player, CARBINEER[i]);
for (int i = 0; i < PISTOL.length; i++)
skill.grantSkill(player, PISTOL[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_3);
obj_id weapon2 = weapons.createWeapon("object/weapon/ranged/carbine/carbine_elite.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
obj_id weapon3 = weapons.createWeapon("object/weapon/ranged/pistol/pistol_dx2.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon2);
flagForDestruction(weapon3);
groundquests.clearQuest(player, "ep3_hunt_johnson_seek_kint");
groundquests.grantQuest(player, "ep3_hunt_johnson_seek_kint");
warpPlayer(player, "kashyyyk_hunting", -88, 23, -245, null, 0, 0, 0, "", false);
break;
case 2: // healer
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MEDIC.length; i++)
skill.grantSkill(player, MEDIC[i]);
for (int i = 0; i < DOCTOR.length; i++)
skill.grantSkill(player, DOCTOR[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_2);
obj_id stimd = createObject("object/tangible/medicine/instant_stimpack/stimpack_d.iff", pInv, "");
if(isIdValid(stimd))
{
flagForDestruction(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))
{
flagForDestruction(enh);
setCount(enh, 150);
setObjVar(enh, "healing.enhancement", 700);
}
}
groundquests.clearQuest(player, "ep3_hunt_johnson_seek_kint");
groundquests.grantQuest(player, "ep3_hunt_johnson_seek_kint");
warpPlayer(player, "kashyyyk_hunting", -88, 23, -245, null, 0, 0, 0, "", false);
break;
}
}
return SCRIPT_CONTINUE;
}
void handleRryattOption(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired testing option";
string title = "Kashyyyk Content Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, KACHIRHO_OPTIONS, "handleRryattSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleRryattSelect()
{
int idx = sui.getListboxSelectedRow(params);
obj_id player = sui.getPlayerId(params);
int btn = sui.getIntButtonPressed(params);
obj_id pInv = utils.getInventoryContainer(player);
int species = getSpecies(player);
if ( btn == sui.BP_CANCEL )
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
if (isIdValid(player))
{
switch(idx)
{
case 0: // melee
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < BRAWLER.length; i++)
skill.grantSkill(player, BRAWLER[i]);
for (int i = 0; i < PIKEMAN.length; i++)
skill.grantSkill(player, PIKEMAN[i]);
for (int i = 0; i < TKA.length; i++)
skill.grantSkill(player, TKA[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_1);
obj_id weapon1 = weapons.createWeapon("object/weapon/melee/polearm/lance_massassi.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon1);
warpPlayer(player, "kashyyyk_main", -67, 0, 808, null, 0, 0, 0, "", false);
break;
case 1: // ranged
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MARKSMAN.length; i++)
skill.grantSkill(player, MARKSMAN[i]);
for (int i = 0; i < CARBINEER.length; i++)
skill.grantSkill(player, CARBINEER[i]);
for (int i = 0; i < PISTOL.length; i++)
skill.grantSkill(player, PISTOL[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_3);
obj_id weapon2 = weapons.createWeapon("object/weapon/ranged/carbine/carbine_elite.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
obj_id weapon3 = weapons.createWeapon("object/weapon/ranged/pistol/pistol_dx2.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon2);
flagForDestruction(weapon3);
warpPlayer(player, "kashyyyk_main", -67, 0, 808, null, 0, 0, 0, "", false);
break;
case 2: // healer
handleRevokeAllSkills(player);
nukeInventory(player);
for (int i = 0; i < MEDIC.length; i++)
skill.grantSkill(player, MEDIC[i]);
for (int i = 0; i < DOCTOR.length; i++)
skill.grantSkill(player, DOCTOR[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_2);
obj_id stimd = createObject("object/tangible/medicine/instant_stimpack/stimpack_d.iff", pInv, "");
if(isIdValid(stimd))
{
flagForDestruction(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))
{
flagForDestruction(enh);
setCount(enh, 150);
setObjVar(enh, "healing.enhancement", 700);
}
}
warpPlayer(player, "kashyyyk_main", -67, 0, 808, null, 0, 0, 0, "", false);
break;
}
}
return SCRIPT_CONTINUE;
}
void handleBlackscaleOption(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired testing option";
string title = "Kashyyyk Content Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, KACHIRHO_OPTIONS, "handleBlackscaleSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleBlackscaleSelect()
{
int idx = sui.getListboxSelectedRow(params);
obj_id player = sui.getPlayerId(params);
int btn = sui.getIntButtonPressed(params);
obj_id pInv = utils.getInventoryContainer(player);
int species = getSpecies(player);
if ( btn == sui.BP_CANCEL )
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
if (isIdValid(player))
{
switch(idx)
{
case 0: // melee
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < BRAWLER.length; i++)
skill.grantSkill(player, BRAWLER[i]);
for (int i = 0; i < PIKEMAN.length; i++)
skill.grantSkill(player, PIKEMAN[i]);
for (int i = 0; i < TKA.length; i++)
skill.grantSkill(player, TKA[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_1);
obj_id weapon1 = weapons.createWeapon("object/weapon/melee/polearm/lance_massassi.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon1);
groundquests.clearQuest(player, "ep3_slaver_gursan_entry_quest");
groundquests.grantQuest(player, "ep3_slaver_gursan_entry_quest");
//warpPlayer(player, "kashyyyk_main", -67, 0, 808, null, 0, 0, 0, "", false);
warpPlayer(player, "kashyyyk_main", 404, 18, 656, null, 0, 0, 0, "", false);
break;
case 1: // ranged
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MARKSMAN.length; i++)
skill.grantSkill(player, MARKSMAN[i]);
for (int i = 0; i < CARBINEER.length; i++)
skill.grantSkill(player, CARBINEER[i]);
for (int i = 0; i < PISTOL.length; i++)
skill.grantSkill(player, PISTOL[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_3);
obj_id weapon2 = weapons.createWeapon("object/weapon/ranged/carbine/carbine_elite.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
obj_id weapon3 = weapons.createWeapon("object/weapon/ranged/pistol/pistol_dx2.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon2);
flagForDestruction(weapon3);
groundquests.clearQuest(player, "ep3_slaver_gursan_entry_quest");
groundquests.grantQuest(player, "ep3_slaver_gursan_entry_quest");
warpPlayer(player, "kashyyyk_main", 404, 18, 656, null, 0, 0, 0, "", false);
break;
case 2: // healer
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < MEDIC.length; i++)
skill.grantSkill(player, MEDIC[i]);
for (int i = 0; i < DOCTOR.length; i++)
skill.grantSkill(player, DOCTOR[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_2);
obj_id stimd = createObject("object/tangible/medicine/instant_stimpack/stimpack_d.iff", pInv, "");
if(isIdValid(stimd))
{
flagForDestruction(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))
{
flagForDestruction(enh);
setCount(enh, 150);
setObjVar(enh, "healing.enhancement", 700);
}
}
groundquests.clearQuest(player, "ep3_slaver_gursan_entry_quest");
groundquests.grantQuest(player, "ep3_slaver_gursan_entry_quest");
warpPlayer(player, "kashyyyk_main", 404, 18, 656, null, 0, 0, 0, "", false);
break;
}
}
return SCRIPT_CONTINUE;
}
void handleAvatarOption(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired testing option";
string title = "Kashyyyk Content Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, KACHIRHO_OPTIONS, "handleAvatarSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleAvatarSelect()
{
int idx = sui.getListboxSelectedRow(params);
obj_id player = sui.getPlayerId(params);
int btn = sui.getIntButtonPressed(params);
obj_id pInv = utils.getInventoryContainer(player);
int species = getSpecies(player);
if ( btn == sui.BP_CANCEL )
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
if (isIdValid(player))
{
switch(idx)
{
case 0: // melee
handleRevokeAllSkills(player);
nukeSelectedInventory(player);
for (int i = 0; i < BRAWLER.length; i++)
skill.grantSkill(player, BRAWLER[i]);
for (int i = 0; i < PIKEMAN.length; i++)
skill.grantSkill(player, PIKEMAN[i]);
for (int i = 0; i < TKA.length; i++)
skill.grantSkill(player, TKA[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_1);
obj_id weapon1 = weapons.createWeapon("object/weapon/melee/polearm/lance_massassi.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon1);
groundquests.clearQuest(player, "ep3_trando_hssissk_zssik_10");
groundquests.grantQuest(player, "ep3_trando_hssissk_zssik_10");
//warpPlayer(player, "kashyyyk_main", -67, 0, 808, null, 0, 0, 0, "", false);
obj_id newship = space_utils.createShipControlDevice(player, "xwing", true);
if (isIdValid(newship))
{
obj_id ship = space_transition.getShipFromShipControlDevice(newship);
location space = new location(2600, 360, -2650, "space_kashyyyk");
location ground = getLocation(player);
launch(player, ship, null, space, ground);
}
break;
case 1: // ranged
handleRevokeAllSkills(player);
nukeInventory(player);
for (int i = 0; i < MARKSMAN.length; i++)
skill.grantSkill(player, MARKSMAN[i]);
for (int i = 0; i < CARBINEER.length; i++)
skill.grantSkill(player, CARBINEER[i]);
for (int i = 0; i < PISTOL.length; i++)
skill.grantSkill(player, PISTOL[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_3);
obj_id weapon2 = weapons.createWeapon("object/weapon/ranged/carbine/carbine_elite.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
obj_id weapon3 = weapons.createWeapon("object/weapon/ranged/pistol/pistol_dx2.iff", pInv, weapons.VIA_TEMPLATE, CRAFTED_QUALITY);
flagForDestruction(weapon2);
flagForDestruction(weapon3);
groundquests.clearQuest(player, "ep3_trando_hssissk_zssik_10");
groundquests.grantQuest(player, "ep3_trando_hssissk_zssik_10");
obj_id newship2 = space_utils.createShipControlDevice(player, "xwing", true);
if (isIdValid(newship2))
{
obj_id ship = space_transition.getShipFromShipControlDevice(newship2);
location space = new location(2600, 360, -2650, "space_kashyyyk");
location ground = getLocation(player);
launch(player, ship, null, space, ground);
}
break;
case 2: // healer
handleRevokeAllSkills(player);
nukeInventory(player);
for (int i = 0; i < MEDIC.length; i++)
skill.grantSkill(player, MEDIC[i]);
for (int i = 0; i < DOCTOR.length; i++)
skill.grantSkill(player, DOCTOR[i]);
if (species == 4) //wke
issueBattleArmorSet(player, ARMOR_SET_BATTLE_WOOKIEE);
else if (species == 33) //ith
issueBattleArmorSet(player, ARMOR_SET_BATTLE_ITHORIAN);
else
issueBattleArmorSet(player, ARMOR_SET_BATTLE_2);
obj_id stimd = createObject("object/tangible/medicine/instant_stimpack/stimpack_d.iff", pInv, "");
if(isIdValid(stimd))
{
flagForDestruction(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))
{
flagForDestruction(enh);
setCount(enh, 150);
setObjVar(enh, "healing.enhancement", 700);
}
}
groundquests.clearQuest(player, "ep3_trando_hssissk_zssik_10");
groundquests.grantQuest(player, "ep3_trando_hssissk_zssik_10");
obj_id newship3 = space_utils.createShipControlDevice(player, "xwing", true);
if (isIdValid(newship3))
{
obj_id ship = space_transition.getShipFromShipControlDevice(newship3);
location space = new location(2600, 360, -2650, "space_kashyyyk");
location ground = getLocation(player);
launch(player, ship, null, space, ground);
}
break;
}
}
return SCRIPT_CONTINUE;
}
void handleSpaceMiningOption(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired testing option";
string title = "Kashyyyk Content Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, SPACE_MINING_OPTIONS, "handleSpaceMiningSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleSpaceMiningSelect()
{
int idx = sui.getListboxSelectedRow(params);
obj_id player = sui.getPlayerId(params);
int btn = sui.getIntButtonPressed(params);
obj_id objInventory = utils.getInventoryContainer(player);
if ( btn == sui.BP_CANCEL )
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
if (isIdValid(player))
{
handleRevokeAllSkills(player);
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 cargoHold = createObjectOverloaded("object/tangible/ship/components/cargo_hold/crg_starfighter_large.iff", objInventory);
switch(idx)
{
case 0: //rebel pilot
for (int i = 0; i < REBEL_PILOT.length; i++)
skill.grantSkill(player, REBEL_PILOT[i]);
obj_id clothing = createObjectOverloaded("object/tangible/wearables/bodysuit/rebel_bodysuit_s14.iff", objInventory);
obj_id rebboots = createObjectOverloaded("object/tangible/wearables/boots/boots_s03.iff", objInventory);
obj_id newship = space_utils.createShipControlDevice(player, "xwing", true);
if (isIdValid(newship))
{
obj_id ship = space_transition.getShipFromShipControlDevice(newship);
setChassisComponentMassMaximum(ship, 110000.0f);
if (isShipSlotInstalled(ship, ship_chassis_slot_type.SCST_weapon_0))
{
obj_id comp1 = shipUninstallComponent(player, ship , ship_chassis_slot_type.SCST_weapon_0, objInventory);
destroyObject(comp1);
}
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_0, weapon1);
if (isShipSlotInstalled(ship, ship_chassis_slot_type.SCST_weapon_1))
{
obj_id comp2 = shipUninstallComponent(player, ship , ship_chassis_slot_type.SCST_weapon_1, objInventory);
destroyObject(comp2);
}
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_1, weapon2);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_cargo_hold, cargoHold);
}
break;
case 1: //imperial pilot
for (int i = 0; i < IMPERIAL_PILOT.length; i++)
skill.grantSkill(player, IMPERIAL_PILOT[i]);
obj_id impclothing = createObjectOverloaded("object/tangible/wearables/bodysuit/bodysuit_tie_fighter.iff", objInventory);
obj_id impboots = createObjectOverloaded("object/tangible/wearables/boots/boots_s03.iff", objInventory);
obj_id impship = space_utils.createShipControlDevice(player, "tieadvanced", true);
if (isIdValid(impship))
{
obj_id ship = space_transition.getShipFromShipControlDevice(impship);
setChassisComponentMassMaximum(ship, 110000.0f);
if (isShipSlotInstalled(ship, ship_chassis_slot_type.SCST_weapon_0))
{
obj_id comp1 = shipUninstallComponent(player, ship , ship_chassis_slot_type.SCST_weapon_0, objInventory);
destroyObject(comp1);
}
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_0, weapon1);
if (isShipSlotInstalled(ship, ship_chassis_slot_type.SCST_weapon_1))
{
obj_id comp2 = shipUninstallComponent(player, ship , ship_chassis_slot_type.SCST_weapon_1, objInventory);
destroyObject(comp2);
}
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_1, weapon2);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_cargo_hold, cargoHold);
}
break;
case 2: //neutral pilot
for (int i = 0; i < NEUTRAL_PILOT.length; i++)
skill.grantSkill(player, NEUTRAL_PILOT[i]);
obj_id neuclothing = createObjectOverloaded("object/tangible/wearables/bodysuit/bodysuit_bwing.iff", objInventory);
obj_id neuboots = createObjectOverloaded("object/tangible/wearables/boots/boots_s03.iff", objInventory);
obj_id neuship = space_utils.createShipControlDevice(player, "hutt_medium_s01", true);
if (isIdValid(neuship))
{
obj_id ship = space_transition.getShipFromShipControlDevice(neuship);
setChassisComponentMassMaximum(ship, 110000.0f);
if (isShipSlotInstalled(ship, ship_chassis_slot_type.SCST_weapon_0))
{
obj_id comp1 = shipUninstallComponent(player, ship , ship_chassis_slot_type.SCST_weapon_0, objInventory);
destroyObject(comp1);
}
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_0, weapon1);
if (isShipSlotInstalled(ship, ship_chassis_slot_type.SCST_weapon_1))
{
obj_id comp2 = shipUninstallComponent(player, ship , ship_chassis_slot_type.SCST_weapon_1, objInventory);
destroyObject(comp2);
}
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_1, weapon2);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_cargo_hold, cargoHold);
}
break;
}
}
return SCRIPT_CONTINUE;
}
void handleSpaceMissionOption(obj_id player)
{
obj_id self = getSelf();
string prompt = "Select the desired testing option";
string title = "Kashyyyk Content Terminal";
closeOldWindow(player);
int pid = sui.listbox(self, player, prompt, sui.OK_CANCEL, title, SPACE_MINING_OPTIONS, "handleSpaceMissionSelect", true, false);
setWindowPid(player, pid);
}
messageHandler handleSpaceMissionSelect()
{
int idx = sui.getListboxSelectedRow(params);
obj_id player = sui.getPlayerId(params);
int btn = sui.getIntButtonPressed(params);
obj_id objInventory = utils.getInventoryContainer(player);
if ( btn == sui.BP_CANCEL )
{
cleanScriptVars(player);
return SCRIPT_CONTINUE;
}
if (isIdValid(player))
{
handleRevokeAllSkills(player);
switch(idx)
{
case 0: //rebel pilot
for (int i = 0; i < REBEL_PILOT.length; i++)
skill.grantSkill(player, REBEL_PILOT[i]);
obj_id clothing = createObjectOverloaded("object/tangible/wearables/bodysuit/rebel_bodysuit_s14.iff", objInventory);
obj_id rebboots = createObjectOverloaded("object/tangible/wearables/boots/boots_s03.iff", objInventory);
obj_id newship = space_utils.createShipControlDevice(player, "xwing", true);
if (isIdValid(newship))
{
obj_id ship = space_transition.getShipFromShipControlDevice(newship);
setChassisComponentMassMaximum(ship, 110000.0f);
space_crafting.uninstallAll(ship);
obj_id armor1 = createObjectOverloaded("object/tangible/ship/components/armor/armor_subpro_corrugated_durasteel.iff", objInventory);
obj_id armor2 = createObjectOverloaded("object/tangible/ship/components/armor/armor_subpro_corrugated_durasteel.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_armor_0, armor1);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_armor_1, armor2);
obj_id capacitor = createObjectOverloaded("object/tangible/ship/components/weapon_capacitor/cap_qualdex_conservator_qx2.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_capacitor, capacitor);
obj_id engine = createObjectOverloaded("object/tangible/ship/components/engine/eng_novaldex_x6.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_engine, engine);
obj_id reactor = createObjectOverloaded("object/tangible/ship/components/reactor/rct_rss_x8.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_reactor, reactor);
obj_id shield = createObjectOverloaded("object/tangible/ship/components/shield_generator/shd_cygnus_mk3.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_shield_0, shield);
obj_id weapon = createObjectOverloaded("object/tangible/ship/components/weapon/wpn_mandal_annihilator_mk2.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_0, weapon);
obj_id weapon1 = createObjectOverloaded("object/tangible/ship/components/weapon/wpn_mandal_annihilator_mk2.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_1, weapon1);
}
break;
case 1: //imperial pilot
for (int i = 0; i < IMPERIAL_PILOT.length; i++)
skill.grantSkill(player, IMPERIAL_PILOT[i]);
obj_id impclothing = createObjectOverloaded("object/tangible/wearables/bodysuit/bodysuit_tie_fighter.iff", objInventory);
obj_id impboots = createObjectOverloaded("object/tangible/wearables/boots/boots_s03.iff", objInventory);
obj_id impship = space_utils.createShipControlDevice(player, "tieinterceptor", true);
if (isIdValid(impship))
{
obj_id ship = space_transition.getShipFromShipControlDevice(impship);
setChassisComponentMassMaximum(ship, 110000.0f);
space_crafting.uninstallAll(ship);
obj_id armor1 = createObjectOverloaded("object/tangible/ship/components/armor/armor_subpro_corrugated_durasteel.iff", objInventory);
obj_id armor2 = createObjectOverloaded("object/tangible/ship/components/armor/armor_subpro_corrugated_durasteel.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_armor_0, armor1);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_armor_1, armor2);
obj_id capacitor = createObjectOverloaded("object/tangible/ship/components/weapon_capacitor/cap_qualdex_conservator_qx2.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_capacitor, capacitor);
obj_id engine = createObjectOverloaded("object/tangible/ship/components/engine/eng_novaldex_x6.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_engine, engine);
obj_id reactor = createObjectOverloaded("object/tangible/ship/components/reactor/rct_rss_x8.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_reactor, reactor);
obj_id shield = createObjectOverloaded("object/tangible/ship/components/shield_generator/shd_cygnus_mk3.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_shield_0, shield);
obj_id weapon = createObjectOverloaded("object/tangible/ship/components/weapon/wpn_mandal_annihilator_mk2.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_0, weapon);
}
break;
case 2: //neutral pilot
for (int i = 0; i < NEUTRAL_PILOT.length; i++)
skill.grantSkill(player, NEUTRAL_PILOT[i]);
obj_id neuclothing = createObjectOverloaded("object/tangible/wearables/bodysuit/bodysuit_bwing.iff", objInventory);
obj_id neuboots = createObjectOverloaded("object/tangible/wearables/boots/boots_s03.iff", objInventory);
obj_id neuship = space_utils.createShipControlDevice(player, "blacksun_medium_s03", true);
if (isIdValid(neuship))
{
obj_id ship = space_transition.getShipFromShipControlDevice(neuship);
setChassisComponentMassMaximum(ship, 110000.0f);
space_crafting.uninstallAll(ship);
obj_id armor1 = createObjectOverloaded("object/tangible/ship/components/armor/armor_subpro_corrugated_durasteel.iff", objInventory);
obj_id armor2 = createObjectOverloaded("object/tangible/ship/components/armor/armor_subpro_corrugated_durasteel.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_armor_0, armor1);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_armor_1, armor2);
obj_id capacitor = createObjectOverloaded("object/tangible/ship/components/weapon_capacitor/cap_qualdex_conservator_qx2.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_capacitor, capacitor);
obj_id engine = createObjectOverloaded("object/tangible/ship/components/engine/eng_novaldex_x6.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_engine, engine);
obj_id reactor = createObjectOverloaded("object/tangible/ship/components/reactor/rct_rss_x8.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_reactor, reactor);
obj_id shield = createObjectOverloaded("object/tangible/ship/components/shield_generator/shd_cygnus_mk3.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_shield_0, shield);
obj_id weapon = createObjectOverloaded("object/tangible/ship/components/weapon/wpn_mandal_annihilator_mk2.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_0, weapon);
obj_id weapon1 = createObjectOverloaded("object/tangible/ship/components/weapon/wpn_mandal_annihilator_mk2.iff", objInventory);
shipInstallComponent(player, ship, ship_chassis_slot_type.SCST_weapon_1, weapon1);
}
break;
}
}
return SCRIPT_CONTINUE;
}
void nukeInventory(obj_id player)
{
obj_id[] contents = getInventoryAndEquipment(player);
if (contents != null)
{
for (int i = 0; i < contents.length; i++)
{
if (isIdValid(contents[i]))
destroyObject(contents[i]);
}
}
}
void nukeSelectedInventory(obj_id player)
{
obj_id[] contents = getInventoryAndEquipment(player);
if (contents != null)
{
for (int i = 0; i < contents.length; i++)
{
if (isIdValid(contents[i]) && hasObjVar(contents[i], "frog.item"))
destroyObject(contents[i]);
}
}
}
void flagForDestruction(obj_id item)
{
setObjVar(item, "frog.item", 1);
}
void issueReconArmorSet(obj_id player, string[] armorPieces)
{
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, "");
flagForDestruction(armorItem);
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);
}
}
}
}
void issueBattleArmorSet(obj_id player, string[] armorPieces)
{
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, "");
flagForDestruction(armorItem);
if ( isIdValid(armorItem) )
{
if (!isGameObjectTypeOf(armorItem, GOT_armor_foot) && !isGameObjectTypeOf(armorItem, GOT_armor_hand))
{
armor.setArmorDataPercent(armorItem, 2, 1, GENERAL_PROTECTION, CONDITION);
}
}
}
}
void issueAssaultArmorSet(obj_id player, string[] armorPieces)
{
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, "");
flagForDestruction(armorItem);
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);
}
}
}
}
//===================================================================
// Revoke All Skills Section //======================================
void handleRevokeAllSkills(obj_id player)
{
if (exists(player))
{
string[] skillList = getSkillListingForPlayer(player);
int attempts = skillList.length;
if ((skillList != null) && (skillList.length != 0))
{
while(skillList.length > 0 && attempts > 0)
{
for (int i = 0; i < skillList.length; i++)
{
string skillName = skillList[i];
if (skillName.startsWith("pilot_"))
{
utils.setScriptVar(player, "revokePilotSkill", 1);
skill.revokeSkillSilent(player, skillName);
}
if (!skillName.startsWith ("species_")&&
!skillName.startsWith("social_language_")&&
!skillName.startsWith("utility_")&&
!skillName.startsWith("common_")&&
!skillName.startsWith("demo_")&&
!skillName.startsWith("force_title_")&&
!skillName.startsWith("force_sensitive_")&&
!skillName.startsWith("combat_melee_basic")&&
!skillName.startsWith("combat_ranged_weapon_basic")) //don't revoke species skills
{
skill.revokeSkillSilent(player, skillName);
}
}
// The new skill list is the remaining skills.
skillList = getSkillListingForPlayer(player);
// Prevent data from creating an infinite loop.
--attempts;
}
}
}
}
//===================================================================
// Launch function and other supporting functions for space mining testing
//======================================
void launch(obj_id player, obj_id ship, obj_id[] membersApprovedByShipOwner, location warpLocation, location groundLoc)
{
//sendSystemMessageTestingOnly(player, "(unlocalized) Launching...");
space_transition.clearOvertStatus(ship);
resizeable obj_id[] groupMembersToWarp = utils.addElement(null, player);
resizeable int[] groupMemberStartIndex = utils.addElement(null, 0);
utils.setScriptVar(player, "strLaunchPointName", "launching");
resizeable location[] shipStartLocations = space_transition.getShipStartLocations(ship);
if (shipStartLocations != null && shipStartLocations.length > 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.length)
{
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.length; ++i)
{
space_transition.setLaunchInfo(groupMembersToWarp[i], ship, groupMemberStartIndex[i], groundLoc);
warpPlayer(
groupMembersToWarp[i],
warpLocation.area,
warpLocation.x, warpLocation.y, warpLocation.z,
null,
warpLocation.x, warpLocation.y, warpLocation.z);
}
//sendSystemMessageTestingOnly(player, "(unlocalized) Finishing launch sequence...");
}
int getNextStartIndex(resizeable location[] shipStartLocations, int lastStartIndex)
{
int startIndex = lastStartIndex+1;
// If we have more players than start locations, see if we have any start
// locations in cells and reuse those. We assume that all start locations
// not in cells come at the beginning of the list.
if (startIndex > shipStartLocations.length)
{
for (startIndex = 1; startIndex <= shipStartLocations.length; ++startIndex)
if (shipStartLocations[startIndex-1].cell != null)
break;
}
return startIndex;
}
boolean groupMemberApproved(obj_id[] membersApprovedByShipOwner, obj_id memberToTest)
{
for (int i = 0; i < membersApprovedByShipOwner.length; ++i)
{
if (membersApprovedByShipOwner[i] == memberToTest)
{
return true;
}
}
return false;
}
//--- CYBERNETICS ------------
void handleCyberneticsOption( obj_id player )
{
obj_id inv = utils.getInventoryContainer(player);
if ( !isIdValid( inv ) )
return;
for ( int i = 0; i < CYBERNETIC_ITEMS.length; ++i )
{
createObject(CYBERNETIC_ITEMS[i], inv, "");
}
sendSystemMessageTestingOnly( player, "Cybernetics issued. Pay a cybernetic Engineer to install the items" );
sendSystemMessageTestingOnly( player, "Locate the cybernetic engineer on the 2nd floor of a medical center" );
}