I don't know the code is ok, is something else that is bugging the script, like I said on the first post. I tested it moving manually with arrow keys so I don't really know what could be messing with this.
Well, it works when you stand in 1 place, but when you are moving it have problems with shooting. There wasn't any problems with area rune shooter on ibot, so I guess it's may be the bot problem. @Lucas Terra, take a look at here and try to help us out find what's wrong with area rune shooter :)
01-29-2014, 10:32 PM
K4r4biN
Quote:
Originally Posted by Leonardo
Can you guys test it for me ? I'm not home now but I did this:
Remember to have rune item binded on your Tibia hotkeys.
local SpecialAreas = {
--{min x, max x, min y, max y, z}
}
local UseTargetState = false
-- DO NOT CHANGE BELOW --
local i, LastFloor, Exhaust = 1, $posz, $timems
while Runes[i] ~= nil do
Runes[i].Info = runeinfo(Runes[i].Name)
if Runes[i].Info.itemid == 0 or Runes[i].Info.castarea == 'None' or not Runes[i].Info.group:find('Attack') then
table.remove(Runes, i)
else
Runes[i].Monsters = Runes[i].Monsters or Monsters
table.lower(Runes[i].Monsters) i = i + 1
end
end
init end
auto(200, 400)
if $posz ~= LastFloor then
LastFloor, Exhaust = $posz, $timems + 2000
return
end
if $timems >= Exhaust and ($targeting or not UseTargetState) then
for _, Rune in ipairs(Runes) do
if cancast(Rune.Info) and not isinsidearea(SpecialAreas) and clientitemhotkey(Rune.Name, 'crosshair') ~= 'not found' then
if not Players.Consider or paroundfloorignore(Players.Distance, Players.FloorDifference, unpack(Players.SafeList)) == 0 then
local area = {x = 0, y = 0, z = 0, amount = 0}
for a = 0, 7 do
local i, j = -a, -a
while j <= a do
i = -a
while i <= a do
if (math.abs(j) == a or math.abs(i) == a) and (tilehasinfo($posx + i, $posy + j, $posz)) then
local posx, posy = $posx + i, $posy + j
if tileshootable(posx,posy, $posz) then
local count = 0
foreach creature c 'mfx' do
if isonspellarea(c, '3x3', false, i, j) and (#Rune.Monsters == 0 or table.find(Rune.Monsters, c.name:lower())) then
count = count + 1
end
end
if count > area.amount then
area.x, area.y, area.z, area.amount = posx, posy, $posz, count
end
end
end
if math.abs(j) ~= a then
i = i + 2 * a
else
i = i + 1
end
end
j = j+1
end
end
if area.amount >= Rune.Amount then
useitemon(Rune.Name, 0, ground(area.x, area.y, area.z)) waitping(1.2, 1.4)
end
end
end
end
end
Hell yea, it's working. But just when you stand for a while, when you are moving it's having problems, so the best way to make it working 100% is to add pausewalking(1000) or w/e when it have to shoot rune ;)
01-29-2014, 10:37 PM
Leonardo
Quote:
Originally Posted by K4r4biN
Hell yea, it's working. But just when you stand for a while, when you are moving it's having problems, so the best way to make it working 100% is to add pausewalking(1000) or w/e when it have to shoot rune ;)
Ah thanks I forgot to add a pausewalking :P
01-29-2014, 10:58 PM
K4r4biN
Quote:
Originally Posted by Leonardo
Ah thanks I forgot to add a pausewalking :P
I think 1000 is enough, 5000 might be a problem when you are botting grims or other strong monsters;p
01-29-2014, 11:08 PM
Leonardo
Quote:
Originally Posted by K4r4biN
I think 1000 is enough, 5000 might be a problem when you are botting grims or other strong monsters;p
It'll use 5000, use the rune and then cancel using pausewalking(0), this overrides the previous pausing time.
01-29-2014, 11:12 PM
RoxZin xD
Quote:
Originally Posted by K4r4biN
I think 1000 is enough, 5000 might be a problem when you are botting grims or other strong monsters;p
500 is enough :P
01-30-2014, 12:03 AM
K4r4biN
Quote:
Originally Posted by Leonardo
It'll use 5000, use the rune and then cancel using pausewalking(0), this overrides the previous pausing time.
Aha ok. Well I'm used and using pausewalking. Just wanted to know if it something changed. But well, it will stop walking for 5 seconds in case it doesn't shoot rune on first try :D
01-30-2014, 04:28 PM
bergvall
edit: nevermind
01-31-2014, 09:37 AM
Mavic
Leonardo can add in your script hp monster np if 10% dont atak gfb atak sd?
01-31-2014, 10:52 AM
Leonardo
Quote:
Originally Posted by Mavic
Leonardo can add in your script hp monster np if 10% dont atak gfb atak sd?
local SpecialAreas = {
--{min x, max x, min y, max y, z}
}
local UseTargetState = false
-- DO NOT CHANGE BELOW --
local i, LastFloor, Exhaust = 1, $posz, $timems
while Runes[i] ~= nil do
Runes[i].Info = runeinfo(Runes[i].Name)
if Runes[i].Info.itemid == 0 or Runes[i].Info.castarea == 'None' or not Runes[i].Info.group:find('Attack') then
table.remove(Runes, i)
else
Runes[i].Monsters = Runes[i].Monsters or Monsters
table.lower(Runes[i].Monsters) i = i + 1
end
end
init end
auto(200, 400)
if $posz ~= LastFloor then
LastFloor, Exhaust = $posz, $timems + 2000
return
end
if $timems >= Exhaust and ($targeting or not UseTargetState) then
for _, Rune in ipairs(Runes) do
if cancast(Rune.Info) and not isinsidearea(SpecialAreas) and clientitemhotkey(Rune.Name, 'crosshair') ~= 'not found' then
if not Players.Consider or paroundfloorignore(Players.Distance, Players.FloorDifference, unpack(Players.SafeList)) == 0 then
local area = {x = 0, y = 0, z = 0, amount = 0}
for a = 0, 7 do
local i, j = -a, -a
while j <= a do
i = -a
while i <= a do
if (math.abs(j) == a or math.abs(i) == a) and (tilehasinfo($posx + i, $posy + j, $posz)) then
local posx, posy = $posx + i, $posy + j
if tileshootable(posx,posy, $posz) then
local count = 0
foreach creature c 'mfx' do
if c.hppc > 10 and isonspellarea(c, '3x3', false, i, j) and (#Rune.Monsters == 0 or table.find(Rune.Monsters, c.name:lower())) then
count = count + 1
end
end
if count > area.amount then
area.x, area.y, area.z, area.amount = posx, posy, $posz, count
end
end
end
if math.abs(j) ~= a then
i = i + 2 * a
else
i = i + 1
end
end
j = j+1
end
end
if area.amount >= Rune.Amount then
pausewalking(5000)
useitemon(Rune.Name, 0, ground(area.x, area.y, area.z)) waitping(1.2, 1.4)
pausewalking(0)
end
end
end
end
end
01-31-2014, 11:26 AM
Mavic
dont work idk why ;/
I need script if i atak for example 4x hydras of thunderstorm rune and one have less than 10% bot atak in the first place sd
01-31-2014, 12:24 PM
Leonardo
Quote:
Originally Posted by Mavic
dont work idk why ;/
Try again I've made some changes.
01-31-2014, 12:24 PM
Leonardo
Quote:
Originally Posted by Mavic
dont work idk why ;/
Try again I've made some changes.
01-31-2014, 02:06 PM
Bomba
I think he need something like, bot use thunderstorm rune all the time, but when some monster have less then 10% hp, bot use student death rune on this target.After kill this monster who have less then 10% back to normal only shoot rune and then again if some other monster have 10% less use student death rune. This function i see in other bot in banuta, and work very well. I can show you if you wand to see it.
02-02-2014, 05:48 PM
Xeromex
Any way to fix the targeting(exori flam etc) because it will fuck it up.
And I almost died because the bot wanted to browsefield and it didn't heal then ;s
02-02-2014, 07:06 PM
RoxZin xD
Quote:
Originally Posted by Bomba
I think he need something like, bot use thunderstorm rune all the time, but when some monster have less then 10% hp, bot use student death rune on this target.After kill this monster who have less then 10% back to normal only shoot rune and then again if some other monster have 10% less use student death rune. This function i see in other bot in banuta, and work very well. I can show you if you wand to see it.
Quote:
Originally Posted by Xeromex
Any way to fix the targeting(exori flam etc) because it will fuck it up.
And I almost died because the bot wanted to browsefield and it didn't heal then ;s
A better way to make it work is creating a function similar to shootarearune() and making whatever you want on actions.
02-02-2014, 08:02 PM
sirmate
Quote:
Originally Posted by roxzin xd
a better way to make it work is creating a function similar to shootarearune() and making whatever you want on actions.
+1 [too short]
02-02-2014, 09:36 PM
Xeromex
I don't understand what you are saying xD
02-03-2014, 01:25 PM
Leonardo
Quote:
Originally Posted by Xeromex
I don't understand what you are saying xD
Neither this:
Quote:
Originally Posted by Xeromex
Any way to fix the targeting(exori flam etc) because it will fuck it up.
And I almost died because the bot wanted to browsefield and it didn't heal then ;s
Not sure if you are using the targeting and the action together, of course if you'll use actions to attack then disable spells/runes on the targeting, also I didn't get the browsefield thing.
Anyway, they tried to say this: you need to create a similar function like shootarearune() by your own and do what you want with that function, I did a general code there, it'll work but someone might need a different check, like if the monster have more than X health percent.
02-03-2014, 02:10 PM
Xeromex
Quote:
Originally Posted by Leonardo
Neither this:
Not sure if you are using the targeting and the action together, of course if you'll use actions to attack then disable spells/runes on the targeting, also I didn't get the browsefield thing.
Anyway, they tried to say this: you need to create a similar function like shootarearune() by your own and do what you want with that function, I did a general code there, it'll work but someone might need a different check, like if the monster have more than X health percent.
Yes I'm using the targeting and action together.
There's no pausetargeting(), which sucks and by turning of targeting it still didn't work very well
02-03-2014, 02:28 PM
Leonardo
Quote:
Originally Posted by Xeromex
Yes I'm using the targeting and action together.
There's no pausetargeting(), which sucks and by turning of targeting it still didn't work very well
There's settargeting("on/off") you can put it on the script.
02-17-2014, 07:26 AM
sylomex
Since the new update your script isnt working anymore.