mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-02 02:15:48 -04:00
87 lines
2.6 KiB
Java
Executable File
87 lines
2.6 KiB
Java
Executable File
package script.poi.factoryliberation;
|
|
|
|
import script.dictionary;
|
|
import script.library.ai_lib;
|
|
import script.library.factions;
|
|
import script.library.poi;
|
|
import script.library.scenario;
|
|
import script.modifiable_float;
|
|
import script.obj_id;
|
|
|
|
public class prisoner extends script.base_script
|
|
{
|
|
public prisoner()
|
|
{
|
|
}
|
|
public static final String frustrationEmotes[] =
|
|
{
|
|
"scratch",
|
|
"yawn",
|
|
"tantrum",
|
|
"cough",
|
|
"curse",
|
|
"fear",
|
|
"steam"
|
|
};
|
|
public static final String joyEmotes[] =
|
|
{
|
|
"thank",
|
|
"cheer",
|
|
"applaud",
|
|
"laugh",
|
|
"softclap",
|
|
"yes",
|
|
"glow"
|
|
};
|
|
public int OnAttach(obj_id self) throws InterruptedException
|
|
{
|
|
ai_lib.setIgnoreCombat(self, true);
|
|
setObjVar(self, "oldFaction", factions.getFaction(self));
|
|
factions.setFaction(self, "Unattackable");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnLoiterWaiting(obj_id self, modifiable_float time) throws InterruptedException
|
|
{
|
|
stop(self);
|
|
if (scenario.isComplete(poi.getBaseObject(self)))
|
|
{
|
|
messageTo(self, "emoteJoy", null, 4, false);
|
|
}
|
|
else
|
|
{
|
|
messageTo(self, "emoteFrustration", null, 4, false);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int emoteFrustration(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
int dosocial = rand(1, 4);
|
|
if (dosocial == 1)
|
|
{
|
|
int whichsocial = rand(0, 6);
|
|
queueCommand(self, (1780871594), null, frustrationEmotes[whichsocial], COMMAND_PRIORITY_DEFAULT);
|
|
}
|
|
messageTo(self, "resumeDefaultCalmBehavior", null, 3, false);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int emoteJoy(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
int dosocial = rand(1, 4);
|
|
if (dosocial == 1)
|
|
{
|
|
int whichsocial = rand(0, 6);
|
|
queueCommand(self, (1780871594), null, joyEmotes[whichsocial], COMMAND_PRIORITY_DEFAULT);
|
|
}
|
|
messageTo(self, "resumeDefaultCalmBehavior", null, 3, false);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int celebrateFreedom(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
stop(self);
|
|
int whichsocial = rand(0, 6);
|
|
queueCommand(self, (1780871594), null, joyEmotes[whichsocial], COMMAND_PRIORITY_DEFAULT);
|
|
messageTo(self, "resumeDefaultCalmBehavior", null, 3, false);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|