mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
1421 lines
39 KiB
Plaintext
1421 lines
39 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// npe_medic2.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.groundquests;
|
|
include library.npe;
|
|
include library.space_quest;
|
|
include library.static_item;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/npe_medic2";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean npe_medic2_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_needsNewPack (obj_id player, obj_id npc)
|
|
{
|
|
boolean needsItem = false;
|
|
boolean hasItem = false;
|
|
obj_id[] playerStuff = getInventoryAndEquipment(player);
|
|
//loop thru players inventory, make sure they dont have the item already.
|
|
for(int i =0; i < playerStuff.length; i++)
|
|
{
|
|
string templateName = static_item.getStaticItemName(playerStuff[i]);
|
|
if(templateName != null)
|
|
{
|
|
if(templateName == "item_bactapack_01_01")
|
|
hasItem = true;
|
|
}
|
|
}
|
|
if((groundquests.isTaskActive(player, "npe_medic2", "npe_medic2_heal") || groundquests.isTaskActive(player, "npe_medic2", 0)) && hasItem == false)
|
|
needsItem = true;
|
|
return needsItem;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_onEntQuest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_prof_entertainer2", "play");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_hasPilot (obj_id player, obj_id npc)
|
|
{
|
|
return hasObjVar(player, "npe.hasMetSerissu");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_wantsMedic (obj_id player, obj_id npc)
|
|
{
|
|
return (npe_medic2_condition_isMedTemplate(player, npc) && !groundquests.isQuestActiveOrComplete(player, "npe_medic2"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_hasPack (obj_id player, obj_id npc)
|
|
{
|
|
obj_id[] playerStuff = getInventoryAndEquipment(player);
|
|
//loop thru players inventory, make sure they dont have the item already.
|
|
for(int i =0; i < playerStuff.length; i++)
|
|
{
|
|
string templateName = static_item.getStaticItemName(playerStuff[i]);
|
|
if(templateName != null)
|
|
{
|
|
if(templateName == "item_bactapack_01_01")
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_busy (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.isTaskActive(player, "npe_medic", "npe_medic_heal_1") ||
|
|
groundquests.isTaskActive(player, "npe_medic", "npe_medic_return") ||
|
|
groundquests.isTaskActive(player, "npe_medic2", 0) ||
|
|
groundquests.isTaskActive(player, "npe_medic2", "npe_medic2_heal") ||
|
|
groundquests.isTaskActive(player, "npe_medic2", "talk_technician") ||
|
|
groundquests.isTaskActive(player, "npe_medic2", "ingredients") ||
|
|
groundquests.isTaskActive(player, "npe_medic2", 9) ||
|
|
groundquests.isTaskActive(player, "npe_medic2", "return_technician"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_finishedGather (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_medic2", "return2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_finishedLastTask (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_medic2", "final_return");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_fromMedic (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.isQuestActive(player, "npe_pointer_med_template") && groundquests.hasCompletedQuest(player, "npe_medic"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_finishedMedTask (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_medic2", "return1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_medic2_condition_isMedTemplate (obj_id player, obj_id npc)
|
|
{
|
|
string pTemplate = getSkillTemplate(player);
|
|
if(pTemplate.indexOf("medic") > -1 )
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void npe_medic2_action_giveMedQuest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "npe_medic2");
|
|
groundquests.sendSignal(player, "found_medic");
|
|
groundquests.sendSignal(player, "npe_medic_done");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_medic2_action_giveReward (obj_id player, obj_id npc)
|
|
{
|
|
setObjVar(player, "npe.finishedTemplate", 1);
|
|
groundquests.sendSignal(player, "npe_return_billingsly3");
|
|
groundquests.grantQuest(player, "npe_job_pointer_han");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_medic2_action_giveAjaPointer (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "npe_pointer_medic");
|
|
groundquests.sendSignal(player, "found_medic");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_medic2_action_giveFirstSignal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "npe_return_billingsly1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_medic2_action_giveNewPack (obj_id player, obj_id npc)
|
|
{
|
|
obj_id bactaPack = static_item.createNewItemFunction("item_bactapack_01_01", player);
|
|
obj_id[] items = new obj_id[1];
|
|
items[0] = bactaPack;
|
|
showLootBox(player, items);
|
|
newbieTutorialSetToolbarElement(player, 5, bactaPack);
|
|
dictionary dic = new dictionary();
|
|
dic.put("player", player);
|
|
dic.put("location", 5);
|
|
dic.put("time", 5.0f);
|
|
messageTo(player, "makeUiElementAnimate", dic, 0.25f, true);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_medic2_action_facePlayer (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_medic2_action_giveComm (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "npe_medic_comm", false);
|
|
npe_medic2_action_facePlayer(player, npc);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_medic2_action_GiveMedQuestAndPack (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.requestGrantQuest(player, "npe_medic2");
|
|
groundquests.sendSignal(player, "found_medic");
|
|
obj_id bactaPack = static_item.createNewItemFunction("item_bactapack_01_01", player);
|
|
newbieTutorialSetToolbarElement(player, 5, bactaPack);
|
|
dictionary dic = new dictionary();
|
|
dic.put("player", player);
|
|
dic.put("location", 5);
|
|
dic.put("time", 5.0f);
|
|
messageTo(player, "makeUiElementAnimate", dic, 0.25f, true);
|
|
groundquests.sendSignal(player, "npe_medic_done");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_medic2_action_give2ndSignal (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "npe_return_billingsly2");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int npe_medic2_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Why are you here?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I lost my bactapack.
|
|
if (response == "s_67")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_medic2_action_giveNewPack (player, npc);
|
|
|
|
//-- NPC: Here is a new one, try not to lose it.
|
|
string_id message = new string_id (c_stringFile, "s_71");
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah, you are back, %TU. You administered the antitoxin, I trust?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, he is already feeling better.
|
|
if (response == "s_48")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good to hear. I wish I knew what was in that shipment...must have been bad. Lucky for us that you are here. You have shown great potential and are on your way to becoming a great Medic.
|
|
string_id message = new string_id (c_stringFile, "s_49");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_50");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good to hear. I wish I knew what was in that shipment...must have been bad. Lucky for us that you are here. You have shown great potential and are on your way to becoming a great Medic.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_50")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here. Take this. It is a bracelet used by the Polis Massans. They are some of the greatest healers in the Galaxy. By the way, I do believe Han Solo was looking for you. You should seek him out.
|
|
string_id message = new string_id (c_stringFile, "s_51");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will. Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_52");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 8);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch8 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Here. Take this. It is a bracelet used by the Polis Massans. They are some of the greatest healers in the Galaxy. By the way, I do believe Han Solo was looking for you. You should seek him out.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will. Thank you.
|
|
if (response == "s_52")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_medic2_action_giveReward (player, npc);
|
|
|
|
//-- NPC: You have earned it. I also happen to have an extra medic uniform. Please take it as well. You have the skills...now you can wear the uniform too!
|
|
string_id message = new string_id (c_stringFile, "s_53");
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Do you have the ingredients?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, here they are.
|
|
if (response == "s_40")
|
|
{
|
|
doAnimationAction (player, "feed_creature_medium");
|
|
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Good, let me mix this up... There, take this antitoxin to the technician. He must take this immediately. His wooziness will fade eventually. Until then, he must rest.
|
|
string_id message = new string_id (c_stringFile, "s_41");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I will bring it to him.
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_43");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good, let me mix this up... There, take this antitoxin to the technician. He must take this immediately. His wooziness will fade eventually. Until then, he must rest.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I will bring it to him.
|
|
if (response == "s_43")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_medic2_action_give2ndSignal (player, npc);
|
|
|
|
//-- NPC: Yes, yes. Go now.
|
|
string_id message = new string_id (c_stringFile, "s_45");
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Tell me of his symptoms. Maybe we can determine what his illness is.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: He said he fainted and is still woozy.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: From your description of the symptoms, I think he was poisoned. We need to get him an antitoxin right now.
|
|
string_id message = new string_id (c_stringFile, "s_47");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Where do we get that?
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_83");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: From your description of the symptoms, I think he was poisoned. We need to get him an antitoxin right now.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Where do we get that?
|
|
if (response == "s_83")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Go to my medicine cabinet by the wall over there and collect the ingredients. Bring them back to me so I can mix them up.
|
|
string_id message = new string_id (c_stringFile, "s_84");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Okay.
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_33");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Go to my medicine cabinet by the wall over there and collect the ingredients. Bring them back to me so I can mix them up.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Okay.
|
|
if (response == "s_33")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_medic2_action_giveFirstSignal (player, npc);
|
|
|
|
//-- NPC: Do hurry.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Aja sends her thanks. You did fine work...
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I think they need help.
|
|
if (response == "s_68")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yes, most fortunate you are here indeed. Please help them for us.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What do I do?
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_77");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes, most fortunate you are here indeed. Please help them for us.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What do I do?
|
|
if (response == "s_77")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition_hasPack (player, npc))
|
|
{
|
|
npe_medic2_action_giveMedQuest (player, npc);
|
|
|
|
//-- NPC: Use your bactapack on him. That should stabilize his condition. He is on the lower level.
|
|
string_id message = new string_id (c_stringFile, "s_81");
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!npe_medic2_condition_hasPack (player, npc))
|
|
{
|
|
npe_medic2_action_GiveMedQuestAndPack (player, npc);
|
|
|
|
//-- NPC: Here, take another bactapack and use it on him. He is on the lower level.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Greetings. I am Medical Android 2-1b-58, but you may call me Billingsly. You would be %TU, correct?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, how did you know?
|
|
if (response == "s_57")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Part of my programming dictates that I keep up-to-date on all new arrivals to the station. It is most fortunate for us here at Tansarii that you have arrived. With all the dangers around here, we can always use another medic.
|
|
string_id message = new string_id (c_stringFile, "s_59");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Why?
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_62");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Part of my programming dictates that I keep up-to-date on all new arrivals to the station. It is most fortunate for us here at Tansarii that you have arrived. With all the dangers around here, we can always use another medic.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Why?
|
|
if (response == "s_62")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: As you can see, we are a little short-staffed, so every healer helps.
|
|
string_id message = new string_id (c_stringFile, "s_64");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What can I do?
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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.npe_medic2.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: As you can see, we are a little short-staffed, so every healer helps.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What can I do?
|
|
if (response == "s_66")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_medic2_action_giveAjaPointer (player, npc);
|
|
|
|
//-- NPC: Aja Sen could use your help. She is right behind me tending to a station mechanic who burned his hand.
|
|
string_id message = new string_id (c_stringFile, "s_70");
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_medic2_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I am extremely busy. I hope you are here to help.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sorry. I will leave you alone.
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you.
|
|
string_id message = new string_id (c_stringFile, "s_85");
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.npe_medic2");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
setName (self, "Billingsly (Medic)");
|
|
ai_lib.setCustomIdleAnimation(self, "calm");
|
|
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
setName (self, "Billingsly (Medic)");
|
|
ai_lib.setCustomIdleAnimation(self, "calm");
|
|
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
|
|
|
|
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.npe_medic2");
|
|
|
|
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 (npe_medic2_condition_onEntQuest (player, npc))
|
|
{
|
|
//-- NPC: Oh, thank you for coming to cheer up the patients! You can start playing whenever you'd like.
|
|
string_id message = new string_id (c_stringFile, "s_79");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (!npe_medic2_condition_isMedTemplate (player, npc))
|
|
{
|
|
npe_medic2_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: I don't have time to deal with non-medics right now.
|
|
string_id message = new string_id (c_stringFile, "s_69");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition_needsNewPack (player, npc))
|
|
{
|
|
//-- NPC: Why are you here?
|
|
string_id message = new string_id (c_stringFile, "s_65");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I lost my bactapack.
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_67");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 3);
|
|
|
|
npcStartConversation (player, npc, "npe_medic2", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition_busy (player, npc))
|
|
{
|
|
npe_medic2_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Why are you here? Go finish your task first.
|
|
string_id message = new string_id (c_stringFile, "s_42");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition_finishedLastTask (player, npc))
|
|
{
|
|
npe_medic2_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Ah, you are back, %TU. You administered the antitoxin, I trust?
|
|
string_id message = new string_id (c_stringFile, "s_39");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, he is already feeling better.
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_48");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 6);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "npe_medic2", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition_finishedGather (player, npc))
|
|
{
|
|
npe_medic2_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Do you have the ingredients?
|
|
string_id message = new string_id (c_stringFile, "s_38");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, here they are.
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_40");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 10);
|
|
|
|
npcStartConversation (player, npc, "npe_medic2", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition_finishedMedTask (player, npc))
|
|
{
|
|
npe_medic2_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Tell me of his symptoms. Maybe we can determine what his illness is.
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: He said he fainted and is still woozy.
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_46");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 13);
|
|
|
|
npcStartConversation (player, npc, "npe_medic2", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition_fromMedic (player, npc))
|
|
{
|
|
npe_medic2_action_giveComm (player, npc);
|
|
|
|
//-- NPC: Aja sends her thanks. You did fine work...
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I think they need help.
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_68");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 17);
|
|
|
|
npcStartConversation (player, npc, "npe_medic2", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition_wantsMedic (player, npc))
|
|
{
|
|
npe_medic2_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Greetings. I am Medical Android 2-1b-58, but you may call me Billingsly. You would be %TU, correct?
|
|
string_id message = new string_id (c_stringFile, "s_37");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, how did you know?
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_57");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 21);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "npe_medic2", null, pp, responses);
|
|
}
|
|
else
|
|
{
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, null, null, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition_isMedTemplate (player, npc))
|
|
{
|
|
npe_medic2_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: You have learned all I have to teach.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_medic2_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_medic2_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: I am extremely busy. I hope you are here to help.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sorry. I will leave you alone.
|
|
boolean hasResponse0 = false;
|
|
if (npe_medic2_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_80");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_medic2.branchId", 26);
|
|
|
|
npcStartConversation (player, npc, "npe_medic2", 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 != "npe_medic2")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
if (branchId == 3 && npe_medic2_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && npe_medic2_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && npe_medic2_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 8 && npe_medic2_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && npe_medic2_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && npe_medic2_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && npe_medic2_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && npe_medic2_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && npe_medic2_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && npe_medic2_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && npe_medic2_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && npe_medic2_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && npe_medic2_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && npe_medic2_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && npe_medic2_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.npe_medic2.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|