Difference between revisions of "Script: Teleobj"

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> message(<span style="color:#800000">"teleobj"</span>) { <span style=...")
 
Line 34: Line 34:
 
   <span style="color:#0000FF">if</span> (Q5FT)
 
   <span style="color:#0000FF">if</span> (Q5FT)
 
   {
 
   {
     Q5FT = [[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](this, where);
+
     Q5FT = [[Server Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](this, where);
 
   }
 
   }
 
   <span style="color:#0000FF">if</span> (!Q5FT)
 
   <span style="color:#0000FF">if</span> (!Q5FT)

Revision as of 06:29, 19 October 2018

inherits globals;
trigger message("teleobj")
{
  loc where = args[0x00];
  int Q4VQ = getHeight(this);
  int Q58C = 0x01;
  if (isMobile(this))
  {
    Q58C = getMovementType(this);
  }
  obj Q5R2 = createNoResObjectAt(0x01, getLocation(this));
  attachScript(Q5R2, "telecheck");
  list Q5Z0;
  appendToList(Q5Z0, this);
  appendToList(Q5Z0, where);
  appendToList(Q5Z0, Q4VQ);
  appendToList(Q5Z0, Q58C);
  message(Q5R2, "telecheck", Q5Z0);
  return (0x01);
}
trigger message("telereply")
{
  int Q5FT = args[0x00];
  loc where = args[0x01];
  if (isPlayer(this))
  {
    if (isDead(this))
    {
      Q5FT = 0x00;
    }
  }
  if (Q5FT)
  {
    Q5FT = teleport(this, where);
  }
  if (!Q5FT)
  {
    if (isPlayer(this))
    {
      systemMessage(this, "Something is blocking the location.");
    }
    detachScript(this, "teleobj");
  }
  return (0x01);
}
trigger callback(0x86)
{
  detachScript(this, "teleobj");
  return (0x01);
}