Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
reach/follow walking on field
#1
I've been using this lua script for a while, but anywhere there is a firebomb on the ground the character gets stuck. Is there a way to use reachplayer instead of follow_creature to always follow the character listed?

local Player = ''
local Monsters = { '' }

local monsters_around = maroundreachable(0, table.unpack(Monsters))
if monsters_around == 0 and target().id == 0 then
    local follow_creature = followed()
    if follow_creature.id == 0 or (follow_creature.id > 0 and follow_creature.name:lower() ~= Player:lower()) and paround(0, Player) > 0 then
        follow(Player)
        wait(1000)
    end
elseif monsters_around > 0 and followed().id > 0 then
    stop()
end
Reply

#2
Yeah, use gettiles() to know if there are fields on screen. Something like this:
local Player = ''
local Monsters = { '' }
local FIELDS_IDS = { 2118, 2119, 2123, 2124, 2131, 2132, 2137, 2138, 2121, 2127, 2134, 2136, 2122, 2126, 2135 }

local monsters_around = maroundreachable(0, table.unpack(Monsters))
if monsters_around == 0 and target().id == 0 then
    
    local creature = getcreature(Player)
    if creature.id > 0 and creature.dist > 1 then
        local tile = gettile(creature.posx, creature.posy, creature.posz)
        local foundFields = false
        if tile ~= nil and tile.posx > 0 then
            for _, item in ipairs(tile.items) do
                if table.find(FIELDS_IDS, item.id) ~= nil then
                    foundFields = true
                    break
                end
            end
        end

        if foundFields then
            while creature.id > 0 and creature.dist > 1 do
                reachcreature(Player)
                creature = getcreature(Player)
            end
        else
            local follow_creature = followed()
            if follow_creature.id == 0 or (follow_creature.id > 0 and follow_creature.name:lower() ~= Player:lower()) then
                follow(Player)
                wait(1000)
            end
        end
    end
elseif monsters_around > 0 and followed().id > 0 then
    stop()
end
Reply

#3
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Got this error trying the script: 14:45:17 - Core:Lua:ExecuteScript
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Big Grin" title="Big Grin" class="smilie smilie_4" />oString
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Tongue" title="Tongue" class="smilie smilie_5" />ersistent03: 6: 'then' expected near 'the'
Reply

#4
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Well, you could read the error message and fix it yourself...

Anyway, i fixed it.
Reply

#5
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Sorry Arkilys, i actually didn't figure it out :<
Thanks Anyway
Reply

#6
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#7
Yes, it does works.
Reply

#8
|Only Registered members can see download links. | Click here to buy subscription or here to register.
16:52:51 - Core:Lua:ExecuteScript
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Big Grin" title="Big Grin" class="smilie smilie_4" />oString
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Tongue" title="Tongue" class="smilie smilie_5" />ersistent03: 6: 'then' expected near 'the'

im using your code, can you past it again?
Reply

#9
No, you are not using my code.
You are using the code that the guy quoted in his post. My code is working, because i've updated on my post.
Reply

#10
|Only Registered members can see download links. | Click here to buy subscription or here to register.
i saw your updated your post, and i have sure im using yours.


19:02:53 - Core:Lua:ExecuteScript
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Big Grin" title="Big Grin" class="smilie smilie_4" />oString
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Tongue" title="Tongue" class="smilie smilie_5" />ersistent03: 35: 'end' expected (to close 'if' at line 6) near '<eof>'
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016