mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-08-02 02:15:48 -04:00
36 lines
820 B
Plaintext
36 lines
820 B
Plaintext
/**
|
|
* sc_cts_test.script
|
|
*
|
|
* Assumes this script is attached to a character
|
|
*/
|
|
|
|
//----------------------------------------------------------
|
|
|
|
include library.cts;
|
|
include library.utils;
|
|
include java.util.StringTokenizer;
|
|
|
|
//----------------------------------------------------------
|
|
|
|
trigger OnHearSpeech(obj_id objSpeaker, string strText)
|
|
{
|
|
if (objSpeaker != self)
|
|
return SCRIPT_CONTINUE;
|
|
|
|
if (strText.startsWith("initiateCtsFromItem "))
|
|
{
|
|
StringTokenizer st = new StringTokenizer(strText);
|
|
|
|
if (st.countTokens() == 2)
|
|
{
|
|
string command = st.nextToken();
|
|
obj_id item = utils.stringToObjId(st.nextToken());
|
|
|
|
sendSystemMessageTestingOnly(self, "calling cts.initiateCtsFromItem(player=" + self + ", item=" + item + ")");
|
|
cts.initiateCtsFromItem(self, item);
|
|
}
|
|
}
|
|
|
|
return SCRIPT_CONTINUE;
|
|
}
|