Difference between revisions of "Script: Hyth1 blade switch"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">inherits</span> globals; <span style="color:#0000FF">trigger</span> use { <span style="color:#0000FF">list</span> Q5DQ; <span style="...")
 
 
Line 9: Line 9:
 
   {
 
   {
 
   <span style="color:#0000FF">case</span> 0x1093
 
   <span style="color:#0000FF">case</span> 0x1093
     [[[[Engine Function:_message|<span style="color:#FF0000;font-weight:bold">message</span>]]ToRange|<span style="color:#FF0000;font-weight:bold">[[Engine Function:_message|<span style="color:#FF0000;font-weight:bold">message</span>]]ToRange</span>]](trapLocation, 0x01, <span style="color:#800000">"disarm"</span>, Q5DQ);
+
     [[Engine Function:_messageToRange|<span style="color:#FF0000;font-weight:bold">messageToRange</span>]](trapLocation, 0x01, <span style="color:#800000">"disarm"</span>, Q5DQ);
 
     [[Engine Function:_callback|<span style="color:#FF0000;font-weight:bold">callback</span>]](this, 0x3C, 0x24);
 
     [[Engine Function:_callback|<span style="color:#FF0000;font-weight:bold">callback</span>]](this, 0x3C, 0x24);
 
     <span style="color:#0000FF">break</span>;
 
     <span style="color:#0000FF">break</span>;
 
   <span style="color:#0000FF">case</span> 0x1095
 
   <span style="color:#0000FF">case</span> 0x1095
     [[[[Engine Function:_message|<span style="color:#FF0000;font-weight:bold">message</span>]]ToRange|<span style="color:#FF0000;font-weight:bold">[[Engine Function:_message|<span style="color:#FF0000;font-weight:bold">message</span>]]ToRange</span>]](trapLocation, 0x01, <span style="color:#800000">"reset"</span>, Q5DQ);
+
     [[Engine Function:_messageToRange|<span style="color:#FF0000;font-weight:bold">messageToRange</span>]](trapLocation, 0x01, <span style="color:#800000">"reset"</span>, Q5DQ);
 
     <span style="color:#0000FF">break</span>;
 
     <span style="color:#0000FF">break</span>;
 
   <span style="color:#0000FF">default</span>
 
   <span style="color:#0000FF">default</span>
Line 29: Line 29:
 
   {
 
   {
 
     [[Engine Function:_setType|<span style="color:#FF0000;font-weight:bold">setType</span>]](this, 0x1093);
 
     [[Engine Function:_setType|<span style="color:#FF0000;font-weight:bold">setType</span>]](this, 0x1093);
     [[[[Engine Function:_message|<span style="color:#FF0000;font-weight:bold">message</span>]]ToRange|<span style="color:#FF0000;font-weight:bold">[[Engine Function:_message|<span style="color:#FF0000;font-weight:bold">message</span>]]ToRange</span>]](trapLocation, 0x01, <span style="color:#800000">"reset"</span>, Q5DQ);
+
     [[Engine Function:_messageToRange|<span style="color:#FF0000;font-weight:bold">messageToRange</span>]](trapLocation, 0x01, <span style="color:#800000">"reset"</span>, Q5DQ);
 
   }
 
   }
 
   <span style="color:#0000FF">return</span> (0x00);
 
   <span style="color:#0000FF">return</span> (0x00);
 
  }
 
  }

Latest revision as of 21:12, 5 October 2018

inherits globals;
trigger use
{
  list Q5DQ;
  int Q5A2 = getObjType(this);
  loc trapLocation = 0x1764, 0x20, 0x16;
  switch (Q5A2)
  {
  case 0x1093
    messageToRange(trapLocation, 0x01, "disarm", Q5DQ);
    callback(this, 0x3C, 0x24);
    break;
  case 0x1095
    messageToRange(trapLocation, 0x01, "reset", Q5DQ);
    break;
  default
    break;
  }
  return (0x01);
}
trigger callback(0x24)
{
  list Q5DQ;
  loc trapLocation = 0x1764, 0x20, 0x16;
  int Q5A2 = getObjType(this);
  if (Q5A2 == 0x1095)
  {
    setType(this, 0x1093);
    messageToRange(trapLocation, 0x01, "reset", Q5DQ);
  }
  return (0x00);
}