Edit the invisCreatures variable on the init block to specify which creatures go invisible. Also, edit stuckTime to specify how many miliseconds it should be stuck before attacking the creatures and spellToUse so the bot knows which spell to use.
Code
init start
-- local SCRIPT_VERSION = '1.0.1'
local invisCreatures = {'Stalker'}
local stuckTime = 0 -- Set to 0 to always attack
local spellToUse = 'exori'
-- DO NOT EDIT BELOW THIS LINE --
table.lower(invisCreatures)
local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
if spellToUseInfo.castarea == 'None' then
spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
end
init end
auto(100)
if $standtime >= stuckTime then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local _, _, name = m.content:match(REGEX_DMG_TAKEN)
if name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then
if spellType == 'spell' and cancastspell(spellToUseInfo) then
cast(spellToUseInfo.words)
waitping()
elseif spellType == 'rune' then
useoncreature(spellToUseInfo.itemid, $self)
waitping()
end
end
end
end
end
Rapha sorry for bothering again, just have a question :D
why the code doesnt work if I change the "REGEX_DMG_TAKEN" to
local _, _, name = m.content:match('^You lose (%d+) (%1+) due to an attack by ?a?n? (.-)%.$')
also will it be possible that it will only detect damage 30 and above?
really sorry to bother. just this left for my code to work properly. run out of option :(
03-04-2015, 10:19 PM
Raphael
Quote:
Originally Posted by Harvey
Rapha sorry for bothering again, just have a question :D
why the code doesnt work if I change the "REGEX_DMG_TAKEN" to
local _, _, name = m.content:match('^You lose (%d+) (%1+) due to an attack by ?a?n? (.-)%.$')
also will it be possible that it will only detect damage 30 and above?
really sorry to bother. just this left for my code to work properly. run out of option :(
That's because (1+) is not a valid pattern while (l+) is (notice the difference between 1 and l). But why would you even want to replace REGEX_DMG_TAKEN?
As for your other request, I've edited the script on the first post to allow for it.
03-05-2015, 03:22 AM
Harvey
Quote:
Originally Posted by Raphael
That's because (1+) is not a valid pattern while (l+) is (notice the difference between 1 and l). But why would you even want to replace REGEX_DMG_TAKEN?
As for your other request, I've edited the script on the first post to allow for it.
hahaha damn i didnt notice that
Thank you sooooo much raph :D :D :D
so it can only detect damage 30 and above hehe trying to figure how to do it :D
03-05-2015, 03:28 AM
Raphael
Quote:
Originally Posted by Harvey
so it can only detect damage 30 and above hehe trying to figure how to do it :D
Quote:
Originally Posted by Raphael
As for your other request, I've edited the script on the first post to allow for it.
<div style="opacity:0;">Read it</div>
03-05-2015, 04:11 AM
Harvey
Quote:
Originally Posted by Raphael
<div style="opacity:0;">Read it</div>
ty much raph :* :* :*
btw raph, there is a typo error on minDmgTaken and your local minDamageTaken :P just informing :D
I made something the other day for an Anti Stalker/whatever script.. Triggered by "Sorry, not possible", since i'm a tanky dude and will not take damage from those and it will just anti them if they are blocking my path. Did you think of this?
I made something the other day for an Anti Stalker/whatever script.. Triggered by "Sorry, not possible", since i'm a tanky dude and will not take damage from those and it will just anti them if they are blocking my path. Did you think of this?
Not really...
03-26-2015, 09:56 PM
Pukielos
this script dont work...
03-26-2015, 11:31 PM
mistgun
Quote:
Originally Posted by Pukielos
this script dont work...
More info plax?
03-27-2015, 10:19 AM
Pukielos
@Edit
work but must have in server log information to lose x hp and etc
03-30-2015, 07:13 PM
benkzy
What should I add to be safe for pvp servers?
04-07-2015, 11:27 AM
Sea
error in Persistent script NewPersistentScript:
[" if dmg >= minDmgTak..."]:NewPersistentScript:23 attempt to compare number with string
init start
-- local SCRIPT_VERSION = '1.1.1'
local invisCreatures = {'Stalker'}
local stuckTime = 0 -- Set to 0 to always attack
local minDmgTaken = 0 -- Set to 0 to always attack
local spellToUse = 'thunderstorm rune'
-- DO NOT EDIT BELOW THIS LINE --
table.lower(invisCreatures)
local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
if spellToUseInfo.castarea == 'None' then
spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
end
init end
auto(100)
if $standtime >= stuckTime then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local dmg, _, name = m.content:match(REGEX_DMG_TAKEN)
if dmg >= minDmgTaken and name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then
if spellType == 'spell' and cancastspell(spellToUseInfo) then
cast(spellToUseInfo.words)
waitping()
elseif spellType == 'rune' then
useoncreature(spellToUseInfo.itemid, $self)
waitping()
end
end
end
end
end
error in Persistent script NewPersistentScript:
[" if dmg >= minDmgTak..."]:NewPersistentScript:23 attempt to compare number with string
PHP Code:
init start -- local SCRIPT_VERSION = '1.1.1'
local invisCreatures = {'Stalker'} local stuckTime = 0 -- Set to 0 to always attack local minDmgTaken = 0 -- Set to 0 to always attack local spellToUse = 'thunderstorm rune'
-- DO NOT EDIT BELOW THIS LINE -- table.lower(invisCreatures) local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell' if spellToUseInfo.castarea == 'None' then spellToUseInfo, spellType = runeinfo(spellToUse), 'rune' end init end
auto(100)
if $standtime >= stuckTime then foreach newmessage m do if m.type == MSG_STATUSLOG then local dmg, _, name = m.content:match(REGEX_DMG_TAKEN) if dmg and dmg >= minDmgTaken and name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then if spellType == 'spell' and cancastspell(spellToUseInfo) then cast(spellToUseInfo.words) waitping() elseif spellType == 'rune' then useoncreature(spellToUseInfo.itemid, $self) waitping() end end end end end
local invisCreatures = {'Stalker'}
local stuckTime = 0 -- Set to 0 to always attack
local minDmgTaken = 0 -- Set to 0 to always attack
local spellToUse = 'thunderstorm rune'
-- DO NOT EDIT BELOW THIS LINE --
table.lower(invisCreatures)
local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
if spellToUseInfo.castarea == 'None' then
spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
end
init end
auto(100)
if $standtime >= stuckTime then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local dmg, _, name = m.content:match(REGEX_DMG_TAKEN)
if dmg and tonumber(dmg) >= minDmgTaken and name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then
if spellType == 'spell' and cancastspell(spellToUseInfo) then
cast(spellToUseInfo.words)
waitping()
elseif spellType == 'rune' then
useoncreature(spellToUseInfo.itemid, $self)
waitping()
end
end
end
end
end
04-07-2015, 12:00 PM
Sea
so dmg is a string and by adding tonumber(dmg) you convert the string to number?\
xd new error: error in Persistent script NewPersistentScript:
[" if tonumber(dmg) >=..."]:NewPersistentScript:27 attempt to compare number with nil
04-07-2015, 12:13 PM
mistgun
Quote:
Originally Posted by Sea
so dmg is a string and by adding tonumber(dmg) you convert the string to number?\
xd new error: error in Persistent script NewPersistentScript:
[" if tonumber(dmg) >=..."]:NewPersistentScript:27 attempt to compare number with nil
try now ;o
04-07-2015, 12:21 PM
Sea
No error when enabling script will see when it works when I deposit.
If it doesnt I will try my own pro script
auto(200)
if $standtime >= 7000 and $posz==15 and maround(7)>=3 and itemcount('thunderstorm rune')>=0 then
useoncreature("thunderstorm rune", $self)
wait(2000)
end
Q: What difference does 'blabla' make with "blabla"? So between single ' and double "
04-07-2015, 01:09 PM
mistgun
Quote:
Originally Posted by Sea
No error when enabling script will see when it works when I deposit.
If it doesnt I will try my own pro script
auto(200)
if $standtime >= 7000 and $posz==15 and maround(7)>=3 and itemcount('thunderstorm rune')>=0 then
useoncreature("thunderstorm rune", $self)
wait(2000)
end
Q: What difference does 'blabla' make with "blabla"? So between single ' and double "
There's no diff like f.e in C++, only thing is that u can enclose ' ' inside double quotes f.e
local var = "Hello 'noob' "
04-07-2015, 02:45 PM
Sea
Hmm ok so u can include people with ' in character names. Completed demon oak on a character today gotta see if script is running good and get next char on the task.
Hmm ok so u can include people with ' in character names. Completed demon oak on a character today gotta see if script is running good and get next char on the task.
You can include ' inside strings quoted with ' too, but you gotta escape it with \:
print('Raphael\'s da best') -- Raphael's da best
print("She said: \"Raphael's da best\"") -- She said "Raphael's da best"
local invisCreatures = {'Stalker'}
local stuckTime = 0 -- Set to 0 to always attack
local minDmgTaken = 0 -- Set to 0 to always attack
local spellToUse = 'thunderstorm rune'
-- DO NOT EDIT BELOW THIS LINE --
table.lower(invisCreatures)
local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
if spellToUseInfo.castarea == 'None' then
spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
end
init end
auto(100)
if $standtime >= stuckTime then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local dmg, _, name = m.content:match(REGEX_DMG_TAKEN)
if dmg and tonumber(dmg) >= minDmgTaken and name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then
if spellType == 'spell' and cancastspell(spellToUseInfo) then
cast(spellToUseInfo.words)
waitping()
elseif spellType == 'rune' then
useoncreature(spellToUseInfo.itemid, $self)
waitping()
end
end
end
end
end
I have copied the script above but it shoot GFB only sometimes not always when there's a stalker around. Is there anything wrong?
05-02-2015, 10:00 AM
thedoger
what's wrong with this?
I'ts not gfbing stalkers for me.
init start
function inputevents(e)
print(e)
end
filteruseroptions(true)
init end
auto(1000)
-- your script here --
init start
local invisCreatures = {"Stalker"}
local stuckTime = 0 -- Set to 0 to always attack
-- Do not edit below
table.lower(invisCreatures)
local spellToUseInfo = spellinfo(spellToUse)
if spellToUseInfo.castarea == 'None' then
spellToUseInfo = runeinfo(spellToUse)
end
init end
auto(100)
if $standtime >= stuckTime then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local _, _, name = m.content:match('^You lose (%d+) (%l+) due to an attack by ?a?n? (.-)%.$')
if name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then
if ((paround(10) == 0 and pvp and $timems - $playerlastseen > 6000) or not pvp) then
pausewalking(1000)
useoncreature("Great Fireball Rune" , $self)
pausewalking(0)
end
end
end
end
end
if $standtime > 3000 and $wptsection == 'Hunt' and ((paround(10) == 0 and pvp and $timems - $playerlastseen > 6000) or not pvp) and (not $looting) then
pausewalking(1000)
useoncreature("Great Fireball Rune" , $self)
pausewalking(0)
end
05-07-2015, 08:33 AM
Gore
does this script if u use runes use on self or shoot area where last seen?..... im in need for an anti invis script that works on warlocks with Stone Shower Runes.
pm me if u can help me out @Raphael :D
05-16-2015, 10:03 PM
Mithwons
Quote:
error in Cavebot script AntiStakler:
[" if dmg >= minDmgTaken and n..."]:AntiStakler:25 attempt to compare number with nil
What is it ?
06-04-2015, 03:21 PM
xikaos
It work with cancel invisibility ? It would be great for warlocks if you put the attack mode for chasing!
06-05-2015, 01:41 AM
xikaos
I'm getting this error when trying with utana vid, didn't tested with runes.
22:19:38 error in Hotkey script NewHotkey:
[" if dmg >= minDmgTaken and nam..."]:NewHotkey:25 attempt to compare number with nil
22:19:38 error in Hotkey script NewHotkey:
[" if dmg >= minDmgTaken and nam..."]:NewHotkey:25 attempt to compare number with nil
07-28-2015, 02:04 PM
Dworak
I am using this one.
init start
-- local SCRIPT_VERSION = '1.0.1'
local invisCreatures = {'Stalker'}
local stuckTime = 0 -- Set to 0 to always attack
local spellToUse = 'avalanche rune'
-- DO NOT EDIT BELOW THIS LINE --
table.lower(invisCreatures)
local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
if spellToUseInfo.castarea == 'None' then
spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
end
init end
auto(100)
if $standtime >= stuckTime and paround(7) == 0 then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local _, _, name = m.content:match(REGEX_DMG_TAKEN)
if name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then
if spellType == 'spell' and cancastspell(spellToUseInfo) then
cast(spellToUseInfo.words)
waitping()
elseif spellType == 'rune' then
useoncreature(spellToUseInfo.itemid, $self)
waitping()
end
end
end
end
end
Ive created a script at drefia necromancers, but i keep getting problem with the stalkers. When a stalker goes invisible and stands infront of me the bot wont do anything, it keeps trying to walk in on that tile the stalker's in (making it bump back n forth).
Im a knight so id like it to do Exori spell, i used the code on this thread but it wont do anything still. Here is the code and please let me know whats wrong
init start
-- local SCRIPT_VERSION = '1.0.1'
local invisCreatures = {'Stalker'}
local stuckTime = 1000 -- Set to 0 to always attack
local spellToUse = 'exori'
-- DO NOT EDIT BELOW THIS LINE --
table.lower(invisCreatures)
local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
if spellToUseInfo.castarea == 'None' then
spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
end
init end
auto(100)
if $standtime >= stuckTime and ($wptsection == "ToHunt" or $wptsection == "Hunt" or $wptsection == "refill") then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local _, _, name = m.content:match(REGEX_DMG_TAKEN)
if (name and table.find(invisCreatures, name:lower())) then
if spellType == 'spell' and cancastspell(spellToUseInfo) then
cast(spellToUseInfo.words)
waitping()
elseif spellType == 'rune' then
if $standtime < 5000 then
pausewalking(5000)
end
wait(200)
if maround(10, "Demon Skeleton", "Green Djinn") > 0 then
useoncreature("avalanche rune", $self)
else
useoncreature("great fireball rune", $self)
end
wait(400)
pausewalking(0)
end
end
end
end
end
10-26-2015, 03:13 PM
ozzix
Quote:
Originally Posted by Raiven
Ive created a script at drefia necromancers, but i keep getting problem with the stalkers. When a stalker goes invisible and stands infront of me the bot wont do anything, it keeps trying to walk in on that tile the stalker's in (making it bump back n forth).
Im a knight so id like it to do Exori spell, i used the code on this thread but it wont do anything still. Here is the code and please let me know whats wrong
init start
-- local SCRIPT_VERSION = '1.0.1'
local invisCreatures = {'Stalker'}
local stuckTime = 1000 -- Set to 0 to always attack
local spellToUse = 'exori'
-- DO NOT EDIT BELOW THIS LINE --
table.lower(invisCreatures)
local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
if spellToUseInfo.castarea == 'None' then
spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
end
init end
auto(100)
if $standtime >= stuckTime and ($wptsection == "ToHunt" or $wptsection == "Hunt" or $wptsection == "refill") then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local _, _, name = m.content:match(REGEX_DMG_TAKEN)
if (name and table.find(invisCreatures, name:lower())) then
if spellType == 'spell' and cancastspell(spellToUseInfo) then
cast(spellToUseInfo.words)
waitping()
elseif spellType == 'rune' then
if $standtime < 5000 then
pausewalking(5000)
end
wait(200)
if maround(10, "Demon Skeleton", "Green Djinn") > 0 then
useoncreature("avalanche rune", $self)
else
useoncreature("great fireball rune", $self)
end
wait(400)
pausewalking(0)
end
end
end
end
end
do you have server log msgs on?
10-26-2015, 03:36 PM
Raiven
Quote:
Originally Posted by ozzix
do you have server log msgs on?
nope, maybe thats why XD thanks, i changed it now so ill check on it when stalker comes around again :P
11-18-2015, 06:49 PM
Wasrea
it does not work.. :/
11-18-2015, 11:01 PM
mistgun
Quote:
Originally Posted by Wasrea
it does not work.. :/
check all options in tibia->options->conole.
also, when something isn't work try to be more descriptive
11-18-2015, 11:04 PM
Wasrea
Quote:
Originally Posted by mistgun
check all options in tibia->options->conole.
also, when something isn't work try to be more descriptive
error here:
[" if dmg >= minDmgTaken and nam..."]:NewHotkey:25 attempt to compare number with nil
and my console is all activated
11-18-2015, 11:11 PM
mistgun
how did you set up minDmgTaken variable?
11-18-2015, 11:14 PM
Wasrea
Quote:
Originally Posted by mistgun
how did you set up minDmgTaken variable?
init start
-- local SCRIPT_VERSION = '1.1.2'
local invisCreatures = {'Souleater'}
local stuckTime = 500 -- Set to 0 to always attack
local minDmgTaken = 120 -- Set to 0 to always attack
local spellToUse = 'great fireball rune'
-- DO NOT EDIT BELOW THIS LINE --
table.lower(invisCreatures)
local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
if spellToUseInfo.castarea == 'None' then
spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
end
init end
auto(100)
if $standtime >= stuckTime then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local dmg, _, name = m.content:match(REGEX_DMG_TAKEN)
dmg = tonumber(dmg)
if dmg >= minDmgTaken and name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then
if spellType == 'spell' and cancastspell(spellToUseInfo) then
cast(spellToUseInfo.words)
waitping()
elseif spellType == 'rune' then
useoncreature(spellToUseInfo.itemid, $self)
waitping()
end
end
end
end
end
11-18-2015, 11:31 PM
mistgun
try this
init start
-- local SCRIPT_VERSION = '1.1.2'
local invisCreatures = {'Souleater'}
local stuckTime = 0 -- Set to 0 to always attack
local minDmgTaken = 0 -- Set to 0 to always attack
local spellToUse = 'exori'
-- DO NOT EDIT BELOW THIS LINE --
table.lower(invisCreatures)
local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
if spellToUseInfo.castarea == 'None' then
spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
end
init end
auto(100)
if $standtime >= stuckTime then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local dmg, _, name = m.content:match(REGEX_DMG_TAKEN)
dmg = tonumber(dmg)
if dmg and dmg >= minDmgTaken and name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then
if spellType == 'spell' and cancastspell(spellToUseInfo) then
cast(spellToUseInfo.words)
waitping()
elseif spellType == 'rune' then
useoncreature(spellToUseInfo.itemid, $self)
waitping()
end
end
end
end
end
11-18-2015, 11:38 PM
Wasrea
Thanks is working!
12-13-2015, 12:00 AM
peeedrofeerreira
it's not work for me :(
02-01-2016, 04:17 AM
Binzones
1 Attachment(s)
Error
Quote:
Originally Posted by Raphael
Anti Stalker
Description
Attacks invisible creatures that attack you.
Configuration
Edit the invisCreatures variable on the init block to specify which creatures go invisible. Also, edit stuckTime to specify how many miliseconds it should be stuck before attacking the creatures and spellToUse so the bot knows which spell to use.
Code
init start
-- local SCRIPT_VERSION = '1.1.2'
local invisCreatures = {'Stalker'}
local stuckTime = 0 -- Set to 0 to always attack
local minDmgTaken = 0 -- Set to 0 to always attack
local spellToUse = 'exori'
-- DO NOT EDIT BELOW THIS LINE --
table.lower(invisCreatures)
local spellToUseInfo, spellType = spellinfo(spellToUse), 'spell'
if spellToUseInfo.castarea == 'None' then
spellToUseInfo, spellType = runeinfo(spellToUse), 'rune'
end
init end
auto(100)
if $standtime >= stuckTime then
foreach newmessage m do
if m.type == MSG_STATUSLOG then
local dmg, _, name = m.content:match(REGEX_DMG_TAKEN)
dmg = tonumber(dmg)
if dmg >= minDmgTaken and name and table.find(invisCreatures, name:lower()) and maround(7, name:lower()) == 0 then
if spellType == 'spell' and cancastspell(spellToUseInfo) then
cast(spellToUseInfo.words)
waitping()
elseif spellType == 'rune' then
useoncreature(spellToUseInfo.itemid, $self)
waitping()
end
end
end
end
end