Files
dsrc/sku.0/sys.server/compiled/game/script/npc/celebrity/general_otto.script
T
2013-09-10 23:17:15 -07:00

54 lines
1.3 KiB
Plaintext

include library.ai_lib;
include library.hue;
include library.colors;
const string CONVO = "celebrity/general_otto";
trigger OnAttach ()
{
setName (self, "General Otto");
ai_lib.setDefaultCalmBehavior( self, ai_lib.BEHAVIOR_SENTINEL );
debugSpeakMsg (self, "I long to see Bespin...");
return SCRIPT_CONTINUE;
}
trigger OnStartNpcConversation (obj_id speaker)
{
if (ai_lib.isInCombat(self) || ai_lib.isInCombat(speaker))
return SCRIPT_OVERRIDE;
string_id greeting = new string_id (CONVO,"npc_1");
string_id response[] = new string_id [2];
response[0] = new string_id (CONVO, "player_1");
response[1] = new string_id (CONVO,"player_2");
npcStartConversation (speaker, self, "celebConvo", greeting, response);
return SCRIPT_CONTINUE;
}
trigger OnNpcConversationResponse (string convo, obj_id player, string_id response)
{
if ( response.getAsciiId().equals("player_1")) //
{
string_id message = new string_id (CONVO, "npc_2");
npcSpeak(player, message);
npcEndConversation (player);
return SCRIPT_CONTINUE;
}
if ( response.getAsciiId().equals("player_2") ) //
{
string_id message = new string_id (CONVO, "npc_3");//
npcSpeak(player, message);
npcEndConversation(player);
return SCRIPT_CONTINUE;
}
return SCRIPT_CONTINUE;
}