mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-01 01:15:59 -04:00
4564 lines
126 KiB
Plaintext
4564 lines
126 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// event_promoter.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.36 - 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/event_promoter";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean event_promoter_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean event_promoter_condition_sellsImpStuff (obj_id player, obj_id npc)
|
|
{
|
|
string myType = getStringObjVar(npc, "event_perk.promoter.promoter_type");
|
|
|
|
if(myType.equals("imp"))
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean event_promoter_condition_sellsRebStuff (obj_id player, obj_id npc)
|
|
{
|
|
string myType = getStringObjVar(npc, "event_perk.promoter.promoter_type");
|
|
|
|
if(myType.equals("reb"))
|
|
return true;
|
|
else
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void event_promoter_action_showGameList (obj_id player, obj_id npc)
|
|
{
|
|
dictionary params = new dictionary();
|
|
string table = "datatables/event_perk/promoter_game.iff";
|
|
|
|
params.put("table", table);
|
|
params.put("player", player);
|
|
messageTo(npc, "showPromoterItemList", params, 1, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void event_promoter_action_showPersonList (obj_id player, obj_id npc)
|
|
{
|
|
dictionary params = new dictionary();
|
|
string table = "datatables/event_perk/promoter_person.iff";
|
|
|
|
params.put("table", table);
|
|
params.put("player", player);
|
|
messageTo(npc, "showPromoterItemList", params, 1, false);
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void event_promoter_action_showPersonImpList (obj_id player, obj_id npc)
|
|
{
|
|
dictionary params = new dictionary();
|
|
string table = "datatables/event_perk/promoter_person_imp.iff";
|
|
|
|
params.put("table", table);
|
|
params.put("player", player);
|
|
messageTo(npc, "showPromoterItemList", params, 1, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void event_promoter_action_showPersonRebList (obj_id player, obj_id npc)
|
|
{
|
|
dictionary params = new dictionary();
|
|
string table = "datatables/event_perk/promoter_person_reb.iff";
|
|
|
|
params.put("table", table);
|
|
params.put("player", player);
|
|
messageTo(npc, "showPromoterItemList", params, 1, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void event_promoter_action_showStaticList (obj_id player, obj_id npc)
|
|
{
|
|
dictionary params = new dictionary();
|
|
string table = "datatables/event_perk/promoter_static.iff";
|
|
|
|
params.put("table", table);
|
|
params.put("player", player);
|
|
messageTo(npc, "showPromoterItemList", params, 1, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void event_promoter_action_showStaticImpList (obj_id player, obj_id npc)
|
|
{
|
|
dictionary params = new dictionary();
|
|
string table = "datatables/event_perk/promoter_static_imp.iff";
|
|
|
|
params.put("table", table);
|
|
params.put("player", player);
|
|
messageTo(npc, "showPromoterItemList", params, 1, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void event_promoter_action_showStaticRebList (obj_id player, obj_id npc)
|
|
{
|
|
dictionary params = new dictionary();
|
|
string table = "datatables/event_perk/promoter_static_reb.iff";
|
|
|
|
params.put("table", table);
|
|
params.put("player", player);
|
|
messageTo(npc, "showPromoterItemList", params, 1, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void event_promoter_action_showTheaterList (obj_id player, obj_id npc)
|
|
{
|
|
dictionary params = new dictionary();
|
|
string table = "datatables/event_perk/promoter_theater.iff";
|
|
|
|
params.put("table", table);
|
|
params.put("player", player);
|
|
messageTo(npc, "showPromoterItemList", params, 1, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void event_promoter_action_showTheaterImpList (obj_id player, obj_id npc)
|
|
{
|
|
dictionary params = new dictionary();
|
|
string table = "datatables/event_perk/promoter_theater_imp.iff";
|
|
|
|
params.put("table", table);
|
|
params.put("player", player);
|
|
messageTo(npc, "showPromoterItemList", params, 1, false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void event_promoter_action_showTheaterRebList (obj_id player, obj_id npc)
|
|
{
|
|
dictionary params = new dictionary();
|
|
string table = "datatables/event_perk/promoter_theater_reb.iff";
|
|
|
|
params.put("table", table);
|
|
params.put("player", player);
|
|
messageTo(npc, "showPromoterItemList", params, 1, false);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int event_promoter_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to my shop! I rent a number of goods including decorations, venues, stand alone games and supplies. You can even hire personnel! Our reproductions are of the highest quality and are difficult to distinguish from the real thing. We have everything you need to ensure your event will be a memorable one.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more about all of this
|
|
if (response == "s_9")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: For a modest sum, you can rent supplies for use in your personal events. Most items rented are received in the form of a deed. Simply deploy the deed in any wilderness area or city that has allowed you zoning rights to set it up. You may rent up to five deeds at a time. The term of rental in most cases is 8 hours starting at the time of purchase. All equipment is automatically returned after that time.
|
|
string_id message = new string_id (c_stringFile, "s_10");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about all of this
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in decorations
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in venues
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in games and supplies
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in hiring personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_9");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_11");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_26");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_42");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 1);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm interested in decorations
|
|
if (response == "s_11")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Decorations are simply single items ranging from flags to reproductions of vehicles and other equipment. When you purchase a decoration, simply move to the location where you would like to place it and deploy. The decoration will be placed where you stand.
|
|
string_id message = new string_id (c_stringFile, "s_12");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Rent Decorations
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Imperial Themed Decorations
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Alliance Themed Decorations
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (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_14");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_18");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_22");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm interested in venues
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Venues are full set designs and include things such as performance stages, wedding pavilions and even realistic military exhibitions. Some venues also include hired personnel as part of the package. When deployed, your venue will be automatically arranged at a location close to where you used the deed.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Rent Venue
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Imperial Themed Venue
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Rebel Themed Venue
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (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_30");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_34");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm interested in games and supplies
|
|
if (response == "s_42")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: These include stand alone gaming devices as well as supplies to help you with running your own games or events. These include various gaming droids, beacons to call shuttles and chests that you can stock, place and hide for others to find.
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Games and Supplies
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_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_46");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm interested in hiring personnel
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are a number of personnel that may be hired to help give your event that special official sort of ambience. Our actors are highly trained and their costumes are quite authentic.
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: For a modest sum, you can rent supplies for use in your personal events. Most items rented are received in the form of a deed. Simply deploy the deed in any wilderness area or city that has allowed you zoning rights to set it up. You may rent up to five deeds at a time. The term of rental in most cases is 8 hours starting at the time of purchase. All equipment is automatically returned after that time.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more about all of this
|
|
if (response == "s_9")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: For a modest sum, you can rent supplies for use in your personal events. Most items rented are received in the form of a deed. Simply deploy the deed in any wilderness area or city that has allowed you zoning rights to set it up. You may rent up to five deeds at a time. The term of rental in most cases is 8 hours starting at the time of purchase. All equipment is automatically returned after that time.
|
|
string_id message = new string_id (c_stringFile, "s_10");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about all of this
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in decorations
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in venues
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in games and supplies
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in hiring personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_9");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_11");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_26");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_42");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 1);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm interested in decorations
|
|
if (response == "s_11")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Decorations are simply single items ranging from flags to reproductions of vehicles and other equipment. When you purchase a decoration, simply move to the location where you would like to place it and deploy. The decoration will be placed where you stand.
|
|
string_id message = new string_id (c_stringFile, "s_12");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Rent Decorations
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Imperial Themed Decorations
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Alliance Themed Decorations
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (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_14");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_18");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_22");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 3);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm interested in venues
|
|
if (response == "s_26")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Venues are full set designs and include things such as performance stages, wedding pavilions and even realistic military exhibitions. Some venues also include hired personnel as part of the package. When deployed, your venue will be automatically arranged at a location close to where you used the deed.
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Rent Venue
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Imperial Themed Venue
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Rebel Themed Venue
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (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_30");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_34");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_38");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm interested in games and supplies
|
|
if (response == "s_42")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: These include stand alone gaming devices as well as supplies to help you with running your own games or events. These include various gaming droids, beacons to call shuttles and chests that you can stock, place and hide for others to find.
|
|
string_id message = new string_id (c_stringFile, "s_44");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Games and Supplies
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_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_46");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm interested in hiring personnel
|
|
if (response == "s_80")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: There are a number of personnel that may be hired to help give your event that special official sort of ambience. Our actors are highly trained and their costumes are quite authentic.
|
|
string_id message = new string_id (c_stringFile, "s_82");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch3 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Decorations are simply single items ranging from flags to reproductions of vehicles and other equipment. When you purchase a decoration, simply move to the location where you would like to place it and deploy. The decoration will be placed where you stand.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Decorations
|
|
if (response == "s_14")
|
|
{
|
|
event_promoter_action_showStaticList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_16");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Imperial Themed Decorations
|
|
if (response == "s_18")
|
|
{
|
|
event_promoter_action_showStaticImpList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_20");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Alliance Themed Decorations
|
|
if (response == "s_22")
|
|
{
|
|
event_promoter_action_showStaticRebList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_24");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Venues are full set designs and include things such as performance stages, wedding pavilions and even realistic military exhibitions. Some venues also include hired personnel as part of the package. When deployed, your venue will be automatically arranged at a location close to where you used the deed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Venue
|
|
if (response == "s_30")
|
|
{
|
|
event_promoter_action_showTheaterList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_32");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Imperial Themed Venue
|
|
if (response == "s_34")
|
|
{
|
|
event_promoter_action_showTheaterImpList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_36");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Rebel Themed Venue
|
|
if (response == "s_38")
|
|
{
|
|
event_promoter_action_showTheaterRebList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_40");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch11 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: These include stand alone gaming devices as well as supplies to help you with running your own games or events. These include various gaming droids, beacons to call shuttles and chests that you can stock, place and hide for others to find.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What are you interested in hearing more about?
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is the Capture the Flag Game?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Race Droid?
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Lottery Droid?
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Scavenger Hunt Droid?
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Treasure Chest?
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Shuttle Beacon?
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: How does the jukebox work?
|
|
boolean hasResponse6 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_54");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_58");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_62");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_109");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Games and Supplies
|
|
if (response == "s_76")
|
|
{
|
|
event_promoter_action_showGameList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch12 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: What are you interested in hearing more about?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is the Capture the Flag Game?
|
|
if (response == "s_50")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: When you deploy the deed for this game a neutral flag is created where you stand. You will be able to specify a time limit for the game. When the game starts, overt members of a faction may attempt to capture the flag and change it to their own. The one who holds the flag for the longest wins the game. Multiple games may be run during rental period.
|
|
string_id message = new string_id (c_stringFile, "s_52");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Games and Supplies
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_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_46");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is the Race Droid?
|
|
if (response == "s_54")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This droid will allow you to create and hold your own races. After deploying the droid in the desired location, you can then program the droid with a number of waypoints. When you are satisfied, you can initialize the droid and it will allow racers to run your course and it will record the best time for that track.
|
|
string_id message = new string_id (c_stringFile, "s_56");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Games and Supplies
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_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_46");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is the Lottery Droid?
|
|
if (response == "s_58")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The lottery droid will allow you to run a lottery. You can set how long the lottery will run, registration cost and percentage of the total purse that will be paid out. Registration fees are added to the purse. You may also sweeten the pot with your own credits. When the lottery ends, a winner is chosen. Funds are automatically transferred to the winner and any percentage of the pot set aside as the owner's take is also transferred.
|
|
string_id message = new string_id (c_stringFile, "s_60");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Games and Supplies
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_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_46");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is the Scavenger Hunt Droid?
|
|
if (response == "s_62")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This droid will allow you to setup and run a scavenger hunt. When deployed, you will show the droid a number of items you would like your participants to find. When the droid is initialized, the game begins. The first one to find all of the items wins.
|
|
string_id message = new string_id (c_stringFile, "s_64");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Games and Supplies
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_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_46");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is the Treasure Chest?
|
|
if (response == "s_66")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: A variety of styles of chests are available. Styles range from a standard container, to those with special effects and even a very realistic humanoid skeleton. You may place the chest in the wilderness or in any city that has allowed you zoning rights. You (and only you) may add items to the chest. Anyone happening along the chest may take one item from it.
|
|
string_id message = new string_id (c_stringFile, "s_68");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Games and Supplies
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_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_46");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is the Shuttle Beacon?
|
|
if (response == "s_70")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: The shuttle beacon is a special effects utility that will allow you to call down one of a number of shuttles. You can use the shuttle beacon to have a shuttle land and then to order the shuttle to take off again. Shuttles may be called for the duration of the rental term.
|
|
string_id message = new string_id (c_stringFile, "s_72");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Games and Supplies
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_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_46");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: How does the jukebox work?
|
|
if (response == "s_109")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: When purchased you will receive a jukebox in your inventory. You can then drop the jukebox in your home or any other structure you have access rights too. After placing the jukebox, you can use it and select a song to play. Anyone entering the room will hear the music. The jukebox rental term is eight hours, after which it will expire.
|
|
string_id message = new string_id (c_stringFile, "s_110");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Rent Games and Supplies
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_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_46");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_76");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 11);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch13 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: When you deploy the deed for this game a neutral flag is created where you stand. You will be able to specify a time limit for the game. When the game starts, overt members of a faction may attempt to capture the flag and change it to their own. The one who holds the flag for the longest wins the game. Multiple games may be run during rental period.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What are you interested in hearing more about?
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is the Capture the Flag Game?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Race Droid?
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Lottery Droid?
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Scavenger Hunt Droid?
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Treasure Chest?
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Shuttle Beacon?
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: How does the jukebox work?
|
|
boolean hasResponse6 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_54");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_58");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_62");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_109");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Games and Supplies
|
|
if (response == "s_76")
|
|
{
|
|
event_promoter_action_showGameList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This droid will allow you to create and hold your own races. After deploying the droid in the desired location, you can then program the droid with a number of waypoints. When you are satisfied, you can initialize the droid and it will allow racers to run your course and it will record the best time for that track.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What are you interested in hearing more about?
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is the Capture the Flag Game?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Race Droid?
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Lottery Droid?
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Scavenger Hunt Droid?
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Treasure Chest?
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Shuttle Beacon?
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: How does the jukebox work?
|
|
boolean hasResponse6 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_54");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_58");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_62");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_109");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Games and Supplies
|
|
if (response == "s_76")
|
|
{
|
|
event_promoter_action_showGameList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch15 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The lottery droid will allow you to run a lottery. You can set how long the lottery will run, registration cost and percentage of the total purse that will be paid out. Registration fees are added to the purse. You may also sweeten the pot with your own credits. When the lottery ends, a winner is chosen. Funds are automatically transferred to the winner and any percentage of the pot set aside as the owner's take is also transferred.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What are you interested in hearing more about?
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is the Capture the Flag Game?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Race Droid?
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Lottery Droid?
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Scavenger Hunt Droid?
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Treasure Chest?
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Shuttle Beacon?
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: How does the jukebox work?
|
|
boolean hasResponse6 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_54");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_58");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_62");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_109");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Games and Supplies
|
|
if (response == "s_76")
|
|
{
|
|
event_promoter_action_showGameList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: This droid will allow you to setup and run a scavenger hunt. When deployed, you will show the droid a number of items you would like your participants to find. When the droid is initialized, the game begins. The first one to find all of the items wins.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What are you interested in hearing more about?
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is the Capture the Flag Game?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Race Droid?
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Lottery Droid?
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Scavenger Hunt Droid?
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Treasure Chest?
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Shuttle Beacon?
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: How does the jukebox work?
|
|
boolean hasResponse6 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_54");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_58");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_62");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_109");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Games and Supplies
|
|
if (response == "s_76")
|
|
{
|
|
event_promoter_action_showGameList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: A variety of styles of chests are available. Styles range from a standard container, to those with special effects and even a very realistic humanoid skeleton. You may place the chest in the wilderness or in any city that has allowed you zoning rights. You (and only you) may add items to the chest. Anyone happening along the chest may take one item from it.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What are you interested in hearing more about?
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is the Capture the Flag Game?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Race Droid?
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Lottery Droid?
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Scavenger Hunt Droid?
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Treasure Chest?
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Shuttle Beacon?
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: How does the jukebox work?
|
|
boolean hasResponse6 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_54");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_58");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_62");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_109");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Games and Supplies
|
|
if (response == "s_76")
|
|
{
|
|
event_promoter_action_showGameList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: The shuttle beacon is a special effects utility that will allow you to call down one of a number of shuttles. You can use the shuttle beacon to have a shuttle land and then to order the shuttle to take off again. Shuttles may be called for the duration of the rental term.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What are you interested in hearing more about?
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is the Capture the Flag Game?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Race Droid?
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Lottery Droid?
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Scavenger Hunt Droid?
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Treasure Chest?
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Shuttle Beacon?
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: How does the jukebox work?
|
|
boolean hasResponse6 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_54");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_58");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_62");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_109");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Games and Supplies
|
|
if (response == "s_76")
|
|
{
|
|
event_promoter_action_showGameList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch19 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: When purchased you will receive a jukebox in your inventory. You can then drop the jukebox in your home or any other structure you have access rights too. After placing the jukebox, you can use it and select a song to play. Anyone entering the room will hear the music. The jukebox rental term is eight hours, after which it will expire.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me more about games and supplies.
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: What are you interested in hearing more about?
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is the Capture the Flag Game?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Race Droid?
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Lottery Droid?
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Scavenger Hunt Droid?
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Treasure Chest?
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: What is the Shuttle Beacon?
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
//-- PLAYER: How does the jukebox work?
|
|
boolean hasResponse6 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse6 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_50");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_54");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_58");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_62");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_66");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_70");
|
|
|
|
if (hasResponse6)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_109");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 12);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Rent Games and Supplies
|
|
if (response == "s_76")
|
|
{
|
|
event_promoter_action_showGameList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Here is what I have to offer.
|
|
string_id message = new string_id (c_stringFile, "s_78");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: There are a number of personnel that may be hired to help give your event that special official sort of ambience. Our actors are highly trained and their costumes are quite authentic.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is an Honor Guard?
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: An honor guard is military style formation of actors, dressed in one of a variety of authentic looking official dress, who will stand at attention for your event. They come in a variety of numbers and formations.
|
|
string_id message = new string_id (c_stringFile, "s_86");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about recruiters
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We have a special contract with the Empire that allows us to employ the services of off-duty recruiters. You may contract their services through us for a period of eight hours.
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about recruiters
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We have a special contract with the Alliance that allows us to employ the services of off-duty recruiters. You may contract their services through us for a period of eight hours.
|
|
string_id message = new string_id (c_stringFile, "s_98");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Personnel
|
|
if (response == "s_100")
|
|
{
|
|
event_promoter_action_showPersonList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
if (response == "s_104")
|
|
{
|
|
event_promoter_action_showPersonImpList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
if (response == "s_108")
|
|
{
|
|
event_promoter_action_showPersonRebList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: An honor guard is military style formation of actors, dressed in one of a variety of authentic looking official dress, who will stand at attention for your event. They come in a variety of numbers and formations.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is an Honor Guard?
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: An honor guard is military style formation of actors, dressed in one of a variety of authentic looking official dress, who will stand at attention for your event. They come in a variety of numbers and formations.
|
|
string_id message = new string_id (c_stringFile, "s_86");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about recruiters
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We have a special contract with the Empire that allows us to employ the services of off-duty recruiters. You may contract their services through us for a period of eight hours.
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about recruiters
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We have a special contract with the Alliance that allows us to employ the services of off-duty recruiters. You may contract their services through us for a period of eight hours.
|
|
string_id message = new string_id (c_stringFile, "s_98");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Personnel
|
|
if (response == "s_100")
|
|
{
|
|
event_promoter_action_showPersonList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
if (response == "s_104")
|
|
{
|
|
event_promoter_action_showPersonImpList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
if (response == "s_108")
|
|
{
|
|
event_promoter_action_showPersonRebList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We have a special contract with the Empire that allows us to employ the services of off-duty recruiters. You may contract their services through us for a period of eight hours.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is an Honor Guard?
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: An honor guard is military style formation of actors, dressed in one of a variety of authentic looking official dress, who will stand at attention for your event. They come in a variety of numbers and formations.
|
|
string_id message = new string_id (c_stringFile, "s_86");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about recruiters
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We have a special contract with the Empire that allows us to employ the services of off-duty recruiters. You may contract their services through us for a period of eight hours.
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about recruiters
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We have a special contract with the Alliance that allows us to employ the services of off-duty recruiters. You may contract their services through us for a period of eight hours.
|
|
string_id message = new string_id (c_stringFile, "s_98");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Personnel
|
|
if (response == "s_100")
|
|
{
|
|
event_promoter_action_showPersonList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
if (response == "s_104")
|
|
{
|
|
event_promoter_action_showPersonImpList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
if (response == "s_108")
|
|
{
|
|
event_promoter_action_showPersonRebList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int event_promoter_handleBranch24 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We have a special contract with the Alliance that allows us to employ the services of off-duty recruiters. You may contract their services through us for a period of eight hours.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: What is an Honor Guard?
|
|
if (response == "s_84")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: An honor guard is military style formation of actors, dressed in one of a variety of authentic looking official dress, who will stand at attention for your event. They come in a variety of numbers and formations.
|
|
string_id message = new string_id (c_stringFile, "s_86");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about recruiters
|
|
if (response == "s_92")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We have a special contract with the Empire that allows us to employ the services of off-duty recruiters. You may contract their services through us for a period of eight hours.
|
|
string_id message = new string_id (c_stringFile, "s_94");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Tell me about recruiters
|
|
if (response == "s_96")
|
|
{
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We have a special contract with the Alliance that allows us to employ the services of off-duty recruiters. You may contract their services through us for a period of eight hours.
|
|
string_id message = new string_id (c_stringFile, "s_98");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: What is an Honor Guard?
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: Tell me about recruiters
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Personnel
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition_sellsImpStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
boolean hasResponse5 = false;
|
|
if (event_promoter_condition_sellsRebStuff (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse5 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_84");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_92");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_96");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_100");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_104");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_108");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 21);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Personnel
|
|
if (response == "s_100")
|
|
{
|
|
event_promoter_action_showPersonList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_102");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Imperial Personnel
|
|
if (response == "s_104")
|
|
{
|
|
event_promoter_action_showPersonImpList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_106");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Hire Alliance Personnel
|
|
if (response == "s_108")
|
|
{
|
|
event_promoter_action_showPersonRebList (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is who we have available.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.event_promoter");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
|
|
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.event_promoter");
|
|
|
|
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 (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Welcome to my shop! I rent a number of goods including decorations, venues, stand alone games and supplies. You can even hire personnel! Our reproductions are of the highest quality and are difficult to distinguish from the real thing. We have everything you need to ensure your event will be a memorable one.
|
|
string_id message = new string_id (c_stringFile, "s_4");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Tell me more about all of this
|
|
boolean hasResponse0 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in decorations
|
|
boolean hasResponse1 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in venues
|
|
boolean hasResponse2 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in games and supplies
|
|
boolean hasResponse3 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm interested in hiring personnel
|
|
boolean hasResponse4 = false;
|
|
if (event_promoter_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_9");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_11");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_26");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_42");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_80");
|
|
|
|
utils.setScriptVar (player, "conversation.event_promoter.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "event_promoter", 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 != "event_promoter")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
if (branchId == 1 && event_promoter_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && event_promoter_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 3 && event_promoter_handleBranch3 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && event_promoter_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 11 && event_promoter_handleBranch11 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 12 && event_promoter_handleBranch12 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 13 && event_promoter_handleBranch13 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && event_promoter_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 15 && event_promoter_handleBranch15 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && event_promoter_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && event_promoter_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && event_promoter_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 19 && event_promoter_handleBranch19 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && event_promoter_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && event_promoter_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && event_promoter_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 24 && event_promoter_handleBranch24 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.event_promoter.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|