who isn't sick of converting the freaking scripts? this negates the need

This commit is contained in:
DarthArgus
2015-11-24 09:27:45 -06:00
parent 2e64106bc8
commit bbee2d328c
11077 changed files with 2604347 additions and 3425075 deletions
@@ -0,0 +1,67 @@
package script.npe;
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;
import script.library.ai_lib;
import script.library.create;
import script.library.corpse;
import script.library.utils;
import script.library.weapons;
public class weak_droid extends script.base_script
{
public weak_droid()
{
}
public int OnInitialize(obj_id self) throws InterruptedException
{
obj_id weapon = aiGetPrimaryWeapon(self);
setWeaponMinDamage(weapon, 0);
setWeaponMaxDamage(weapon, 1);
weapons.setWeaponData(weapon);
setRegenRate(self, HEALTH, 3);
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
obj_id weapon = aiGetPrimaryWeapon(self);
setWeaponMinDamage(weapon, 0);
setWeaponMaxDamage(weapon, 1);
weapons.setWeaponData(weapon);
setRegenRate(self, HEALTH, 3);
return SCRIPT_CONTINUE;
}
public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException
{
kill(self);
playClientEffectObj(killer, "clienteffect/npe_training_droid_explode.cef", self, "");
return SCRIPT_CONTINUE;
}
public int OnDeath(obj_id self, obj_id killer, obj_id corpseId) throws InterruptedException
{
messageTo(self, "cleanUpSelf", null, 5, false);
return SCRIPT_CONTINUE;
}
public int OnHateTargetChanged(obj_id self, obj_id target) throws InterruptedException
{
removeHateTarget(self, target);
return SCRIPT_CONTINUE;
}
public int cleanUpSelf(obj_id self, dictionary params) throws InterruptedException
{
location myLoc = getLocation(self);
if (!utils.hasScriptVar(self, "npe.hasDied"))
{
create.object("npe_training_droid", myLoc, false);
utils.setScriptVar(self, "npe.hasDied", true);
}
destroyObject(self);
return SCRIPT_CONTINUE;
}
}