Script Function: Q41S

From Ultima Online: The Second Age
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);
 }