mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-28 22:15:54 -04:00
51 lines
1.6 KiB
Plaintext
51 lines
1.6 KiB
Plaintext
include java.lang.Math;
|
|
include java.util.Random;
|
|
include vector;
|
|
include library.ship_ai;
|
|
include library.space_create;
|
|
include library.static_item;
|
|
include library.utils;
|
|
include library.skill;
|
|
|
|
|
|
|
|
const string s_logLabel = "ai_rsitton";
|
|
|
|
trigger OnSpeaking(String text)
|
|
{
|
|
if (isGod(self))
|
|
{
|
|
java.util.StringTokenizer tokenizer = new java.util.StringTokenizer(text);
|
|
|
|
if (tokenizer.hasMoreTokens())
|
|
{
|
|
String command = tokenizer.nextToken();
|
|
|
|
LOG(s_logLabel, "fnord: " + command + "--------------");
|
|
|
|
if (command.equalsIgnoreCase("fnord_waypoint"))
|
|
{
|
|
location here = getWorldLocation(self);
|
|
createWaypointInDatapadInternal(self, here, "shared_starport_tatooine.iff", "arrivals1");
|
|
}
|
|
else if (command.equalsIgnoreCase("fnord_client_path"))
|
|
{
|
|
obj_id target = getLookAtTarget(self);
|
|
createClientPathAdvanced(self, getLocation(self), getLocation(target), "default");
|
|
}
|
|
else if (command.equalsIgnoreCase("fnord_static_weapon"))
|
|
{
|
|
obj_id objInventory = utils.getInventoryContainer(self);
|
|
obj_id lootItem = static_item.createNewItemFunction("weapon_carbine_02_03", objInventory);
|
|
//obj_id lootItem = static_item.createNewItemFunction("item_force_sensitive_ring_01_02", objInventory);
|
|
//obj_id lootItem = static_item.createNewItemFunction("weapon_pistol_02_03", objInventory);
|
|
//lootItem = static_item.createNewItemFunction("weapon_npe_carbine_spy_03_01", objInventory);
|
|
//obj_id lootItem = static_item.createNewItemFunction("weapon_grenade_fragmentation_01_01", objInventory);
|
|
sendSystemMessageTestingOnly(self, "made "+lootItem);
|
|
}
|
|
}
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|