Echoism's Spell Routines include file v. 2.5.0. This is the include file you need for this to work. It is in the VIP section so you can either donate for the access, or find a way to make one of the others work.
I'd like to thank Lax and fearless for their tactful directions that helped me find the information I needed to get certain portions of this to work. E.g. loops and item counts, and the like. I would also like to thank Bardomatic for his help and suggestions, without which I'd be bald from pulling out my hair. Finally, I'd like to thank OneTimeHero for his very simple CastPractice.iss from which a good portion of my code was originally ripped from.
This can be modified to cast anything, but is set up for 3 items; food, drink, and daggers(for pets).
This version does not take input for number of items to summon, but the next one (third post) does.
I hope this proves useful to anyone looking for a script like this.
I further hope that it helps others trying to learn to write scripts, just as castpractice helped me.
This has some echos in it, their purpose is to give the user a updated count in the isxeqchatwnd. If you are not using isxeqchatwnd, you won't see them.
Code: Select all
#include spell_routines.inc
function main()
{
[color=red]EQExecute /memspellset Summon[/color]
[color=cyan];I have a spell set with the items I tend to summon in it, you can comment these lines out that are in red[/color]
[color=red]wait 3000 ${Me.SpellReady[Dimensional Pocket]}[/color]
call CastFood
call CastDrink
call CastWeaps
if !${Me.Sitting}
EQExecute /sit
echo END!!!!
}
function CastFood()
{
do
{
wait ${Math.Rand[15]:Inc[5]}
;echo ${Me.SpellReady[Summon Food]} && ${Me.PctMana}>5 [color=cyan];commented out because it really is only for troubleshooting[/color]
if ${Me.SpellReady[Summon Food]} && ${Me.PctMana}>5
{
;echo summoning food [color=cyan];commented out because it really is only for troubleshooting[/color]
call Cast "Summon Food"
if ${Cursor(exists)}
{
EQExecute /autoinventory
wait 20 !${Cursor.ID}
wait 20 ${Me.SpellReady[Summon Food]}
echo ${FindItemCount[=Summoned: Black Bread]} Black Bread loaves summoned so far.
}
}
else
{
[color=cyan];Med to full[/color]
if !${Me.Sitting}
EQExecute /sit
wait 9999 ${Me.PctMana}==100
}
}
while (${FindItemCount[=Summoned: Black Bread]}<100) [color=cyan];watches the count so that it knows when to stop summoning this item[/color]
}
function CastDrink()
{
do
{
wait ${Math.Rand[15]:Inc[5]}
;echo ${Me.SpellReady[Summon Drink]} && ${Me.PctMana}>5 [color=cyan];commented out because it really is only for troubleshooting[/color]
if ${Me.SpellReady[Summon Drink]} && ${Me.PctMana}>5
{
;echo summoning drink [color=cyan];commented out because it really is only for troubleshooting[/color]
call Cast "Summon Drink"
if ${Cursor(exists)}
{
EQExecute /autoinventory
wait 20 !${Cursor.ID}
wait 20 ${Me.SpellReady[Summon Drink]}
echo ${FindItemCount[=Summoned: Globe of Water]} Globe's of Water summoned so far.
}
}
else
{
[color=cyan];Med to full[/color]
if !${Me.Sitting}
EQExecute /sit
wait 9999 ${Me.PctMana}==100
}
}
while (${FindItemCount[=Summoned: Globe of Water]}<40) [color=cyan];watches the count so that it knows when to stop summoning this item[/color]
}
function CastWeaps()
{
do
{
wait ${Math.Rand[15]:Inc[5]}
;echo ${Me.SpellReady[Summon Dagger]} && ${Me.PctMana}>5 [color=cyan];commented out because it really is only for troubleshooting[/color]
if ${Me.SpellReady[Summon Dagger]} && ${Me.PctMana}>5
{
;echo summoning drink [color=cyan];commented out because it really is only for troubleshooting[/color]
call Cast "Summon Dagger"
if ${Cursor(exists)}
{
EQExecute /autoinventory
wait 20 !${Cursor.ID}
wait 20 ${Me.SpellReady[Summon Dagger]}
echo ${FindItemCount[=Summoned: Dagger]} Daggers summoned so far.
}
}
else
{
[color=cyan];Med to full[/color]
if !${Me.Sitting}
EQExecute /sit
wait 9999 ${Me.PctMana}==100
}
}
while (${FindItemCount[=Summoned: Dagger]}<2) [color=cyan];watches the count so that it knows when to stop summoning this item[/color]
}

