Difference between revisions of "Script Function: Q4IX"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4IX(<span style="color:#0000FF">obj</span> beggar, <span style="color:#0000FF">obj</span...") |
|||
Line 56: | Line 56: | ||
<span style="color:#0000FF">if</span> (Q4Q1 == [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]()) | <span style="color:#0000FF">if</span> (Q4Q1 == [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]()) | ||
{ | { | ||
− | <span style="color:#0000FF">int</span> bar = [[ | + | <span style="color:#0000FF">int</span> bar = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q606, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](beggar)); |
} | } | ||
[[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](this, <span style="color:#800000">"beggingpathfind"</span>); | [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](this, <span style="color:#800000">"beggingpathfind"</span>); | ||
<span style="color:#0000FF">return</span> (); | <span style="color:#0000FF">return</span> (); | ||
} | } |
Latest revision as of 07:46, 19 October 2018
function void Q4IX(obj beggar, obj victim) { removeObjVar(this, "beggingVictim"); removeObjVar(this, "beggingBeggar"); int Q45Y = getMoney(victim) / 0x0A; if (Q45Y > 0x0A) { Q45Y = 0x0A; } if (!getCompileFlag(0x01)) { Q45Y = Q45Y + (getNotoriety(beggar) / 0x0A); } else { int mod = Q45Y + getAdjKarma(beggar) / 0x07D0; Q45Y = Q45Y + mod; } if (Q45Y < 0x01) { bark(victim, "Thou dost not look trustworthy... no gold for thee today!"); return (); } if (Q45Y > getMoney(victim)) { bark(victim, "I have not enough money to give thee any!"); return (); } obj Q606 = transferGenericToContainer(this, victim, 0x0EED, Q45Y); if (Q606 == NULL()) { bark(victim, "I have not enough money to give thee any!"); return (); } obj Q4Q1 = giveItem(beggar, Q606); if (Q4Q1 == NULL()) { bark(victim, "I have not enough money to give thee any!"); return (); } string Q496 = "Here, have " ); string Q463 = Q45Y; concat(Q496, Q463); concat(Q496, " gold coin"); if (Q45Y > 0x01) { concat(Q496, "s."); } else { concat(Q496, "."); } toUpper(Q496, 0x00, 0x01); bark(beggar, Q496); if (Q4Q1 == NULL()) { int bar = teleport(Q606, getLocation(beggar)); } detachScript(this, "beggingpathfind"); return (); }