Files
dsrc/sku.0/sys.server/compiled/game/script/test/tford_test.java
T
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

118 lines
4.5 KiB
Java
Executable File

package script.test;
import script.location;
import script.obj_id;
import script.prose_package;
import script.string_id;
public class tford_test extends script.base_script
{
public tford_test()
{
}
public int OnLootLotterySelected(obj_id self, obj_id target_id, obj_id[] selection_ids) throws InterruptedException
{
debugConsoleMsg(self, "loot lottery by " + self + " for " + target_id);
debugSpeakMsg(self, "selected items:");
for (obj_id item : selection_ids) {
debugSpeakMsg(self, "[" + item + "]");
}
return SCRIPT_CONTINUE;
}
public int OnHearSpeech(obj_id self, obj_id speaker, String text) throws InterruptedException
{
if (speaker == self)
{
return SCRIPT_CONTINUE;
}
if (text.equals("tauntme"))
{
prose_package pp = new prose_package();
pp.stringId = new string_id("ui", "test_pp");
pp.actor.set(self);
pp.target.set(self);
pp.other.set("other_here");
pp.digitInteger = 666;
pp.digitFloat = 0.333f;
dogfightTauntPlayer(self, speaker, pp);
}
return SCRIPT_CONTINUE;
}
public int OnSpeaking(obj_id self, String text) throws InterruptedException
{
if (isGod(self))
{
java.util.StringTokenizer tok = new java.util.StringTokenizer(text);
if (tok.hasMoreTokens())
{
String command = tok.nextToken();
debugConsoleMsg(self, "command is: " + command);
switch (command) {
case "tmf_showLotteryMyInventory":
break;
case "tmf_pvpPrepareToBeCovert":
debugConsoleMsg(self, "pvpPrepareToBeCovert");
pvpPrepareToBeCovert(self);
break;
case "tmf_pvpPrepareToBeDeclared":
debugConsoleMsg(self, "pvpPrepareToBeDeclared");
pvpPrepareToBeDeclared(self);
break;
case "tmf_pvpPrepareToBeNeutral":
debugConsoleMsg(self, "pvpPrepareToBeNeutral");
pvpPrepareToBeNeutral(self);
break;
}
if (command.equals("tmf_hideFromClient"))
{
debugConsoleMsg(self, "hit tmf_hideFromClient");
obj_id target = getLookAtTarget(self);
hideFromClient(target, true);
}
switch (command) {
case "tmf_noHideFromClient": {
debugConsoleMsg(self, "hit tmf_noHideFromClient");
obj_id target = getLookAtTarget(self);
hideFromClient(target, false);
break;
}
case "tmf_makePrivate": {
debugConsoleMsg(self, "hit tmf_makePrivate");
location here = getLocation(self);
obj_id target = here.cell;
permissionsMakePrivate(target);
break;
}
case "tmf_makePublic": {
debugConsoleMsg(self, "hit tmf_makePublic");
location here = getLocation(self);
obj_id target = here.cell;
permissionsMakePublic(target);
break;
}
}
}
}
return SCRIPT_CONTINUE;
}
public int OnAttach(obj_id self) throws InterruptedException
{
if (!isGod(self) || getGodLevel(self) < 50 || !isPlayer(self)) {
detachScript(self, "test.tford_test");
}
else{
debugSpeakMsg(self, "tford_test.script attached");
}
return SCRIPT_CONTINUE;
}
public int OnLocomotionChanged(obj_id self, int newLocomotion, int oldLocomotion) throws InterruptedException
{
return SCRIPT_CONTINUE;
}
public int OnCombatLevelChanged(obj_id self, int oldCombatLevel, int newCombatLevel) throws InterruptedException
{
debugSpeakMsg(self, "oldCombatLevel = " + oldCombatLevel + " newCombatLevel = " + newCombatLevel);
return SCRIPT_CONTINUE;
}
}