Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/npe_spy.script
T

1462 lines
42 KiB
Plaintext

// ======================================================================
//
// npe_spy.script
//
//
//
// 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.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/npe_spy";
// ======================================================================
// Script Conditions
// ======================================================================
boolean npe_spy_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean npe_spy_condition_reward1 (obj_id player, obj_id npc)
{
return (groundquests.isTaskActive(player, "npe_spy_try", "spy"));
}
// ----------------------------------------------------------------------
boolean npe_spy_condition_onQuest2 (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "npe_spy_try_2");
}
// ----------------------------------------------------------------------
boolean npe_spy_condition_rewardQuest2 (obj_id player, obj_id npc)
{
if (groundquests.isTaskActive(player, "npe_spy_try_2", "spy2_1")||
groundquests.isTaskActive(player, "npe_spy_try_2", "spy2_2"))
return true;
else
return false;
}
// ----------------------------------------------------------------------
boolean npe_spy_condition_wantsSY (obj_id player, obj_id npc)
{
return npe_spy_condition_isSYTemplate(player, npc);
}
// ----------------------------------------------------------------------
boolean npe_spy_condition_completedQuest2 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "npe_spy_try_2"));
}
// ----------------------------------------------------------------------
boolean npe_spy_condition_busy (obj_id player, obj_id npc)
{
return ( groundquests.isQuestActive(player, "npe_new_artisan_quest")||
groundquests.isQuestActive(player, "npe_brawler_1hand")||
groundquests.isQuestActive(player, "npe_brawler_2hand")||
groundquests.isQuestActive(player, "npe_brawler_polearm")||
groundquests.isQuestActive(player, "npe_brawler_unarmed")||
groundquests.isQuestActive(player, "npe_scout_1")||
groundquests.isQuestActive(player, "npe_entertainer_1")||
groundquests.isQuestActive(player, "npe_marksman_carbine")||
groundquests.isQuestActive(player, "npe_marksman_pistol")||
groundquests.isQuestActive(player, "npe_marksman_rifle")||
groundquests.isQuestActive(player, "npe_medic")||
space_quest.hasQuest( player, "patrol", "npe_training_1" )||
space_quest.hasQuest( player, "patrol", "npe_training_2" )||
space_quest.hasQuest( player, "escort", "npe_training_3" ));
}
// ----------------------------------------------------------------------
boolean npe_spy_condition_isActiveSYQuest (obj_id player, obj_id npc)
{
return groundquests.isQuestActive(player, "npe_spy_try");
}
// ----------------------------------------------------------------------
boolean npe_spy_condition_completedQuest1 (obj_id player, obj_id npc)
{
return (groundquests.hasCompletedQuest(player, "npe_spy_try"));
}
// ----------------------------------------------------------------------
boolean npe_spy_condition_isSYTemplate (obj_id player, obj_id npc)
{
string pTemplate = getSkillTemplate(player);
if(pTemplate.indexOf("spy") > -1 )
return true;
else
return false;
}
// ======================================================================
// Script Actions
// ======================================================================
void npe_spy_action_giveSpyQuest (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "npe_spy_try");
if(!hasObjVar(player, npe.QUEST_REWORK_VAR))
setObjVar(player, npe.QUEST_REWORK_VAR, npe.QUEST_ENUMERATION);
}
// ----------------------------------------------------------------------
void npe_spy_action_grantQuest2 (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "npe_spy_try_2");
}
// ----------------------------------------------------------------------
void npe_spy_action_giveReward2 (obj_id player, obj_id npc)
{
groundquests.completeQuest(player, "npe_spy_try_2");
}
// ----------------------------------------------------------------------
void npe_spy_action_grantJobPointer (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "npe_job_pointer_han");
setObjVar(player, "npe.finishedTemplate", 1);
}
// ----------------------------------------------------------------------
void npe_spy_action_giveLostSignal (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "clearQuest");
faceTo(npc, player);
}
// ----------------------------------------------------------------------
void npe_spy_action_grantCommQuest (obj_id player, obj_id npc)
{
groundquests.requestGrantQuest(player, "npe_spy_comm");
}
// ----------------------------------------------------------------------
void npe_spy_action_giveFoundSpy (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "found_spy");
faceTo(npc, player);
}
// ----------------------------------------------------------------------
void npe_spy_action_giveAssistantPointer (obj_id player, obj_id npc)
{
groundquests.grantQuest(player, "npe_pointer_secretary");
}
// ----------------------------------------------------------------------
void npe_spy_action_faceToNoob (obj_id player, obj_id npc)
{
faceTo(npc, player);
}
// ----------------------------------------------------------------------
void npe_spy_action_giveReward1 (obj_id player, obj_id npc)
{
groundquests.sendSignal(player, "reward1");
groundquests.grantQuest(player, "npe_pointer_spy_template");
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int npe_spy_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I've done nothing wrong!
//-- [RESPONSE NOTE]
//-- PLAYER: Calm down, I was just saying hello.
if (response == "s_80")
{
doAnimationAction (player, "slow_down");
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
//-- NPC: Oh okay, hello there.
string_id message = new string_id (c_stringFile, "s_89");
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_spy_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Fantastic work %TU! With these files, I should be able to get the management on both stations to come to a peaceful solution and make some sweet credits at the same time.
//-- [RESPONSE NOTE]
//-- PLAYER: I'm glad I could be of assistance Lercer.
if (response == "s_49")
{
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
//-- NPC: You have been, I couldn't possibly have done this myself. I've prepared a small token of my appreciation for you %TU.
string_id message = new string_id (c_stringFile, "s_50");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Most kind.
boolean hasResponse0 = false;
if (npe_spy_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_58");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 6);
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_spy.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_spy_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: You have been, I couldn't possibly have done this myself. I've prepared a small token of my appreciation for you %TU.
//-- [RESPONSE NOTE]
//-- PLAYER: Most kind.
if (response == "s_58")
{
npe_spy_action_giveReward2 (player, npc);
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "dismiss");
npe_spy_action_grantJobPointer (player, npc);
//-- NPC: Think nothing of it. I'm afraid this concludes our business together but if you want something else to do, I'm sure Solo could use your help getting himself out of trouble. That guy, I swear... anyway, it's been a pleasure %TU, take care of yourself out there!
string_id message = new string_id (c_stringFile, "s_60");
utils.removeScriptVar (player, "conversation.npe_spy.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_spy_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Welcome back %TU. I see that you have picked up 'Eliminate'. Good, the extra damage of that skill will be useful in this next step of our plan.
//-- [RESPONSE NOTE]
//-- PLAYER: I sense that I will have to get rough?
if (response == "s_32")
{
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
//-- NPC: I'm afraid so. Although a frontal assault is never preferred in our line of work, sometimes it's unavoidable. In order for our information to be worth as much as possible, we need to find out what the situation is on Station Gamma as well.
string_id message = new string_id (c_stringFile, "s_33");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Who's on the arms dealer's payroll over there, you mean?
boolean hasResponse0 = false;
if (npe_spy_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_34");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_spy_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I'm afraid so. Although a frontal assault is never preferred in our line of work, sometimes it's unavoidable. In order for our information to be worth as much as possible, we need to find out what the situation is on Station Gamma as well.
//-- [RESPONSE NOTE]
//-- PLAYER: Who's on the arms dealer's payroll over there, you mean?
if (response == "s_34")
{
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
//-- NPC: Exactly. Now we don't want to escalate the conflict even further, so we'll leave the Rak'qua, the inhabitants of Gamma, alone for now. There's plenty of droids in the station though, and I'm willing to bet that their primitive databanks have come across a clue or two while patrolling the station.
string_id message = new string_id (c_stringFile, "s_35");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: That could very well be true.
boolean hasResponse0 = false;
if (npe_spy_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_36");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_spy_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Exactly. Now we don't want to escalate the conflict even further, so we'll leave the Rak'qua, the inhabitants of Gamma, alone for now. There's plenty of droids in the station though, and I'm willing to bet that their primitive databanks have come across a clue or two while patrolling the station.
//-- [RESPONSE NOTE]
//-- PLAYER: That could very well be true.
if (response == "s_36")
{
doAnimationAction (player, "nod");
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
//-- NPC: I was hoping you would agree, %TU. My idea is to go down there, dismantle some droids, any of them will do, and scan their databanks for any information pertaining to our little project.
string_id message = new string_id (c_stringFile, "s_38");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Not bad, Lercer, not bad at all.
boolean hasResponse0 = false;
if (npe_spy_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_spy.branchId", 12);
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_spy.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_spy_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I was hoping you would agree, %TU. My idea is to go down there, dismantle some droids, any of them will do, and scan their databanks for any information pertaining to our little project.
//-- [RESPONSE NOTE]
//-- PLAYER: Not bad, Lercer, not bad at all.
if (response == "s_40")
{
npe_spy_action_giveFoundSpy (player, npc);
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "refuse_offer_affection");
npe_spy_action_grantQuest2 (player, npc);
//-- NPC: You flatter me, %TU. But to get to Station Gamma, you'll need to take the Gamma Shuttle. Look for it in Hangarbay 1.
string_id message = new string_id (c_stringFile, "s_43");
utils.removeScriptVar (player, "conversation.npe_spy.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_spy_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I knew this would be a walk in the park for you %TU. Let me have a look at those files and see what we got here.
//-- [RESPONSE NOTE]
//-- PLAYER: Anything?
if (response == "s_51")
{
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod");
//-- NPC: Yes, very interesting indeed. It seems that a local arms dealer is behind it. He's bribed people on both sides in an attempt to start a conflict, open war even. Not too surprised, some arms dealers do anything to get their merchandise sold.
string_id message = new string_id (c_stringFile, "s_52");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: So what now?
boolean hasResponse0 = false;
if (npe_spy_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_53");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_spy_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes, very interesting indeed. It seems that a local arms dealer is behind it. He's bribed people on both sides in an attempt to start a conflict, open war even. Not too surprised, some arms dealers do anything to get their merchandise sold.
//-- [RESPONSE NOTE]
//-- PLAYER: So what now?
if (response == "s_53")
{
doAnimationAction (player, "shrug_hands");
npe_spy_action_giveReward1 (player, npc);
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
//-- NPC: This information could prove to be a goldmine, just have to figure out who to sell it to. Come back later and I might have something else I need help with.
string_id message = new string_id (c_stringFile, "s_54");
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_spy_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Is there a problem %TU?
//-- [RESPONSE NOTE]
//-- PLAYER: No, just letting you know that I'm about to start.
if (response == "s_129")
{
doAnimationAction (player, "shake_head_no");
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "thumb_up");
//-- NPC: Excellent, good luck!
string_id message = new string_id (c_stringFile, "s_130");
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_spy_handleBranch19 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: %TU, when I heard you were here, I was hoping you would come by. I could use your hand with something if you have the time.
//-- [RESPONSE NOTE]
//-- PLAYER: I can probably squeeze it in, what do you need?
if (response == "s_41")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
//-- NPC: Let me give you some background. In the Ord Mantell system there's two space stations, this one, the Tansarii Point station and another called Gamma. They have always been getting along fairly well but lately there's been a lot of hostility between the two.
string_id message = new string_id (c_stringFile, "s_48");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: About what?
boolean hasResponse0 = false;
if (npe_spy_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_spy.branchId", 20);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_spy_handleBranch20 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Let me give you some background. In the Ord Mantell system there's two space stations, this one, the Tansarii Point station and another called Gamma. They have always been getting along fairly well but lately there's been a lot of hostility between the two.
//-- [RESPONSE NOTE]
//-- PLAYER: About what?
if (response == "s_83")
{
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
//-- NPC: That's the strange thing, no one seems to be really sure what it's all about. They just keep blaming each other for stuff. I think that there's someone behind the scenes planting all this hostility.
string_id message = new string_id (c_stringFile, "s_84");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Interesting. How would we find out?
boolean hasResponse0 = false;
if (npe_spy_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_86");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 21);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_spy_handleBranch21 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: That's the strange thing, no one seems to be really sure what it's all about. They just keep blaming each other for stuff. I think that there's someone behind the scenes planting all this hostility.
//-- [RESPONSE NOTE]
//-- PLAYER: Interesting. How would we find out?
if (response == "s_86")
{
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
//-- NPC: I'm hoping I could find something in the high security data files on the Tansarii computer network but so far they have been too hard for me to decrypt. That's where you come in, I'm guessing you will be able to do it.
string_id message = new string_id (c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Maybe so but I would need some tools.
boolean hasResponse0 = false;
if (npe_spy_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_90");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 22);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_spy_handleBranch22 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I'm hoping I could find something in the high security data files on the Tansarii computer network but so far they have been too hard for me to decrypt. That's where you come in, I'm guessing you will be able to do it.
//-- [RESPONSE NOTE]
//-- PLAYER: Maybe so but I would need some tools.
if (response == "s_90")
{
doAnimationAction (player, "rub_chin_thoughtful");
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
//-- NPC: Yes, I've been trying to make a data splice and been successful but with my limited skills, it hasn't been enough to do the job. I was trying to build a better one but broke my factory and don't have a new power core for it yet. You should be able to steal a power core from the generator in the lower level though, if you're up for it.
string_id message = new string_id (c_stringFile, "s_92");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds easy enough.
boolean hasResponse0 = false;
if (npe_spy_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_71");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 23);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int npe_spy_handleBranch23 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes, I've been trying to make a data splice and been successful but with my limited skills, it hasn't been enough to do the job. I was trying to build a better one but broke my factory and don't have a new power core for it yet. You should be able to steal a power core from the generator in the lower level though, if you're up for it.
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds easy enough.
if (response == "s_71")
{
doAnimationAction (player, "shrug_shoulders");
//-- [NOTE]
if (npe_spy_condition__defaultCondition (player, npc))
{
npe_spy_action_giveSpyQuest (player, npc);
//-- NPC: Excellent! Steal the core, repair my factory, make yourself a data splice and then hack the computer terminal. Just another day for you eh? Let me provide you with the coordinates to the generator in the lower level.
string_id message = new string_id (c_stringFile, "s_73");
utils.removeScriptVar (player, "conversation.npe_spy.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.npe_spy");
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable (self, true);
setName (self, "Lercer Gaia (Spy)");
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
//setCondition (self, CONDITION_INTERESTING);
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable (self, true);
setName (self, "Lercer Gaia (Spy)");
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
//setCondition (self, CONDITION_INTERESTING);
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);
faceTo(self, player);
return SCRIPT_CONTINUE;
}
trigger OnIncapacitated (obj_id killer)
{
clearCondition (self, CONDITION_CONVERSABLE);
detachScript (self, "conversation.npe_spy");
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_spy_condition_isSYTemplate (player, npc))
{
doAnimationAction (npc, "taken_aback");
npe_spy_action_faceToNoob (player, npc);
//-- NPC: I've done nothing wrong!
string_id message = new string_id (c_stringFile, "s_69");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Calm down, I was just saying hello.
boolean hasResponse0 = false;
if (npe_spy_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_spy.branchId", 1);
npcStartConversation (player, npc, "npe_spy", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_spy_condition_busy (player, npc))
{
npe_spy_action_faceToNoob (player, npc);
//-- NPC: You should finish up some of your tasks and then come see me.
string_id message = new string_id (c_stringFile, "s_42");
chat.chat (npc, player, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (npe_spy_condition_completedQuest2 (player, npc))
{
doAnimationAction (npc, "greet");
doAnimationAction (player, "greet");
//-- NPC: Good to see you again %TU, I trust you are doing well. I'm a bit busy right now or I would have a drink with you but next time, right?
string_id message = new string_id (c_stringFile, "s_65");
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_spy_condition_rewardQuest2 (player, npc))
{
doAnimationAction (npc, "greet");
doAnimationAction (player, "greet");
//-- NPC: Fantastic work %TU! With these files, I should be able to get the management on both stations to come to a peaceful solution and make some sweet credits at the same time.
string_id message = new string_id (c_stringFile, "s_45");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I'm glad I could be of assistance Lercer.
boolean hasResponse0 = false;
if (npe_spy_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_49");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 5);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "npe_spy", 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_spy_condition_onQuest2 (player, npc))
{
doAnimationAction (npc, "greet");
doAnimationAction (player, "greet");
//-- NPC: You still have some tasks to finish before it's time for us to talk %TU. Refer to your Journal.
string_id message = new string_id (c_stringFile, "s_46");
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_spy_condition_completedQuest1 (player, npc))
{
doAnimationAction (npc, "greet");
doAnimationAction (player, "greet");
//-- NPC: Welcome back %TU. I see that you have picked up 'Eliminate'. Good, the extra damage of that skill will be useful in this next step of our plan.
string_id message = new string_id (c_stringFile, "s_91");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I sense that I will have to get rough?
boolean hasResponse0 = false;
if (npe_spy_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_32");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 9);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "npe_spy", 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_spy_condition_reward1 (player, npc))
{
doAnimationAction (npc, "thumb_up");
npe_spy_action_faceToNoob (player, npc);
//-- NPC: I knew this would be a walk in the park for you %TU. Let me have a look at those files and see what we got here.
string_id message = new string_id (c_stringFile, "s_44");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Anything?
boolean hasResponse0 = false;
if (npe_spy_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_51");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 14);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "npe_spy", 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_spy_condition_isActiveSYQuest (player, npc))
{
npe_spy_action_faceToNoob (player, npc);
//-- NPC: Is there a problem %TU?
string_id message = new string_id (c_stringFile, "s_128");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: No, just letting you know that I'm about to start.
boolean hasResponse0 = false;
if (npe_spy_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_129");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 17);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "npe_spy", 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_spy_condition_wantsSY (player, npc))
{
doAnimationAction (npc, "whisper");
npe_spy_action_giveFoundSpy (player, npc);
//-- NPC: %TU, when I heard you were here, I was hoping you would come by. I could use your hand with something if you have the time.
string_id message = new string_id (c_stringFile, "s_37");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I can probably squeeze it in, what do you need?
boolean hasResponse0 = false;
if (npe_spy_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_41");
utils.setScriptVar (player, "conversation.npe_spy.branchId", 19);
prose_package pp = new prose_package ();
pp.stringId = message;
pp.actor.set (player);
pp.target.set (npc);
npcStartConversation (player, npc, "npe_spy", 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_spy_condition__defaultCondition (player, npc))
{
npe_spy_action_faceToNoob (player, npc);
//-- NPC: I wish I could share a drink but I've got things to do and places to be.
string_id message = new string_id (c_stringFile, "s_78");
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_spy")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.npe_spy.branchId");
if (branchId == 1 && npe_spy_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && npe_spy_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && npe_spy_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && npe_spy_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && npe_spy_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && npe_spy_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && npe_spy_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && npe_spy_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && npe_spy_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && npe_spy_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 19 && npe_spy_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 20 && npe_spy_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 21 && npe_spy_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 22 && npe_spy_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 23 && npe_spy_handleBranch23 (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_spy.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================