mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-14 23:07:51 -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
180 lines
7.2 KiB
Java
Executable File
180 lines
7.2 KiB
Java
Executable File
package script.theme_park.lok;
|
|
|
|
import script.library.ai_lib;
|
|
import script.library.create;
|
|
import script.location;
|
|
import script.obj_id;
|
|
|
|
public class cantina extends script.base_script
|
|
{
|
|
public cantina()
|
|
{
|
|
}
|
|
public int OnInitialize(obj_id self) throws InterruptedException
|
|
{
|
|
spawnEveryone(self);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public void spawnEveryone(obj_id self) throws InterruptedException
|
|
{
|
|
debugSpeakMsg(self, "Spawning Everyone");
|
|
spawnCelebs(self);
|
|
return;
|
|
}
|
|
public void spawnCelebs(obj_id self) throws InterruptedException
|
|
{
|
|
spawnHan(self);
|
|
spawnChewie(self);
|
|
spawnNien(self);
|
|
spawnPadawanTrialsNpc(self);
|
|
spawnGamblor(self);
|
|
spawnRetired(self);
|
|
spawnEngineer(self);
|
|
}
|
|
public obj_id spawnHan(obj_id self) throws InterruptedException
|
|
{
|
|
obj_id room = getCellId(self, "private_room2");
|
|
location hanLoc = new location(-30.20f, -0.57f, 7.24f, "lok", room);
|
|
obj_id han = create.staticObject("han_solo", hanLoc);
|
|
setObjVar(self, "cantinaInhabitants.han", han);
|
|
setYaw(han, 45.0f);
|
|
setObjVar(han, "cantina", self);
|
|
return han;
|
|
}
|
|
public obj_id spawnChewie(obj_id self) throws InterruptedException
|
|
{
|
|
obj_id room = getCellId(self, "private_room2");
|
|
location chewieLoc = new location(-28.48f, -0.57f, 5.87f, "lok", room);
|
|
obj_id chewie = create.staticObject("chewbacca", chewieLoc);
|
|
setObjVar(self, "cantinaInhabitants.chewie", chewie);
|
|
setYaw(chewie, 12.0f);
|
|
setObjVar(chewie, "cantina", self);
|
|
return chewie;
|
|
}
|
|
public obj_id spawnPadawanTrialsNpc(obj_id self) throws InterruptedException
|
|
{
|
|
obj_id room = getCellId(self, "stage");
|
|
location npcLoc = new location(-13.19f, -0.89f, -20.28f, "lok", room);
|
|
obj_id npc = create.object("noren_krast", npcLoc);
|
|
ai_lib.setDefaultCalmMood(npc, "npc_sitting_chair");
|
|
setYaw(npc, 12.0f);
|
|
setInvulnerable(npc, true);
|
|
setCreatureStatic(npc, true);
|
|
setName(npc, "Vixur Webb (a musician)");
|
|
attachScript(npc, "conversation.padawan_old_musician_03");
|
|
setObjVar(self, "cantinaInhabitants.padawanTrialsNpc", npc);
|
|
setObjVar(npc, "cantina", self);
|
|
return npc;
|
|
}
|
|
public obj_id spawnNien(obj_id self) throws InterruptedException
|
|
{
|
|
obj_id room = getCellId(self, "alcove5");
|
|
location nienLoc = new location(-12.12f, -0.89f, 23.08f, "lok", room);
|
|
obj_id nien = create.staticObject("nien_nunb", nienLoc);
|
|
setObjVar(self, "cantinaInhabitants.nien", nien);
|
|
setAnimationMood(nien, "npc_sitting_chair");
|
|
setYaw(nien, 80.0f);
|
|
setObjVar(nien, "cantina", self);
|
|
return nien;
|
|
}
|
|
public obj_id spawnGamblor(obj_id self) throws InterruptedException
|
|
{
|
|
obj_id room = getCellId(self, "alcove2");
|
|
location gamblorLoc = new location(12.82f, -0.89f, 21.49f, "lok", room);
|
|
obj_id gamblor = create.staticObject("commoner", gamblorLoc);
|
|
attachScript(gamblor, "theme_park.nym.nym_contact");
|
|
setObjVar(self, "cantinaInhabitants.gamblor", gamblor);
|
|
setAnimationMood(gamblor, "npc_sitting_chair");
|
|
setYaw(gamblor, 89.0f);
|
|
setObjVar(gamblor, "cantina", self);
|
|
return gamblor;
|
|
}
|
|
public obj_id spawnEngineer(obj_id self) throws InterruptedException
|
|
{
|
|
obj_id room = getCellId(self, "alcove3");
|
|
location engineerLoc = new location(11.63f, -0.89f, -16.56f, "lok", room);
|
|
obj_id engineer = create.staticObject("nym_themepark_choster_cantina", engineerLoc);
|
|
setObjVar(self, "cantinaInhabitants.engineer", engineer);
|
|
setYaw(engineer, -83.0f);
|
|
setObjVar(engineer, "cantina", self);
|
|
return engineer;
|
|
}
|
|
public obj_id spawnRetired(obj_id self) throws InterruptedException
|
|
{
|
|
obj_id room = getCellId(self, "back_hallway");
|
|
location initiateLoc = new location(-36.21f, 0.11f, -13.93f, "lok", room);
|
|
obj_id retired = create.staticObject("nym_themepark_sergeant_moore_cantina", initiateLoc);
|
|
setObjVar(self, "cantinaInhabitants.retired", retired);
|
|
setYaw(retired, 87.0f);
|
|
setObjVar(retired, "cantina", self);
|
|
return retired;
|
|
}
|
|
public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException
|
|
{
|
|
if (!hasObjVar(speaker, "gm"))
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
if (text.equals("celebs"))
|
|
{
|
|
spawnCelebs(self);
|
|
}
|
|
if (text.equals("kill celebs"))
|
|
{
|
|
killCelebs(self);
|
|
}
|
|
if (text.equals("kill all"))
|
|
{
|
|
killAll(self);
|
|
}
|
|
if (text.equals("padawanTrials"))
|
|
{
|
|
spawnPadawanTrialsNpc(self);
|
|
}
|
|
if (text.equals("killPadawan"))
|
|
{
|
|
obj_id npc = getObjIdObjVar(self, "cantinaInhabitants.padawanTrialsNpc");
|
|
if (isIdValid(npc))
|
|
{
|
|
destroyObject(npc);
|
|
}
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public void killAll(obj_id self) throws InterruptedException
|
|
{
|
|
killCelebs(self);
|
|
return;
|
|
}
|
|
public void killCelebs(obj_id self) throws InterruptedException
|
|
{
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.han"));
|
|
removeObjVar(self, "cantinaInhabitants.han");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.chewie"));
|
|
removeObjVar(self, "cantinaInhabitants.chewie");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.nien"));
|
|
removeObjVar(self, "cantinaInhabitants.nien");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.gamblor"));
|
|
removeObjVar(self, "cantinaInhabitants.gamblor");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.engineer"));
|
|
removeObjVar(self, "cantinaInhabitants.engineer");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.retired"));
|
|
removeObjVar(self, "cantinaInhabitants.retired");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.protector"));
|
|
removeObjVar(self, "cantinaInhabitants.protector");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.rancortamer"));
|
|
removeObjVar(self, "cantinaInhabitants.rancortamer");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.ranger"));
|
|
removeObjVar(self, "cantinaInhabitants.ranger");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.sentinel"));
|
|
removeObjVar(self, "cantinaInhabitants.sentinel");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.sentry"));
|
|
removeObjVar(self, "cantinaInhabitants.sentry");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.spellweaver"));
|
|
removeObjVar(self, "cantinaInhabitants.spellweaver");
|
|
destroyObject(getObjIdObjVar(self, "cantinaInhabitants.stalker"));
|
|
removeObjVar(self, "cantinaInhabitants.stalker");
|
|
return;
|
|
}
|
|
}
|