mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-10-06 22:12:58 -04:00
who isn't sick of converting the freaking scripts? this negates the need
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
package script.npc.celebrity;
|
||||
|
||||
import script.*;
|
||||
import script.base_class.*;
|
||||
import script.combat_engine.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
import script.base_script;
|
||||
|
||||
import script.library.ai_lib;
|
||||
import script.library.hue;
|
||||
import script.library.colors;
|
||||
|
||||
public class morag extends script.base_script
|
||||
{
|
||||
public morag()
|
||||
{
|
||||
}
|
||||
public static final String CONVO = "celebrity/morag";
|
||||
public int OnAttach(obj_id self) throws InterruptedException
|
||||
{
|
||||
setName(self, "Morag");
|
||||
ai_lib.setDefaultCalmBehavior(self, ai_lib.BEHAVIOR_SENTINEL);
|
||||
debugSpeakMsg(self, "The Tulgah Witch.");
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
public int OnStartNpcConversation(obj_id self, obj_id speaker) throws InterruptedException
|
||||
{
|
||||
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;
|
||||
}
|
||||
public int OnNpcConversationResponse(obj_id self, String convo, obj_id player, string_id response) throws InterruptedException
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user