XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 6 of 6

Thread: Look direction against Creatures while botting...

  1. #1
    Lifetime Subscriber
    Join Date
    Aug 2012
    Location
    Stockholm, Sweden
    Posts
    428
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Look direction against Creatures while botting...

    I have had this idea, why not make the bot look a little more like an player than an bot...

    So why not make it switch direction instead of just standing still and looking like an ordinary botter player...

    Could make less people report you and less chance going Deletera!

    Thanks!
    Belden's Free Scripts
    Belden's Quest Scripts

    Bought Lifetime Subscription from Fractal
    Bought TeamSpeak 3 Service from Sikkness
    Bought Leveling Service from Y2Quakepc2

  2. #2
    Senior Member Jontor's Avatar
    Join Date
    Sep 2014
    Posts
    446
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    Not sure if this is what you mean, but try this
    Code:
    local dirs = {3, 4, 1, 2} -- south, west, north, east
    
    Module.New("", function(mod)
        local target = getSelfTargetID()
    
        if (target > 0) then
            local dir = Creature.LookDirection(target)
    
            while (Self.LookDirection() ~= dirs[dir]) do
                doSelfTurn(dirs[dir])
                wait(300)
            end
        end
    
        mod:Delay(500)
    end)

  3. #3
    Lifetime Subscriber
    Join Date
    Aug 2012
    Location
    Stockholm, Sweden
    Posts
    428
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Well that's the basic, but it doesn't work 100%...

    Only a few times it turns...
    Belden's Free Scripts
    Belden's Quest Scripts

    Bought Lifetime Subscription from Fractal
    Bought TeamSpeak 3 Service from Sikkness
    Bought Leveling Service from Y2Quakepc2

  4. #4
    Senior Member Jontor's Avatar
    Join Date
    Sep 2014
    Posts
    446
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    Try this then, was a small mistake with directions

    Code:
    local dirs = {2, 3, 0, 1} -- south, west, north, east
    local minDist = 1 -- distance from myself to turn, might want to add a table with creatures and separate distances if you want to use it with rp/ms/ed
    
    Module.New("", function(mod)
        local target = getSelfTargetID()
    
        if (target > 0 and Creature.DistanceFromSelf(target) <= minDist) then
            local dir = Creature.LookDirection(target)
            local time = os.time()
    
            while (Creature.isAlive(target) and Self.LookDirection() ~= dirs[dir+1] and os.difftime(os.time(), time) <= 2) do
                doSelfTurn(dirs[dir+1])
                wait(300)
            end
        end
    
    end)
    Last edited by Jontor; 03-28-2016 at 08:42 AM.

  5. #5
    Lifetime Subscriber
    Join Date
    Aug 2012
    Location
    Stockholm, Sweden
    Posts
    428
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Awesome, I tried the script and it seems to work flawlessly
    Belden's Free Scripts
    Belden's Quest Scripts

    Bought Lifetime Subscription from Fractal
    Bought TeamSpeak 3 Service from Sikkness
    Bought Leveling Service from Y2Quakepc2

  6. #6
    Senior Member Jontor's Avatar
    Join Date
    Sep 2014
    Posts
    446
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    @krille09

    Code:
    local minDist = 1 -- distance from myself to turn, might want to add a table with creatures and separate distances if you want to use it with rp/ms/ed
    
    function getDirectionTo(pos1, pos2)
        local dir = 0 -- north
    
        if (pos1.x > pos2.x) then
            return 3 -- west
        elseif (pos1.x < pos2.x) then
            return 1 -- east
        elseif (pos1.y < pos2.y) then
            return 2 -- south
        end
    
        return dir
    end
    
    Module.New("", function(mod)
        local target = getSelfTargetID()
    
        if (target > 0 and Creature.DistanceFromSelf(target) <= minDist) then
            local time = os.time()
    
            while (Creature.isAlive(target) and Self.LookDirection() ~= getDirectionTo(Self.Position(), Creature.Position(target)) and os.difftime(os.time(), time) <= 2) do
                doSelfTurn(getDirectionTo(Self.Position(), Creature.Position(target)))
                wait(300)
            end
        end
    
    end)
    It prefers west and east side like this :

    W N E
    W .. E
    W S E

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •