Difference between revisions of "Script: Dice"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">trigger</span> use { <span style="color:#0000FF">if</span> (<span style="color:#FF0000;font-weight:bold">isDead</span>(user)) {...") |
|||
Line 7: | Line 7: | ||
<span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"inUse"</span>)) | <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"inUse"</span>)) | ||
{ | { | ||
− | [[Engine Function:_ebarkTo|<span style="color:#FF0000;font-weight:bold">ebarkTo</span>]](this, user, <span style="color:#800000">"Someone | + | [[Engine Function:_ebarkTo|<span style="color:#FF0000;font-weight:bold">ebarkTo</span>]](this, user, <span style="color:#800000">"Someone else is already using those dice."</span>); |
<span style="color:#0000FF">return</span> (0x00); | <span style="color:#0000FF">return</span> (0x00); | ||
} | } |
Revision as of 20:49, 18 October 2018
trigger use { if (isDead(user)) { return (0x00); } if (hasObjVar(this, "inUse")) { ebarkTo(this, user, "Someone else is already using those dice."); return (0x00); } setObjVar(this, "inUse", 0x01); int Q4I6 = dice(0x01, 0x06); int Q4I7 = dice(0x01, 0x06); int Q63R = Q4I6 + Q4I7; string Q4I8 = Q4I6; string Q4I9 = Q4I7; string Q5XE = Q63R; string Q47T = getName(user) + " shakes the cup and spills the dice. The dice come to a stop showing a " + Q4I8 + " and a " + Q4I9 + " for a total of " + Q5XE + "."; ebark(this, Q47T); removeObjVar(this, "inUse"); return (0x00); }