Script Function: Q43R

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q43R(obj user, int newType)
 {
   int Q5NC = 0x00;
   if (Q50G(user))
   {
     if (newType >= 0x00)
     {
       if (isRiding(user))
       {
         int Q52Q = unRide(user);
       }
       if (!(hasObjVar(Q62D, "oldBodyType")))
       {
         setObjVar(Q62D, "oldBodyType", getObjType(Q62D));
       }
       if (!(hasObjVar(Q62D, "oldHue")))
       {
         setObjVar(Q62D, "oldHue", getHue(Q62D));
       }
       setType(user, newType);
       setHue(user, 0x00);
       int Q4NC = (getSkillLevel(user, 0x19) / 0x05) * 0x05;
       if (isScroll())
       {
         Q4NC = 0x3C;
       }
       Q4MU(user, Q4NC);
       Q5NC = 0x01;
     }
   }
   Q5UQ(this);
   return (Q5NC);
 }