mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-13 22:01:04 -04:00
* Code compiles - execution NOT tested * updating gitignore * Removed intellij settings files * Removed more intellij files * Added exclusion for JDK classes. * Fixed purchasing script for vendors that have listed coin types. * Updated script to not kick off until the entire preload is complete. * adds static name entry for Solo movie poster and tcg9 vendor entry * clean up empty and orphaned object templates * adds placeholder black market (static) spawns * corrects entries for the video game table to correctly set it in tcg series 2 and remove series 1 console errors * Updated gitignore and removed intellij project files * Fixed appearance reference for thranta payroll and kashyyyk door, added skipLosCheck objvar due to cannit see issue. Requires updated src * Fixed appearance and template for terminal (#2) * Fixed appearance and template for terminal (#3) * Fixed appearance and template for terminal (#4) * Deleted another faulty/orphaned object template * Fixed gcw ranks option on frog. Only issue is that it doesn't award the officer commands or badges. * Fixed some unneeded java 11 changes
104 lines
3.3 KiB
Java
Executable File
104 lines
3.3 KiB
Java
Executable File
package script.e3demo;
|
|
|
|
import script.dictionary;
|
|
import script.library.factions;
|
|
import script.library.utils;
|
|
import script.location;
|
|
import script.obj_id;
|
|
|
|
public class e3_bridge_vader extends script.base_script
|
|
{
|
|
public e3_bridge_vader()
|
|
{
|
|
}
|
|
public int OnAttach(obj_id self) throws InterruptedException
|
|
{
|
|
setAnimationMood(self, "npc_imperial");
|
|
factions.setFaction(self, "Imperial");
|
|
attachScript(self, "e3demo.e3_faceto");
|
|
setObjVar(self, "intDestination", 1);
|
|
messageTo(self, "moveToLocationTwo", null, 0, false);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnTriggerVolumeEntered(obj_id self, String volumeName, obj_id breacher) throws InterruptedException
|
|
{
|
|
if (volumeName.equals("playerEnter"))
|
|
{
|
|
if (isPlayer(breacher))
|
|
{
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int moveToLocationTwo(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
pathToLocationTwo(self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int moveToLocationOne(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
pathToLocationOne(self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnHearSpeech(obj_id self, obj_id objSpeaker, String strText) throws InterruptedException
|
|
{
|
|
if (strText.equals("reset"))
|
|
{
|
|
pathToLocationOne(self);
|
|
}
|
|
if (strText.equals("playerEnter"))
|
|
{
|
|
pathToLocationTwo(self);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public void pathToLocationOne(obj_id self) throws InterruptedException
|
|
{
|
|
location destLoc = new location(getLocation(self));
|
|
destLoc.x = 8.6f;
|
|
destLoc.y = 455.2f;
|
|
destLoc.z = 330.7f;
|
|
setObjVar(self, "intIndex", 1);
|
|
pathTo(self, destLoc);
|
|
}
|
|
public void pathToLocationTwo(obj_id self) throws InterruptedException
|
|
{
|
|
location destLoc = new location(getLocation(self));
|
|
destLoc.x = -0.5f;
|
|
destLoc.y = 455.2f;
|
|
destLoc.z = 321.8f;
|
|
setObjVar(self, "intIndex", 2);
|
|
pathTo(self, destLoc);
|
|
}
|
|
public int OnMovePathComplete(obj_id self) throws InterruptedException
|
|
{
|
|
messageTo(self, "doFaceTo", null, 2.5f, false);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int doFaceTo(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
int intIndex = getIntObjVar(self, "intIndex");
|
|
location locTest = getLocation(self);
|
|
if (intIndex == 1)
|
|
{
|
|
obj_id[] objObjects = getAllObjectsWithTemplate(getLocation(self), 2000, "object/mobile/boba_fett.iff");
|
|
faceTo(self, getLocation(objObjects[0]));
|
|
}
|
|
else
|
|
{
|
|
faceTo(self, utils.getObjIdScriptVar(self, "objPlayer"));
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int doLocationOne(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
pathToLocationOne(self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int doLocationTwo(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
pathToLocationTwo(self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|