Script Function: Q41S

From Ultima Online: The Second Age
Revision as of 22:05, 11 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q41S(<span style="color:#0000FF">int</span> listindex, <span style="color:#0000FF">obj</sp...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int Q41S(int listindex, obj usedon)
 {
   if (listindex == 0x00)
   {
     return (0x00);
   }
   if (!isDead(usedon))
   {
     return (0x00);
   }
   if ((!hasObjVar(usedon, "resurrectLocation")) || (!hasObjVar(usedon, "resurrectCaster")))
   {
     return (0x00);
   }
   loc Q4VS = getLocation(usedon);
   loc there = getObjVar(usedon, "resurrectLocation");
   obj caster = getObjVar(usedon, "resurrectCaster");
   if (Q4VS != there)
   {
     systemMessage(usedon, "Thou hast wandered too far from the site of thy resurrection!");
     return (0x00);
   }
   loc target = getLocation(usedon);
   int Q4XW = getHeight(usedon);
   if (0x07 != canExistAt(target, Q4XW, 0x01))
   {
     systemMessage(usedon, "Thou can not be resurrected there!");
     return (0x00);
   }
   return (0x01);
 }