Difference between revisions of "Script: Des1 ankh tele 2"

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">loc</span> toLocation = 0x1581, 0x...")
 
 
Line 11: Line 11:
 
     [[Engine Function:_doLocAnimation|<span style="color:#FF0000;font-weight:bold">doLocAnimation</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](user), 0x373A, 0x01, 0x18, 0x00, 0x00);
 
     [[Engine Function:_doLocAnimation|<span style="color:#FF0000;font-weight:bold">doLocAnimation</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](user), 0x373A, 0x01, 0x18, 0x00, 0x00);
 
     [[Engine Function:_doLocAnimation|<span style="color:#FF0000;font-weight:bold">doLocAnimation</span>]](toLocation, 0x373A, 0x01, 0x18, 0x00, 0x00);
 
     [[Engine Function:_doLocAnimation|<span style="color:#FF0000;font-weight:bold">doLocAnimation</span>]](toLocation, 0x373A, 0x01, 0x18, 0x00, 0x00);
     <span style="color:#0000FF">if</span> (![[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](user, toLocation))
+
     <span style="color:#0000FF">if</span> (![[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](user, toLocation))
 
     {
 
     {
 
       <span style="color:#0000FF">return</span> (0x01);
 
       <span style="color:#0000FF">return</span> (0x01);

Latest revision as of 08:41, 19 October 2018

inherits globals;
trigger use
{
  loc toLocation = 0x1581, 0x0271, 0x1E;
  if (!hasObjVar(this, "working"))
  {
    setObjVar(this, "working", 0x01);
    setType(this, 0x1091);
    callback(this, 0x03, 0x24);
    doLocAnimation(getLocation(user), 0x373A, 0x01, 0x18, 0x00, 0x00);
    doLocAnimation(toLocation, 0x373A, 0x01, 0x18, 0x00, 0x00);
    if (!teleport(user, toLocation))
    {
      return (0x01);
    }
  }
  return (0x00);
}
trigger callback(0x24)
{
  if (hasObjVar(this, "working"))
  {
    removeObjVar(this, "working");
    setType(this, 0x1092);
  }
  return (0x00);
}