Difference between revisions of "Script Function: Q4E8"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4E8(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">obj</span>...") |
|||
Line 43: | Line 43: | ||
<span style="color:#0000FF">else</span> | <span style="color:#0000FF">else</span> | ||
{ | { | ||
− | Q4TM = [[ | + | Q4TM = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q5CN, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](user)); |
[[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](user, <span style="color:#800000">"You put the cooked food on the ground."</span>); | [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](user, <span style="color:#800000">"You put the cooked food on the ground."</span>); | ||
} | } |
Latest revision as of 07:45, 19 October 2018
function void Q4E8(obj user, obj Q66M, int Q4QY, string name) { if (isAtHome(this)) { systemMessage(user, "You can't use that, it belongs to someone else."); return (); } int Q66P = getObjType(Q66M); if (Q4Z2(Q66P)) { if (!testSkill(user, 0x0D)) { systemMessage(user, "You burn the food to a crisp! It's ruined."); destroyOne(this); return (); } if (name != "default") { if (hasObjVar(this, "NAME")) { removeObjVar(this, "NAME"); setObjVar(this, "NAME", name); } } if (random(0x00, 0x01)) { barkTo(user, user, "Looks delicious."); } else { barkTo(user, user, "Mmmm, smells good."); } obj Q47F = getBackpack(user); int Q4TM; obj Q5CN = createGlobalObjectOn(this, Q4QY); if (!isInContainer(this)) { if (canHold(Q47F, Q5CN)) { Q4TM = putObjContainer(Q5CN, Q47F); systemMessage(user, "You put the cooked food into your backpack."); } else { Q4TM = teleport(Q5CN, getLocation(user)); systemMessage(user, "You put the cooked food on the ground."); } } destroyOne(this); } else { systemMessage(user, "You can't cook on that."); } return (); }