mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-02 02:15:48 -04:00
259 lines
8.5 KiB
Plaintext
259 lines
8.5 KiB
Plaintext
// ======================================================================
|
|
//
|
|
// ep3_etyyy_harroom.script
|
|
//
|
|
//
|
|
//
|
|
// Created with SwgConversationEditor 1.35 - DO NOT EDIT THIS AUTO-GENERATED FILE!
|
|
//
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Library Includes
|
|
// ======================================================================
|
|
|
|
include library.ai_lib;
|
|
include library.chat;
|
|
include library.groundquests;
|
|
include library.utils;
|
|
|
|
// ======================================================================
|
|
// Script Constants
|
|
// ======================================================================
|
|
|
|
string c_stringFile = "conversation/ep3_etyyy_harroom";
|
|
|
|
// ======================================================================
|
|
// Script Conditions
|
|
// ======================================================================
|
|
|
|
boolean ep3_etyyy_harroom_condition__defaultCondition (obj_id player, obj_id npc)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_harroom_condition_needsUllerReward (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedTask(player, "ep3_hunt_sordaan_seek_harroom", "sordaan_ullerBetReward");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_harroom_condition_needsWallugaReward (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedTask(player, "ep3_hunt_sordaan_seek_harroom", "sordaan_wallugaBetReward");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_harroom_condition_needsMoufReward (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedTask(player, "ep3_hunt_sordaan_seek_harroom", "sordaan_moufBetReward");
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
boolean ep3_etyyy_harroom_condition_needsWebweaverReward (obj_id player, obj_id npc)
|
|
{
|
|
return groundquests.hasCompletedTask(player, "ep3_hunt_sordaan_seek_harroom", "sordaan_webweaverBetReward");
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script Actions
|
|
// ======================================================================
|
|
|
|
void ep3_etyyy_harroom_action_giveUllerReward (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "sordaan_talkToHarroom");
|
|
groundquests.grantQuest(player, "ep3_hunt_harroom_uller_reward", false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_harroom_action_giveWallugaReward (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "sordaan_talkToHarroom");
|
|
groundquests.grantQuest(player, "ep3_hunt_harroom_walluga_reward", false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_harroom_action_giveMoufReward (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "sordaan_talkToHarroom");
|
|
groundquests.grantQuest(player, "ep3_hunt_harroom_mouf_reward", false);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
void ep3_etyyy_harroom_action_giveWebweaverReward (obj_id player, obj_id npc)
|
|
{
|
|
groundquests.sendSignal(player, "sordaan_talkToHarroom");
|
|
groundquests.grantQuest(player, "ep3_hunt_harroom_webweaver_reward", false);
|
|
}
|
|
|
|
// ======================================================================
|
|
// Script %TO Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DI Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// Script %DF Tokens
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// handleBranch<n> Functions
|
|
// ======================================================================
|
|
|
|
// ======================================================================
|
|
// User Script Triggers
|
|
// ======================================================================
|
|
|
|
trigger OnInitialize ()
|
|
{
|
|
if ((!isMob (self)) || (isPlayer (self)))
|
|
detachScript(self, "conversation.ep3_etyyy_harroom");
|
|
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnAttach ()
|
|
{
|
|
setCondition (self, CONDITION_CONVERSABLE);
|
|
setInvulnerable (self, true);
|
|
|
|
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);
|
|
faceTo(self, player);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnIncapacitated (obj_id killer)
|
|
{
|
|
clearCondition (self, CONDITION_CONVERSABLE);
|
|
detachScript (self, "conversation.ep3_etyyy_harroom");
|
|
|
|
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 (ep3_etyyy_harroom_condition_needsUllerReward (player, npc))
|
|
{
|
|
ep3_etyyy_harroom_action_giveUllerReward (player, npc);
|
|
|
|
//-- NPC: Sordaan asked me to give you this Tchotchee Pistol. It's much nicer than most other flare pistols.
|
|
string_id message = new string_id (c_stringFile, "s_183");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_harroom_condition_needsWallugaReward (player, npc))
|
|
{
|
|
ep3_etyyy_harroom_action_giveWallugaReward (player, npc);
|
|
|
|
//-- NPC: Sordaan asked me to give you this Kalranoos Carbine. I hope it serves you well as you continue hunting.
|
|
string_id message = new string_id (c_stringFile, "s_185");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_harroom_condition_needsMoufReward (player, npc))
|
|
{
|
|
ep3_etyyy_harroom_action_giveMoufReward (player, npc);
|
|
|
|
//-- NPC: Sordaan asked me to give you this Xris Acid Sword. I designed the modifications to these myself, though Sordaan gave them his own name. As it should be. I suppose.
|
|
string_id message = new string_id (c_stringFile, "s_187");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_harroom_condition_needsWebweaverReward (player, npc))
|
|
{
|
|
ep3_etyyy_harroom_action_giveWebweaverReward (player, npc);
|
|
|
|
//-- NPC: Sordaan asked me to give you this Fallann Hyper-Rifle. He must be quite impressed with your hunting skills, though I'm sure he won't admit it.
|
|
string_id message = new string_id (c_stringFile, "s_189");
|
|
chat.chat (npc, player, message);
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
//-- [NOTE]
|
|
if (ep3_etyyy_harroom_condition__defaultCondition (player, npc))
|
|
{
|
|
//-- NPC: Hello, honorable hunter. Your presence here speaks well for your skills, but do be careful to be respectful of the Rodians. Trust me.
|
|
string_id message = new string_id (c_stringFile, "s_294");
|
|
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 != "ep3_etyyy_harroom")
|
|
return SCRIPT_CONTINUE;
|
|
|
|
obj_id npc = self;
|
|
|
|
int branchId = utils.getIntScriptVar (player, "conversation.ep3_etyyy_harroom.branchId");
|
|
|
|
chat.chat (npc, "Error: Fell through all branches and responses for OnNpcConversationResponse.");
|
|
|
|
utils.removeScriptVar (player, "conversation.ep3_etyyy_harroom.branchId");
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
// ======================================================================
|
|
|