mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
87 lines
2.2 KiB
Plaintext
87 lines
2.2 KiB
Plaintext
/**
|
|
* test.script
|
|
*/
|
|
//include steve.mylib;
|
|
//include libs.stevelibs.mylib;
|
|
include library.utils;
|
|
|
|
|
|
trigger OnHearSpeech(obj_id speaker, string text)
|
|
{
|
|
if ( text == "test" )
|
|
{
|
|
debugConsoleMsg(speaker, "Yaw is " + getYaw(self));
|
|
setYaw(self, 180);
|
|
debugConsoleMsg(speaker, "Yaw is " + getYaw(self));
|
|
|
|
}
|
|
else if (text == "test2")
|
|
{
|
|
int x = dataTableSearchColumnForInt(2, 7, "datatables/combat/combat_data.iff");
|
|
debugConsoleMsg(speaker, "Row is " + x);
|
|
x = dataTableSearchColumnForInt(2, 8, "datatables/combat/combat_data.iff");
|
|
debugConsoleMsg(speaker, "Invalid Column Row is " + x);
|
|
x = dataTableSearchColumnForInt(2, 7, "datatables/combat/combats_data.iff");
|
|
debugConsoleMsg(speaker, "Invalid Datatable Row is " + x);
|
|
}
|
|
else if (text == "test3")
|
|
{
|
|
location loc = getLocation(self);
|
|
|
|
setObjVar(self, "test1", loc);
|
|
setObjVar(self, "test2", loc);
|
|
setObjVar(self, "test3", loc);
|
|
setObjVar(self, "test4", loc);
|
|
setObjVar(self, "test5", loc);
|
|
setObjVar(self, "test6", loc);
|
|
setObjVar(self, "test7", loc);
|
|
setObjVar(self, "test8", loc);
|
|
setObjVar(self, "test9", loc);
|
|
setObjVar(self, "test10", loc);
|
|
}
|
|
else if (text == "test4")
|
|
{
|
|
removeObjVar(self, "test1");
|
|
removeObjVar(self, "test2");
|
|
removeObjVar(self, "test3");
|
|
removeObjVar(self, "test4");
|
|
removeObjVar(self, "test5");
|
|
removeObjVar(self, "test6");
|
|
removeObjVar(self, "test7");
|
|
removeObjVar(self, "test8");
|
|
removeObjVar(self, "test9");
|
|
removeObjVar(self, "test10");
|
|
}
|
|
else if (text == "test5")
|
|
{
|
|
resizeable obj_id[] ids = new obj_id[0];
|
|
ids.clear();
|
|
utils.addElement(ids, self);
|
|
setObjVar(self, "testids", ids); // Suppress linting - This is a developer test script
|
|
}
|
|
else if (text == "test6")
|
|
{
|
|
resizeable obj_id[] ids = getResizeableObjIdArrayObjVar(self, "testids");
|
|
int idx = utils.getElementPositionInArray(ids, self);
|
|
if ( idx > -1 )
|
|
{
|
|
ids = utils.removeElementAt(ids, idx);
|
|
setObjVar(self, "testids", ids); // Suppress linting - This is a developer test script
|
|
}
|
|
}
|
|
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
trigger OnSpeaking (string text)
|
|
{
|
|
if (text == "shirt")
|
|
{
|
|
obj_id target = getLookAtTarget(self);
|
|
boolean retval = equipOverride(target, self);
|
|
debugServerConsoleMsg(self, "Retval is " + retval);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|