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
120 lines
3.9 KiB
Java
Executable File
120 lines
3.9 KiB
Java
Executable File
package script.systems.combat;
|
|
|
|
import script.dictionary;
|
|
import script.library.combat;
|
|
import script.library.utils;
|
|
import script.obj_id;
|
|
import script.transform;
|
|
|
|
import java.util.Vector;
|
|
|
|
public class volleytarget extends script.base_script
|
|
{
|
|
public volleytarget()
|
|
{
|
|
}
|
|
public int OnAttach(obj_id self) throws InterruptedException
|
|
{
|
|
obj_id[] me = new obj_id[]
|
|
{
|
|
self
|
|
};
|
|
playClientEffectObj(me, "appearance/pt_special_attack_volley_fire.prt", self, "", new transform(), combat.ID_VOLLEY_FIRE_PARTICLE);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnInitialize(obj_id self) throws InterruptedException
|
|
{
|
|
detachScript(self, "systems.combat.volleytarget");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public void notifyVolleyTargetDone() throws InterruptedException
|
|
{
|
|
obj_id self = getSelf();
|
|
Vector groups = utils.getResizeableObjIdBatchScriptVar(self, combat.VAR_VOLLEY_GROUPS);
|
|
utils.removeScriptVar(self, combat.VAR_VOLLEY_GROUPS);
|
|
for (Object group : groups) {
|
|
notifyVolleyTargetDone((obj_id) group);
|
|
}
|
|
}
|
|
public void notifyVolleyTargetDone(obj_id group) throws InterruptedException
|
|
{
|
|
dictionary parms = new dictionary();
|
|
parms.put("objTarget", getSelf());
|
|
messageTo(group, "volleyTargetDone", parms, 0, false);
|
|
}
|
|
public int handlePlayerDeath(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
stopClientEffectObjByLabel(new obj_id[]
|
|
{
|
|
self
|
|
}, self, combat.ID_VOLLEY_FIRE_PARTICLE);
|
|
notifyVolleyTargetDone();
|
|
detachScript(self, "systems.combat.volleytarget");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
|
|
{
|
|
if (isPlayer(self))
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
stopClientEffectObjByLabel(new obj_id[]
|
|
{
|
|
self
|
|
}, self, combat.ID_VOLLEY_FIRE_PARTICLE);
|
|
notifyVolleyTargetDone();
|
|
detachScript(self, "systems.combat.volleytarget");
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int msgMarkedByGroup(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
obj_id group = params.getObjId("objGroup");
|
|
if (!isIdValid(group))
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
Vector groups = new Vector();
|
|
if (utils.hasScriptVar(self, combat.VAR_VOLLEY_GROUPS))
|
|
{
|
|
groups = utils.getResizeableObjIdBatchScriptVar(self, combat.VAR_VOLLEY_GROUPS);
|
|
}
|
|
if (groups.indexOf(group) > -1)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
groups.add(group);
|
|
utils.setBatchScriptVar(self, combat.VAR_VOLLEY_GROUPS, groups);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
public int msgUnmarkedByGroup(obj_id self, dictionary params) throws InterruptedException
|
|
{
|
|
obj_id group = params.getObjId("objGroup");
|
|
if (!isIdValid(group))
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
Vector groups = new Vector();
|
|
if (utils.hasScriptVar(self, combat.VAR_VOLLEY_GROUPS))
|
|
{
|
|
groups = utils.getResizeableObjIdBatchScriptVar(self, combat.VAR_VOLLEY_GROUPS);
|
|
}
|
|
if (groups.indexOf(group) < 0)
|
|
{
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
groups.remove(group);
|
|
if (groups.size() < 1)
|
|
{
|
|
utils.removeScriptVar(self, combat.VAR_VOLLEY_GROUPS);
|
|
stopClientEffectObjByLabel(self, self, combat.ID_VOLLEY_FIRE_PARTICLE);
|
|
detachScript(self, "systems.combat.volleytarget");
|
|
}
|
|
else
|
|
{
|
|
utils.setBatchScriptVar(self, combat.VAR_VOLLEY_GROUPS, groups);
|
|
}
|
|
notifyVolleyTargetDone(group);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
}
|