Script Function: Q65E

From Ultima Online: The Second Age
Revision as of 05:20, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q65E(<span style="color:#0000FF">obj</span> user) { <span style="color:#0000FF">loc<...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int Q65E(obj user)
 {
   loc Q4VS = getLocation(user);
   loc there = getLocation(this);
   loc Q62J = getLocation(user);
   obj Q47F = getBackpack(user);
   if (isAtHome(this))
   {
     systemMessage(user, "You can't ignite that, it belongs to someone else.");
     return (0x00);
   }
   if (isInContainer(this))
   {
     if (!findGoodSpotNearWithElev(Q62J, getZ(Q4VS) - 0x08, getZ(Q4VS) + 0x08, 0x02, 0x02, 0x01))
     {
       systemMessage(user, "There is not a spot nearby to place your campfire.");
       return (0x00);
     }
   }
   else
   {
     Q62J = there;
   }
   if (!testSkill(user, 0x0A))
   {
     barkTo(this, user, "You fail to ignite the campfire.");
     return (0x00);
   }
   obj fire = createGlobalObjectAt(0x0DE3, Q62J);
   setObjVar(fire, "campfire_burning", 0x01);
   attachScript(fire, "campfire");
   destroyOne(this);
   if (!isInContainer(this))
   {
     if (canHold(Q47F, this))
     {
       int Q4Q1 = putObjContainer(this, Q47F);
     }
     else
     {
       deleteObject(this);
     }
   }
   return (0x00);
 }