Files
dsrc/sku.0/sys.server/compiled/game/script/conversation/c_kashyyyk_hunter.script
T
2013-09-10 23:17:15 -07:00

2182 lines
59 KiB
Plaintext

// ======================================================================
//
// c_kashyyyk_hunter.script
// Copyright 2004, Sony Online Entertainment
// All Rights Reserved.
//
// Created with SwgConversationEditor 1.35 - DO NOT EDIT THIS AUTO-GENERATED FILE!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.utils;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/c_kashyyyk_hunter";
// ======================================================================
// Script Conditions
// ======================================================================
boolean c_kashyyyk_hunter_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ======================================================================
// Script Actions
// ======================================================================
void c_kashyyyk_hunter_action_facePlayer (obj_id player, obj_id npc)
{
faceTo(npc, player);
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// handleBranch<n> Functions
// ======================================================================
int c_kashyyyk_hunter_handleBranch1 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Hello there.
//-- [RESPONSE NOTE]
//-- PLAYER: What are all these things?
if (response == "s_6")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "pose_proudly");
//-- NPC: These are my trophies of course.
string_id message = new string_id (c_stringFile, "s_8");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Trophies? They look like animal heads to me.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Trophies for what?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Those are your trophies?
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_10");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_51");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 2);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Animal heads?
if (response == "s_35")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "pose_proudly");
//-- NPC: Not just animal heads. They are tokens of courage, strength and skill. Trophies!
string_id message = new string_id (c_stringFile, "s_37");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Trophies for what?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Trophies? They look like animal heads to me.
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Those are your trophies?
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_39");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_72");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 8);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: What bizarre looking creatures you have there.
if (response == "s_74")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "waft");
//-- NPC: Bizarre, but beautiful trophies heh?
string_id message = new string_id (c_stringFile, "s_76");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Those are your trophies?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Trophies? They look like animal heads to me.
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Trophies for what?
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_78");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_102");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 14);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch2 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: These are my trophies of course.
//-- [RESPONSE NOTE]
//-- PLAYER: Trophies? They look like animal heads to me.
if (response == "s_10")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod_head_multiple");
//-- NPC: Yes trophies. I collect many rare creature relics. Some of which I mount to display as trophies.
string_id message = new string_id (c_stringFile, "s_12");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Where do you find such amazing creatures?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I haven't seen any animals like those around here?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_14");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Trophies for what?
if (response == "s_50")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_to_self");
//-- NPC: I am a great hunter and have killed hundreds of grand beasts for sport and loot. Some of them you see mounted here.
string_id message = new string_id (c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I haven't seen any animals like those around here!
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Where do you find such amazing creatures?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_43");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_68");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Those are your trophies?
if (response == "s_51")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "pose_proudly");
//-- NPC: Yes. I collect them on my safaris. Only a great hunter like me can acquire so many.
string_id message = new string_id (c_stringFile, "s_80");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Safaris? Where can you go on safari?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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_82");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch3 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes trophies. I collect many rare creature relics. Some of which I mount to display as trophies.
//-- [RESPONSE NOTE]
//-- PLAYER: Where do you find such amazing creatures?
if (response == "s_14")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "waft");
//-- NPC: These are all from Kashyyyk! I have just come from safari there. Oh and it was great hunt too.
string_id message = new string_id (c_stringFile, "s_16");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Oh yeah? What made it so great?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Really? Tell me all about it.
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: How so?
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_18");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_59");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: I haven't seen any animals like those around here?
if (response == "s_56")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "waft");
//-- NPC: These are all from Kashyyyk! I have just come from safari there. Oh and it was great hunt too.
string_id message = new string_id (c_stringFile, "s_45");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Really? Tell me all about it.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Oh yeah. What made it so great?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: How so?
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_47");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_64");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch4 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: These are all from Kashyyyk! I have just come from safari there. Oh and it was great hunt too.
//-- [RESPONSE NOTE]
//-- PLAYER: Oh yeah? What made it so great?
if (response == "s_18")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_right");
//-- NPC: The thrill of the hunt! These animals aren't easy to kill. That one over there ate three hunters in my safari party before I was able to take him down.
string_id message = new string_id (c_stringFile, "s_20");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds dangerous. Perhaps it would be safer to just buy a trophy.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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_22");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Really? Tell me all about it.
if (response == "s_59")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_right");
//-- NPC: That one wiped out an entire camp before I was able to take him down. And that one there almost ate me for breakfast, but I got the better of him.
string_id message = new string_id (c_stringFile, "s_49");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Well I'm glad you got away. Now you can sell those heads and get rich.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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.c_kashyyyk_hunter.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How so?
if (response == "s_60")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_right");
//-- NPC: Well these beasts were tough. That one there almost ate me for breakfast, but I got the better of him in the end.
string_id message = new string_id (c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Wow! Can I buy one from you?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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.c_kashyyyk_hunter.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch5 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: The thrill of the hunt! These animals aren't easy to kill. That one over there ate three hunters in my safari party before I was able to take him down.
//-- [RESPONSE NOTE]
//-- PLAYER: Sounds dangerous. Perhaps it would be safer to just buy a trophy.
if (response == "s_22")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "slow_down");
//-- NPC: Oh no...You have to earn them like I did. These are not for sale. I display them so others will know what a great hunter I am.
string_id message = new string_id (c_stringFile, "s_24");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Well good luck on your next safari.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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_26");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 6);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch6 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Oh no...You have to earn them like I did. These are not for sale. I display them so others will know what a great hunter I am.
//-- [RESPONSE NOTE]
//-- PLAYER: Well good luck on your next safari.
if (response == "s_26")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "goodbye");
//-- NPC: Thank you and farewell to you too.
string_id message = new string_id (c_stringFile, "s_28");
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch8 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Not just animal heads. They are tokens of courage, strength and skill. Trophies!
//-- [RESPONSE NOTE]
//-- PLAYER: Trophies for what?
if (response == "s_39")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_to_self");
//-- NPC: I am a great hunter and have killed hundreds of grand beasts for sport and loot. Some of them you see mounted here.
string_id message = new string_id (c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I haven't seen any animals like those around here!
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Where do you find such amazing creatures?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_43");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_68");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Trophies? They look like animal heads to me.
if (response == "s_70")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod_head_multiple");
//-- NPC: Yes trophies. I collect many rare creature relics. Some of which I mount to display as trophies.
string_id message = new string_id (c_stringFile, "s_12");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Where do you find such amazing creatures?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I haven't seen any animals like those around here?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_14");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Those are your trophies?
if (response == "s_72")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "pose_proudly");
//-- NPC: Yes. I collect them on my safaris. Only a great hunter like me can acquire so many.
string_id message = new string_id (c_stringFile, "s_80");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Safaris? Where can you go on safari?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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_82");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch9 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: I am a great hunter and have killed hundreds of grand beasts for sport and loot. Some of them you see mounted here.
//-- [RESPONSE NOTE]
//-- PLAYER: I haven't seen any animals like those around here!
if (response == "s_43")
{
doAnimationAction (player, "point_away");
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "waft");
//-- NPC: These are all from Kashyyyk! I have just come from safari there. Oh and it was great hunt too.
string_id message = new string_id (c_stringFile, "s_45");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Really? Tell me all about it.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Oh yeah. What made it so great?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: How so?
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_47");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_64");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 10);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Where do you find such amazing creatures?
if (response == "s_68")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "waft");
//-- NPC: These are all from Kashyyyk! I have just come from safari there. Oh and it was great hunt too.
string_id message = new string_id (c_stringFile, "s_16");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Oh yeah? What made it so great?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Really? Tell me all about it.
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: How so?
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_18");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_59");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 4);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch10 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: These are all from Kashyyyk! I have just come from safari there. Oh and it was great hunt too.
//-- [RESPONSE NOTE]
//-- PLAYER: Really? Tell me all about it.
if (response == "s_47")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_right");
//-- NPC: That one wiped out an entire camp before I was able to take him down. And that one there almost ate me for breakfast, but I got the better of him.
string_id message = new string_id (c_stringFile, "s_49");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Well I'm glad you got away. Now you can sell those heads and get rich.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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.c_kashyyyk_hunter.branchId", 11);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Oh yeah. What made it so great?
if (response == "s_64")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_right");
//-- NPC: The thrill of the hunt! These animals aren't easy to kill. That one over there ate three hunters in my safari party before I was able to take him down.
string_id message = new string_id (c_stringFile, "s_20");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds dangerous. Perhaps it would be safer to just buy a trophy.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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_22");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: How so?
if (response == "s_66")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_right");
//-- NPC: Well these beasts were tough. That one there almost ate me for breakfast, but I got the better of him in the end.
string_id message = new string_id (c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Wow! Can I buy one from you?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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.c_kashyyyk_hunter.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch11 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: That one wiped out an entire camp before I was able to take him down. And that one there almost ate me for breakfast, but I got the better of him.
//-- [RESPONSE NOTE]
//-- PLAYER: Well I'm glad you got away. Now you can sell those heads and get rich.
if (response == "s_53")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "slow_down");
//-- NPC: Oh no...You have to earn them like I did. These are not for sale. I display them so others will know what a great hunter I am.
string_id message = new string_id (c_stringFile, "s_55");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Well, happy hunting.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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.c_kashyyyk_hunter.branchId", 12);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch12 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Oh no...You have to earn them like I did. These are not for sale. I display them so others will know what a great hunter I am.
//-- [RESPONSE NOTE]
//-- PLAYER: Well, happy hunting.
if (response == "s_58")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "goodbye");
//-- NPC: Same to you. Farewell.
string_id message = new string_id (c_stringFile, "s_62");
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch14 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Bizarre, but beautiful trophies heh?
//-- [RESPONSE NOTE]
//-- PLAYER: Those are your trophies?
if (response == "s_78")
{
doAnimationAction (player, "point_away");
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "pose_proudly");
//-- NPC: Yes. I collect them on my safaris. Only a great hunter like me can acquire so many.
string_id message = new string_id (c_stringFile, "s_80");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Safaris? Where can you go on safari?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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_82");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 15);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Trophies? They look like animal heads to me.
if (response == "s_102")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "nod_head_multiple");
//-- NPC: Yes trophies. I collect many rare creature relics. Some of which I mount to display as trophies.
string_id message = new string_id (c_stringFile, "s_12");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Where do you find such amazing creatures?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: I haven't seen any animals like those around here?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_14");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 3);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Trophies for what?
if (response == "s_104")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_to_self");
//-- NPC: I am a great hunter and have killed hundreds of grand beasts for sport and loot. Some of them you see mounted here.
string_id message = new string_id (c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I haven't seen any animals like those around here!
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Where do you find such amazing creatures?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_43");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_68");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch15 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Yes. I collect them on my safaris. Only a great hunter like me can acquire so many.
//-- [RESPONSE NOTE]
//-- PLAYER: Safaris? Where can you go on safari?
if (response == "s_82")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "dream");
//-- NPC: These all came from my safari on Kashyyyk. Ah... that was a great hunt.
string_id message = new string_id (c_stringFile, "s_84");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: How so?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Oh yeah. What made it so great?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: Really? Tell me all about it.
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_86");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_98");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 16);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch16 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: These all came from my safari on Kashyyyk. Ah... that was a great hunt.
//-- [RESPONSE NOTE]
//-- PLAYER: How so?
if (response == "s_86")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_right");
//-- NPC: Well these beasts were tough. That one there almost ate me for breakfast, but I got the better of him in the end.
string_id message = new string_id (c_stringFile, "s_88");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Wow! Can I buy one from you?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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.c_kashyyyk_hunter.branchId", 17);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Oh yeah. What made it so great?
if (response == "s_98")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_right");
//-- NPC: The thrill of the hunt! These animals aren't easy to kill. That one over there ate three hunters in my safari party before I was able to take him down.
string_id message = new string_id (c_stringFile, "s_20");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Sounds dangerous. Perhaps it would be safer to just buy a trophy.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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_22");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 5);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
//-- [RESPONSE NOTE]
//-- PLAYER: Really? Tell me all about it.
if (response == "s_100")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "point_to_self");
//-- NPC: I am a great hunter and have killed hundreds of grand beasts for sport and loot. Some of them you see mounted here.
string_id message = new string_id (c_stringFile, "s_41");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: I haven't seen any animals like those around here!
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Where do you find such amazing creatures?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_43");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_68");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 9);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch17 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Well these beasts were tough. That one there almost ate me for breakfast, but I got the better of him in the end.
//-- [RESPONSE NOTE]
//-- PLAYER: Wow! Can I buy one from you?
if (response == "s_90")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "slow_down");
//-- NPC: Oh no...You have to earn them like I did. These are not for sale. I display them so others will know what a great hunter I am and solicit my services.
string_id message = new string_id (c_stringFile, "s_92");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: Well that was quite a tale. Thanks for sharing. Farewell.
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_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_94");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 18);
npcSpeak (player, message);
npcSetConversationResponses (player, responses);
}
else
{
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
}
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
int c_kashyyyk_hunter_handleBranch18 (obj_id player, obj_id npc, string_id response)
{
//-- [BRANCH NOTE]
//-- NPC: Oh no...You have to earn them like I did. These are not for sale. I display them so others will know what a great hunter I am and solicit my services.
//-- [RESPONSE NOTE]
//-- PLAYER: Well that was quite a tale. Thanks for sharing. Farewell.
if (response == "s_94")
{
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "goodbye");
//-- NPC: Farewell to you too.
string_id message = new string_id (c_stringFile, "s_96");
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
npcEndConversationWithMessage (player, message);
return SCRIPT_CONTINUE;
}
}
return SCRIPT_DEFAULT;
}
// ----------------------------------------------------------------------
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "conversation.c_kashyyyk_hunter");
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable (self, true);
setName (self, "Hunter Javeezo");
return SCRIPT_CONTINUE;
}
trigger OnAttach ()
{
setCondition (self, CONDITION_CONVERSABLE);
setInvulnerable (self, true);
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
setName (self, "Hunter Javeezo");
return SCRIPT_CONTINUE;
}
trigger OnObjectMenuRequest (obj_id player, menu_info menuInfo)
{
int menu = menuInfo.addRootMenu (menu_info_types.CONVERSE_START, null);
menu_info_data menuInfoData = menuInfo.getMenuItemById (menu);
menuInfoData.setServerNotify (false);
setCondition (self, CONDITION_CONVERSABLE);
return SCRIPT_CONTINUE;
}
trigger OnIncapacitated (obj_id killer)
{
clearCondition (self, CONDITION_CONVERSABLE);
detachScript (self, "conversation.c_kashyyyk_hunter");
return SCRIPT_CONTINUE;
}
// ======================================================================
// Script Triggers
// ======================================================================
//-- This function should move to base_class.java
boolean npcStartConversation(obj_id player, obj_id npc, string convoName, string_id greetingId, prose_package greetingProse, string_id[] responses)
{
Object[] objects = new Object[responses.length];
System.arraycopy(responses, 0, objects, 0, responses.length);
return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects);
}
// ----------------------------------------------------------------------
trigger OnStartNpcConversation (obj_id player)
{
obj_id npc = self;
if (ai_lib.isInCombat (npc) || ai_lib.isInCombat (player))
return SCRIPT_OVERRIDE;
//-- [NOTE]
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
doAnimationAction (npc, "greet");
c_kashyyyk_hunter_action_facePlayer (player, npc);
//-- NPC: Hello there.
string_id message = new string_id (c_stringFile, "s_4");
int numberOfResponses = 0;
boolean hasResponse = false;
//-- PLAYER: What are all these things?
boolean hasResponse0 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse0 = true;
}
//-- PLAYER: Animal heads?
boolean hasResponse1 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse1 = true;
}
//-- PLAYER: What bizarre looking creatures you have there.
boolean hasResponse2 = false;
if (c_kashyyyk_hunter_condition__defaultCondition (player, npc))
{
++numberOfResponses;
hasResponse = true;
hasResponse2 = true;
}
if (hasResponse)
{
int responseIndex = 0;
string_id responses [] = new string_id [numberOfResponses];
if (hasResponse0)
responses [responseIndex++] = new string_id (c_stringFile, "s_6");
if (hasResponse1)
responses [responseIndex++] = new string_id (c_stringFile, "s_35");
if (hasResponse2)
responses [responseIndex++] = new string_id (c_stringFile, "s_74");
utils.setScriptVar (player, "conversation.c_kashyyyk_hunter.branchId", 1);
npcStartConversation (player, npc, "c_kashyyyk_hunter", message, responses);
}
else
{
chat.chat (npc, player, message);
}
return SCRIPT_CONTINUE;
}
chat.chat (npc, "Error: All conditions for OnStartNpcConversation were false.");
return SCRIPT_CONTINUE;
}
// ----------------------------------------------------------------------
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
{
if (conversationId != "c_kashyyyk_hunter")
return SCRIPT_CONTINUE;
obj_id npc = self;
int branchId = utils.getIntScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
if (branchId == 1 && c_kashyyyk_hunter_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 2 && c_kashyyyk_hunter_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 3 && c_kashyyyk_hunter_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 4 && c_kashyyyk_hunter_handleBranch4 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 5 && c_kashyyyk_hunter_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 6 && c_kashyyyk_hunter_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 8 && c_kashyyyk_hunter_handleBranch8 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 9 && c_kashyyyk_hunter_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 10 && c_kashyyyk_hunter_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 11 && c_kashyyyk_hunter_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 12 && c_kashyyyk_hunter_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 14 && c_kashyyyk_hunter_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 15 && c_kashyyyk_hunter_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 16 && c_kashyyyk_hunter_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 17 && c_kashyyyk_hunter_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
if (branchId == 18 && c_kashyyyk_hunter_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
return SCRIPT_CONTINUE;
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
utils.removeScriptVar (player, "conversation.c_kashyyyk_hunter.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================