Files
TekaohandGitHub 5c2e112349 Java 11.0.2 migration (#32)
* Code compiles - execution NOT tested

* updating gitignore

* Removed intellij settings files

* Removed more intellij files

* Added exclusion for JDK classes.

* Fixed purchasing script for vendors that have listed coin types.

* Updated script to not kick off until the entire preload is complete.

* adds static name entry for Solo movie poster and tcg9 vendor entry

* clean up empty and orphaned object templates

* adds placeholder black market (static) spawns

* corrects entries for the video game table to correctly set it in tcg series 2 and remove series 1 console errors

* Updated gitignore and removed intellij project files

* Fixed appearance reference for thranta payroll and kashyyyk door, added skipLosCheck objvar due to cannit see issue. Requires updated src

* Fixed appearance and template for terminal (#2)

* Fixed appearance and template for terminal (#3)

* Fixed appearance and template for terminal (#4)

* Deleted another faulty/orphaned object template

* Fixed gcw ranks option on frog. Only issue is that it doesn't award the officer commands or badges.

* Fixed some unneeded java 11 changes
2019-04-18 18:31:52 -05:00

86 lines
3.4 KiB
Java
Executable File

package script.beta;
import script.dictionary;
import script.library.colors;
import script.library.create;
import script.library.pet_lib;
import script.location;
import script.obj_id;
import script.string_id;
public class pet_test extends script.base_script
{
public pet_test()
{
}
public int OnAttach(obj_id self) throws InterruptedException
{
debugSpeakMsg(self, "Pet test ready.");
return SCRIPT_CONTINUE;
}
public int OnSpeaking(obj_id self, String text) throws InterruptedException
{
location playerLocation = getLocation(self);
if (text.equals("beginpetdemo"))
{
petTest(self);
}
else if (text.equals("endpetdemo"))
{
endPetTest(self);
}
return SCRIPT_CONTINUE;
}
public void petTest(obj_id self) throws InterruptedException
{
grantSkill(self, "outdoors_creaturehandler_master");
grantSkill(self, "outdoors_creaturehandler_support_04");
grantSkill(self, "outdoors_creaturehandler_healing_04");
grantSkill(self, "outdoors_creaturehandler_training_04");
grantSkill(self, "outdoors_creaturehandler_taming_04");
grantSkill(self, "outdoors_creaturehandler_taming_03");
grantSkill(self, "outdoors_creaturehandler_training_03");
grantSkill(self, "outdoors_creaturehandler_healing_03");
grantSkill(self, "outdoors_creaturehandler_support_03");
grantSkill(self, "outdoors_creaturehandler_training_02");
grantSkill(self, "outdoors_creaturehandler_taming_02");
grantSkill(self, "outdoors_creaturehandler_healing_02");
grantSkill(self, "outdoors_creaturehandler_support_02");
grantSkill(self, "outdoors_creaturehandler_taming_01");
grantSkill(self, "outdoors_creaturehandler_training_01");
grantSkill(self, "outdoors_creaturehandler_healing_01");
grantSkill(self, "outdoors_creaturehandler_support_01");
grantSkill(self, "outdoors_creaturehandler_novice");
obj_id pet = create.object("bantha", getLocation(self));
attachScript(pet, "ai.pet_advance");
pet_lib.makePet(pet, self);
showFlyTextPrivate(pet, self, new string_id("npc_reaction/flytext", "success"), 1.5f, colors.FORESTGREEN);
setObjVar(pet, "ai.pet.commandList" + pet_lib.COMMAND_FOLLOW, "bob follow me");
setObjVar(pet, "ai.pet.commandList" + pet_lib.COMMAND_ATTACK, "bob attack");
setObjVar(pet, "ai.pet.commandList" + pet_lib.COMMAND_TRICK_1, "bob do a trick");
setObjVar(self, "pet_test.pet_id", pet);
sendSystemMessage(self, "Ready for pet demonstration.", null);
}
public void endPetTest(obj_id self) throws InterruptedException
{
obj_id pet = getObjIdObjVar(self, "pet_test.pet_id");
if (!isIdValid(pet))
{
return;
}
pet_lib.removeFromPetList(pet);
messageTo(self, "destroyPet", null, 2.0f, true);
}
public int destroyPet(obj_id self, dictionary params) throws InterruptedException
{
obj_id pet = getObjIdObjVar(self, "pet_test.pet_id");
if (!isIdValid(pet))
{
return SCRIPT_CONTINUE;
}
destroyObject(pet);
sendSystemMessage(self, "Pet demonstration complete.", null);
return SCRIPT_CONTINUE;
}
}