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,48 @@
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.locations;
import script.library.groundquests;
public class elevator_down extends script.base_script
{
public elevator_down()
{
}
public static final String STF_FILE = "elevator_text";
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info mi) throws InterruptedException
{
int mnu2 = mi.addRootMenu(menu_info_types.ITEM_USE, new string_id(STF_FILE, "down"));
return SCRIPT_CONTINUE;
}
public int OnObjectMenuSelect(obj_id self, obj_id player, int item) throws InterruptedException
{
location here = getLocation(player);
location term = getLocation(self);
float range = getDistance(here, term);
if (range > 3.0)
{
sendSystemMessage(player, new string_id(STF_FILE, "too_far"));
return SCRIPT_OVERRIDE;
}
if (item == menu_info_types.ITEM_USE)
{
playClientEffectObj(player, "clienteffect/elevator_descend.cef", player, null);
groundquests.sendSignal(player, "npe_elevator_main_down");
if (elevatorMove(player, -1) == 0)
{
sendSystemMessage(player, new string_id(STF_FILE, "lowest_floor"));
return SCRIPT_OVERRIDE;
}
return SCRIPT_CONTINUE;
}
return SCRIPT_CONTINUE;
}
}