Difference between revisions of "Script: Dice"
From Ultima Online: The Second Age
Line 11: | Line 11: | ||
} | } | ||
[[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](this, <span style="color:#800000">"inUse"</span>, 0x01); | [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](this, <span style="color:#800000">"inUse"</span>, 0x01); | ||
− | <span style="color:#0000FF">int</span> Q4I6 = [[ | + | <span style="color:#0000FF">int</span> Q4I6 = [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x06); |
− | <span style="color:#0000FF">int</span> Q4I7 = [[ | + | <span style="color:#0000FF">int</span> Q4I7 = [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x06); |
<span style="color:#0000FF">int</span> Q63R = Q4I6 + Q4I7; | <span style="color:#0000FF">int</span> Q63R = Q4I6 + Q4I7; | ||
<span style="color:#0000FF">string</span> Q4I8 = Q4I6; | <span style="color:#0000FF">string</span> Q4I8 = Q4I6; |
Latest revision as of 20:53, 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); }