Files
2018-06-07 00:32:29 +01:00

36 lines
983 B
Java
Executable File

package script.demo;
import script.dictionary;
import script.obj_id;
public class grievous extends script.base_script
{
public grievous()
{
}
public int OnIncapacitated(obj_id self, obj_id player) throws InterruptedException
{
messageTo(self, "destroyCorpse", null, 5.0f, true);
return SCRIPT_CONTINUE;
}
public int OnDestroy(obj_id self) throws InterruptedException
{
obj_id player = getObjIdObjVar(self, "player");
int number = getIntObjVar(self, "demoNumber");
if (number == 1)
{
messageTo(player, "resetDemo1", null, 1.0f, true);
}
if (number == 2)
{
messageTo(player, "resetDemo2", null, 1.0f, true);
}
return SCRIPT_CONTINUE;
}
public int destroyCorpse(obj_id self, dictionary params) throws InterruptedException
{
destroyObject(self);
return SCRIPT_CONTINUE;
}
}