So, I am going to be doing a short quest where the party take over an Item shop for a little while and NPCs will come in to buy, sell or ask for types of items. Depending on the type of NPC, commoner or royal, they have differing amounts of money on hand, which will affect what they will be able to sell or buy from the players. I want to make a macro that does this all automatically for me, however it seems to keep the final hidden roll of the if statements, for example, their Gil is 188 so they should roll for items of value 150 or below, but it returns me an item worth 1000 Gil which they shouldn't have access to. Any advice? Current Macro: !power {{ --whisper|Gm --name|Item Wanted --Character:| @{selected|token_name} [[ [$BuyOrSell] 1d3]] --Character Wealth?:| [[ [$wealth] 49 + ?{Character Type?|Commoner, 1d150|Adventurer, 6d250|Royal, 10d250} ]] Gil
--?? $wealth <= 50 ?? 50 Gil Item:| [[ [$item] 1d4]] --?? $wealth >= 51 AND $wealth <= 75 ?? 75 Gil Item:| [[ [$item] 1d5]] --?? $wealth >= 76 AND $wealth <= 100 ?? 100 Gil Item:| [[ [$item] 1d9]] --?? $wealth >= 101 AND $wealth <= 150 ?? 150 Gil Item:| [[ [$item] 1d12]] --?? $wealth >= 151 AND $wealth <= 200?? 200 Gil Item:| [[ [$item] 1d21]] --?? $wealth >= 201 AND $wealth <= 300?? 300 Gil Item:| [[ [$item] 1d27]] --?? $wealth >= 301 AND $wealth <= 500?? 500 Gil Item:| [[ [$item] 1d41]] --?? $wealth >= 501 AND $wealth <= 750 ?? 750 Gil Item:| [[ [$item] 1d45]] --?? $wealth >= 751 AND $wealth <= 1000?? 1000 Gil Item:| [[ [$item] 1d54]] --?? $wealth >= 1001 AND $wealth <= 3000?? 2000 Gil Item:| [[ [$item] 1d55]]
--?? $BuyOrSell == 1?? Transaction Type:| Buying this item --?? $BuyOrSell == 2?? Transaction Type:| Selling this item --?? $BuyOrSell == 3?? Transaction Type:| Wants this type of item
--?? $item == 1 ?? Item:| Echo Screen - 50 Gil --?? $item == 2 ?? Item:| Light Curtain - 50 Gil --?? $item == 3 ?? Item:| Lunar Curtain - 50 Gil --?? $item == 4 ?? Item:| Eye Drops - 50 Gil
--?? $item == 5 ?? Item:| Dream Powder - 75 Gil
--?? $item == 6 ?? Item:| Antidote - 100 Gil --?? $item == 7 ?? Item:| Smelling Salts - 100 Gil --?? $item == 8 ?? Item:| Healing Spring - 100 Gil --?? $item == 9 ?? Item:| Squid Ink - 100 Gil
--?? $item == 10 ?? Item:| Deadly Waste - 150 Gil --?? $item == 11 ?? Item:| Mute Mask - 150 Gil --?? $item == 12 ?? Item:| Vaccine - 150 Gil
--?? $item == 13 ?? Item:| Arctic Wind - 200 Gil --?? $item == 14 ?? Item:| Black Club - 200 Gil --?? $item == 15 ?? Item:| Bolt Plume - 200 Gil --?? $item == 16 ?? Item:| Fire Fang - 200 Gil --?? $item == 17 ?? Item:| Fish Scale - 200 Gil --?? $item == 18 ?? Item:| Gale Winds - 200 Gil --?? $item == 19 ?? Item:| Gold Needle - 200 Gil --?? $item == 20 ?? Item:| Earth Drum - 200 Gil --?? $item == 21 ?? Item:| White Ribbon - 200 Gil
--?? $item == 22 ?? Item:| Hi-Potion - 300 Gil --?? $item == 23 ?? Item:| Luck Mallet - 300 Gil --?? $item == 24 ?? Item:| Magic Tentacles - 300 Gil --?? $item == 25 ?? Item:| Maiden's Kiss - 300 Gil --?? $item == 26 ?? Item:| Silver Hourglass - 300 Gil --?? $item == 27 ?? Item:| Spider Web - 300 Gil
--?? $item == 28 ?? Item:| Ether - 500 Gil --?? $item == 29 ?? Item:| Dark Matter - 500 Gil --?? $item == 30 ?? Item:| Bomb Fragment - 500 Gil --?? $item == 31 ?? Item:| Dragon Scales - 500 Gil --?? $item == 32 ?? Item:| Earth Mallet - 500 Gil --?? $item == 33 ?? Item:| Holy Water - 500 Gil --?? $item == 34 ?? Item:| Ice Crystal - 500 Gil --?? $item == 35 ?? Item:| Prism Powder - 500 Gil --?? $item == 36 ?? Item:| Purifying Salt - 500 Gil --?? $item == 37 ?? Item:| Remedy - 500 Gil --?? $item == 38 ?? Item:| Shrivel - 500 Gil --?? $item == 39 ?? Item:| Swift Bolt - 500 Gil --?? $item == 40 ?? Item:| White Globe - 500 Gil --?? $item == 41 ?? Item:| Wind Chime - 500 Gil
--?? $item == 42 ?? Item:| Baccus Wine- 750 Gil --?? $item == 43 ?? Item:| Basilisk Claw - 750 Gil --?? $item == 44 ?? Item:| Dazers - 750 Gil --?? $item == 45 ?? Item:| Star Curtain- 750 Gil
--?? $item == 46 ?? Item:| Dark Gem - 1000 Gil --?? $item == 47 ?? Item:| Earth Gem - 1000 Gil --?? $item == 48 ?? Item:| Fire Gem - 1000 Gil --?? $item == 49 ?? Item:| Ice Gem - 1000 Gil --?? $item == 50 ?? Item:| Light Gem - 1000 Gil --?? $item == 51 ?? Item:| Lightning Gem - 1000 Gil --?? $item == 52 ?? Item:| Water Gem - 1000 Gil --?? $item == 53 ?? Item:| WindGem - 1000 Gil --?? $item == 54 ?? Item:| Hi-Ether - 1000 Gil
--?? $item == 55 ?? Item:| Phoenix Down - 2000 Gil }} What it returns: