// ====================================================================== include library.ai_lib; include library.create; include library.groundquests; include library.pclib; include library.skill; include library.space_quest; include library.sui; include library.utils; include library.weapons; inherits base.remote_object_requester; // ====================================================================== const string STARTING_EQUIPMENT_FILE = "datatables/equipment/newbie_equipment.iff"; // ====================================================================== // Hello World trigger OnSpeaking(String text) { if(isGod(self)) { debugConsoleMsg( self, "rhanz_test OnSpeaking: " + text ); java.util.StringTokenizer tok = new java.util.StringTokenizer (text); if (tok.hasMoreTokens ()) { String command = tok.nextToken (); debugConsoleMsg( self, "command is: " + command); // ---------------------------------------------------------------------- if (command.equalsIgnoreCase ("rh_help")) { debugConsoleMsg(self, "Usage\nrh_setPet (sets pet to current target)\n"); debugConsoleMsg(self, "rh_commands1 (loads up the first set of commands)\n"); debugConsoleMsg(self, "rh_commands2 (loads up the second set of commands)\n"); debugConsoleMsg(self, "rh_toggle1 (turns on \"bm_bite_1\")\n"); debugConsoleMsg(self, "rh_toggle2 (turns on \"toggleBeastDefensive\")\n"); debugConsoleMsg(self, "rh_cleartoggles (clears all toggles)\n"); } else if (command.equalsIgnoreCase ("rh_setPet")) { setBeastmasterPet(self, getIntendedTarget(self)); } else if (command.equalsIgnoreCase ("rh_commands1")) { debugSpeakMsg(self, "commands1"); String commands[] = {"bm_follow_1", "bm_stay_1", "bm_pet_attack", "invalid", "empty", ""}; setBeastmasterPetCommands(self, commands); } else if (command.equalsIgnoreCase ("rh_commands2")) { debugSpeakMsg(self, "commands2"); String commands[] = {"", "invalid", "empty", "bm_pet_attack", "bm_stay_1", "bm_follow_1" }; setBeastmasterPetCommands(self, commands); } else if (command.equalsIgnoreCase ("rh_clearcommands")) { debugSpeakMsg(self, "clear commands"); String commands[] = {}; setBeastmasterPetCommands(self, commands); } else if (command.equalsIgnoreCase ("rh_toggle1")) { String commands[] = { "bm_bite_1" }; setBeastmasterToggledPetCommands(self, commands); } else if (command.equalsIgnoreCase ("rh_toggle2")) { String commands[] = { "toggleBeastDefensive" }; setBeastmasterToggledPetCommands(self, commands); } else if (command.equalsIgnoreCase ("rh_cleartoggles")) { String commands[] = {}; setBeastmasterToggledPetCommands(self, commands); } } } return SCRIPT_CONTINUE; }