Script: Magrflctbase

From Ultima Online: The Second Age
Revision as of 19:44, 5 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">inherits</span> spelskil; <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4KN(<span style="color:#0000FF...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
inherits spelskil;
function int Q4KN(obj user, obj usedon)
{
  int Q5NC = 0x00;
  if ((!Q50G(usedon)) || (hasScript(usedon, "reflctor")))
  {
    Q4RD(user);
  }
  else
  {
    int Q4NC;
    loc Q4VS = getLocation(user);
    loc there = getLocation(usedon);
    faceHere(user, getDirectionInternal(Q4VS, there));
    Q5NC = 0x01;
    doMobAnimation(usedon, 0x375A, 0x0A, 0x0F, 0x00, 0x00);
    sfx(there, 0x01E9, 0x00);
    if (getSkillLevel(user, 0x19) < 0x0A)
    {
      Q4NC = 0x0A;
    }
    else
    {
      Q4NC = 0x0A * getSkillLevel(user, 0x19) / 0x05;
    }
    attachScript(usedon, "reflctor");
    callback(usedon, Q4NC, 0x16);
  }
  Q5UQ(this);
  return (Q5NC);
}