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

647 lines
19 KiB
Plaintext

// ======================================================================
//
// tier3convotemplate.script
// Copyright 2003, Sony Online Entertainment
//
//
// DO NOT EDIT THIS AUTO-GENERATED FILE. PLEASE USE THE CONVERATION EDITOR!
//
// ======================================================================
// ======================================================================
// Library Includes
// ======================================================================
include library.ai_lib;
include library.chat;
include library.space_quest;
// ======================================================================
// Script Constants
// ======================================================================
string c_stringFile = "conversation/tier3convotemplate";
// ======================================================================
// Script Conditions
// ======================================================================
boolean tier3convotemplate_condition__defaultCondition (obj_id player, obj_id npc)
{
return true;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_isCorrectFaction (obj_id player, obj_id npc)
{
//if this is an Imperial trainer, make sure the player is an Imperial Pilot
//if it is Rebel, then make sure the player is a rebel pilot, etc.
//return FALSE if this NPC should NOT talk to this player!
return true;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_isReadyForTier3 (obj_id player, obj_id npc)
{
//make sure the player has all of his tier2 skills.
//If not, then he shouldn't be talking to this NPC so return FALSE.
//return FALSE if this NPC should not be talking to this player.
return true;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_isOnQuest (obj_id player, obj_id npc)
{
return ( space_quest.hasQuest( player ) );
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_failedQuestOne (obj_id player, obj_id npc)
{
//return true if the player has either failed or aborted ANY of
//the quests in this series! Return FALSE otherwise.
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_failedQuestTwo (obj_id player, obj_id npc)
{
//return true if the player has either failed or aborted ANY of
//the quests in this series! Return FALSE otherwise.
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_failedQuestThree (obj_id player, obj_id npc)
{
//return true if the player has either failed or aborted ANY of
//the quests in this series! Return FALSE otherwise.
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_FailedQuestFour (obj_id player, obj_id npc)
{
//return true if the player has either failed or aborted ANY of
//the quests in this series! Return FALSE otherwise.
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_FailedQuestFive (obj_id player, obj_id npc)
{
//return true if the player has either failed or aborted ANY of
//the quests in this series! Return FALSE otherwise.
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_FailedQuestSix (obj_id player, obj_id npc)
{
//return true if the player has either failed or aborted ANY of
//the quests in this series! Return FALSE otherwise.
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_collectingQuestOneReward (obj_id player, obj_id npc)
{
//if the player has WON this quest, but has not been rewarded for it
//then return TRUE so the NPC can grant the reward!
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_collectingQuestTwoReward (obj_id player, obj_id npc)
{
//if the player has WON this quest, but has not been rewarded for it
//then return TRUE so the NPC can grant the reward!
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_collectingQuestThreeReward (obj_id player, obj_id npc)
{
//if the player has WON this quest, but has not been rewarded for it
//then return TRUE so the NPC can grant the reward!
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_collectingQuestFourReward (obj_id player, obj_id npc)
{
//if the player has WON this quest, but has not been rewarded for it
//then return TRUE so the NPC can grant the reward!
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_collectingQuestFiveReward (obj_id player, obj_id npc)
{
//if the player has WON this quest, but has not been rewarded for it
//then return TRUE so the NPC can grant the reward!
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_collectingQuestSixReward (obj_id player, obj_id npc)
{
//if the player has WON this quest, but has not been rewarded for it
//then return TRUE so the NPC can grant the reward!
return false;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_hasCompletedQuestOne (obj_id player, obj_id npc)
{
//return FALSE if the player has not yet done this
//quest, so the npc will assign it to the player
return true;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_hasCompletedQuestTwo (obj_id player, obj_id npc)
{
//return FALSE if the player has not yet done this
//quest, so the npc will assign it to the player
return true;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_hasCompletedQuestThree (obj_id player, obj_id npc)
{
//return FALSE if the player has not yet done this
//quest, so the npc will assign it to the player
return true;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_hasCompletedQuestFour (obj_id player, obj_id npc)
{
//return FALSE if the player has not yet done this
//quest, so the npc will assign it to the player
return true;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_hasCompletedQuestFive (obj_id player, obj_id npc)
{
//return FALSE if the player has not yet done this
//quest, so the npc will assign it to the player
return true;
}
// ----------------------------------------------------------------------
boolean tier3convotemplate_condition_hasCompletedQuestSix (obj_id player, obj_id npc)
{
//return FALSE if the player has not yet done this
//quest, so the npc will assign it to the player
return true;
}
// ======================================================================
// Script Actions
// ======================================================================
void tier3convotemplate_action_grantQuestOne (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_grantQuestTwo (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_grantQuestThree (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_grantQuestFour (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_grantQuestFive (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_grantQuestSix (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_rewardForQuestOne (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_rewardForQuesTwo (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_rewardForQuestThree (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_rewardForQuestFour (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_rewardForQuestFive (obj_id player, obj_id npc)
{
}
// ----------------------------------------------------------------------
void tier3convotemplate_action_rewardForQuestSix (obj_id player, obj_id npc)
{
}
// ======================================================================
// Script %TO Tokens
// ======================================================================
// ======================================================================
// Script %DI Tokens
// ======================================================================
// ======================================================================
// Script %DF Tokens
// ======================================================================
// ======================================================================
// User Script Triggers
// ======================================================================
trigger OnInitialize ()
{
if ((!isMob (self)) || (isPlayer (self)))
detachScript(self, "npc.conversation.tier3convotemplate");
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, "npc.conversation.tier3convotemplate");
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)
{
if (ai_lib.isInCombat (self) || ai_lib.isInCombat (player))
return SCRIPT_OVERRIDE;
//-- [NOTE]
if (!tier3convotemplate_condition_isCorrectFaction (player, self))
{
//-- NPC: You're the wrong faction.
string_id message = new string_id (c_stringFile, "s_abaa1510");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!tier3convotemplate_condition_isReadyForTier3 (player, self))
{
//-- NPC: You're not through tier2 yet!
string_id message = new string_id (c_stringFile, "s_9c278b35");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_isOnQuest (player, self))
{
//-- NPC: You are busy. Already on a quest. Go do it.
string_id message = new string_id (c_stringFile, "s_6793cafb");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_failedQuestOne (player, self))
{
tier3convotemplate_action_grantQuestOne (player, self);
//-- NPC: You failed quest one. You must start over.
string_id message = new string_id (c_stringFile, "s_35c72c81");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_failedQuestTwo (player, self))
{
tier3convotemplate_action_grantQuestTwo (player, self);
//-- NPC: You failed quest two. You must start over.
string_id message = new string_id (c_stringFile, "s_755c8b16");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_failedQuestThree (player, self))
{
tier3convotemplate_action_grantQuestThree (player, self);
//-- NPC: You failed quest three. You must start over.
string_id message = new string_id (c_stringFile, "s_f07b0dfd");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_FailedQuestFour (player, self))
{
tier3convotemplate_action_grantQuestFour (player, self);
//-- NPC: You failed quest four. You must start over.
string_id message = new string_id (c_stringFile, "s_e16e4699");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_FailedQuestFive (player, self))
{
tier3convotemplate_action_grantQuestFive (player, self);
//-- NPC: You failed quest five. You must start over.
string_id message = new string_id (c_stringFile, "s_22632bc1");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_FailedQuestSix (player, self))
{
tier3convotemplate_action_grantQuestSix (player, self);
//-- NPC: You failed quest six. You must start over.
string_id message = new string_id (c_stringFile, "s_3b915d92");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_collectingQuestOneReward (player, self))
{
tier3convotemplate_action_rewardForQuestOne (player, self);
//-- NPC: You are here to collect your reward for quest one, so here it is!
string_id message = new string_id (c_stringFile, "s_52a877fa");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_collectingQuestTwoReward (player, self))
{
tier3convotemplate_action_grantQuestTwo (player, self);
//-- NPC: You are here to collect your reward for quest two, so here it is!
string_id message = new string_id (c_stringFile, "s_85f759f2");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_collectingQuestThreeReward (player, self))
{
tier3convotemplate_action_rewardForQuestThree (player, self);
//-- NPC: You are here to collect your reward for quest three, so here it is!
string_id message = new string_id (c_stringFile, "s_1350d8f1");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_collectingQuestFourReward (player, self))
{
tier3convotemplate_action_rewardForQuestFour (player, self);
//-- NPC: You are here to collect your reward for quest four, so here it is!
string_id message = new string_id (c_stringFile, "s_7a2b3961");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_collectingQuestFiveReward (player, self))
{
tier3convotemplate_action_rewardForQuestFive (player, self);
//-- NPC: You are here to collect your reward for quest five, so here it is!
string_id message = new string_id (c_stringFile, "s_dfd0f16b");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition_collectingQuestSixReward (player, self))
{
tier3convotemplate_action_rewardForQuestSix (player, self);
//-- NPC: You are here to collect your reward for quest six, so here it is!
string_id message = new string_id (c_stringFile, "s_8f22e2f2");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!tier3convotemplate_condition_hasCompletedQuestOne (player, self))
{
tier3convotemplate_action_grantQuestOne (player, self);
//-- NPC: You haven't done quest one yet, so go do it.
string_id message = new string_id (c_stringFile, "s_77108b2b");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!tier3convotemplate_condition_hasCompletedQuestTwo (player, self))
{
tier3convotemplate_action_grantQuestTwo (player, self);
//-- NPC: You haven't done quest two yet, so go do it.
string_id message = new string_id (c_stringFile, "s_fd94cc2c");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!tier3convotemplate_condition_hasCompletedQuestThree (player, self))
{
tier3convotemplate_action_grantQuestThree (player, self);
//-- NPC: You haven't done quest three yet, so go do it.
string_id message = new string_id (c_stringFile, "s_63ef993a");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!tier3convotemplate_condition_hasCompletedQuestFour (player, self))
{
tier3convotemplate_action_rewardForQuestFour (player, self);
//-- NPC: You haven't done quest four yet, so go do it.
string_id message = new string_id (c_stringFile, "s_3e1e51ce");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!tier3convotemplate_condition_hasCompletedQuestFive (player, self))
{
tier3convotemplate_action_grantQuestFive (player, self);
//-- NPC: You haven't done quest five yet, so go do it.
string_id message = new string_id (c_stringFile, "s_61f5696d");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (!tier3convotemplate_condition_hasCompletedQuestSix (player, self))
{
tier3convotemplate_action_grantQuestSix (player, self);
//-- NPC: You haven't done quest six yet, so go do it.
string_id message = new string_id (c_stringFile, "s_6a7031f3");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
//-- [NOTE]
if (tier3convotemplate_condition__defaultCondition (player, self))
{
//-- NPC: You must have completed tier3 completely. Hope you have all your skills! Now I will tell you to go talk to a tier-4 guy.
string_id message = new string_id (c_stringFile, "s_fc6ea208");
chat.chat (self, message);
return SCRIPT_CONTINUE;
}
chat.chat (self, "Error: All conditions for OnStartNpcConversation were false.");
return SCRIPT_CONTINUE;
}
// ----------------------------------------------------------------------
trigger OnNpcConversationResponse (string conversationId, obj_id player, string_id response)
{
if (conversationId != "tier3convotemplate")
return SCRIPT_CONTINUE;
int branchId = getIntObjVar (player, "conversation.tier3convotemplate.branchId");
chat.chat (self, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
removeObjVar (player, "conversation.tier3convotemplate.branchId");
return SCRIPT_CONTINUE;
}
// ======================================================================