Page 3 of 11
Posted: Fri Jul 30, 2004 10:49 am
by Rusty~
Is there anyway quick way to to use spell_routines.inc so that it will contunually try to cast the spell and won't stop until the spell has landed?
for instance..
not quite sure what you mean here but... if you're trying to cast a spell and keep getting interrupted, an dwant it to recast it, you can specify how long you want it to keep trying to recast. eg:
Code: Select all
/call Cast "Force Shield" gem5 10s
would keep trying to cast Force Shield for 10 seconds
Posted: Fri Jul 30, 2004 11:21 am
by Draimen
Thanks for the fix Rusty, will give it a try.
Your spell did not take hold.
Posted: Mon Aug 02, 2004 10:57 pm
by s0rcier
Is it possible to handle those spells cast message.
1) "Your spell did not take hold."
Appends when as an example you try to cast malos on a mobs after someone cast malosinia... (malosinia being resisted more, but do better debuff) so i end up oftenly in a dead loop trying to cast malos that is unresistable on a mobs that someone malosinia. (was same i think when u were trying to cast malo after malosini... etc ...
2) "Your can only cast this spell in the outdoors."
Be cool to be able to get that error message so you wont have to code long events just to handle it!
s0rcier!
Posted: Tue Aug 03, 2004 4:05 pm
by Rusty~
yeah i'll add in the outdoor thing... i already have it as an event in my macros just never got around to adding it to this.
as for the not hold thing. as it is now, it counts spells not holding as a success.... which it is really.... it means the spell landed, and if you use this in a macro to cast malos on something, there should be no reason to get stucin a loop since it should return that it landed successfully.
Posted: Wed Aug 04, 2004 10:41 pm
by s0rcier
Well i might need to recheck for the hold thing ... or i will suggest using a global variable like checkhold or something ... i just realise that the wont hold is report also when trying to cast a lower buff on someone that have better...
I just downloaded your latest mods on the module so i will recheck the hold thing ...
Thx a lot for the nice support, just wish that was written as a plugin! hehe
s0rCier!
Posted: Thu Aug 12, 2004 2:13 pm
by Rusty~
Made some changes to how this casts items... added in a new subroutine you can call to swap items.
Changed how interrupts work again.
By default, it will always interrupt a spell if target is lost (only spells that require targets of course) and you're not mounted. If you're mounted, and the spell you're casting has 7 seconds or longer left, it will dismount and interrupt ( if you want to use this, then you should have some code in your macro to recast mount if it's missing! ). If the spell you're casting has under 7 seconds left, but has a recast time of 3 seconds or more (like many stuns, some nukes, mana taps, etc ), it will move forward a bit to interrupt, then move back.
If you DON'T want to interrupt at all when you're on a mount, then add
to the top of the macro (usually with the rest of your declarations) you're calling this from (not in the include file). This will still interrupt spells if you're not mounted, as I don't see any possible down side to that.
Posted: Sun Aug 15, 2004 5:23 am
by A Troll
Anyone else got the problem that this one crashes if you do an
?
My Code for the calls is from the old Stick.mac and dosent work since the 12.8.04
Code: Select all
/if (${Me.Class.Name.Equal[Shadow Knight]}) /if (${Target.ID}==${MobID}) /if (!${Me.Casting.ID}) /if (${Target.Distance}<=${MeleeDistance}) /goto :attackSpellsSK
/goto :attackMeleeLoop
:attackSpellsSK
/echo spell
/if (${Me.Gem["Zevfeer's Bite"]}>0) /if (${Me.PctMana}>20) /if (${Target.PctHPs}<97) /call cast "Zevfeer's Bite"
/if (${Me.Gem[Aura of Hate]}>0) /if (${Me.PctMana}>20) /if (${Target.PctHPs}<96) /call cast "Aura of Hate"
/if (${Me.Gem[Spear of Decay]}>0) /call Cast "Spear of Decay"
/if (${Me.Gem[Spear of Plague]}>0) /if (${Me.PctMana}>20) /if (${Target.PctHPs}<95) /call cast "Spear of Plague"
| /if (${Me.Gem[Bond of Death]}>0) /if (${Me.PctHPs}<90) /if (${Me.PctMana}>20) /if (${Target.PctHPs}<90) /call cast "Bond of Death"
/goto :attackMeleeLoop
Posted: Thu Aug 19, 2004 2:27 pm
by Rusty~
ok, made big changes to this include today. pretty much rewrote most of it. hopefully the problems some people were having should be fixed by this.
also, this will now cast AA abilities again (yay)
Posted: Fri Aug 20, 2004 10:11 am
by Blazer
Problem with calling Subroutines with
mySub being defined locally in your code..
Code: Select all
Sub Cast(string spellName,string spellType,timer giveUpTimer,string mySub)
and then trying to call
mySub in another Subroutine...
Code: Select all
Sub WaitCast
:wait_cast_loop
/if ( ${Defined[mySub]} ) /call ${mySub}
This will always be
NULL so any macros out their that use subroutunes with their Cast wont work.
Looks like you moved
mySub in a new subroutine when you did the latest changes.
Posted: Fri Aug 20, 2004 12:02 pm
by Rusty~
ew thanks.. yeah i missed that heh, used to have that in the main sub. i'll work on it right away
ok.. hopefully fixed it. not in game atm to check tho, but just made WaitCast take the sub as a parameter
Posted: Fri Aug 20, 2004 2:02 pm
by Night Hawk
Line: 507
when I did a simple
/call cast "Fabled Jounryman's Boots" item
I got an error of:
"Subroutine NULL cannot be found"
I changed:
Code: Select all
/if ( ${Bool[mySub]} ) /call ${mySub}
to:
Code: Select all
/if ( !${Bool[mySub]} ) /call ${mySub}
It worked, but is this correct?
Posted: Fri Aug 20, 2004 7:25 pm
by Rusty~
meh ok thats what i get for makin fast changes and not testing.... it used to be /if ${Defined[mySub]}, which takes the variable name as a string and doesnt need the brackets... but i changed it to bool since it will always be defined, but will be NULL if not there. as it is now, it will always call it even if you dont specify it, since that line will always be true... so it should be:
Code: Select all
/if ( ${Bool[${mySub}]} ) /call ${mySub}
Posted: Fri Aug 20, 2004 9:48 pm
by Night Hawk
Kinda confused. Cause as I said, with that in there, it just returns null.
Also in your code:
Code: Select all
:wait_for_mem
/delay 15s ${Me.SpellReady[${spellName}]}
Should definately up the 15s. I put mine at about 45 because there are spells out there with 30second recast times, meaning after meming it, ya gotta wait 30 seconds

Posted: Fri Aug 20, 2004 10:13 pm
by Rusty~
i added mySub as a parameter to WaitCast... so i /call WaitCast ${mySub}... if mySub wasn't defined, it would be NULL.
also, on the 15 second thing, if a spell takes longer than that to cast then it will return CAST_NOTREADY... which can be handled from the macro. i dont really want it to get stuck for 45s waitin for a 3 min recast spell to pop up hehe
A special request
Posted: Sat Aug 21, 2004 12:12 am
by aChallenged1
Rusty~, would you consider taking the time to make a song_routine.inc?
Much of what is needed is already in place, but there are items which would have to be removed, and some to be adjusted.
For example: Bards don't get a 'you begin' when starting to sing a song and their fizzle is "You miss a note, bringing your song to a close!" Also, Bards stop songs either by clicking any spell gem or by the command /stopsong.
I'm already looking at the spell_routines.inc, and I will probably get there, eventually. I'm just wondering if you would care to do it, or leave it to me. The biggest problem I'm having right now with ripping this is lack of comments on what section is what. Some of it seems to blend into others and is somewhat confusing.
Thanks.