If you set this up correctly then when you first log in you can hit run, and then go off and get a drink. Come back a few minutes later and you've performed all those boring tasks you usually have to do manually. You're buffed, you've got your food, water, weapon, pet, what ever.
It could dual as a generic skill increaser as well - just set up the spell list to include one of each type.
A few notes:
> This does require SpellSub.mac & SpellBook.mac
> You must edit SpellSub.mac as listed below. I posted an update to that thread, you may want to read it and it's warning before doing this edit.
> Edit (at the start of the code) the spells list. For each spell defined, give the name of the spell (use "s), the time to wait after casting, and the number of times to cast it (want to summon 20 drinks? Put 20). Make sure that you update the index values of the aray as well. Indexes are the numbers in () after that letter a. The second number should go up one for every new spell.
> IMPORTANT: After adding your spells update that variable NumberOfSpells. If you don't then the thing won't loop.
Additions:
It's late, I'm going to bed. Apathy has set in. If people want to code these for me I'll splice them in. My character doesn't need them, so I'm being selfish.
> Check if OOM or LOM and med up to full if you need to.
> I don't like modifying SpellSub.mac - come up with some other way to detect that the spell isn't ready to be cast.
> Break out the portion that sets the Spell array so that you can load different includes for different situations. Then you could set up multiple files and call them from the command line. /macro CastSeries JustStarted would summon your food. /macro CastSeries BuffMe would buff you to full. /macro CastSeries WorkOnSkills would increase your skills. You get the point.
Thanks, and enjoy. As always feedback and (polite) critisicism is welcome. I'm still new to this so be gentle.
Code: Select all
| CastSeries.mac
|
| Author: Nerfy
| Usage: /macro CastSeries <SpellSlotToUse>
| Notes: Must have SpellSub.mac & SpellBook.mac. Also
| be aware that these 2 mac files only work in the OLD UI
| view where the menus are NOT see through.
|
| Please add the following code to the top of SpellSub.mac:
|
| #Event NeedToRecover "You haven't recovered yet..."
|
| Please add the following code to the bottom of SpellSub.mac:
|
| Sub Event_NeedToRecover
| /varset v1 4
| /return
|
#define SpellSlotToUse p0
#define OldSpellName v10
#define NumberOfSpells v11
#include SpellSub.mac
#include SpellBook.mac
Sub Main
| Customize this
| Set the spell name
/varset a(1,1) "Summon Food"
| How long to recycle?
| (Cast time + cycle time)
/varset a(2,1) 7
| How many to suumon?
/varset a(3,1) 2
/varset a(1,2) "Summon Drink"
/varset a(2,2) 7
/varset a(3,2) 8
| Set this to the number of total spells that you defined above.
/varset NumberOfSpells 2
| Pre-summon tasks
/call CleanUpScreen
/varset OldSpellName $char(gem,$p0)
| Begin Spell Casting Loop
/for v20 1 to $NumberOfSpells
| Mem New Spell
|/doability Meditate
/sit
/echo Forget old spell $SpellSlotToUse
/call ForgetSpellByNumber $SpellSlotToUse
/echo Memorize: $a(1,$v20)
:MemAgain
/call MemorizeSpell "$a(1,$v20)" $SpellSlotToUse
/if "$char(gem,$SpellSlotToUse)"=="NULL" /goto :MemAgain
/call CleanUpScreen
| Summon the specified amount
/for v21 1 to $a(3,$v20)
/stand
/press F1
:CastFailed
/echo Casting $a(1,$v20) ($v21 of $a(3,$v20))
/call SpellSub $SpellSlotToUse $a(2,$v20)
/if $invpanel==FALSE /press i
/click left auto
/if $invpanel==TRUE /press i
/next v21
/next v20
| Set spell back to what it was
/sit
/call ForgetSpellByNumber $SpellSlotToUse
/call MemorizeSpell $OldSpellName $SpellSlotToUse
/call CleanUpScreen
/return
Sub CleanUpScreen
/sendkey up ctrl
/sendkey up shift
/sendkey up alt
/press esc
/press esc
/press esc
/stand
/delay 2
/return
