View Full Version : Walker stuck (delay the alarm)
Niels
01-07-2013, 03:00 PM
A lot of times when I'm botting and at the same time doing something else in my room, I hear the alarm walker stuck that solves itself within 3 sec. So you'll here "walker stuck", because of some creature that walks in front of you, xenobot automatically kills it and proceeds walking. I think it would be nice if the bot waits 5 sec before alarming you. If it is still stuck after 5 seconds it'll alert you.
I get that unnecessary alarm everytime my knight passes amazones on its way to orc fortress. If you have 5 clients open this can get on your nerves.
There are probably more people that recognize this and would like this to be more user friendly. Please reply about what you think.
Niels
edit: I know this is not a big issue, but I think little changes like these really make the bot more user friendly
thorekz
01-07-2013, 03:25 PM
same happens to me! if this could be fixed would be great
XtrmJosh
01-07-2013, 07:10 PM
Something like this might help:
standtimemax = 100 -- Seconds to stand before alerting
local oldposition = 0 -- Declare the variable for oldposition as we need to compare it before it is used.
function onTick()
local position = Self.Position()
if (oldposition ~= 0) then
if (position == oldposition) then
stood += 1
else
stood = 0
end
if (stood > standtimemax) then
playsound("alert.wav")
end
local oldposition = Self.Position()
end
registerEventListener(TIMER_TICK, "onTick")
If that doesn't work try this one:
standtimemax = 100 -- Seconds to stand before alerting
function onTick()
local myx = Self.Position().x
local myy = Self.Position().y
local myz = Self.Position().z
if (oldx ~= 0) then
if myx = oldx and myy = oldy and myz = oldz then
stood += 1
else
stood = 0
end
if stood > standtimemax then
playsound("alert.wav")
end
oldx = Self.Position().x
oldy = Self.Position().y
oldz = Self.Position().z
end
registerEventListener(TIMER_TICK, "onTick")
If it doesn't work let me know what error it throws and I will take a look. What it's supposed to do is get your position, check if it's the same as it was last tick, and each second if you are stood still then it will add 1 to a variable, if that variable reaches standtimemax then you have been stood still for too long and it will play alert.wav. Test it thoroughly before relying on it, as I've not even executed it yet.
Niels
01-08-2013, 06:04 PM
Thanks XtrmJosh I'll try that
Wovimus
03-12-2013, 11:21 PM
XtrmJosh that scripts are not working, I paste here the errors.
00:18 XenoScript Error:
Script: walkeralarm.lua
Line #: 9
Chunk: C:?Users?Sergio?Documents?XenoBot?Scripts?walkeral arm.lua
Error: '=' expected near '+'
This is an error with user-input and should not be reported as a bug with XenoBot.
second one
00:15 XenoScript Error:
Script: walkeralarm.lua
Line #: 9
Chunk: C:?Users?Sergio?Documents?XenoBot?Scripts?walkeral arm.lua
Error: 'then' expected near '='
This is an error with user-input and should not be reported as a bug with XenoBot.
Avani
03-13-2013, 12:06 AM
Wovimus
Try these, i've fixed XtrmJosh scripts.
standtimemax = 100 -- Seconds to stand before alerting
local oldposition = 0 -- Declare the variable for oldposition as we need to compare it before it is used.
function onTick()
local position = Self.Position()
if (oldposition ~= 0) then
if (position == oldposition) then
stood = stood + 1
else
stood = 0
end
if (stood > standtimemax) then
playsound("alert.wav")
end
local oldposition = Self.Position()
end
registerEventListener(TIMER_TICK, "onTick")
standtimemax = 100 -- Seconds to stand before alerting
function onTick()
local myx = Self.Position().x
local myy = Self.Position().y
local myz = Self.Position().z
if (oldx ~= 0) then
if myx = oldx and myy = oldy and myz = oldz then
stood = stood + 1
else
stood = 0
end
if stood > standtimemax then
playsound("alert.wav")
end
oldx = Self.Position().x
oldy = Self.Position().y
oldz = Self.Position().z
end
registerEventListener(TIMER_TICK, "onTick")
Wovimus
03-13-2013, 01:49 AM
Avani still not working, tried to fix it myself, it now execute but doesnt work.
standtimemax = 60 -- Seconds to stand before alerting
local oldposition = 0 -- Declare the variable for oldposition as we need to compare it before it is used.
stood = 0
function onTick()
local position = Self.Position()
for i=0, (1/0) do
if (oldposition ~= 0) then
if (position == oldposition) then
stood = stood + 1
end
end
return stood
end
if (stood > standtimemax) then
print("Walker Stuck")
alert()
end
local oldposition = Self.Position()
end
registerEventListener(TIMER_TICK, "onTick")
Wovimus
04-04-2013, 03:17 AM
Anyone got working version of this or can fix?
Still would be nice that bot implement option to put delay on walker stuck alarm, like % on low health.
Wovimus
04-14-2013, 08:03 PM
Bump^
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.