Script Function: Q4JH

From Ultima Online: The Second Age
Jump to: navigation, search
 function void Q4JH(obj user, obj usedon)
 {
   list Q514;
   loc Q4EC;
   string name;
   int Q51J;
   obj Q48M;
   obj Q495;
   Q4EC = getLocation(usedon);
   name = getObjVar(usedon, "nameVar");
   int Q4Q1;
   switch (getObjType(usedon))
   {
   case 0x2006
     if (!getCompileFlag(0x01))
     {
       if (getNotorietyLevel(user) >= (0x00 - 0x02))
       {
         addNotoriety(user, 0x00 - 0x0A);
       }
     }
     else
     {
       if (canBeFreelyAggressedBy(usedon, user))
       {
         changeKarma(user, 0x00 - 0x1B58);
       }
       else
       {
         changeKarma(user, 0x00 - 0x07D0);
       }
       receiveUnhealthyActionFrom(usedon, user);
     }
     getContents(Q514, usedon);
     for(int x = 0x00; x < numInList(Q514); x++)
     {
       obj Q4FF = Q514[x];
       int Q5TS = getEquipSlot(Q4FF);
       if ((Q5TS != 0x0B) && (Q5TS != 0x10))
       {
         Q51J = teleport(Q4FF, Q4EC);
       }
     }
     Q495 = Q4EN(Q4EC);
     Q48M = Q4EO(Q4EC, 0x1DA0, "head", name);
     copyObjVar(Q48M, usedon, "controller");
     deleteObject(usedon);
     Q48M = Q4EO(Q4EC, 0x1DA1, "left arm", name);
     Q48M = Q4EO(Q4EC, 0x1DA2, "right arm", name);
     Q48M = Q4EO(Q4EC, 0x1DA3, "left leg", name);
     Q48M = Q4EO(Q4EC, 0x1DA4, "right leg", name);
     Q48M = Q4EO(Q4EC, 0x1D9F, "torso", name);
     break;
   case 0x1DA0
     deleteObject(usedon);
     Q495 = Q4EN(Q4EC);
     Q48M = Q4EO(Q4EC, 0x1CF0, "brain", name);
     Q48M = Q4EO(Q4EC, 0x1AE2, "skull", name);
     break;
   case 0x1D9F
     deleteObject(usedon);
     Q495 = Q4EN(Q4EC);
     Q48M = Q4EO(Q4EC, 0x1B17, "ribcage", name);
     Q48M = Q4EO(Q4EC, 0x1CEE, "liver", name);
     Q48M = Q4EO(Q4EC, 0x1CED, "heart", name);
     Q48M = Q4EO(Q4EC, 0x1CEC, "entrails", name);
     break;
   case 0x1DA4
   case 0x1DA3
     deleteObject(usedon);
     Q495 = Q4EN(Q4EC);
     Q48M = Q4EO(Q4EC, 0x1B11, "femur", name);
     break;
   case 0x1DA1
   case 0x1DA2
     deleteObject(usedon);
     Q495 = Q4EN(Q4EC);
     Q48M = Q4EO(Q4EC, 0x1B12, "armbone", name);
     break;
   }
   return ();
 }