Difference between revisions of "Script: Text"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">trigger</span> message(<span style="color:#800000">"activate"</span>) { <span style="color:#0000FF">if</span> (hasObjVar|<span style="color:...")
 
 
Line 3: Line 3:
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"acttext"</span>))
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"acttext"</span>))
 
   {
 
   {
     <span style="color:#0000FF">string</span> acttext = [[getobjvar_str|<span style="color:#FF0000;font-weight:bold">getobjvar_str</span>]](this, <span style="color:#800000">"acttext"</span>);
+
     <span style="color:#0000FF">string</span> acttext = [[Engine Function:_getobjvar_str|<span style="color:#FF0000;font-weight:bold">getobjvar_str</span>]](this, <span style="color:#800000">"acttext"</span>);
 
     [[Engine Function:_bark|<span style="color:#FF0000;font-weight:bold">bark</span>]](this, acttext);
 
     [[Engine Function:_bark|<span style="color:#FF0000;font-weight:bold">bark</span>]](this, acttext);
 
     [[Engine Function:_processTriggerCmds|<span style="color:#FF0000;font-weight:bold">processTriggerCmds</span>]](this, <span style="color:#800000">"a"</span>);
 
     [[Engine Function:_processTriggerCmds|<span style="color:#FF0000;font-weight:bold">processTriggerCmds</span>]](this, <span style="color:#800000">"a"</span>);
Line 14: Line 14:
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"deacttext"</span>))
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"deacttext"</span>))
 
   {
 
   {
     <span style="color:#0000FF">string</span> deacttext = [[getobjvar_str|<span style="color:#FF0000;font-weight:bold">getobjvar_str</span>]](this, <span style="color:#800000">"deacttext"</span>);
+
     <span style="color:#0000FF">string</span> deacttext = [[Engine Function:_getobjvar_str|<span style="color:#FF0000;font-weight:bold">getobjvar_str</span>]](this, <span style="color:#800000">"deacttext"</span>);
 
     [[Engine Function:_bark|<span style="color:#FF0000;font-weight:bold">bark</span>]](this, deacttext);
 
     [[Engine Function:_bark|<span style="color:#FF0000;font-weight:bold">bark</span>]](this, deacttext);
 
     [[Engine Function:_processTriggerCmds|<span style="color:#FF0000;font-weight:bold">processTriggerCmds</span>]](this, <span style="color:#800000">"d"</span>);
 
     [[Engine Function:_processTriggerCmds|<span style="color:#FF0000;font-weight:bold">processTriggerCmds</span>]](this, <span style="color:#800000">"d"</span>);

Latest revision as of 06:00, 24 October 2018

trigger message("activate")
{
  if (hasObjVar(this, "acttext"))
  {
    string acttext = getobjvar_str(this, "acttext");
    bark(this, acttext);
    processTriggerCmds(this, "a");
  }
  return (0x00);
}
trigger message("deactivate")
{
  if (hasObjVar(this, "deacttext"))
  {
    string deacttext = getobjvar_str(this, "deacttext");
    bark(this, deacttext);
    processTriggerCmds(this, "d");
  }
  return (0x00);
}