mirror of
https://bitbucket.org/seefoe/dsrc.git
synced 2026-07-31 01:15:55 -04:00
36 lines
652 B
Plaintext
36 lines
652 B
Plaintext
include library.utils;
|
|
|
|
trigger OnHearSpeech(obj_id speaker, string text)
|
|
{
|
|
if ( text == "test" )
|
|
{
|
|
dictionary dict = new dictionary();
|
|
if (!hasObjVar(self, "myTest"))
|
|
{
|
|
messageTo(self, "TestCallback", dict, 1, true);
|
|
setObjVar(self, "myTest", 1);
|
|
}
|
|
|
|
}
|
|
if (text == "end")
|
|
{
|
|
removeObjVar(self, "myTest");
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
messageHandler TestCallback()
|
|
{
|
|
if (hasObjVar(self, "myTest"))
|
|
{
|
|
debugSpeakMsg(self, "bleh");
|
|
resizeable int[] test = new int[0];
|
|
for (int j = 0; j < 2000; ++j)
|
|
{
|
|
test = utils.addElement(test, j);
|
|
}
|
|
messageTo(self, "TestCallback", params, 1, true);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|