Supplies (Checks, Resupply, Conditions)
Hello, my first script i used the supply functions in the but, but i prefer LUA script!!
Let's show you the functions and variable about it:
Code:
needresupply(cap, category)
resupply()
depositerbank()
https://i.imgur.com/WzeUJK1.png
Looking at this image you see, categories that A and B.
Now, using a check for your hunt:
The code needresupply(cap, category) - if you didn't use any variable for cap, it will be default by 50
Let's try to check if i need repot:
Code:
if needresupply(cap, 'a') then
gotolabel(0, "Hunt2City")
else
gotolabel("Hunt")
end
This will check if need both Mana Potion and Health Potion, because the category is a that i filled up in the screen.
The same for b that check if i need royal spear, it works with ANY item.
Now let's use function for buy items in pot or anything else you want.
The code resupply(category) will be added in a action, in front of NPC, if you want put a reachcreature before
The code for resupply potion will be:
Code:
resupply('a')
wait(1234,3456)
Simple...
Than now to withdraw money in bank for supplies:
The code depositerbank(category) has the same variable of other supplies function, the category.
Doing the code below it will withdraw money to all a category items.
Code:
depositerbank('a')
wait(1234,3456)
If you need money to withdraw 2 or more categories you use:
Code:
depositerbank('ab')
wait(1234,3456)
Don't do separated depositerbank() because it will deposit all your money.
Take free to questions.
https://i.imgur.com/VvWRN7F.png