mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
704 lines
21 KiB
Plaintext
704 lines
21 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// pvp_station_imperial.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.25 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.space_battlefield;
|
|
include library.space_quest;
|
|
include library.space_transition;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/pvp_station_imperial";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean pvp_station_imperial_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean pvp_station_imperial_condition_isPlayerRebel (obj_id player, obj_id npc)
|
|
{
|
|
return ( space_battlefield.isInRebelShip(player) || pvpGetAlignedFaction( player ) == ##"rebel" );
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean pvp_station_imperial_condition_isPlayerImperial (obj_id player, obj_id npc)
|
|
{
|
|
return space_battlefield.isInImperialShip(player);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean pvp_station_imperial_condition_isImperialFactionWithMission (obj_id player, obj_id npc)
|
|
{
|
|
if (space_battlefield.isInNeutralShip(player))
|
|
return ( ( pvpGetAlignedFaction( player ) == ##"imperial" ) && space_quest.hasQuest(player ) );
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean pvp_station_imperial_condition_isInYacht (obj_id player, obj_id npc)
|
|
{
|
|
obj_id ship = space_transition.getContainingShip(player);
|
|
if (isIdValid( ship) )
|
|
{
|
|
string template = getTemplateName(ship);
|
|
if ( template != null && template.endsWith("_yacht.iff") )
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean pvp_station_imperial_condition_isPlayerNeutral (obj_id player, obj_id npc)
|
|
{
|
|
if(space_battlefield.isInNeutralShip(player))
|
|
{
|
|
if ( pvpGetAlignedFaction( player ) == ##"imperial" )
|
|
return false;
|
|
else
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean pvp_station_imperial_condition_isTooFar (obj_id player, obj_id npc)
|
|
{
|
|
obj_id containingShip = space_transition.getContainingShip(player);
|
|
return ( getDistance( npc, containingShip ) > space_transition.STATION_COMM_MAX_DISTANCE );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void pvp_station_imperial_action_setPlayerToOvertStatus (obj_id player, obj_id npc)
|
|
{
|
|
space_transition.setPlayerOvert( player, ##"imperial" );
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
int pvp_station_imperial_tokenDI_prestigeCost (obj_id player, obj_id npc)
|
|
{
|
|
return space_battlefield.getPrestigeCostForTransition(player, npc);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int pvp_station_imperial_handleBranch6 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to the Imperial Space Station, %TU. Would you like to declare your affiliation with the Empire?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes
|
|
if (response == "s_370822d1")
|
|
{
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
pvp_station_imperial_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Imperial affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Imperial Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_7b492de4");
|
|
removeObjVar (player, "conversation.pvp_station_imperial.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No
|
|
if (response == "s_457a7010")
|
|
{
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In that case, please move away from the station. Clear the area for official traffic.
|
|
string_id message = new string_id (c_stringFile, "s_1e8d6243");
|
|
removeObjVar (player, "conversation.pvp_station_imperial.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What does that mean?
|
|
if (response == "s_dd67013")
|
|
{
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Although you are an Imperial Pilot by profession, you have not Declared your factional affiliation. Many Rebel ships [players] will hold-fire in the event you are not really affiliated with the Empire. You may declare your affiliation with the Empire to make it clear that you are willing to respond to their attacks.
|
|
string_id message = new string_id (c_stringFile, "s_25329880");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How long does this last?
|
|
boolean hasResponse0 = false;
|
|
if (pvp_station_imperial_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_626fe576");
|
|
|
|
setObjVar (player, "conversation.pvp_station_imperial.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.pvp_station_imperial.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int pvp_station_imperial_handleBranch9 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Although you are an Imperial Pilot by profession, you have not Declared your factional affiliation. Many Rebel ships [players] will hold-fire in the event you are not really affiliated with the Empire. You may declare your affiliation with the Empire to make it clear that you are willing to respond to their attacks.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How long does this last?
|
|
if (response == "s_626fe576")
|
|
{
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You will be Declared Imperial until you land your ship. The next time you launch, if you want to be a Declared Imperial again, you must speak to an Imperial Station again.
|
|
string_id message = new string_id (c_stringFile, "s_41ebf230");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: All Rebel Pilots will be able to attack me?
|
|
boolean hasResponse0 = false;
|
|
if (pvp_station_imperial_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_3a7768e6");
|
|
|
|
setObjVar (player, "conversation.pvp_station_imperial.branchId", 10);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.pvp_station_imperial.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int pvp_station_imperial_handleBranch10 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You will be Declared Imperial until you land your ship. The next time you launch, if you want to be a Declared Imperial again, you must speak to an Imperial Station again.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: All Rebel Pilots will be able to attack me?
|
|
if (response == "s_3a7768e6")
|
|
{
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Not all of them, %TU. Just the ones that have Declared their affiliation with the Rebel Alliance. You'll be able to attack them, and they will be able to attack you. Ready to declare?
|
|
string_id message = new string_id (c_stringFile, "s_ef2a0e9c");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes
|
|
boolean hasResponse0 = false;
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No
|
|
boolean hasResponse1 = false;
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What does that mean?
|
|
boolean hasResponse2 = false;
|
|
if (pvp_station_imperial_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_370822d1");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_457a7010");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_dd67013");
|
|
|
|
setObjVar (player, "conversation.pvp_station_imperial.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
|
|
{
|
|
removeObjVar (player, "conversation.pvp_station_imperial.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int pvp_station_imperial_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Not all of them, %TU. Just the ones that have Declared their affiliation with the Rebel Alliance. You'll be able to attack them, and they will be able to attack you. Ready to declare?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Yes
|
|
if (response == "s_370822d1")
|
|
{
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
pvp_station_imperial_action_setPlayerToOvertStatus (player, npc);
|
|
|
|
//-- NPC: Very well, %TU. Your ship will begin broadcasting your Imperial affiliation in 30 seconds. You may want to clear the area in the event there are hostiles nearby. Imperial Station, out.
|
|
string_id message = new string_id (c_stringFile, "s_7b492de4");
|
|
removeObjVar (player, "conversation.pvp_station_imperial.branchId");
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
chat.chat (npc, player, pp);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: No
|
|
if (response == "s_457a7010")
|
|
{
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: In that case, please move away from the station. Clear the area for official traffic.
|
|
string_id message = new string_id (c_stringFile, "s_1e8d6243");
|
|
removeObjVar (player, "conversation.pvp_station_imperial.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What does that mean?
|
|
if (response == "s_dd67013")
|
|
{
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Although you are an Imperial Pilot by profession, you have not Declared your factional affiliation. Many Rebel ships [players] will hold-fire in the event you are not really affiliated with the Empire. You may declare your affiliation with the Empire to make it clear that you are willing to respond to their attacks.
|
|
string_id message = new string_id (c_stringFile, "s_25329880");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: How long does this last?
|
|
boolean hasResponse0 = false;
|
|
if (pvp_station_imperial_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_626fe576");
|
|
|
|
setObjVar (player, "conversation.pvp_station_imperial.branchId", 9);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
removeObjVar (player, "conversation.pvp_station_imperial.branchId");
|
|
|
|
chat.chat (npc, player, message);
|
|
npcEndConversation (player);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_imperial_officer_02.iff" );
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setObjVar(self, "convo.appearance", "object/mobile/space_comm_imperial_officer_02.iff" );
|
|
detachScript(self, "space.content_tools.spacestation");
|
|
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.pvp_station_imperial");
|
|
|
|
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 (pvp_station_imperial_condition_isInYacht (player, npc))
|
|
{
|
|
//-- NPC: There's nothing we can do for you while you're in that civilian ship.
|
|
string_id message = new string_id (c_stringFile, "s_358253b2");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition_isPlayerRebel (player, npc))
|
|
{
|
|
//-- NPC: You are not welcome at this station Rebel, SCUM!
|
|
string_id message = new string_id (c_stringFile, "s_f48e8567");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition_isImperialFactionWithMission (player, npc))
|
|
{
|
|
//-- NPC: We could put your ship to good use, %TU, but you seem to be busy doing something else. Finish your mission and we'll talk.
|
|
string_id message = new string_id (c_stringFile, "s_e8cb2563");
|
|
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 (pvp_station_imperial_condition_isPlayerNeutral (player, npc))
|
|
{
|
|
//-- NPC: Sign up with the Empire and we'll talk.
|
|
string_id message = new string_id (c_stringFile, "s_2e491159");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition_isTooFar (player, npc))
|
|
{
|
|
//-- NPC: You need to move closer to this station.
|
|
string_id message = new string_id (c_stringFile, "s_48f82131");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Welcome to the Imperial Space Station, %TU. Would you like to declare your affiliation with the Empire?
|
|
string_id message = new string_id (c_stringFile, "s_afe52489");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Yes
|
|
boolean hasResponse0 = false;
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: No
|
|
boolean hasResponse1 = false;
|
|
if (pvp_station_imperial_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What does that mean?
|
|
boolean hasResponse2 = false;
|
|
if (pvp_station_imperial_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_370822d1");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_457a7010");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_dd67013");
|
|
|
|
setObjVar (player, "conversation.pvp_station_imperial.branchId", 6);
|
|
|
|
prose_package pp = new prose_package ();
|
|
pp.stringId = message;
|
|
pp.actor.set (player);
|
|
pp.target.set (npc);
|
|
|
|
npcStartConversation (player, npc, "pvp_station_imperial", 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;
|
|
}
|
|
|
|
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 != "pvp_station_imperial")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = getIntObjVar (player, "conversation.pvp_station_imperial.branchId");
|
|
|
|
if (branchId == 6 && pvp_station_imperial_handleBranch6 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 9 && pvp_station_imperial_handleBranch9 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 10 && pvp_station_imperial_handleBranch10 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && pvp_station_imperial_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
removeObjVar (player, "conversation.pvp_station_imperial.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|