Difference between revisions of "Script Function: addBounty"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> addBounty(<span style="color:#0000FF">list</span> args) { <span style="color:#0000FF">i...")
 
(No difference)

Latest revision as of 15:02, 19 October 2018

function int addBounty(list args)
{
  int bounty = args[0x01];
  int Q5T8 = numInList(Q490);
  for(int i = 0x00; i < Q5T8; i++)
  {
    int Q4FD = oprlist(Q490[i], 0x01);
    if (bounty <= Q4FD)
    {
      break;
    }
  }
  if (Q5T8 >= 0x32)
  {
    if (i <= 0x00)
    {
      return (0x00 - 0x01);
    }
    i--;
    removeItem(Q490, 0x00);
  }
  insertInList(Q490, args, i);
  return (i);
}