mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-02 02:15:48 -04:00
2863 lines
78 KiB
Plaintext
2863 lines
78 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// mtp_complaint_department.script
|
|
// Copyright 2004, Sony Online Entertainment
|
|
// All Rights Reserved.
|
|
//
|
|
// Created with SwgConversationEditor 1.37 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.buff;
|
|
include library.chat;
|
|
include library.conversation;
|
|
include library.static_item;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/mtp_complaint_department";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean mtp_complaint_department_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mtp_complaint_department_condition_hasMeatlumpMono (obj_id player, obj_id npc)
|
|
{
|
|
if(buff.hasBuff(player, "mtp_meatlump_kiss_debuff"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean mtp_complaint_department_condition_noMeatlumpMono (obj_id player, obj_id npc)
|
|
{
|
|
if(!buff.hasBuff(player, "mtp_meatlump_kiss_debuff"))
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void mtp_complaint_department_action_LumpAndMonoRebate (obj_id player, obj_id npc)
|
|
{
|
|
//show the particle effect on player.
|
|
string mtp_complaint_particle = "appearance/pt_mtp_lightning.prt";
|
|
playClientEffectObj(player, mtp_complaint_particle, player, "root");
|
|
//play2dNonLoopingMusic(player, "sound/dro_astromech_dmg.snd");
|
|
//sample/plr_force_lightning.wav
|
|
//get the player's current health
|
|
int playerHealth = getHealth(player);
|
|
//cast to a float to avoid precision losses during calc.
|
|
float fltPlayerHealth = (float)playerHealth;
|
|
//get 80% of the player's health
|
|
fltPlayerHealth *= 0.8;
|
|
//recast to an Int.
|
|
playerHealth = (int)fltPlayerHealth;
|
|
//set his health to the new value.
|
|
setHealth(player, playerHealth);
|
|
|
|
//give the player a lump.
|
|
obj_id pInv = utils.getInventoryContainer(player);
|
|
obj_id rebateLump = static_item.createNewItemFunction("item_meatlump_lump_01_01", pInv);
|
|
//remove the meatlump debuff
|
|
buff.removeBuff(player, "mtp_meatlump_kiss_debuff");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
int mtp_complaint_department_handleBranch1 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to the Meatlump Complaint Department's automated complaint system. Please listen to all options since our menu has recently changed.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter a complaint, Press 1.
|
|
if (response == "s_6")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you for contacting the Meatlump Complaint Department. Complaints are handled on a first-come-first-serve basis. You are currently #10045. Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_17");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *Wait*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_24");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_25");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter another complaint, Press 2.
|
|
if (response == "s_13")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you for contacting the Meatlump Complaint Department. Complaints are handled on a first-come-first-serve basis.
|
|
string_id message = new string_id (c_stringFile, "s_19");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *Wait*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_21");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_29");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To speak with one of our representatives, Press 3.
|
|
if (response == "s_52")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, all of our representatives are busy at the moment and will remain busy until the end of the day. Please try back at a more convenient time for us.
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To receive a refund due to a game or booth malfunction, Press 4.
|
|
if (response == "s_60")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *continue to hold*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *hang up*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_129");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_130");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To be put on hold, Press 5.
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Please continue to hold.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm tired of holding!
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *continue to hold*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_69");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_73");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To end this session, Press 6.
|
|
if (response == "s_140")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you again for contacting the Meatlump Complaint Department.
|
|
string_id message = new string_id (c_stringFile, "s_142");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch2 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thank you for contacting the Meatlump Complaint Department. Complaints are handled on a first-come-first-serve basis. You are currently #10045. Please hold.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *Hang Up*
|
|
if (response == "s_24")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you again for contacting the Meatlump Complaint Department. *click*
|
|
string_id message = new string_id (c_stringFile, "s_28");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *Wait*
|
|
if (response == "s_25")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you for waiting, unfortunately, all representatives are busy right now. Please try back later. *dial tone*
|
|
string_id message = new string_id (c_stringFile, "s_27");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch5 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thank you for contacting the Meatlump Complaint Department. Complaints are handled on a first-come-first-serve basis.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *Hang Up*
|
|
if (response == "s_21")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you again for contacting the Meatlump Complaint Department. *click*
|
|
string_id message = new string_id (c_stringFile, "s_30");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *Wait*
|
|
if (response == "s_29")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Welcome to the Meatlump Complaint Filing System. Please listen to all choices; our menus change daily.
|
|
string_id message = new string_id (c_stringFile, "s_31");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: To enter a complaint concerning a game malfunction, Press 1.
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: To enter a complaint concerning a booth malfunction, Press 2.
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: To enter a random complaint, Press 3.
|
|
boolean hasResponse2 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: To complain anonymously, Press 4.
|
|
boolean hasResponse3 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: I ALREADY WENT THROUGH THIS MENU!!!!
|
|
boolean hasResponse4 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: I know it's you behind those pallets! Get out here and help me!
|
|
boolean hasResponse5 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (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_32");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_36");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_42");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_44");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_46");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_127");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 7);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch7 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Welcome to the Meatlump Complaint Filing System. Please listen to all choices; our menus change daily.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter a complaint concerning a game malfunction, Press 1.
|
|
if (response == "s_32")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is not a valid entry. You will be directed to our main menu. Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_86");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter a complaint concerning a booth malfunction, Press 2.
|
|
if (response == "s_36")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is not a valid entry. You will be directed to our main menu. Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_87");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter a random complaint, Press 3.
|
|
if (response == "s_42")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is not a valid entry. You will be directed to our main menu. Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_88");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To complain anonymously, Press 4.
|
|
if (response == "s_44")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: This is not a valid entry. You will be directed to our main menu. Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_89");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I ALREADY WENT THROUGH THIS MENU!!!!
|
|
if (response == "s_46")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We're sorry, we did not recognize your response. Please try back again at your convenience. Goodbye. *click*
|
|
string_id message = new string_id (c_stringFile, "s_48");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I know it's you behind those pallets! Get out here and help me!
|
|
if (response == "s_127")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We're sorry, we did not recognize your response. *chuckle* Please try back again at your convenience. Goodbye. *click*
|
|
string_id message = new string_id (c_stringFile, "s_128");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch14 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Unfortunately, all of our representatives are busy at the moment and will remain busy until the end of the day. Please try back at a more convenient time for us.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *Hang Up*
|
|
if (response == "s_56")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you again for contacting the Meatlump Complaint Department. Have a nice day!
|
|
string_id message = new string_id (c_stringFile, "s_58");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch16 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Please hold.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *continue to hold*
|
|
if (response == "s_129")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, all of our representatives are extremely busy, please come back some other time.
|
|
string_id message = new string_id (c_stringFile, "s_131");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I know you're back there and I'm the only one in line!
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_133");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 17);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *hang up*
|
|
if (response == "s_130")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you again for contacting the Meatlump Complaint Department. Have a nice day!
|
|
string_id message = new string_id (c_stringFile, "s_132");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch17 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Unfortunately, all of our representatives are extremely busy, please come back some other time.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I know you're back there and I'm the only one in line!
|
|
if (response == "s_133")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Yelling is not a valid response. Please hold while you're transferred to our main menu.
|
|
string_id message = new string_id (c_stringFile, "s_134");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: To enter a complaint, Press 1.
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: To enter another complaint, Press 2.
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: To speak with one of our representatives, Press 3.
|
|
boolean hasResponse2 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: To receive a refund due to a game or booth malfunction, Press 4.
|
|
boolean hasResponse3 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: To be put on hold, Press 5.
|
|
boolean hasResponse4 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: To end this session, Press 6.
|
|
boolean hasResponse5 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (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_6");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_13");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_52");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_65");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_140");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 1);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch18 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Yelling is not a valid response. Please hold while you're transferred to our main menu.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter a complaint, Press 1.
|
|
if (response == "s_6")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you for contacting the Meatlump Complaint Department. Complaints are handled on a first-come-first-serve basis. You are currently #10045. Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_17");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *Wait*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_24");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_25");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter another complaint, Press 2.
|
|
if (response == "s_13")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you for contacting the Meatlump Complaint Department. Complaints are handled on a first-come-first-serve basis.
|
|
string_id message = new string_id (c_stringFile, "s_19");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *Wait*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_21");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_29");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To speak with one of our representatives, Press 3.
|
|
if (response == "s_52")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, all of our representatives are busy at the moment and will remain busy until the end of the day. Please try back at a more convenient time for us.
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To receive a refund due to a game or booth malfunction, Press 4.
|
|
if (response == "s_60")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *continue to hold*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *hang up*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_129");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_130");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To be put on hold, Press 5.
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Please continue to hold.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm tired of holding!
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *continue to hold*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_69");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_73");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To end this session, Press 6.
|
|
if (response == "s_140")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you again for contacting the Meatlump Complaint Department.
|
|
string_id message = new string_id (c_stringFile, "s_142");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch20 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Please continue to hold.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm tired of holding!
|
|
if (response == "s_69")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We're sorry, we did not recognize that response. You will now be returned to the main menu.
|
|
string_id message = new string_id (c_stringFile, "s_71");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: To enter a complaint, Press 1.
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: To enter another complaint, Press 2.
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: To speak with one of our representatives, Press 3.
|
|
boolean hasResponse2 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: To receive a refund due to a game or booth malfunction, Press 4.
|
|
boolean hasResponse3 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: To be put on hold, Press 5.
|
|
boolean hasResponse4 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: To end this session, Press 6.
|
|
boolean hasResponse5 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (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_6");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_13");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_52");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_65");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_140");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 1);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *continue to hold*
|
|
if (response == "s_73")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thanks for holding. What is your issue today?
|
|
string_id message = new string_id (c_stringFile, "s_75");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Your kissing booth gave me Meatlump Mono!
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm just complaining to complain.
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_77");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_116");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 22);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch21 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: We're sorry, we did not recognize that response. You will now be returned to the main menu.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter a complaint, Press 1.
|
|
if (response == "s_6")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you for contacting the Meatlump Complaint Department. Complaints are handled on a first-come-first-serve basis. You are currently #10045. Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_17");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *Wait*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_24");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_25");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter another complaint, Press 2.
|
|
if (response == "s_13")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you for contacting the Meatlump Complaint Department. Complaints are handled on a first-come-first-serve basis.
|
|
string_id message = new string_id (c_stringFile, "s_19");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *Wait*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_21");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_29");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To speak with one of our representatives, Press 3.
|
|
if (response == "s_52")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, all of our representatives are busy at the moment and will remain busy until the end of the day. Please try back at a more convenient time for us.
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To receive a refund due to a game or booth malfunction, Press 4.
|
|
if (response == "s_60")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *continue to hold*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *hang up*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_129");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_130");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To be put on hold, Press 5.
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Please continue to hold.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm tired of holding!
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *continue to hold*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_69");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_73");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To end this session, Press 6.
|
|
if (response == "s_140")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you again for contacting the Meatlump Complaint Department.
|
|
string_id message = new string_id (c_stringFile, "s_142");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch22 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Thanks for holding. What is your issue today?
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Your kissing booth gave me Meatlump Mono!
|
|
if (response == "s_77")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Due to the nature of the booth, we are not responsible for anything other than the kisses. Please see your physician for assistance.
|
|
string_id message = new string_id (c_stringFile, "s_79");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: grrrr....*hang up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: I'm not leaving until I either get a refund, or you get rid of this Meatlump Mono!
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_81");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_85");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 23);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm just complaining to complain.
|
|
if (response == "s_116")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_118");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *hang up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *hold*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_122");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_136");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 33);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch23 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Due to the nature of the booth, we are not responsible for anything other than the kisses. Please see your physician for assistance.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: grrrr....*hang up*
|
|
if (response == "s_81")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you again for contacting the Meatlump Complaint Department. Goodbye.
|
|
string_id message = new string_id (c_stringFile, "s_83");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: I'm not leaving until I either get a refund, or you get rid of this Meatlump Mono!
|
|
if (response == "s_85")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: At this time, we are only allowing refunds for such incidents. These refunds are only given for those that complain repeatedly.
|
|
string_id message = new string_id (c_stringFile, "s_92");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: Oh, in that case, sorry to have bothered you. *hang up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Give me my money back! This is a rip-off!
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_94");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_98");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 25);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch25 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: At this time, we are only allowing refunds for such incidents. These refunds are only given for those that complain repeatedly.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Oh, in that case, sorry to have bothered you. *hang up*
|
|
if (response == "s_94")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: We hope you enjoyed your stay. Take Care.
|
|
string_id message = new string_id (c_stringFile, "s_96");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Give me my money back! This is a rip-off!
|
|
if (response == "s_98")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition_hasMeatlumpMono (player, npc))
|
|
{
|
|
//-- NPC: One moment while I verify your Meatlump Mono status.
|
|
string_id message = new string_id (c_stringFile, "s_100");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *wait*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *hang up*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_102");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_110");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 27);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You do not look to have an infection. Please hold for the main menu.
|
|
string_id message = new string_id (c_stringFile, "s_114");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: To enter a complaint, Press 1.
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: To enter another complaint, Press 2.
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: To speak with one of our representatives, Press 3.
|
|
boolean hasResponse2 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: To receive a refund due to a game or booth malfunction, Press 4.
|
|
boolean hasResponse3 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: To be put on hold, Press 5.
|
|
boolean hasResponse4 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: To end this session, Press 6.
|
|
boolean hasResponse5 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (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_6");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_13");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_52");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_65");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_140");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 1);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch27 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: One moment while I verify your Meatlump Mono status.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *wait*
|
|
if (response == "s_102")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: After careful consideration and looking over your past history of Meatlump interactions, we are able to offer you a refund this one time only.
|
|
string_id message = new string_id (c_stringFile, "s_104");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: That would be great!
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: Actually, nevermind. I've gotten used to
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_120");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_125");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 28);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *hang up*
|
|
if (response == "s_110")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Goodbye.
|
|
string_id message = new string_id (c_stringFile, "s_112");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch28 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: After careful consideration and looking over your past history of Meatlump interactions, we are able to offer you a refund this one time only.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: That would be great!
|
|
if (response == "s_120")
|
|
{
|
|
mtp_complaint_department_action_LumpAndMonoRebate (player, npc);
|
|
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: You might feel a slight pinch...
|
|
string_id message = new string_id (c_stringFile, "s_121");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: Actually, nevermind. I've gotten used to
|
|
if (response == "s_125")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thanks again for contacting the Meatlump Complaint Department
|
|
string_id message = new string_id (c_stringFile, "s_126");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch32 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: You do not look to have an infection. Please hold for the main menu.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter a complaint, Press 1.
|
|
if (response == "s_6")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you for contacting the Meatlump Complaint Department. Complaints are handled on a first-come-first-serve basis. You are currently #10045. Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_17");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *Wait*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_24");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_25");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 2);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To enter another complaint, Press 2.
|
|
if (response == "s_13")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you for contacting the Meatlump Complaint Department. Complaints are handled on a first-come-first-serve basis.
|
|
string_id message = new string_id (c_stringFile, "s_19");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *Wait*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_21");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_29");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 5);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To speak with one of our representatives, Press 3.
|
|
if (response == "s_52")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Unfortunately, all of our representatives are busy at the moment and will remain busy until the end of the day. Please try back at a more convenient time for us.
|
|
string_id message = new string_id (c_stringFile, "s_54");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *Hang Up*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
if (hasResponse)
|
|
{
|
|
int responseIndex = 0;
|
|
string_id responses [] = new string_id [numberOfResponses];
|
|
|
|
if (hasResponse0)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_56");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 14);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To receive a refund due to a game or booth malfunction, Press 4.
|
|
if (response == "s_60")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Please hold.
|
|
string_id message = new string_id (c_stringFile, "s_90");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: *continue to hold*
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *hang up*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_129");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_130");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 16);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To be put on hold, Press 5.
|
|
if (response == "s_65")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Please continue to hold.
|
|
string_id message = new string_id (c_stringFile, "s_67");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: I'm tired of holding!
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: *continue to hold*
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_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_69");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_73");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 20);
|
|
|
|
npcSpeak (player, message);
|
|
npcSetConversationResponses (player, responses);
|
|
}
|
|
else
|
|
{
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: To end this session, Press 6.
|
|
if (response == "s_140")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thank you again for contacting the Meatlump Complaint Department.
|
|
string_id message = new string_id (c_stringFile, "s_142");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
int mtp_complaint_department_handleBranch33 (obj_id player, obj_id npc, string_id response)
|
|
{
|
|
//-- [BRANCH NOTE]
|
|
//-- NPC: Please hold.
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *hang up*
|
|
if (response == "s_122")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Thanks again for calling the Meatlump Complaint Department.
|
|
string_id message = new string_id (c_stringFile, "s_124");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
//-- [RESPONSE NOTE]
|
|
//-- PLAYER: *hold*
|
|
if (response == "s_136")
|
|
{
|
|
//-- [NOTE]
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: *you hear a click, then a dial tone*
|
|
string_id message = new string_id (c_stringFile, "s_138");
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
npcEndConversationWithMessage (player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
}
|
|
|
|
return SCRIPT_DEFAULT;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isTangible (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.mtp_complaint_department");
|
|
|
|
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.mtp_complaint_department");
|
|
|
|
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 (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
doAnimationAction (npc, "nervous");
|
|
|
|
//-- NPC: Welcome to the Meatlump Complaint Department's automated complaint system. Please listen to all options since our menu has recently changed.
|
|
string_id message = new string_id (c_stringFile, "s_4");
|
|
int numberOfResponses = 0;
|
|
|
|
boolean hasResponse = false;
|
|
|
|
//-- PLAYER: To enter a complaint, Press 1.
|
|
boolean hasResponse0 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse0 = true;
|
|
}
|
|
|
|
//-- PLAYER: To enter another complaint, Press 2.
|
|
boolean hasResponse1 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse1 = true;
|
|
}
|
|
|
|
//-- PLAYER: To speak with one of our representatives, Press 3.
|
|
boolean hasResponse2 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse2 = true;
|
|
}
|
|
|
|
//-- PLAYER: To receive a refund due to a game or booth malfunction, Press 4.
|
|
boolean hasResponse3 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse3 = true;
|
|
}
|
|
|
|
//-- PLAYER: To be put on hold, Press 5.
|
|
boolean hasResponse4 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (player, npc))
|
|
{
|
|
++numberOfResponses;
|
|
hasResponse = true;
|
|
hasResponse4 = true;
|
|
}
|
|
|
|
//-- PLAYER: To end this session, Press 6.
|
|
boolean hasResponse5 = false;
|
|
if (mtp_complaint_department_condition__defaultCondition (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_6");
|
|
|
|
if (hasResponse1)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_13");
|
|
|
|
if (hasResponse2)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_52");
|
|
|
|
if (hasResponse3)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_60");
|
|
|
|
if (hasResponse4)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_65");
|
|
|
|
if (hasResponse5)
|
|
responses [responseIndex++] = new string_id (c_stringFile, "s_140");
|
|
|
|
utils.setScriptVar (player, "conversation.mtp_complaint_department.branchId", 1);
|
|
|
|
npcStartConversation (player, npc, "mtp_complaint_department", 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 != "mtp_complaint_department")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
if (branchId == 1 && mtp_complaint_department_handleBranch1 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 2 && mtp_complaint_department_handleBranch2 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 5 && mtp_complaint_department_handleBranch5 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 7 && mtp_complaint_department_handleBranch7 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 14 && mtp_complaint_department_handleBranch14 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 16 && mtp_complaint_department_handleBranch16 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 17 && mtp_complaint_department_handleBranch17 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 18 && mtp_complaint_department_handleBranch18 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 20 && mtp_complaint_department_handleBranch20 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 21 && mtp_complaint_department_handleBranch21 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 22 && mtp_complaint_department_handleBranch22 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 23 && mtp_complaint_department_handleBranch23 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 25 && mtp_complaint_department_handleBranch25 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 27 && mtp_complaint_department_handleBranch27 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 28 && mtp_complaint_department_handleBranch28 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 32 && mtp_complaint_department_handleBranch32 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (branchId == 33 && mtp_complaint_department_handleBranch33 (player, npc, response) == SCRIPT_CONTINUE)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.mtp_complaint_department.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|