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
Fast turn('n') actions [HUMANIZER]
#1
I realized that if I'm manually hunting, i'm often spam turning my character while melee attacking the creature. I do this purely out of boredom, but apparently this is what i'm doing. Now I want a script which does mimic this behaviour, but I can't get it to spam turn. No matter what kind of script I try to write, it does always turn once every 1 second.

I want it to literally turbo turn, like as if I hold CTRL and smash my arrow keys.

function turnRandomDirection()
    local directions = {'n', 's', 'e', 'w'}
    local numTurns = math.random(5, 20)

    for i = 1, numTurns do
        local randomDirection = directions[math.random(1, 4)]
        turn(randomDirection)
        wait(10)
    end
end

-- Main loop
while true do
    local interval = wait(10000, 30000)  -- Random interval between 10 and 30 seconds because i don't want it to always perform this action

    if standtime() > 4000 then -- preferably i would change this to target.hppc above 90% or something but idk if possible
        turnRandomDirection()
    end

    wait(interval)
end

Does the current core even allow for such quick actions?
Reply

#2
Hello.

Your code should work fine... However, you could use rturn which actually does what you need.
rturn(number times, optional bool backOriginal) [void]: Turn your character in random directions, then back to original or not.
|Only Registered members can see download links. | Click here to buy subscription or here to register.
Reply

#3
But even that is relatively slow isn't it? Like it feels like there is a static 250~ms interval between each turn
Reply

#4
Hello.

It's fine for me, but I got your point. I've created a new function that will try to do it faster by holding CTRL and pressing arrow keys instead of CTRL+Arrow -> CTRL+Arrow. It's definitely faster, but not sure if going to as fast you want.

You must redownload and reinstall Kasteria OTBot:
|Only Registered members can see download links. | Click here to buy subscription or here to register.

rturnholding(number times, optional bool backOriginal) [void]: Turn your character in random directions, then back to original or not.

Applying to your code... btw you could use attacked().hppc >= 90 to check as you thought.
attacked() = red square, doesn't matter what attacked it.
targeting() = creature chose by Targeting.
-- Main loop
while true do
    local interval = wait(10000, 30000)  -- Random interval between 10 and 30 seconds because i don't want it to always perform this action

    if standtime() > 4000 then -- preferably i would change this to target.hppc above 90% or something but idk if possible
        local numTurns = math.random(5, 20)
        rturnholding(numTurns, false)
    end

    wait(interval)
end
Reply

#5
Love you brother, works pretty fast with this new function.
Only thing is, the bool backOriginal (set to false) does still return to original position with the above code

But that's no big issue
thanks for adding this, another nice humanizer option
|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="Smile" title="Smile" class="smilie smilie_1" />
Reply

#6
Hello.

I’m glad to hear that! Yeah, I just fixed it.
Please, redownload and reinstall Kasteria OTBot.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016