Difference between revisions of "Script: Sha boulder"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">inherits</span> globals; <span style="color:#0000FF">member</span> <span style="color:#0000FF">int</span> Q59J; <span style="color:#0000FF...")
 
 
Line 36: Line 36:
 
   }
 
   }
 
   toLocation = Q5CE, Q5A5, Q5A6;
 
   toLocation = Q5CE, Q5A5, Q5A6;
   <span style="color:#0000FF">int</span> Q4Q2 = [[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](this, toLocation);
+
   <span style="color:#0000FF">int</span> Q4Q2 = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](this, toLocation);
 
   [[Engine Function:_callback|<span style="color:#FF0000;font-weight:bold">callback</span>]](this, 0x01, 0x24);
 
   [[Engine Function:_callback|<span style="color:#FF0000;font-weight:bold">callback</span>]](this, 0x01, 0x24);
 
   <span style="color:#0000FF">return</span> (0x00);
 
   <span style="color:#0000FF">return</span> (0x00);
 
  }
 
  }

Latest revision as of 07:20, 19 October 2018

inherits globals;
member int Q59J;
trigger creation
{
  setType(this, 0x11B6);
  Q59J = 0x01;
  callback(this, 0x01, 0x24);
  return (0x00);
}
trigger callback(0x24)
{
  loc Q59R = getLocation(this);
  int Q5A4 = getX(Q59R);
  int Q5A5 = getY(Q59R);
  int Q5A6 = getZ(Q59R);
  int Q5CE;
  loc toLocation;
  if ((Q59J == 0x01) && (Q5A4 < 0x1596))
  {
    Q5CE = Q5A4 + 0x01;
  }
  if (Q5A4 == 0x1596)
  {
    Q59J = 0x00;
  }
  if ((Q59J == 0x00) && (Q5A4 > 0x1593))
  {
    Q5CE = Q5A4 - 0x01;
  }
  if (Q5A4 == 0x1593)
  {
    Q59J = 0x01;
  }
  toLocation = Q5CE, Q5A5, Q5A6;
  int Q4Q2 = teleport(this, toLocation);
  callback(this, 0x01, 0x24);
  return (0x00);
}