Script: Des1 ankh user

From Ultima Online: The Second Age
Revision as of 22:47, 5 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">inherits</span> globals; <span style="color:#0000FF">member</span> <span style="color:#0000FF">int</span> Q5MZ; <span style="color:#0000FF"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
inherits globals;
member int Q5MZ;
member int Q5MY;
trigger creation
{
  Q5MZ = getHour();
  Q5MY = getDay();
  return (0x00);
}
trigger time("hour:**")
{
  if ((getDay() != Q5MY) && (getHour() == Q5MZ) && (hasObjVar(this, "usedDespiseLevelOneAnkh")))
  {
    int Q4VO = getObjVar(this, "usedDespiseLevelOneAnkh");
    if (Q4VO == 0x04)
    {
      setCurHP(this, getMaxHP(this));
      setCurMana(this, getMaxMana(this));
      setCurFatigue(this, getMaxFatigue(this));
      barkTo(this, this, "You feel completely rejuvinated!");
    }
    removeObjVar(this, "usedDespiseLevelOneAnkh");
    detachScript(this, "des1_ankh_user");
  }
  return (0x00);
}