Files
dsrc/sku.0/sys.server/compiled/game/script/player/jedi_conversion_robe.java
T
2018-06-07 00:32:29 +01:00

39 lines
1.2 KiB
Java
Executable File

package script.player;
import script.dictionary;
import script.library.static_item;
import script.obj_id;
import script.string_id;
public class jedi_conversion_robe extends script.base_script
{
public jedi_conversion_robe()
{
}
public static final String STF_FILE = "jedi_spam";
public int OnAttach(obj_id self) throws InterruptedException
{
messageTo(self, "giveRobe", null, 1, false);
return SCRIPT_CONTINUE;
}
public int OnInitialize(obj_id self) throws InterruptedException
{
messageTo(self, "giveRobe", null, 1, false);
return SCRIPT_CONTINUE;
}
public int giveRobe(obj_id self, dictionary params) throws InterruptedException
{
obj_id gaveRobe = static_item.createNewItemFunction("item_jedi_robe_padawan_04_01", self);
if (gaveRobe == null)
{
messageTo(self, "giveRobe", null, 60, false);
sendSystemMessage(self, new string_id(STF_FILE, "inventory_full_jedi_robe"));
}
else
{
detachScript(self, "player.jedi_conversion_robe");
}
return SCRIPT_CONTINUE;
}
}