mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
who isn't sick of converting the freaking scripts? this negates the need
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
package script.theme_park.utils;
|
||||
|
||||
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;
|
||||
|
||||
public class npcdeath extends script.base_script
|
||||
{
|
||||
public npcdeath()
|
||||
{
|
||||
}
|
||||
public int OnAttach(obj_id self) throws InterruptedException
|
||||
{
|
||||
if (!hasObjVar(self, "quests.target"))
|
||||
{
|
||||
detachScript(self, "theme_park.utils.npcdeath");
|
||||
}
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
public int OnDestroy(obj_id self) throws InterruptedException
|
||||
{
|
||||
if (!hasObjVar(self, "quests.target"))
|
||||
{
|
||||
detachScript(self, "theme_park.utils.npcdeath");
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
obj_id target = getObjIdObjVar(self, "quests.target");
|
||||
String msgHandlerName = getStringObjVar(self, "quests.msgHandlerName");
|
||||
messageTo(target, msgHandlerName, null, 0, true);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
|
||||
{
|
||||
setHealth(self, -5000);
|
||||
messageTo(self, "killMe", null, 5, true);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
public int killMe(obj_id self, dictionary params) throws InterruptedException
|
||||
{
|
||||
destroyObject(self);
|
||||
return SCRIPT_CONTINUE;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user