Script: Dice

From Ultima Online: The Second Age
Revision as of 22:42, 5 October 2018 by Grimoric (talk | contribs) (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)) {...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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);
}