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,63 @@
package script.beta;
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.utils;
import script.library.healing;
import script.library.consumable;
import script.library.player_stomach;
public class medicine_damage extends script.base_script
{
public medicine_damage()
{
}
public int OnAttach(obj_id self) throws InterruptedException
{
int power = rand(50, 300);
int charges = rand(1, 10);
if (healing.isRangedMedicine(self))
{
charges = 1;
}
attrib_mod[] am = createHealDamageMedicineMod(power);
setObjVar(self, consumable.VAR_CONSUMABLE_MODS, am);
setObjVar(self, consumable.VAR_CONSUMABLE_MEDICINE, true);
setCount(self, charges);
int[] stomach =
{
0,
0,
0
};
setObjVar(self, consumable.VAR_CONSUMABLE_STOMACH_VALUES, stomach);
String[] skill_mod =
{
"healing_ability"
};
setObjVar(self, consumable.VAR_SKILL_MOD_REQUIRED, skill_mod);
int skill_req = rand(10, 50);
int[] skill_value =
{
skill_req
};
setObjVar(self, consumable.VAR_SKILL_MOD_MIN, skill_value);
LOG("LOG_CHANNEL", "Medicine created!");
return SCRIPT_CONTINUE;
}
public attrib_mod[] createHealDamageMedicineMod(int power) throws InterruptedException
{
attrib_mod[] am = new attrib_mod[3];
for (int i = 0; i < 3; i++)
{
am[i] = utils.createHealDamageAttribMod(i * 3, power);
}
return am;
}
}