// ====================================================================== // // ep3_droid_pilot.script // // // // Created with SwgConversationEditor 1.30 - DO NOT EDIT THIS AUTO-GENERATED FILE! // // ====================================================================== // ====================================================================== // Library Includes // ====================================================================== include library.ai_lib; include library.chat; include library.space_combat; include library.space_transition; include library.utils; // ====================================================================== // Script Constants // ====================================================================== string c_stringFile = "conversation/ep3_droid_pilot"; // ====================================================================== // Script Conditions // ====================================================================== boolean ep3_droid_pilot_condition__defaultCondition (obj_id player, obj_id npc) { return true; } // ---------------------------------------------------------------------- boolean ep3_droid_pilot_condition_isTooFar (obj_id player, obj_id npc) { obj_id containingShip = space_transition.getContainingShip(player); return ( getDistance( npc, containingShip ) > space_transition.STATION_COMM_MAX_DISTANCE ); } // ====================================================================== // Script Actions // ====================================================================== void ep3_droid_pilot_action_playCommSound (obj_id player, obj_id npc) { space_combat.playCombatTauntSound( player ); } // ====================================================================== // Script %TO Tokens // ====================================================================== // ====================================================================== // Script %DI Tokens // ====================================================================== // ====================================================================== // Script %DF Tokens // ====================================================================== // ====================================================================== // handleBranch Functions // ====================================================================== int ep3_droid_pilot_handleBranch2 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: My navigation system has been disrupted by a proton torpedo. As well, my piloting logic has been affected by a plasma leak in the cockpit. //-- [RESPONSE NOTE] //-- PLAYER: Who attacked you? if (response == "s_189") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: The tactical computer indicated that the attacking vessels were piloted by 'Gotal Bandits.' I have copious information on this criminal group... but I cannot retrieve it. string_id message = new string_id (c_stringFile, "s_191"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Why not? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: We can skip the information-dump. boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: Can you please try? boolean hasResponse2 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_193"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_205"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_273"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 3); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: What are you doing about the leak? if (response == "s_327") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: I am unable to repair the leak and pilot this vessel simultaneously. Once I make the jump to hyperspace, I can switch to auto-pilot and attend to it. string_id message = new string_id (c_stringFile, "s_329"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Is there no one else on-board? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_332"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 37); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Just relax. I'll protect you. if (response == "s_337") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Your kindness is appreciated. No doubt you will become an Ace pilot for the Civilian Protection Guild. string_id message = new string_id (c_stringFile, "s_340"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: What is the Civilian Protection Guild? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: That doesn't interest me. boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_343"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_353"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 39); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch3 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: The tactical computer indicated that the attacking vessels were piloted by 'Gotal Bandits.' I have copious information on this criminal group... but I cannot retrieve it. //-- [RESPONSE NOTE] //-- PLAYER: Why not? if (response == "s_193") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: The plasma leak has affected certain areas of my main memory. I no longer have access to certain languages, draft schematics, pilot programs, and my entire galactic encyclopedia. string_id message = new string_id (c_stringFile, "s_195"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Can you fix it yourself? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: Who can fix this? boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_197"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_201"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 4); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: We can skip the information-dump. if (response == "s_205") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: If I understand you correctly, I agree. The information on the Gotal bandits origins and customs will be useless to you in battle. string_id message = new string_id (c_stringFile, "s_207"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Roger that. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I didn't mean that. boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_209"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_213"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 7); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Can you please try? if (response == "s_273") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Searching. string_id message = new string_id (c_stringFile, "s_275"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Anything? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: Can you hurry it up? boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: Nevermind. boolean hasResponse2 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_277"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_293"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_321"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 24); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch4 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: The plasma leak has affected certain areas of my main memory. I no longer have access to certain languages, draft schematics, pilot programs, and my entire galactic encyclopedia. //-- [RESPONSE NOTE] //-- PLAYER: Can you fix it yourself? if (response == "s_197") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Not now. Once I jump to hyperspace, I can attend to these issues. string_id message = new string_id (c_stringFile, "s_199"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Who can fix this? if (response == "s_201") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: I will be fine once I make the jump to hyperspace. string_id message = new string_id (c_stringFile, "s_203"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch7 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: If I understand you correctly, I agree. The information on the Gotal bandits origins and customs will be useless to you in battle. //-- [RESPONSE NOTE] //-- PLAYER: Roger that. if (response == "s_209") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_211"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: I didn't mean that. if (response == "s_213") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Then you would like me to try to retrieve this information? You think it would aid you in battle? string_id message = new string_id (c_stringFile, "s_215"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: No. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: Yes. boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_217"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_221"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 9); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch9 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Then you would like me to try to retrieve this information? You think it would aid you in battle? //-- [RESPONSE NOTE] //-- PLAYER: No. if (response == "s_217") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_219"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Yes. if (response == "s_221") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Searching. string_id message = new string_id (c_stringFile, "s_223"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Anything? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: Can you hurry it up? boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: Nevermind. boolean hasResponse2 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_225"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_241"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_269"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 11); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch11 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Searching. //-- [RESPONSE NOTE] //-- PLAYER: Anything? if (response == "s_225") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Fragments. I have: Gotal...humanoid... marked by a pair of ridged cone-like horns... can survive full-body cybernetic... string_id message = new string_id (c_stringFile, "s_227"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Anything else? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: Thank you. boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_229"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_237"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 12); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Can you hurry it up? if (response == "s_241") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: I have only fragments. Categories include: mercenary, cybernetics, and bio-engineering. string_id message = new string_id (c_stringFile, "s_243"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Mercenary? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: Cybernetics? boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: Bio-engineering? boolean hasResponse2 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_245"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_253"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_261"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 16); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Nevermind. if (response == "s_269") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_271"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch12 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Fragments. I have: Gotal...humanoid... marked by a pair of ridged cone-like horns... can survive full-body cybernetic... //-- [RESPONSE NOTE] //-- PLAYER: Anything else? if (response == "s_229") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Capable hunters... Untrustworthy... and that's the sum total of data I can access at the moment. string_id message = new string_id (c_stringFile, "s_231"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Thank you. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_233"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 13); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Thank you. if (response == "s_237") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_239"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch13 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Capable hunters... Untrustworthy... and that's the sum total of data I can access at the moment. //-- [RESPONSE NOTE] //-- PLAYER: Thank you. if (response == "s_233") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_235"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch16 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: I have only fragments. Categories include: mercenary, cybernetics, and bio-engineering. //-- [RESPONSE NOTE] //-- PLAYER: Mercenary? if (response == "s_245") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: The data under that category is the most complete of my records: Gotal bandits have, in recent cycles, organized their offensive forces... intent on filling gaps created by other, more powerful pirate clans... string_id message = new string_id (c_stringFile, "s_247"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Roger that. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_249"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 17); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Cybernetics? if (response == "s_253") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Data includes: full-body... adaptive superiority... adaptive rejection... but nothing complete. string_id message = new string_id (c_stringFile, "s_255"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Roger that. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_257"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 19); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Bio-engineering? if (response == "s_261") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: No more than that phase, I am afraid. I am not aware of the significance of this. string_id message = new string_id (c_stringFile, "s_263"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Roger that. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_265"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 21); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch17 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: The data under that category is the most complete of my records: Gotal bandits have, in recent cycles, organized their offensive forces... intent on filling gaps created by other, more powerful pirate clans... //-- [RESPONSE NOTE] //-- PLAYER: Roger that. if (response == "s_249") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_251"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch19 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Data includes: full-body... adaptive superiority... adaptive rejection... but nothing complete. //-- [RESPONSE NOTE] //-- PLAYER: Roger that. if (response == "s_257") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_259"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch21 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: No more than that phase, I am afraid. I am not aware of the significance of this. //-- [RESPONSE NOTE] //-- PLAYER: Roger that. if (response == "s_265") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_267"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch24 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Searching. //-- [RESPONSE NOTE] //-- PLAYER: Anything? if (response == "s_277") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Fragments. I have: Gotal...humanoid... marked by a pair of ridged cone-like horns... can survive full-body cybernetic... string_id message = new string_id (c_stringFile, "s_279"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Anything else? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: Thank you. boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_281"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_289"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 25); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Can you hurry it up? if (response == "s_293") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: I have only fragments. Categories include: mercenary, cybernetics, and bio-engineering. string_id message = new string_id (c_stringFile, "s_295"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Mercenary? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: Cybernetics? boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: Bio-engineering? boolean hasResponse2 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_297"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_305"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_313"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 29); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Nevermind. if (response == "s_321") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_324"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch25 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Fragments. I have: Gotal...humanoid... marked by a pair of ridged cone-like horns... can survive full-body cybernetic... //-- [RESPONSE NOTE] //-- PLAYER: Anything else? if (response == "s_281") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Capable hunters... Untrustworthy... and that's the sum total of data I can access at the moment. string_id message = new string_id (c_stringFile, "s_283"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Thank you. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_285"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 26); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Thank you. if (response == "s_289") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_291"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch26 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Capable hunters... Untrustworthy... and that's the sum total of data I can access at the moment. //-- [RESPONSE NOTE] //-- PLAYER: Thank you. if (response == "s_285") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_287"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch29 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: I have only fragments. Categories include: mercenary, cybernetics, and bio-engineering. //-- [RESPONSE NOTE] //-- PLAYER: Mercenary? if (response == "s_297") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: The data under that category is the most complete of my records: Gotal bandits have, in recent cycles, organized their offensive forces... intent on filling gaps created by other, more powerful pirate clans... string_id message = new string_id (c_stringFile, "s_299"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Roger that. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_301"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 30); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Cybernetics? if (response == "s_305") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Data includes: full-body... adaptive superiority... adaptive rejection... but nothing complete. string_id message = new string_id (c_stringFile, "s_307"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Roger that. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_309"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 32); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Bio-engineering? if (response == "s_313") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: No more than that phase, I am afraid. I am not aware of the significance of this. string_id message = new string_id (c_stringFile, "s_315"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Roger that. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_317"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 34); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch30 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: The data under that category is the most complete of my records: Gotal bandits have, in recent cycles, organized their offensive forces... intent on filling gaps created by other, more powerful pirate clans... //-- [RESPONSE NOTE] //-- PLAYER: Roger that. if (response == "s_301") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_303"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch32 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Data includes: full-body... adaptive superiority... adaptive rejection... but nothing complete. //-- [RESPONSE NOTE] //-- PLAYER: Roger that. if (response == "s_309") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_311"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch34 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: No more than that phase, I am afraid. I am not aware of the significance of this. //-- [RESPONSE NOTE] //-- PLAYER: Roger that. if (response == "s_317") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_319"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch37 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: I am unable to repair the leak and pilot this vessel simultaneously. Once I make the jump to hyperspace, I can switch to auto-pilot and attend to it. //-- [RESPONSE NOTE] //-- PLAYER: Is there no one else on-board? if (response == "s_332") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: Just me. string_id message = new string_id (c_stringFile, "s_335"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch39 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Your kindness is appreciated. No doubt you will become an Ace pilot for the Civilian Protection Guild. //-- [RESPONSE NOTE] //-- PLAYER: What is the Civilian Protection Guild? if (response == "s_343") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: I... I'm sorry. I believe that the plasma leak has affected that area of my main memory. string_id message = new string_id (c_stringFile, "s_345"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Roger that. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_348"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 40); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: That doesn't interest me. if (response == "s_353") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: In that case, I have no comment. string_id message = new string_id (c_stringFile, "s_355"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Roger that. boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_357"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 42); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch40 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: I... I'm sorry. I believe that the plasma leak has affected that area of my main memory. //-- [RESPONSE NOTE] //-- PLAYER: Roger that. if (response == "s_348") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_351"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int ep3_droid_pilot_handleBranch42 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: In that case, I have no comment. //-- [RESPONSE NOTE] //-- PLAYER: Roger that. if (response == "s_357") { //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: End of communication. string_id message = new string_id (c_stringFile, "s_359"); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); chat.chat (npc, player, message); npcEndConversation (player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- // ====================================================================== // User Script Triggers // ====================================================================== trigger OnInitialize () { if ((!isMob (self)) || (isPlayer (self))) detachScript(self, "conversation.ep3_droid_pilot"); setCondition (self, CONDITION_CONVERSABLE); setObjVar(self, "convo.appearance", "object/mobile/space_comm_ep3_droid_pilot.iff" ); return SCRIPT_CONTINUE; } trigger OnAttach () { setCondition (self, CONDITION_CONVERSABLE); setObjVar(self, "convo.appearance", "object/mobile/space_comm_ep3_droid_pilot.iff" ); return SCRIPT_CONTINUE; } trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo) { int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null); menu_info_data menuInfoData = menuInfo.getMenuItemById (menu); menuInfoData.setServerNotify (false); setCondition (self, CONDITION_CONVERSABLE); return SCRIPT_CONTINUE; } trigger OnIncapacitated (obj_id killer) { clearCondition (self, CONDITION_CONVERSABLE); detachScript (self, "conversation.ep3_droid_pilot"); return SCRIPT_CONTINUE; } // ====================================================================== // Script Triggers // ====================================================================== //-- This function should move to base_class.java boolean npcStartConversation(obj_id player, obj_id npc, string convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) { Object[] objects = new Object[responses.length]; System.arraycopy(responses, 0, objects, 0, responses.length); return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects); } // ---------------------------------------------------------------------- trigger OnStartNpcConversation (obj_id player) { obj_id npc = self; if (ai_lib.isInCombat (npc) || ai_lib.isInCombat (player)) return SCRIPT_OVERRIDE; //-- [NOTE] if (ep3_droid_pilot_condition_isTooFar (player, npc)) { //-- NPC: Warning. You are out of transmission range! string_id message = new string_id (c_stringFile, "s_85"); chat.chat (npc, player, message); return SCRIPT_CONTINUE; } //-- [NOTE] if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { //-- NPC: My navigation system has been disrupted by a proton torpedo. As well, my piloting logic has been affected by a plasma leak in the cockpit. string_id message = new string_id (c_stringFile, "s_187"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Who attacked you? boolean hasResponse0 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: What are you doing about the leak? boolean hasResponse1 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: Just relax. I'll protect you. boolean hasResponse2 = false; if (ep3_droid_pilot_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_189"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_327"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_337"); utils.setScriptVar (player, "conversation.ep3_droid_pilot.branchId", 2); npcStartConversation (player, npc, "ep3_droid_pilot", message, responses); } else { chat.chat (npc, player, message); } return SCRIPT_CONTINUE; } chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false."); return SCRIPT_CONTINUE; } // ---------------------------------------------------------------------- trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response) { if (conversationId != "ep3_droid_pilot") return SCRIPT_CONTINUE; obj_id npc = self; int branchId = utils.getIntScriptVar (player, "conversation.ep3_droid_pilot.branchId"); if (branchId == 2 && ep3_droid_pilot_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 3 && ep3_droid_pilot_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 4 && ep3_droid_pilot_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 7 && ep3_droid_pilot_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 9 && ep3_droid_pilot_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 11 && ep3_droid_pilot_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 12 && ep3_droid_pilot_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 13 && ep3_droid_pilot_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 16 && ep3_droid_pilot_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 17 && ep3_droid_pilot_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 19 && ep3_droid_pilot_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 21 && ep3_droid_pilot_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 24 && ep3_droid_pilot_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 25 && ep3_droid_pilot_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 26 && ep3_droid_pilot_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 29 && ep3_droid_pilot_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 30 && ep3_droid_pilot_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 32 && ep3_droid_pilot_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 34 && ep3_droid_pilot_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 37 && ep3_droid_pilot_handleBranch37 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 39 && ep3_droid_pilot_handleBranch39 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 40 && ep3_droid_pilot_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 42 && ep3_droid_pilot_handleBranch42 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); utils.removeScriptVar (player, "conversation.ep3_droid_pilot.branchId"); return SCRIPT_CONTINUE; } // ======================================================================