PDA

View Full Version : Anti-Paralyze



Kelevra712
12-04-2012, 10:52 AM
Hello community! :)

I was wondering if any magical coders might be able to provide me with a special anti-paralyze script? (I suck at creating them from scratch)

Now I know there is the native function in the Support tab & condition manager, this is the reason I say 'special':

When botting at Frost Dragons (or other monsters which constantly paralyze), I find it to be a waste of mana (& potions) to anti-paralyze after each wave. Is there any way a script can be made to check maybe after creature is killed or when there is no creature on screen to see if character is paralyzed-and if so, only then use the anti-paralyze?

I know this isn't a crucial request, but it would be nice to know if this is possible or if it in fact already exists/been discussed.

Thanks! :)
-Kel

Spectrus
12-04-2012, 11:18 AM
No current target.


local spell = {
words = "exura ico",
mana = 40
}

local speed = Self.Speed()
print("Your current speed is: " .. speed .. "\nIf you are currently paralyzed, re-execute the script when you are not.")
function main()
if not (Self.TargetID() > 0) then
if speed > Self.Speed() then
Self.Cast(spell.words, spell.mana)
end
end
end
registerEventListener(TIMER_TICK, "main")


No monsters on screen.


local spell = {
words = "exura ico",
mana = 40
}

local speed = Self.Speed()
print("Your current speed is: " .. speed .. "\nIf you are currently paralyzed, re-execute the script when you are not.")
function main()
local count = 0
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.GetFromIndex(i)
if c:isAlive() and c:isVisible() and c:isOnScreen() and c:isMonster() then
count = count + 1
end
end
if not (count > 0) then
if speed > Self.Speed() then
Self.Cast(spell.words, spell.mana)
end
end
end
registerEventListener(TIMER_TICK, "main")

Kelevra712
12-04-2012, 11:30 AM
You're a life saver!

Big thanks!
~Gonna test now

EDIT:Works like a charm! <3

Kelevra712
12-05-2012, 02:42 AM
So, i'm using the 'No current target' one, which works amazingly while the bot is hunting, but I run into a small problem when it goes to refill on pots/deposit items. Since im hunting Frost Dragons, I execute the script when im in the snow but not paralyzed and everything is fine, however when I go to town, and start walking on mud or other surfaces which make me walk faster than snow, my character starts spamming the anti-paralyze.

Is there any way around this?
If not, its all good, I still highly appreciate the help and quick response :)

Spectrus
12-05-2012, 10:54 AM
change the line


if speed > Self.Speed() then


to


if (speed - Self.Speed()) > 100 then


See if it helps.

Kelevra712
12-09-2012, 08:50 AM
Thank you!;)

Ukaszek0622
11-06-2014, 11:16 AM
not working :/

12:15 XenoScript Error:
Script: Anty Paral.lua
Line #: 1
Chunk: C:?Users?Ukaszek?DOCUME?1?XenoBot?Scripts??ANTYPA? 1.LUA
Error: '=' expected near 'current'
This is an error with user-input and should not be reported as a bug with XenoBot.