Difference between revisions of "Script: Dice"

From Ultima Online: The Second Age
Jump to: navigation, search
(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)) {...")
 
 
(One intermediate revision by the same user not shown)
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 <span style="color:#0000FF">else</span> is already using those dice."</span>);
+
     [[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);
 
   }
 
   }
 
   [[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 = [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x06);
+
   <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 = [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x06);
+
   <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 21: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);
}