Script Function: Q4JI

From Ultima Online: The Second Age
Revision as of 16:22, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4JI(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">obj</span> u...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int Q4JI(obj user, obj usedon)
 {
   int Q5NC = 0x00;
   if ((Q50G(usedon)) && (hasScript(usedon, "destcrea")))
   {
     loc Q4VS = getLocation(user);
     loc there = getLocation(usedon);
     int Q47W;
     int Q44S = getSkillLevelReal(user, 0x19);
     faceHere(user, getDirectionInternal(Q4VS, there));
     Q47W = 0x00;
     Q47W = getObjVar(usedon, "summonDifficulty");
     int Q4IA = Q47W;
     int success = testAndLearnSkill(user, 0x19, Q4IA, 0x28);
     if (success > 0x00)
     {
       doLocAnimation(there, 0x3728, 0x08, 0x14, 0x00, 0x00);
       sfx(there, 0x0201, 0x00);
       deleteObject(usedon);
       Q5NC = 0x01;
     }
     else
     {
       doMobAnimation(usedon, 0x3779, 0x0A, 0x14, 0x00, 0x00);
       systemMessage(user, "The " + getName(usedon) + " resisted the attempt to dispel it!");
     }
   }
   Q5UQ(this);
   return (Q5NC);
 }