Script Function: Q4WU

From Ultima Online: The Second Age
Revision as of 14:57, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">obj</span> Q4WU(<span style="color:#0000FF">obj</span> Q4H5, <span style="color:#0000FF">obj</span> u...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function obj Q4WU(obj Q4H5, obj user, loc place)
 {
   int Q65M;
   if (!isHousingOkay(place, 0x01))
   {
     barkTo(user, user, "Housing can not be created in this area.");
     return (NULL());
   }
   if (!hasObjVar(Q4H5, "myhousetype"))
   {
     Q65M = 0x00;
   }
   else
   {
     Q65M = getobjvar_int(Q4H5, "myhousetype");
   }
   loc Q5CV = Q4X1(Q65M, place);
   Q5NG = (0x00 - 0x07);
   obj Q5AO = Q4X5(Q65M, Q5CV);
   if (Q5AO == NULL())
   {
     string Q58D = Q592(Q5NG, "house", "valid terrain");
     barkTo(user, user, Q58D);
     return (Q5AO);
   }
   Q4WV(Q5AO, Q5CV);
   setObjVar(Q5AO, "mydeed", Q4H5);
   return (Q5AO);
 }