Updated: 2-23-2018
got back to this changed a few things, now it runs better and it should work properly
got back to this changed a few things, now it runs better and it should work properly
Rich (BB code):
#turbo
Sub Main
/declare WelcomeStr string \ay Food.mac - \ag Dispensing :
/declare EndStr string \ay Food.mac - \ag We have enough
/declare i int local
/declare ii int local
|---Edit these to fit your dispensing needs---------------
/declare Food[2] string outer NULL
/varset Food[1] Warm Milk Dispenser|Warm Milk|10
/varset Food[2] Fresh Cookie dispenser|Fresh Cookie|10
|---Syntax : ItemToClick|WhatIsDispensed|AmountYouWant---
/for i 1 to ${Food.Size}
/varset WelcomeStr ${WelcomeStr}\a-w ${Food[${i}].Arg[2,|]}
/if (${i} != ${Food.Size}) /varset WelcomeStr ${WelcomeStr}\ag,
/next i
/varset WelcomeStr ${WelcomeStr}\ag Please Hold
/echo ${WelcomeStr}
:Loop
/for i 1 to ${Food.Size}
/if (${FindItem[${Food[${i}].Arg[2,|]}].Stack} <${Food[${i}].Arg[3,|]}) {
/if (${Me.ItemReady[${Food[${i}].Arg[1,|]}]}) /casting "${Food[${i}].Arg[1,|]}|item"
/delay 5s !${Me.Casting.ID}
/delay 2
/autoinventory
}
/next i
/for ii 1 to ${Food.Size}
/if (${FindItem[${Food[${ii}].Arg[2,|]}].Stack} <${Food[${ii}].Arg[3,|]}) {
/goto :Loop
}
/next ii
/goto :Exit
:Exit
/for i 1 to ${Food.Size}
/varset EndStr ${EndStr}\a-w ${Food[${i}].Arg[2,|]}
/if (${i} != ${Food.Size}) /varset EndStr ${EndStr}\ag,
/next i
/varset EndStr ${EndStr}\ag For now.
/echo ${EndStr}
/return