Script Function: Q4LK

From Ultima Online: The Second Age
Revision as of 03:04, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4LK(<span style="color:#0000FF">obj</span> this, <span style="color:#0000FF">obj</span>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function void Q4LK(obj this, obj usedon, obj user)
 {
   int Q57Y;
   Q57Y = getStrength(usedon) + getDexterity(usedon) + getSkillLevel(usedon, 0x05) + getSkillLevel(usedon, 0x1B);
   Q57Y = Q57Y - (getStrength(this) + getDexterity(this) + getSkillLevel(this, 0x05) + getSkillLevel(this, 0x1B));
   Q57Y = Q57Y / 0x0A;
   if ((isHuman(usedon)) && (isNPC(usedon)) && (isHuman(this)))
   {
     bark(this, "I am no murderer!");
     return ();
   }
   if (Q4KK(this, Q57Y))
   {
     if (0x00)
     {
       bark(this, "Attacking!");
     }
     copyControllerInfo(this, user);
     Q4DG(this);
     setObjVar(this, "controllerTimeout", 0x02 * 0x3C * 0x04);
     callbackAdvanced(this, 0x02 * 0x3C * 0x04, 0x14, 0x00);
     setObjVar(this, "victim", usedon);
     setObjVar(this, "user", user);
     walkTo(this, getLocation(usedon), 0x10);
     attack(this, usedon);
     if (!getCompileFlag(0x01))
     {
       criminalAct(user, usedon, 0x01, 0x0A);
       callGuards(user, getLocation(user), 0x02);
     }
   }
   removeObjVar(this, "petAttack");
   return ();
 }