// ====================================================================== // // c_sink_imp.script // Copyright 2004, Sony Online Entertainment // All Rights Reserved. // // Created with SwgConversationEditor 1.36 - DO NOT EDIT THIS AUTO-GENERATED FILE! // // ====================================================================== // ====================================================================== // Library Includes // ====================================================================== include library.ai_lib; include library.chat; include library.factions; include library.features; include library.groundquests; include library.space_quest; include library.utils; // ====================================================================== // Script Constants // ====================================================================== string c_stringFile = "conversation/c_sink_imp"; // ====================================================================== // Script Conditions // ====================================================================== boolean c_sink_imp_condition__defaultCondition (obj_id player, obj_id npc) { return true; } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_IsImperial (obj_id player, obj_id npc) { // if they PC is not imperial, do not show this branch if (!factions.isImperial(player)) return false; // if the PC is not on, or has not completed the first part of the quest return !groundquests.isQuestActiveOrComplete(player, "c_sink_imp_v2"); } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_IsRebel (obj_id player, obj_id npc) { if (!factions.isRebel(player)) return false; return true; } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_isNeutral (obj_id player, obj_id npc) { if (factions.isImperial(player)||factions.isRebel(player)) return false; return true; } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_broughtPilotBack (obj_id player, obj_id npc) { int questId = questGetQuestId("quest/c_sink_imp_v2"); int safesignal = groundquests.getTaskId(questId, "safesignal"); boolean onTask = questIsTaskActive(questId, safesignal, player); return onTask; } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_firstStepofQuest (obj_id player, obj_id npc) { int questId = questGetQuestId("quest/c_sink_imp_v2"); int gotocrash = groundquests.getTaskId(questId, "gotocrash"); boolean onTask = questIsTaskActive(questId, gotocrash, player); return onTask; } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_gangKillStepDone (obj_id player, obj_id npc) { int questId = questGetQuestId("quest/c_sink_imp_v2"); int spacesignal = groundquests.getTaskId(questId, "spacesignal"); int killloot = groundquests.getTaskId(questId, "killloot"); int kill = groundquests.getTaskId(questId, "kill"); return questIsTaskActive(questId, spacesignal, player) && questIsTaskComplete(questId, killloot, player) && questIsTaskComplete(questId, kill, player); } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_gangKillStepNotDone (obj_id player, obj_id npc) { int questId = questGetQuestId("quest/c_sink_imp_v2"); int spacesignal = groundquests.getTaskId(questId, "spacesignal"); int killloot = groundquests.getTaskId(questId, "killloot"); int kill = groundquests.getTaskId(questId, "kill"); return questIsTaskActive(questId, spacesignal, player) && (questIsTaskActive(questId, killloot, player) || questIsTaskActive(questId, kill, player)); } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_gangKillStepActive (obj_id player, obj_id npc) { int questId = questGetQuestId("quest/c_sink_imp_v2"); int spacesignal = groundquests.getTaskId(questId, "spacesignal"); return questIsTaskActive(questId, spacesignal, player); } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_noGangsKilledYet (obj_id player, obj_id npc) { int questId = questGetQuestId("quest/c_sink_imp"); int spacesignal = groundquests.getTaskId(questId, "spacesignal"); int killloot = groundquests.getTaskId(questId, "killloot"); int kill = groundquests.getTaskId(questId, "kill"); return questIsTaskActive(questId, spacesignal, player) && questIsTaskActive(questId, killloot, player) && questIsTaskActive(questId, kill, player); } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_hasJTL (obj_id player, obj_id npc) { return ( features.isSpaceEdition( player ) ); } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_spaceWon (obj_id player, obj_id npc) { // Is the completed space mission task active? return groundquests.isTaskActive(player, "c_sink_imp_pt2", "c_sink_imp_kill_binyare_success_wfs"); } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_spaceLost (obj_id player, obj_id npc) { // Is the failed space mission task active? return groundquests.isTaskActive(player, "c_sink_imp_pt2", "c_sink_imp_kill_binyare_failed_wfs"); } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_spaceStepActive (obj_id player, obj_id npc) { // Is the space quest active? return groundquests.isQuestActive(player, "c_sink_imp_pt2"); } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_spaceTaskActive (obj_id player, obj_id npc) { // conversation branch if the player has not attempted the space task yet return groundquests.isTaskActive(player, "c_sink_imp_pt2", "c_sink_imp_kill_banyare_gsq"); } // ---------------------------------------------------------------------- boolean c_sink_imp_condition_spaceNotActiveOrCmplt (obj_id player, obj_id npc) { // If the space quest does not get granted or is deleted before completion... if(groundquests.hasCompletedQuest(player, "c_sink_imp_v2") && !groundquests.isQuestActiveOrComplete(player, "c_sink_imp_pt2")) return true; return false; } // ====================================================================== // Script Actions // ====================================================================== void c_sink_imp_action_giveQuest (obj_id player, obj_id npc) { int questId = questGetQuestId("quest/c_sink_imp_v2"); groundquests.grantQuest(questId, player, npc, true); obj_id waypoint2 = getObjIdObjVar(player, "quest.general.quest/c_sink_imp_v2.pilot"); if (waypoint2 != null) { destroyWaypointInDatapad(waypoint2, player); } removeObjVar(player, "quest.general.quest/c_sink_imp_v2.pilot"); obj_id waypoint3 = getObjIdObjVar(player, "quest.general.quest/c_sink_imp_v2.questgiver"); if (waypoint3 != null) { destroyWaypointInDatapad(waypoint3, player); } removeObjVar(player, "quest.general.quest/c_sink_imp_v2.questgiver"); obj_id top=getTopMostContainer(player); location loc = getLocation(top); loc.x = -2449; loc.y = 0; loc.z = 3843; obj_id waypoint = createWaypointInDatapad(player, loc); setObjVar(player, "quest.general.quest/c_sink_imp_v2.pilot", waypoint); setWaypointName(waypoint, "Tie Fighter Crash Site"); setWaypointActive(waypoint, true); location loc1 = getLocation(top); loc1.x = -2179; loc1.y = 0; loc1.z = 2273; obj_id waypoint1 = createWaypointInDatapad(player, loc1); setObjVar(player, "quest.general.quest/c_sink_imp_v2.questgiver", waypoint1); setWaypointName(waypoint1, "Ceth Laike"); setWaypointActive(waypoint, true); } // ---------------------------------------------------------------------- void c_sink_imp_action_faceplayer (obj_id player, obj_id npc) { faceTo(npc, player); } // ---------------------------------------------------------------------- void c_sink_imp_action_forwardQuestAfterEscort (obj_id player, obj_id npc) { int questId = questGetQuestId("quest/c_sink_imp_v2"); // int escort = groundquests.getTaskId(questId, "escort"); groundquests.sendSignal(player, "c_sink_imp_safe"); // questCompleteTask(questId, escort, player); obj_id waypoint2 = getObjIdObjVar(player, "quest.general.quest/c_sink_imp_v2.pilot"); if (waypoint2 != null) { destroyWaypointInDatapad(waypoint2, player); } removeObjVar(player, "quest.general.quest/c_sink_imp_v2.pilot"); obj_id top=getTopMostContainer(player); location loc = getLocation(top); loc.x = -4737; loc.y = 0; loc.z = -1519; loc.area = "corellia"; obj_id waypoint = createWaypointInDatapad(player, loc); setObjVar(player, "quest.general.quest/c_sink_imp_v2.daggercamp", waypoint); setWaypointName(waypoint, "Flail Camp"); setWaypointActive(waypoint, true); location loc1 = getLocation(top); loc1.x = -1622; loc1.y = 0; loc1.z = 618; loc1.area = "talus"; obj_id waypoint1 = createWaypointInDatapad(player, loc1); setObjVar(player, "quest.general.quest/c_sink_imp_v2.binayrecamp", waypoint1); setWaypointName(waypoint1, "Binayre Camp"); setWaypointActive(waypoint, true); } // ---------------------------------------------------------------------- void c_sink_imp_action_giveWaypoint (obj_id player, obj_id npc) { obj_id waypoint2 = getObjIdObjVar(player, "quest.general.quest/c_sink_imp_v2.pilot"); if (waypoint2 != null) { destroyWaypointInDatapad(waypoint2, player); } removeObjVar(player, "quest.general.quest/c_sink_imp_v2.pilot"); obj_id waypoint3 = getObjIdObjVar(player, "quest.general.quest/c_sink_imp_v2.questgiver"); if (waypoint3 != null) { destroyWaypointInDatapad(waypoint3, player); } removeObjVar(player, "quest.general.quest/c_sink_imp_v2.questgiver"); obj_id top=getTopMostContainer(player); location loc = getLocation(top); loc.x = -2449; loc.y = 0; loc.z = 3843; obj_id waypoint = createWaypointInDatapad(player, loc); setObjVar(player, "quest.general.quest/c_sink_imp_v2.pilot", waypoint); setWaypointName(waypoint, "Tie Fighter Crash Site"); setWaypointActive(waypoint, true); location loc1 = getLocation(top); loc1.x = -2179; loc1.y = 0; loc1.z = 2273; obj_id waypoint1 = createWaypointInDatapad(player, loc1); setObjVar(player, "quest.general.quest/c_sink_imp_v2.questgiver", waypoint1); setWaypointName(waypoint1, "Ceth Laike"); setWaypointActive(waypoint, true); } // ---------------------------------------------------------------------- void c_sink_imp_action_rewardSignal (obj_id player, obj_id npc) { // Sends the signal to allow the space quest to complete groundquests.sendSignal(player, "c_sink_imp_kill_binyare_report_success"); // removes the waypoints to all ground points in the quest obj_id waypoint1 = getObjIdObjVar(player, "quest.general.quest/c_sink_imp_v2.questgiver"); if (waypoint1 != null) { destroyWaypointInDatapad(waypoint1, player); } removeObjVar(player, "quest.general.quest/c_sink_imp_v2.questgiver"); obj_id waypoint2 = getObjIdObjVar(player, "quest.general.quest/c_sink_imp_v2.daggercamp"); if (waypoint2 != null) { destroyWaypointInDatapad(waypoint2, player); } removeObjVar(player, "quest.general.quest/c_sink_imp_v2.daggercamp"); obj_id waypoint3 = getObjIdObjVar(player, "quest.general.quest/c_sink_imp_v2.binayrecamp"); if (waypoint3 != null) { destroyWaypointInDatapad(waypoint3, player); } removeObjVar(player, "quest.general.quest/c_sink_imp_v2.binayrecamp"); } // ---------------------------------------------------------------------- void c_sink_imp_action_giveSpace (obj_id player, obj_id npc) { // grants the space quest portion of the series if(!groundquests.isQuestActiveOrComplete(player, "c_sink_imp_pt2")) groundquests.grantQuest(player, "c_sink_imp_pt2"); // if the waypoints from the ground quest are still active, clear them. obj_id waypoint2 = getObjIdObjVar(player, "quest.general.quest/c_sink_imp_v2.daggercamp"); if (waypoint2 != null) { destroyWaypointInDatapad(waypoint2, player); } removeObjVar(player, "quest.general.quest/c_sink_imp_v2.daggercamp"); obj_id waypoint3 = getObjIdObjVar(player, "quest.general.quest/c_sink_imp_v2.binayrecamp"); if (waypoint3 != null) { destroyWaypointInDatapad(waypoint3, player); } removeObjVar(player, "quest.general.quest/c_sink_imp_v2.binayrecamp"); } // ---------------------------------------------------------------------- void c_sink_imp_action_complete_quest (obj_id player, obj_id npc) { // Completes the ground quest portion of this quest groundquests.sendSignal(player, "c_sink_imp_gospace"); } // ---------------------------------------------------------------------- void c_sink_imp_action_clearSpaceQuest (obj_id player, obj_id npc) { // If space quest is failed, clear it so it can be granted again. groundquests.clearQuest(player, "c_sink_imp_pt2"); } // ====================================================================== // Script %TO Tokens // ====================================================================== // ====================================================================== // Script %DI Tokens // ====================================================================== // ====================================================================== // Script %DF Tokens // ====================================================================== // ====================================================================== // handleBranch Functions // ====================================================================== int c_sink_imp_handleBranch3 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: I have a simple mission for you, soldier. A good friend of mine from the academy needs an escort back here from an accident. //-- [RESPONSE NOTE] //-- PLAYER: Escort from where? What happened? if (response == "s_1338") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { doAnimationAction (npc, "point_up"); //-- NPC: During a battle, those Rebels shot his ship down. He's good enough, and lucky enough to have crash-landed instead of blowing up. But, outside of a ship, he's just terrible. He needs someone to bring him back here. string_id message = new string_id (c_stringFile, "s_1340"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: It would be a privilege to escort a friend of yours, sir. boolean hasResponse0 = false; if (c_sink_imp_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I think the pilot can make it back on his own. Isn't that what he was trained for? boolean hasResponse1 = false; if (c_sink_imp_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_1342"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_1346"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 4); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch4 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: During a battle, those Rebels shot his ship down. He's good enough, and lucky enough to have crash-landed instead of blowing up. But, outside of a ship, he's just terrible. He needs someone to bring him back here. //-- [RESPONSE NOTE] //-- PLAYER: It would be a privilege to escort a friend of yours, sir. if (response == "s_1342") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { doAnimationAction (npc, "salute1"); doAnimationAction (player, "salute1"); c_sink_imp_action_giveQuest (player, npc); //-- NPC: Good show. Let me give you the location. You can't miss it; look for the crashed Tie Fighter. My friend is probably out of sight. I'll radio and let him know that you are coming, so just go to the coordinates that I give you and bring him back. string_id message = new string_id (c_stringFile, "s_1344"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: I think the pilot can make it back on his own. Isn't that what he was trained for? if (response == "s_1346") { doAnimationAction (player, "shrug_shoulders"); //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { doAnimationAction (npc, "shake_head_disgust"); //-- NPC: I see. You are right of course. I'll remember to mention that to the dispatcher if you ever need a lift back to base. string_id message = new string_id (c_stringFile, "s_1348"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch7 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Welcome back. Tell me what happened. //-- [RESPONSE NOTE] //-- PLAYER: I found a corpse at the crash site and a bunch of Binayre attacked me. if (response == "s_1352") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { doAnimationAction (npc, "shake_head_disgust"); //-- NPC: My friend must be dead. The good news is that they finally stepped over the line. string_id message = new string_id (c_stringFile, "s_1354"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I beg your pardon, sir? There is good news in this? boolean hasResponse0 = false; if (c_sink_imp_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_1356"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 8); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch8 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: My friend must be dead. The good news is that they finally stepped over the line. //-- [RESPONSE NOTE] //-- PLAYER: I beg your pardon, sir? There is good news in this? if (response == "s_1356") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: Yes and no. I have just received orders that if those thugs attack Imperial personnel, I am authorized to take whatever actions I deem necessary. string_id message = new string_id (c_stringFile, "s_1358"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: What, exactly do you deem necessary? boolean hasResponse0 = false; if (c_sink_imp_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I want to help! I hate those gangs. Thugs and criminals, all of them. Tell me what I can do. boolean hasResponse1 = false; if (c_sink_imp_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: Respectfully, sir, I want no part of this. Even if you asked me to do something, I will not. boolean hasResponse2 = false; if (c_sink_imp_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_1360"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_1372"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_1376"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 9); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch9 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Yes and no. I have just received orders that if those thugs attack Imperial personnel, I am authorized to take whatever actions I deem necessary. //-- [RESPONSE NOTE] //-- PLAYER: What, exactly do you deem necessary? if (response == "s_1360") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: I want to cripple them. They hurt and kill our citizens and they must be executed. I want them rendered ineffective and then wiped out. string_id message = new string_id (c_stringFile, "s_1362"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Sounds like a rough job. I like it! boolean hasResponse0 = false; if (c_sink_imp_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: No way. I don't get involved in minor disputes. That is what the Planetary Security Forces are for. boolean hasResponse1 = false; if (c_sink_imp_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_1364"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_1368"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 10); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: I want to help! I hate those gangs. Thugs and criminals, all of them. Tell me what I can do. if (response == "s_1372") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { c_sink_imp_action_forwardQuestAfterEscort (player, npc); //-- NPC: That's the spirit! I want you to target two of the groups, one here and one on Corellia. I'll transmit the information to your journal and datapad. Good luck, soldier! string_id message = new string_id (c_stringFile, "s_1374"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: Respectfully, sir, I want no part of this. Even if you asked me to do something, I will not. if (response == "s_1376") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: Know that you are turning your back on the law-abiding citizens that you are supposed to be defending. Sleep well on that... soldier. string_id message = new string_id (c_stringFile, "s_1378"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch10 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: I want to cripple them. They hurt and kill our citizens and they must be executed. I want them rendered ineffective and then wiped out. //-- [RESPONSE NOTE] //-- PLAYER: Sounds like a rough job. I like it! if (response == "s_1364") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { c_sink_imp_action_forwardQuestAfterEscort (player, npc); //-- NPC: That's the spirit! I want you to target two of the groups, one here and one on Corellia. I'll transmit the information to your journal and datapad. Good luck, soldier! string_id message = new string_id (c_stringFile, "s_1366"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: No way. I don't get involved in minor disputes. That is what the Planetary Security Forces are for. if (response == "s_1368") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: Well they are obviously not nearly as effective as they should be, are they? If you stand aside, it's your business, just get the hell out of the way while I do something about it. string_id message = new string_id (c_stringFile, "s_1370"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch15 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: I don't see my friend with you. I guess you should be heading out to get him. //-- [RESPONSE NOTE] //-- PLAYER: I need the location again. if (response == "s_1382") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { doAnimationAction (npc, "sigh_deeply"); c_sink_imp_action_giveWaypoint (player, npc); //-- NPC: Go west and look for the smoking Tie Fighter. string_id message = new string_id (c_stringFile, "s_1384"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch17 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: How did it go? //-- [RESPONSE NOTE] //-- PLAYER: I haven't started yet, sir. if (response == "s_1388") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: Then I suggest you start now. string_id message = new string_id (c_stringFile, "s_1390"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: I'm still working my way through the bad guys. if (response == "s_1392") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: I have nothing else to offer you now. Get going! string_id message = new string_id (c_stringFile, "s_1394"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: I have the Flail symbols and you have heard about the Binayre, I believe, sir. if (response == "s_1396") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: You would be correct. You did an admirable job. string_id message = new string_id (c_stringFile, "s_1398"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: These thugs aren't only on the ground, sir. boolean hasResponse0 = false; if (c_sink_imp_condition_hasJTL (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I am happy to do my part. boolean hasResponse1 = false; if (!c_sink_imp_condition_hasJTL (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_1400"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_1404"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 20); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch20 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: You would be correct. You did an admirable job. //-- [RESPONSE NOTE] //-- PLAYER: These thugs aren't only on the ground, sir. if (response == "s_1400") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { c_sink_imp_action_complete_quest (player, npc); //-- NPC: Very true. In fact, that's something that I was going to talk to you about. Binyare fly this sector and I want you to cripple their fleet, a few ships at a time. Once you are in space, I'll transfer coordinates to you. string_id message = new string_id (c_stringFile, "s_1402"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Understood, sir! boolean hasResponse0 = false; if (c_sink_imp_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_54"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 21); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: I am happy to do my part. if (response == "s_1404") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { c_sink_imp_action_rewardSignal (player, npc); //-- NPC: Let me give you your reward for a job well done. It looks like this little problem isn't so little. I need to do some research. I'll probably have more for you at a later time. string_id message = new string_id (c_stringFile, "s_1406"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch21 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Very true. In fact, that's something that I was going to talk to you about. Binyare fly this sector and I want you to cripple their fleet, a few ships at a time. Once you are in space, I'll transfer coordinates to you. //-- [RESPONSE NOTE] //-- PLAYER: Understood, sir! if (response == "s_54") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { c_sink_imp_action_giveSpace (player, npc); //-- NPC: When you return, the Empire will offer a bonus to your standard income for your efforts, soldier. string_id message = new string_id (c_stringFile, "s_55"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch24 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: What happened up there? //-- [RESPONSE NOTE] //-- PLAYER: I haven't been up there yet. if (response == "s_1410") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: Then I suggest you get going. string_id message = new string_id (c_stringFile, "s_1412"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: I failed my mission, sir. if (response == "s_1414") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { c_sink_imp_action_clearSpaceQuest (player, npc); //-- NPC: Then I don't believe your mission is complete, soldier. Get back up there. string_id message = new string_id (c_stringFile, "s_1416"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Yes sir! boolean hasResponse0 = false; if (c_sink_imp_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_56"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 26); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: I completed my mission, sir. if (response == "s_1418") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: Good work, soldier. Those Binyare will think twice before crossing the Empire again. string_id message = new string_id (c_stringFile, "s_1420"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: It felt good. boolean hasResponse0 = false; if (c_sink_imp_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'm done with this now. No more. boolean hasResponse1 = false; if (c_sink_imp_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_1422"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_1426"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 28); npcSpeak (player, message); npcSetConversationResponses (player, responses); } else { utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); } return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: What did you need me to do again, sir? if (response == "s_60") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: Your orders were to launch into space and destroy the Binyare ships at a specific location. The coordinates will be transferred to your ships navigation computer once you are in space. string_id message = new string_id (c_stringFile, "s_62"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch26 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Then I don't believe your mission is complete, soldier. Get back up there. //-- [RESPONSE NOTE] //-- PLAYER: Yes sir! if (response == "s_56") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { c_sink_imp_action_giveSpace (player, npc); //-- NPC: And this time, I shall expect you to report no less than success. string_id message = new string_id (c_stringFile, "s_57"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch28 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Good work, soldier. Those Binyare will think twice before crossing the Empire again. //-- [RESPONSE NOTE] //-- PLAYER: It felt good. if (response == "s_1422") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { c_sink_imp_action_rewardSignal (player, npc); //-- NPC: It should. You love the thrill of battle, don't you? No, I see it in your eyes. Here is your payment for a job well done. I will have more for you as soon as I get some research done. string_id message = new string_id (c_stringFile, "s_1424"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } //-- [RESPONSE NOTE] //-- PLAYER: I'm done with this now. No more. if (response == "s_1426") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { c_sink_imp_action_rewardSignal (player, npc); //-- NPC: Here is your payment. When you want to start protecting citizens again, let me know. Maybe I'll have something for you. string_id message = new string_id (c_stringFile, "s_1428"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch32 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: Have you completed your assignment? //-- [RESPONSE NOTE] //-- PLAYER: What was my assignment again? if (response == "s_66") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { c_sink_imp_action_giveSpace (player, npc); //-- NPC: Your assignment was to launch into space and destroy the Binyare ships at a specific location. The coordinates will be transferred to your ships navigation computer once you are in space. string_id message = new string_id (c_stringFile, "s_68"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- int c_sink_imp_handleBranch34 (obj_id player, obj_id npc, string_id response) { //-- [BRANCH NOTE] //-- NPC: I finally have my mission in life. The criminals will not take over while we are at war! //-- [RESPONSE NOTE] //-- PLAYER: Do you have anything for me? if (response == "s_1432") { //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: Not yet. string_id message = new string_id (c_stringFile, "s_1434"); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); npcEndConversationWithMessage (player, message); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } // ---------------------------------------------------------------------- // ====================================================================== // User Script Triggers // ====================================================================== trigger OnInitialize () { if ((!isMob (self)) || (isPlayer (self))) detachScript(self, "conversation.c_sink_imp"); setCondition (self, CONDITION_CONVERSABLE); setCondition (self, CONDITION_INTERESTING); setInvulnerable (self, true); ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL ); setName (self, "Ceth Laike"); return SCRIPT_CONTINUE; } trigger OnAttach () { setCondition (self, CONDITION_CONVERSABLE); setCondition (self, CONDITION_INTERESTING); setInvulnerable (self, true); ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL ); setName (self, "Ceth Laike"); 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.c_sink_imp"); 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 (c_sink_imp_condition_IsRebel (player, npc)) { c_sink_imp_action_faceplayer (player, npc); //-- NPC: What makes you think I will talk to you, insurgent? string_id message = new string_id (c_stringFile, "s_1332"); chat.chat (npc, player, message); return SCRIPT_CONTINUE; } //-- [NOTE] if (c_sink_imp_condition_isNeutral (player, npc)) { c_sink_imp_action_faceplayer (player, npc); //-- NPC: Hello citizen, nice day isn't it? I'm sorry, but I don't have anything that you can help me with. I really need a member of the Imperial Armed Forces. string_id message = new string_id (c_stringFile, "s_1334"); chat.chat (npc, player, message); return SCRIPT_CONTINUE; } //-- [NOTE] if (c_sink_imp_condition_IsImperial (player, npc)) { c_sink_imp_action_faceplayer (player, npc); //-- NPC: I have a simple mission for you, soldier. A good friend of mine from the academy needs an escort back here from an accident. string_id message = new string_id (c_stringFile, "s_1336"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Escort from where? What happened? boolean hasResponse0 = false; if (c_sink_imp_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_1338"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 3); npcStartConversation (player, npc, "c_sink_imp", message, responses); } else { chat.chat (npc, player, message); } return SCRIPT_CONTINUE; } //-- [NOTE] if (c_sink_imp_condition_broughtPilotBack (player, npc)) { c_sink_imp_action_faceplayer (player, npc); //-- NPC: Welcome back. Tell me what happened. string_id message = new string_id (c_stringFile, "s_1350"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I found a corpse at the crash site and a bunch of Binayre attacked me. boolean hasResponse0 = false; if (c_sink_imp_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_1352"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 7); npcStartConversation (player, npc, "c_sink_imp", message, responses); } else { chat.chat (npc, player, message); } return SCRIPT_CONTINUE; } //-- [NOTE] if (c_sink_imp_condition_firstStepofQuest (player, npc)) { //-- NPC: I don't see my friend with you. I guess you should be heading out to get him. string_id message = new string_id (c_stringFile, "s_1380"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I need the location again. boolean hasResponse0 = false; if (c_sink_imp_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_1382"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 15); npcStartConversation (player, npc, "c_sink_imp", message, responses); } else { chat.chat (npc, player, message); } return SCRIPT_CONTINUE; } //-- [NOTE] if (c_sink_imp_condition_gangKillStepActive (player, npc)) { //-- NPC: How did it go? string_id message = new string_id (c_stringFile, "s_1386"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I haven't started yet, sir. boolean hasResponse0 = false; if (c_sink_imp_condition_noGangsKilledYet (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I'm still working my way through the bad guys. boolean hasResponse1 = false; if (!c_sink_imp_condition_noGangsKilledYet (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I have the Flail symbols and you have heard about the Binayre, I believe, sir. boolean hasResponse2 = false; if (c_sink_imp_condition_gangKillStepDone (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_1388"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_1392"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_1396"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 17); npcStartConversation (player, npc, "c_sink_imp", message, responses); } else { chat.chat (npc, player, message); } return SCRIPT_CONTINUE; } //-- [NOTE] if (c_sink_imp_condition_spaceStepActive (player, npc)) { //-- NPC: What happened up there? string_id message = new string_id (c_stringFile, "s_1408"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: I haven't been up there yet. boolean hasResponse0 = false; if (c_sink_imp_condition_spaceTaskActive (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } //-- PLAYER: I failed my mission, sir. boolean hasResponse1 = false; if (c_sink_imp_condition_spaceLost (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } //-- PLAYER: I completed my mission, sir. boolean hasResponse2 = false; if (c_sink_imp_condition_spaceWon (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse2 = true; } //-- PLAYER: What did you need me to do again, sir? boolean hasResponse3 = false; if (c_sink_imp_condition__defaultCondition (player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse3 = true; } if (hasResponse) { int responseIndex = 0; string_id responses [] = new string_id [numberOfResponses]; if (hasResponse0) responses [responseIndex++] = new string_id (c_stringFile, "s_1410"); if (hasResponse1) responses [responseIndex++] = new string_id (c_stringFile, "s_1414"); if (hasResponse2) responses [responseIndex++] = new string_id (c_stringFile, "s_1418"); if (hasResponse3) responses [responseIndex++] = new string_id (c_stringFile, "s_60"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 24); npcStartConversation (player, npc, "c_sink_imp", message, responses); } else { chat.chat (npc, player, message); } return SCRIPT_CONTINUE; } //-- [NOTE] if (c_sink_imp_condition_spaceNotActiveOrCmplt (player, npc)) { //-- NPC: Have you completed your assignment? string_id message = new string_id (c_stringFile, "s_64"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: What was my assignment again? boolean hasResponse0 = false; if (c_sink_imp_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_66"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 32); npcStartConversation (player, npc, "c_sink_imp", message, responses); } else { chat.chat (npc, player, message); } return SCRIPT_CONTINUE; } //-- [NOTE] if (c_sink_imp_condition__defaultCondition (player, npc)) { //-- NPC: I finally have my mission in life. The criminals will not take over while we are at war! string_id message = new string_id (c_stringFile, "s_1430"); int numberOfResponses = 0; boolean hasResponse = false; //-- PLAYER: Do you have anything for me? boolean hasResponse0 = false; if (c_sink_imp_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_1432"); utils.setScriptVar (player, "conversation.c_sink_imp.branchId", 34); npcStartConversation (player, npc, "c_sink_imp", 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 != "c_sink_imp") return SCRIPT_CONTINUE; obj_id npc = self; int branchId = utils.getIntScriptVar (player, "conversation.c_sink_imp.branchId"); if (branchId == 3 && c_sink_imp_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 4 && c_sink_imp_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 7 && c_sink_imp_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 8 && c_sink_imp_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 9 && c_sink_imp_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 10 && c_sink_imp_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 15 && c_sink_imp_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 17 && c_sink_imp_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 20 && c_sink_imp_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 21 && c_sink_imp_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 24 && c_sink_imp_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 26 && c_sink_imp_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 28 && c_sink_imp_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 32 && c_sink_imp_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; if (branchId == 34 && c_sink_imp_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE) return SCRIPT_CONTINUE; chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); utils.removeScriptVar (player, "conversation.c_sink_imp.branchId"); return SCRIPT_CONTINUE; } // ======================================================================