mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
2780 lines
79 KiB
Plaintext
2780 lines
79 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// npe_profession_trader.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.conversation;
|
|
include library.groundquests;
|
|
include library.npe;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/npe_profession_trader";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean npe_profession_trader_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onTrainingQuest (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.isQuestActive(player, "npe_pointer_artisan")||
|
|
groundquests.isQuestActive(player, "npe_new_artisan_quest")||
|
|
groundquests.isQuestActive(player, "npe_prof_artisan1"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onArtisan1task (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_prof_artisan1", "talktotrader");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_isTrader (obj_id player, obj_id npc)
|
|
{
|
|
string pTemplate = getSkillTemplate(player);
|
|
if(pTemplate.indexOf("trader") > -1 )
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onEntertainer1quest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "npe_prof_entertainer1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_finishedArtisan1Quest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "npe_prof_artisan1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onEntertainer1Task (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_prof_entertainer1", "returntomira");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onSideCrafting1Return (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_side_crafting1", "getreward");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onSideCrafting1quest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "npe_side_crafting1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_finishedSideCrafting1Quest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "npe_side_crafting1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_deletedGossipQuest (obj_id player, obj_id npc)
|
|
{
|
|
return (groundquests.hasCompletedQuest(player, "npe_new_artisan_quest")&&
|
|
!groundquests.isQuestActive(player, "npe_prof_artisan1"));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onSideCrafting2quest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "npe_side_crafting2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onSideCrafting3quest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "npe_side_crafting3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onSideCrafting4quest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isQuestActive(player, "npe_side_crafting4");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onSideCrafting2Return (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_side_crafting2", "getreward");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onSideCrafting3Return (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_side_crafting3", "getreward");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_onSideCrafting4Return (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.isTaskActive(player, "npe_side_crafting4", "getreward");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_finishedSideCrafting2Quest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "npe_side_crafting2");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_finishedSideCrafting3Quest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "npe_side_crafting3");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean npe_profession_trader_condition_finishedSideCrafting4Quest (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedQuest(player, "npe_side_crafting4");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void npe_profession_trader_action_facePlayer (obj_id player, obj_id npc)
|
|
{
|
|
faceTo(npc, player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_signalSideCrafting2Quest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "npe_side_crafting2_reward");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_givePointerBartender (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "npe_pointer_artisan");
|
|
groundquests.sendSignal(player, "found_trader");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_signalTrader1Quest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "npe_prof_artisan1_reward");
|
|
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_giveSideCrafting1QUest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.requestGrantQuest(player, "npe_side_crafting1");
|
|
|
|
obj_id[] playerStuff = getInventoryAndEquipment(player);
|
|
if (!utils.hasObjVar(player, "npe.side_crafting1.resources") )
|
|
{
|
|
obj_id[] myResources = new obj_id[2];
|
|
myResources[0] = npe.grantNpeResourceStack(player, "fiberplast_corellia", 16);
|
|
myResources[1] = npe.grantNpeResourceStack(player, "steel_smelted", 4);
|
|
showLootBox(player, myResources);
|
|
utils.setObjVar(player, "npe.side_crafting1.resources", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_giveHanPointer (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "npe_job_pointer_han");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_signalSideCrafting1Quest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "npe_side_crafting1_reward");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_giveArtisan1Quest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.grantQuest(player, "npe_prof_artisan1");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_giveSideCrafting2QUest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.requestGrantQuest(player, "npe_side_crafting2");
|
|
|
|
obj_id[] playerStuff = getInventoryAndEquipment(player);
|
|
boolean hasTool = false;
|
|
if (!utils.hasObjVar(player, "npe.side_crafting2.resources") )
|
|
{
|
|
obj_id[] myResources = new obj_id[1];
|
|
myResources[0] = npe.grantNpeResourceStack(player, "processed_cereal", 11);
|
|
showLootBox(player, myResources);
|
|
utils.setObjVar(player, "npe.side_crafting2.resources", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_giveSideCrafting3QUest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.requestGrantQuest(player, "npe_side_crafting3");
|
|
|
|
obj_id[] playerStuff = getInventoryAndEquipment(player);
|
|
if (!utils.hasObjVar(player, "npe.side_crafting3.resources") )
|
|
{
|
|
obj_id[] myResources = new obj_id[1];
|
|
myResources[0] = npe.grantNpeResourceStack(player, "steel_smelted", 27);
|
|
showLootBox(player, myResources);
|
|
utils.setObjVar(player, "npe.side_crafting3.resources", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_giveSideCrafting4QUest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.requestGrantQuest(player, "npe_side_crafting4");
|
|
|
|
obj_id[] playerStuff = getInventoryAndEquipment(player);
|
|
if (!utils.hasObjVar(player, "npe.side_crafting4.resources") )
|
|
{
|
|
obj_id[] myResources = new obj_id[1];
|
|
myResources[0] = npe.grantNpeResourceStack(player, "steel_smelted", 27);
|
|
showLootBox(player, myResources);
|
|
utils.setObjVar(player, "npe.side_crafting4.resources", 1);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_signalSideCrafting3Quest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "npe_side_crafting3_reward");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void npe_profession_trader_action_signalSideCrafting4Quest (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "npe_side_crafting4_reward");
|
|
setObjVar(player, "npe.finishedTemplate", 1);
|
|
obj_id[] myResources = new obj_id[1];
|
|
myResources[0] = npe.grantNpeResourceStack(player, "energy_renewable_unlimited_wind_weak", 200);
|
|
showLootBox(player, myResources);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int npe_profession_trader_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Have you finished the tool?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes I did.
|
|
if (response == "s_142")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_chin_thoughtful");
|
|
|
|
//-- NPC: Ah. Let me see. Ok, it's as I thought. The Flora Survey Tool is very similar to the mineral one. I'll bet all of them work pretty much the same. I can't wait to go planetside and be able to try one out!
|
|
string_id message = new string_id (c_stringFile, "s_144");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you for supplying me with the resources.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_146");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Ah. Let me see. Ok, it's as I thought. The Flora Survey Tool is very similar to the mineral one. I'll bet all of them work pretty much the same. I can't wait to go planetside and be able to try one out!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you for supplying me with the resources.
|
|
if (response == "s_146")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_profession_trader_action_signalSideCrafting4Quest (player, npc);
|
|
|
|
//-- NPC: I'm happy to help. Oh, when you mentioned harvesters earlier, I started looking through my goods. I noticed that I have this deed. It's not going to do me much good now, so I'd like you to have it. I even have some energy to power it.
|
|
string_id message = new string_id (c_stringFile, "s_148");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you very much! May your business be profitable!
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_139");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 4);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch4 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'm happy to help. Oh, when you mentioned harvesters earlier, I started looking through my goods. I noticed that I have this deed. It's not going to do me much good now, so I'd like you to have it. I even have some energy to power it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you very much! May your business be profitable!
|
|
if (response == "s_139")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "goodbye");
|
|
|
|
npe_profession_trader_action_giveHanPointer (player, npc);
|
|
|
|
//-- NPC: And to you, %TU. I'll be sure to spread the word of your skill and generosity. Han asked me to let you know that he needs to speak to you again.
|
|
string_id message = new string_id (c_stringFile, "s_143");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Are you done with the Flora Survey Tool? If you need more metal, see Jesi. I'm out.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What if I need a new crafting tool?
|
|
if (response == "s_115")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Jesi can sell you one for 100 credits.
|
|
string_id message = new string_id (c_stringFile, "s_117");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Here's my last bit of extra metal. Would you show me a Flora Survey tool?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sure.
|
|
if (response == "s_130")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_profession_trader_action_giveSideCrafting4QUest (player, npc);
|
|
|
|
//-- NPC: Thanks again. Let me know when you finish the Flora Survey Device.
|
|
string_id message = new string_id (c_stringFile, "s_132");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Very good. You finished the device, yes?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes I did.
|
|
if (response == "s_116")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_chin_thoughtful");
|
|
|
|
//-- NPC: Let me see. Oh! I know what I did wrong! I didn't make the radar able to scale and my abilities with it are too low to use the long-range radar.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I see how that could be a problem.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_120");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Let me see. Oh! I know what I did wrong! I didn't make the radar able to scale and my abilities with it are too low to use the long-range radar.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I see how that could be a problem.
|
|
if (response == "s_120")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yes. I still have some extra metal, so if you would show me another tool, I'd appreciate it.
|
|
string_id message = new string_id (c_stringFile, "s_122");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_124");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yes. I still have some extra metal, so if you would show me another tool, I'd appreciate it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sure.
|
|
if (response == "s_124")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "feed_creature_medium");
|
|
|
|
npe_profession_trader_action_signalSideCrafting3Quest (player, npc);
|
|
|
|
//-- NPC: I just want you to know that I'm very impressed with your willingness to help me. Here is payment for your generosity. I have some extra metal if you would show me how to make a Flora Survey device.
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I can do that. I need one anyway.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_110");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I just want you to know that I'm very impressed with your willingness to help me. Here is payment for your generosity. I have some extra metal if you would show me how to make a Flora Survey device.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I can do that. I need one anyway.
|
|
if (response == "s_110")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_profession_trader_action_giveSideCrafting4QUest (player, npc);
|
|
|
|
//-- NPC: Thanks again. Let me know when you finish the Flora Survey Device.
|
|
string_id message = new string_id (c_stringFile, "s_132");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I'm anxious to see a good Mineral Survey Device. If you need more metal, talk to Jesi.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What if I need a new crafting tool?
|
|
if (response == "s_115")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Jesi can sell you one for 100 credits.
|
|
string_id message = new string_id (c_stringFile, "s_117");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: So, the next thing that I want to know more about is Survey tools.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I see, what do you want to know?
|
|
if (response == "s_101")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, I won't be on Tansarii forever. Survey tools are the best way to acquire resources while on the ground, right?
|
|
string_id message = new string_id (c_stringFile, "s_103");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Survey tools and harvesters, yes.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_105");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Well, I won't be on Tansarii forever. Survey tools are the best way to acquire resources while on the ground, right?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Survey tools and harvesters, yes.
|
|
if (response == "s_105")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_profession_trader_action_giveSideCrafting3QUest (player, npc);
|
|
|
|
//-- NPC: Ah, yes. Please show me how to make a Mineral Survey Device. I can't seem to get the bits working right. I have the metal that you need.
|
|
string_id message = new string_id (c_stringFile, "s_107");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Oh, that smells divine!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: This batch did come out rather well.
|
|
if (response == "s_77")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_belly");
|
|
|
|
//-- NPC: It takes me right back home! Let me see. Ah! I understand where I went wrong. No wonder it was never solidifying! You have such talent!
|
|
string_id message = new string_id (c_stringFile, "s_81");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_85");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 18);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: It takes me right back home! Let me see. Ah! I understand where I went wrong. No wonder it was never solidifying! You have such talent!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_85")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You're welcome. You have been so generous with your time that I hate to impose, but I have a couple more requests.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I should have time to help you a bit more.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_93");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 19);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You're welcome. You have been so generous with your time that I hate to impose, but I have a couple more requests.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I should have time to help you a bit more.
|
|
if (response == "s_93")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "feed_creature_medium");
|
|
|
|
npe_profession_trader_action_signalSideCrafting2Quest (player, npc);
|
|
|
|
//-- NPC: Great! Here's your payment for showing me about these Bofa Treats. Oh, and I know what I'd like to see next.
|
|
string_id message = new string_id (c_stringFile, "s_97");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Fine. What do you want to know about?
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_108");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Great! Here's your payment for showing me about these Bofa Treats. Oh, and I know what I'd like to see next.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Fine. What do you want to know about?
|
|
if (response == "s_108")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Well, I won't be on Tansarii forever. Survey tools are the best way to acquire resources while on the ground, right?
|
|
string_id message = new string_id (c_stringFile, "s_103");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Survey tools and harvesters, yes.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_105");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 15);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You don't appear to be done yet. If you need more cereal, Jesi can sell it to you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What if I need a new crafting tool?
|
|
if (response == "s_115")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Jesi can sell you one for 100 credits.
|
|
string_id message = new string_id (c_stringFile, "s_117");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Hello again, %NU. It's okay if I call you %NU?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes.
|
|
if (response == "s_64")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Great! So, my next problem is a recipe for a dessert that I loved as a child. I have the ingredients correct, but it won't set properly. Would you show me how you do it?
|
|
string_id message = new string_id (c_stringFile, "s_65");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Very well.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_profession_trader.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Great! So, my next problem is a recipe for a dessert that I loved as a child. I have the ingredients correct, but it won't set properly. Would you show me how you do it?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Very well.
|
|
if (response == "s_66")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_profession_trader_action_giveSideCrafting2QUest (player, npc);
|
|
|
|
//-- NPC: Here are the ingredients. I'll wait for you here.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Have you finished those pants?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes, here they are.
|
|
if (response == "s_55")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "rub_chin_thoughtful");
|
|
|
|
//-- NPC: Let me see...good lines, even color. Ah, I see! Your seam-work is amazing. Now I see why your clothing is almost indestructible!
|
|
string_id message = new string_id (c_stringFile, "s_56");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_profession_trader.branchId", 26);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch26 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Let me see...good lines, even color. Ah, I see! Your seam-work is amazing. Now I see why your clothing is almost indestructible!
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you.
|
|
if (response == "s_57")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you, %NU. This will help me immensely. I'm just sorry that I can't pay you more.
|
|
string_id message = new string_id (c_stringFile, "s_58");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: That's all right.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_59");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 27);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcSpeak (player, pp);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcEndConversationWithMessage (player, pp);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thank you, %NU. This will help me immensely. I'm just sorry that I can't pay you more.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That's all right.
|
|
if (response == "s_59")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "feed_creature_medium");
|
|
|
|
npe_profession_trader_action_signalSideCrafting1Quest (player, npc);
|
|
|
|
//-- NPC: Here is your payment. I'd love to see more, if you have time.
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_106");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 28);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch28 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Here is your payment. I'd love to see more, if you have time.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Sure.
|
|
if (response == "s_106")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Great! So, my next problem is a recipe for a dessert that I loved as a child. I have the ingredients correct, but it won't set properly. Would you show me how you do it?
|
|
string_id message = new string_id (c_stringFile, "s_65");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Very well.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_profession_trader.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch29 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: When you have made the pants, let me know. If you need more resources, Jesi here can sell them to you.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What if I need a new crafting tool?
|
|
if (response == "s_115")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Jesi can sell you one for 100 credits.
|
|
string_id message = new string_id (c_stringFile, "s_117");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch30 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: %NU, are you ready to show me your technique?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Certainly.
|
|
if (response == "s_68")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you. I've been having some problems with tailoring recently.
|
|
string_id message = new string_id (c_stringFile, "s_71");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It isn't easy, certainly.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_74");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 31);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch31 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thank you. I've been having some problems with tailoring recently.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: It isn't easy, certainly.
|
|
if (response == "s_74")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You aren't kidding. If I supply you with resources, would you make a pair of casual pants? I'd love to see how you put them together.
|
|
string_id message = new string_id (c_stringFile, "s_76");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Very well.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_79");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 32);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You aren't kidding. If I supply you with resources, would you make a pair of casual pants? I'd love to see how you put them together.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Very well.
|
|
if (response == "s_79")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_profession_trader_action_giveSideCrafting1QUest (player, npc);
|
|
|
|
//-- NPC: Good luck!
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch34 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thank you very much. You will be saving hundreds of lives, or at least their stomachs! When you talked to him, what did he tell you?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: He told me that an Old Republic Relic just passed through.
|
|
if (response == "s_91")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_profession_trader_action_signalTrader1Quest (player, npc);
|
|
|
|
//-- NPC: Isn't that fascinating? I'm going to have to sniff around and find out more about this. I would like to learn more from you, if you are willing.
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Certainly. What would you like me to do?
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_96");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 35);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch35 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Isn't that fascinating? I'm going to have to sniff around and find out more about this. I would like to learn more from you, if you are willing.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Certainly. What would you like me to do?
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you. I've been having some problems with tailoring recently.
|
|
string_id message = new string_id (c_stringFile, "s_71");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: It isn't easy, certainly.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_74");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 31);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch36 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: I need you to do me one more favor. The Bartender will be well-disposed to you at the moment. Things here are really ...interesting right now. He probably knows why. Would you find out for me?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: If you insist.
|
|
if (response == "s_125")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "bow");
|
|
|
|
npe_profession_trader_action_giveArtisan1Quest (player, npc);
|
|
|
|
//-- NPC: Thank you.
|
|
string_id message = new string_id (c_stringFile, "s_129");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch38 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Once you finish your demonstration for the Bartender, come back and talk to me.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What if I need a new crafting tool?
|
|
if (response == "s_115")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Jesi can sell you one for 100 credits.
|
|
string_id message = new string_id (c_stringFile, "s_117");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch40 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Good day, or what passes for day here! I can't believe that you are here. Who would imagine that %TU would be on Tansarii Point Station?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Thank you. It's a rather long story, but yes, I'm here.
|
|
if (response == "s_137")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: All the better for us. I was wondering if you would like to show your culinary skills to our resident 'chef'. He's great with a drink, but his cooking leaves a bit to be desired.
|
|
string_id message = new string_id (c_stringFile, "s_141");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I believe I can help.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_145");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 41);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int npe_profession_trader_handleBranch41 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: All the better for us. I was wondering if you would like to show your culinary skills to our resident 'chef'. He's great with a drink, but his cooking leaves a bit to be desired.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I believe I can help.
|
|
if (response == "s_145")
|
|
{
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_profession_trader_action_givePointerBartender (player, npc);
|
|
|
|
//-- NPC: Fantastic! Talk to the Bartender in the Cantina. He should be open to learning new techniques, at least.
|
|
string_id message = new string_id (c_stringFile, "s_149");
|
|
utils.removeScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.npe_profession_trader");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
//setCondition (self, CONDITION_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
setName (self, "Raine Taske (Trader)");
|
|
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
//setCondition (self, CONDITION_INTERESTING);
|
|
setInvulnerable (self, true);
|
|
setName (self, "Raine Taske (Trader)");
|
|
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_profession_trader");
|
|
|
|
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_profession_trader_condition_finishedSideCrafting4Quest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Things are looking up since you helped me!
|
|
string_id message = new string_id (c_stringFile, "s_153");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_onSideCrafting4Return (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Have you finished the tool?
|
|
string_id message = new string_id (c_stringFile, "s_140");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes I did.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_142");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 2);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_onSideCrafting4quest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Are you done with the Flora Survey Tool? If you need more metal, see Jesi. I'm out.
|
|
string_id message = new string_id (c_stringFile, "s_138");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What if I need a new crafting tool?
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_115");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 38);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_finishedSideCrafting3Quest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Here's my last bit of extra metal. Would you show me a Flora Survey tool?
|
|
string_id message = new string_id (c_stringFile, "s_128");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Sure.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_130");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 7);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_onSideCrafting3Return (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Very good. You finished the device, yes?
|
|
string_id message = new string_id (c_stringFile, "s_111");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes I did.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_116");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 9);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_onSideCrafting3quest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: I'm anxious to see a good Mineral Survey Device. If you need more metal, talk to Jesi.
|
|
string_id message = new string_id (c_stringFile, "s_109");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What if I need a new crafting tool?
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_115");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 38);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_finishedSideCrafting2Quest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: So, the next thing that I want to know more about is Survey tools.
|
|
string_id message = new string_id (c_stringFile, "s_99");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I see, what do you want to know?
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_101");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 14);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_onSideCrafting2Return (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Oh, that smells divine!
|
|
string_id message = new string_id (c_stringFile, "s_73");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: This batch did come out rather well.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_profession_trader.branchId", 17);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_onSideCrafting2quest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: You don't appear to be done yet. If you need more cereal, Jesi can sell it to you.
|
|
string_id message = new string_id (c_stringFile, "s_69");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What if I need a new crafting tool?
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_115");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 38);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_finishedSideCrafting1Quest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Hello again, %NU. It's okay if I call you %NU?
|
|
string_id message = new string_id (c_stringFile, "s_61");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_64");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 22);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", 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_profession_trader_condition_onSideCrafting1Return (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Have you finished those pants?
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes, here they are.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_55");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 25);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_onSideCrafting1quest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: When you have made the pants, let me know. If you need more resources, Jesi here can sell them to you.
|
|
string_id message = new string_id (c_stringFile, "s_53");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What if I need a new crafting tool?
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_115");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 38);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_finishedArtisan1Quest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: %NU, are you ready to show me your technique?
|
|
string_id message = new string_id (c_stringFile, "s_62");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Certainly.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_profession_trader.branchId", 30);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", 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_profession_trader_condition_onArtisan1task (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Thank you very much. You will be saving hundreds of lives, or at least their stomachs! When you talked to him, what did he tell you?
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: He told me that an Old Republic Relic just passed through.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_91");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 34);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_deletedGossipQuest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: I need you to do me one more favor. The Bartender will be well-disposed to you at the moment. Things here are really ...interesting right now. He probably knows why. Would you find out for me?
|
|
string_id message = new string_id (c_stringFile, "s_121");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: If you insist.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_125");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 36);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_onTrainingQuest (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Once you finish your demonstration for the Bartender, come back and talk to me.
|
|
string_id message = new string_id (c_stringFile, "s_133");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What if I need a new crafting tool?
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_115");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 38);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", message, responses);
|
|
}
|
|
else
|
|
{
|
|
chat.chat (npc, player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (npe_profession_trader_condition_isTrader (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Good day, or what passes for day here! I can't believe that you are here. Who would imagine that %TU would be on Tansarii Point Station?
|
|
string_id message = new string_id (c_stringFile, "s_135");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Thank you. It's a rather long story, but yes, I'm here.
|
|
boolean hasResponse0 = false;
|
|
if (npe_profession_trader_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_137");
|
|
|
|
utils.setScriptVar (player, "conversation.npe_profession_trader.branchId", 40);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "npe_profession_trader", 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_profession_trader_condition__defaultCondition (player, npc))
|
|
{
|
|
npe_profession_trader_action_facePlayer (player, npc);
|
|
|
|
//-- NPC: Hello! I can't help you, I'm afraid. My services are for Traders only.
|
|
string_id message = new string_id (c_stringFile, "s_151");
|
|
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_profession_trader")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.npe_profession_trader.branchId");
|
|
|
|
if (branchId == 2 && npe_profession_trader_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && npe_profession_trader_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 4 && npe_profession_trader_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 6 && npe_profession_trader_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && npe_profession_trader_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && npe_profession_trader_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && npe_profession_trader_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && npe_profession_trader_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && npe_profession_trader_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && npe_profession_trader_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && npe_profession_trader_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && npe_profession_trader_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && npe_profession_trader_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && npe_profession_trader_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && npe_profession_trader_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && npe_profession_trader_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && npe_profession_trader_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && npe_profession_trader_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && npe_profession_trader_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && npe_profession_trader_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 26 && npe_profession_trader_handleBranch26 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && npe_profession_trader_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 28 && npe_profession_trader_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 29 && npe_profession_trader_handleBranch29 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 30 && npe_profession_trader_handleBranch30 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 31 && npe_profession_trader_handleBranch31 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && npe_profession_trader_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 34 && npe_profession_trader_handleBranch34 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 35 && npe_profession_trader_handleBranch35 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 36 && npe_profession_trader_handleBranch36 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 38 && npe_profession_trader_handleBranch38 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 40 && npe_profession_trader_handleBranch40 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 41 && npe_profession_trader_handleBranch41 (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_profession_trader.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|