Difference between revisions of "Script: Sha teleporter4"

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> creation { setType|<span style="color:#FF0000;font-weight:bold">se...")
 
 
Line 44: Line 44:
 
     Q648 = Q5YY;
 
     Q648 = Q5YY;
 
   }
 
   }
   <span style="color:#0000FF">if</span> (![[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q67D, Q648))
+
   <span style="color:#0000FF">if</span> (![[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q67D, Q648))
 
   {
 
   {
 
     <span style="color:#0000FF">return</span> (0x01);
 
     <span style="color:#0000FF">return</span> (0x01);

Latest revision as of 07:19, 19 October 2018

inherits globals;
trigger creation
{
  setType(this, 0x01);
  return (0x00);
}
trigger enterrange(0x01)
{
  if (!hasObjVar(this, "working"))
  {
    list Q53C = target;
    setObjVar(this, "working", Q53C);
    setType(this, 0x373A);
    callback(this, 0x05, 0x24);
  }
  return (0x01);
}
trigger callback(0x24)
{
  list Q67G;
  getObjListVar(Q67G, this, "working");
  obj Q67D = Q67G[0x00];
  loc Q59R = getLocation(this);
  loc Q648;
  loc Q5YY = 0x1583, 0xA2, 0x05;
  loc Q5YZ = 0x157A, 0xB2, 0x05;
  removeObjVar(this, "working");
  clearList(Q67G);
  getMobsInRange(Q67G, Q59R, 0x02);
  if (!isInList(Q67G, Q67D))
  {
    setType(this, 0x01);
    return (0x00);
  }
  if (Q59R == Q5YY)
  {
    Q648 = Q5YZ;
  }
  if (Q59R == Q5YZ)
  {
    Q648 = Q5YY;
  }
  if (!teleport(Q67D, Q648))
  {
    return (0x01);
  }
  setType(this, 0x01);
  return (0x00);
}