02-05-2024, 04:05 PM
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.
Does the current core even allow for such quick actions?
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?