I also wrote a summonFood.mac and summonDrink.mac to be used as command line versions.
Comming Soon: LootFilter w/ ini Support
Code: Select all
|
|
|FoodAndDrink.inc
|Version: 1.0
|
|Author: Draco
|
|Usage: Add
| /call initFoodAndDrink "Name of Food Summoning Spell" "Name of Drink Summoning Spell"
| in your setup. For Example: /call initFoodAndDrink "Summon Food" "Summon Drink"
| Add
| /call CheckFoodAndDrink
| somewhere in your main loop
|
|Note:
|
| This include requires SpellCast.ini
|TODO:
| Add Reload previously memorized spell. SpellCast.ini automatically load any unmemmed spell into slot 5
|
#include SpellCast.inc
#Event Drink "You are out of drink"
#Event Food "You are out of food"
Sub initFoodAndDrink
/declare NeedFood global
/varset NeedFood 0
/declare NeedDrink global
/varset NeedDrink 0
/declare summonFoodSpell global
/declare summonDrinkSpell global
/varset summonDrinkSpell "Summon Drink"
/varset summonFoodSpell "Summon Food"
/if (${Defined[Param0]}==TRUE) /varset summonFoodSpell "@Param0"
/if (${Defined[Param1]}==TRUE) /varset summonDrinkSpell "@Param1"
/echo "summoning Food With @summonFoodSpell"
/echo "summoning Drink With @summonDrinkSpell"
/return
Sub CheckFoodStatus
/echo Checking Food @NeedFood
/newif (@NeedFood==1) {
/call SummonFood 5
}
/echo Checking Drink @NeedDrink
/newif (@NeedDrink==1) {
/call SummonDrink 5
}
/varset NeedDrink 0
/varset NeedFood 0
/return
Sub SummonFood
/declare cnt local
/echo Casting @summonFoodSpell
/for cnt 1 to @Param0 step 1 {
/call Cast "@summonFoodSpell"
:foodLoop
/autoinventory
/if (${Bool[${Cursor}]}) /goto :foodLoop
/doevents
}
/next cnt
/return
Sub SummonDrink
/declare cnt local
/echo Casting @summonDrinkSpell
/for cnt 1 to @Param0 step 1 {
/call Cast "@summonDrinkSpell"
:drinkLoop
/autoinventory
/if (${Bool[${Cursor}]}) /goto :drinkLoop
/doevents
}
/next cnt
/return
Sub Event_Drink
/varset NeedDrink 1
/echo "Setting NeedDrink to @NeedDrink"
/return
Sub Event_Food
/varset NeedFood 1
/echo "Setting NeedFood to @NeedFood"
/return
Code: Select all
|
|SummonFood.mac
|
|Author: Draco
|
|
|TODO:
| Validate input Param
|
#include FoodAndDrink.inc
Sub Main(count)
/call initFoodAndDrink
/call SummonFood "@count"
/return
Code: Select all
|
|SummonDrink.mac
|
|Author: Draco
|
|
|TODO:
| Validate input Param
|
#include FoodAndDrink.inc
Sub Main(count)
/call initFoodAndDrink
/call SummonDrink "@count"
/return

