Difference between revisions of "Script: Healbase"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">inherits</span> spelskil; <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4K9(<span style="color:#0000FF...") |
|||
Line 14: | Line 14: | ||
<span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"magicItemBonus"</span>)) | <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"magicItemBonus"</span>)) | ||
{ | { | ||
− | Q5MJ = 0x05 + [[ | + | Q5MJ = 0x05 + [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x06); |
} | } | ||
<span style="color:#0000FF">else</span> | <span style="color:#0000FF">else</span> |
Revision as of 21:24, 18 October 2018
inherits spelskil;
function int Q4K9(obj user, obj usedon) { int Q5NC = 0x00; if (Q50G(usedon)) { int Q5MJ; loc Q4VS = getLocation(user); loc there = getLocation(usedon); faceHere(user, getDirectionInternal(Q4VS, there)); doMobAnimation(usedon, 0x376A, 0x09, 0x20, 0x00, 0x00); sfx(there, 0x01F2, 0x00); if (hasObjVar(this, "magicItemBonus")) { Q5MJ = 0x05 + dice(0x01, 0x06); } else { Q5MJ = ((getSkillLevel(user, 0x19) / 0x0A) + dice(0x01, 0x06)); } int Q4FY = getCurHP(usedon); addHP(usedon, Q5MJ); int Q5CO = getCurHP(usedon); Q5MJ = Q5CO - Q4FY; string Q4PN = Q5MJ; if (isPlayer(user)) { systemMessage(user, Q4PN + " points of damage have been healed."); } if (Q5MJ > 0x00) { int Q527 = Q41J(user, usedon, 0x00, this); Q5NC = 0x01; } } Q5UQ(this); return (Q5NC); }