Script: Des1 ankh 2

From Ultima Online: The Second Age
Revision as of 22:48, 5 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">inherits</span> globals; <span style="color:#0000FF">trigger</span> use { <span style="color:#0000FF">int</span> Q5L8 = random|<span s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
inherits globals;
trigger use
{
  int Q5L8 = random(0x01, 0x04);
  string Q4H1 = Q5L8;
  if (!hasObjVar(user, "usedDespiseLvlOneAnkh"))
  {
    setObjVar(user, "usedDespiseLvlOneAnkh", Q5L8);
    attachScript(user, "des1_ankh_user");
    doLocAnimation(getLocation(user), 0x373A, 0x01, 0x10, 0x00, 0x00);
    if ((Q5L8 == 0x01) || (Q5L8 == 0x04))
    {
      setCurHP(user, getMaxHP(user));
      barkTo(user, user, "A sense of warmth fills your body!");
    }
    if ((Q5L8 == 0x02) || (Q5L8 == 0x04))
    {
      setCurMana(user, getMaxMana(user));
      barkTo(user, user, "A feeling of power surges through your veins!");
    }
    if ((Q5L8 == 0x03) || (Q5L8 == 0x04))
    {
      setCurFatigue(user, getMaxFatigue(user));
      barkTo(user, user, "You feel as though you've slept for days!");
    }
  }
  return (0x00);
}