Script Function: addBounty

From Ultima Online: The Second Age
Jump to: navigation, search
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);
}