Hey @
robbinroxxor !! If you are asking about leaving hunting area when you have 30 or less mana potions, then:
1: add a "local MinManaPot = 30" at the top of your lua (without quotes). This declares your minimum mana pots.
2: add a "local ManaPotID = 268" at the top with it as well (without quotes) . This declares what mana potion you are using. This example is a normal mana potion!
3: In your check label (the label used to decide if your leaving) add something like this:
HTML Code:
if ((Self.ItemCount(ManaPotID) <= MinManaPot)) then
gotoLabel("Leave")
end
This will check if you have equal to or less than the mana pots you want, if you don't have enough, it will skip to Leave label in your script!
Hope this helped! Have a wonderful day!
These specific clips of code were taken from Mage Peninsula -2 by @
Biesje Team (Gave wrong props! Got my scripts mixed up sorry.)