View Full Version : "506" script
BLZrizz
05-22-2016, 11:54 AM
I've been using the 506 script from the repository to renew celerity but it doesn't recast after a spell failure.
The current script is as follows:
if Char.mana > 5
fput "incant 506"
end
silence_me
loop {
waitfor "You suddenly feel less light-footed"
if Char.mana > 5
waitcastrt?
pause_script("bigshot") if running?("bigshot")
fput "incant 506"
unpause_script("bigshot") if running?("bigshot")
end
}
What addition do I need to make to add a hindrance recast? I'm sure this is quite elementary but I have zero ruby experience and very rudimentary wizard scripting skills. Thanks in advance.
Luxelle
05-22-2016, 05:55 PM
You might want to look into:
spell[number_number_number_number].cast
to automatically pick up a failure and re-do it.
And you can also check the state of a spell with
checkspell
It's a logcal check. SO ...
if checkspell "whatever its name is"
# true ... it is going
# false ... it's not on and you need to cast it.
~L.
Tillmen
05-22-2016, 09:10 PM
The cast method will only automatically recast on hindrance for bard spells, since it doesn't cost them any mana or roundtime because they're dirty cheaters.
If you really want to check for hindrance and recast, you could do something like this:
1.times {
result = cast(506)
redo if result =~ /^\[Spell Hindrance for/
}
The usual thing to do is to just check to see if the spell is active, and cast it if it isn't.
loop {
Spell[506].cast if Spell[506].known? and Spell[506].affordable? and not Spell[506].active?
sleep 1
}
Luxelle
05-23-2016, 01:51 AM
Wow, only for bards! Thank you :)
BLZrizz
05-23-2016, 08:23 PM
Thanks Tillmen. Is there a way to adapt this for keeping a weapon ebladed/edged/blessed? As if the spell is not active on the character but on a weapon?
RangerZ
05-23-2016, 11:19 PM
My scripts just use a waitfor to trigger either: A) a new cast of edge/eblade/bless or B) swap out weapon for a fresh one.
As you alluded, there is no active system for spells on items.
I can't remember what the lines are when the spells fade. I can try to look through some logs to find them if you are looking to put something together.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.