Page 4 of 11
Posted: Sat Aug 21, 2004 1:37 am
by Rusty~
heh well bard is like the one class i've never played... so really have no idea how to add in support for them. if you think you could do it tho you're welcome to try.. i'll see what i can do about adding comments and stuff throughout the code.
possible addon for your spells_routine ...
Posted: Sat Aug 21, 2004 2:07 am
by s0rcier
Make up a general equip sub, to equip item in main inventory slot. Could be use to equip a focus item, before we calling cast, then un-equip it. Use your good swapitem sub.
Usage: /call EquipItem "ItemName|SlotName"
SlotName is optional, if not given, sub will try to find out first slot where the ItemName could be equip. Sub will equip ItemName in SlotName if the item could be equip there, then returnin ${Macro.Return} Unequip info for future call back"
ie: i'm currently wearing an Ancient Prismatic Staff in mainhand
/call EquipItem "Spear of Fate"
sub return-> "Ancient Prismatic Staff|mainhand"
/call EquipItem "${Macro.Return}"
sub return-> "Spear of Fate|mainhand"
Sub EquipItem(string WhatWhere)
/declare DestName string local
/declare ItemName string local ${String[${WhatWhere}].Arg[1,|]}
/declare SlotName string local ${String[${WhatWhere}].Arg[2,|]}
/if (${SlotName.Equal[NULL]}) /varset SlotName ${InvSlot[${FindItem[=${ItemName}].WornSlot[1]}].Name}
/if (${FindItem[=${ItemName}].InvSlot}<22 || !${FindItem[=${ItemName}].WornSlot[${SlotName}]}) /return
/if (!${InvSlot[${SlotName}].Item.Name.Equal[NULL]}) /varset DestName "${InvSlot[${SlotName}].Item.Name}|${SlotName}"
/call SwapItem "${ItemName}" "${SlotName}"
/return ${DestName}
Have Fun :)
was gonna post about some stuff i see in the 19 update "variable not declare in wait4cast" but you fixed them!
Posted: Sat Aug 21, 2004 7:30 am
by aChallenged1
Rusty~, doing better this morning now that I'm a little more awake while going through this. It really helps to not be nodding off and getting qwerty faced...
Anyway, making changes as I can and wanted to comment on one of your routines for handling STUNNED. While it works most of the time, I'd suggest a change. Instead of a hardcoded 3sec timer, as there are some stuns that are zero length and simply interrupt casting, a small loop.
Due to my current level of knowledge, I am unsure as to the fesibility of the following...
Code: Select all
:me_stunned
/if ( ${castReturn.Equal[CAST_STUNNED]} ) {
/if ( ${Me.Stunned} ) {
/delay 2 !${Me.Stunned}
/goto :me_stunned
} else {
/delay 7
}
/goto :cast_spell_loop
}
Maybe it has to be written differently, but I'm fairly sure something like this would work, AND it would take care of lag issues as well.
Also, you might consider making it a sub.
Code: Select all
/doevent Stunned
Sub Event_Stunned
/if ( ${Defined[castReturn]} ) /varset castReturn CAST_STUNNED
:Stunned
/if ( ${Me.Stunned} ) {
/delay 2
/goto :Stunned
}
/return
Thoughts? Corrections?
PERSONAL EDIT: looking at this, considering that there is a stunned event, and it is checked, with the above change, it would seem to me that the
/if ( ${castReturn.Equal[CAST_STUNNED]}) /goto :Stunned line could be completely removed and in the original its entire substructure.
Posted: Sat Aug 21, 2004 11:21 am
by Rusty~
this is how the code is now:
Code: Select all
/if ( ${castReturn.Equal[CAST_STUNNED]} ) {
/if ( ${Me.Stunned} ) {
/delay 3s !${Me.Stunned}
} else {
/delay 7
}
/goto :cast_spell_loop
}
what it does is, if you're stunned it will wait 3 seconds OR until you're no longer stunned... that's what the line /delay 3s !${Me.Stunned}
does.... it'll wait that ammount of time, or until the condition after it is true. now since i used stunned for silence too, if you're not stunned but it gets the stun return, then it just waits .7 seconds and tries again.... i dont think theres any way to tell if you're silenced without checkin for every type of silence buff which would be way too much work.
to s0rcier:
that sound like it could be pretty useful, i'll see what i can do.
Posted: Sat Aug 21, 2004 11:57 am
by Rusty~
ok added in EquipItem sub!
Posted: Sat Aug 21, 2004 6:08 pm
by Night Hawk
One thing I noticed is if a spell is mem'd right before it does the /call cast it seems to ingore the delay of 15s until the spell is ready.
Converting from SpellCast.inc so I just had to take out anything that memed it before. Just thought I'd say.
Posted: Sat Aug 21, 2004 7:18 pm
by Rusty~
yeah i did it on purpose so that it wouldn't get stuck in a loop till the spell is up. i designed this initially with mainly speed in mind. i wanted to be able to cast spells back to back, and have as little delay as possible. i left it up to the macro to handle spells that aren't ready, etc. if you manually mem a spell, and then the macro tries to cast it and it's not up, it will just return CAST_NOTREADY, instead of waiting.
Posted: Sun Aug 22, 2004 12:11 am
by Night Hawk
Gotcha. Guess I jsut got used to the outdated or insuffienct code for me from SpellCast.inc and worked around it. Now my work arounds aren't needed
Also, is this the correct way to determine that a spell did not take hold? Been using it this way just don't remember if I ran into any resists yet:
Code: Select all
/if (${String[${castReturn}].Equal[CAST_RESISTED]}) {
Cause I know with SpellCast.inc I just used:
Code: Select all
/if (${String[${Macro.Return}].Equal[CAST_RESISTED]}) {
Posted: Sun Aug 22, 2004 11:12 am
by Rusty~
nah with this you can use ${Macro.Return} too
Posted: Sun Aug 22, 2004 2:15 pm
by Night Hawk
Have already tried that to no avail.
Posted: Sun Aug 22, 2004 2:17 pm
by Night Hawk
SpellCast.inc:
Code: Select all
Sub Event_Resisted
/return CAST_RESISTED
Spell_Routines.inc:
Code: Select all
Sub Event_Resisted
/if ( ${Defined[castReturn]} ) /varset castReturn CAST_RESISTED
/return
Posted: Sun Aug 22, 2004 9:21 pm
by Rusty~
heh yeah... in the Cast sub you'll find at the end
Posted: Mon Aug 23, 2004 1:19 am
by Night Hawk
Hmm, ok. I guess I'll have to mess with it more. I just know that when I first started using it and I got a resist it didn't respond what-so-ever

Posted: Wed Aug 25, 2004 6:13 am
by Bad Karma
Rusty~ wrote:...now since i used stunned for silence too, if you're not stunned but it gets the stun return, then it just waits .7 seconds and tries again.... i dont think theres any way to tell if you're silenced without checkin for every type of silence buff which would be way too much work.
Would this work for what you want to do/detect?
Code: Select all
#event Silenced "#*#You *CANNOT* cast spells, you have been silenced!#*#"
Posted: Wed Aug 25, 2004 12:23 pm
by Rusty~
yeah i could have done that, but no real reason to change it i don't think.