Log in

View Full Version : setWalkerEnabled(true) after 30 seconds



kubax36
03-16-2013, 11:53 AM
i need script which will set walker to enabled if its disabled for 30 seconds or longer. Can someone help me please? ;p

Xeromex
03-16-2013, 12:23 PM
delayWalker(30*1000)

kubax36
03-16-2013, 12:51 PM
i dont need to delay walker, i need to turn it on when it is off for longer than 30 sec :D

Ohman
03-16-2013, 01:12 PM
as far as i know theres no function returning the state of Walker (e.g Walker.Enabled())

Hendy
03-16-2013, 01:28 PM
Yes there is. Theres two, Walker.Start() or setWalkerEnabled(true)

Ohman
03-16-2013, 01:32 PM
Yes there is. Theres two, Walker.Start() or setWalkerEnabled(true)
read my post again, none of these inform you about the current walker state (on/off)

Hendy
03-16-2013, 01:37 PM
read my post again, none of these inform you about the current walker state (on/off)

Just use a check position then, if you dont have a target and haven't moved in x amount of seconds then walker must be off.

kubax36
03-16-2013, 02:48 PM
Easiest way to do so is:

while (true) do
Walker.Start()
wait(30000)
end
There are of course other ways to do so, but this is the shortest one.
You could also use variables to check if the walker is enabled or not.

but it is checking it every 30 seconds. It is possible to start to count this 30 seconds from time when it turn off?

kubax36
03-16-2013, 03:28 PM
That's what I meant with variables.
You could set a variable false when you turn the targeting off, which then enables the while loop that executes the action to turn the targeting on again after 30 seconds and then sets the variable true again.

i have no idea how to do it :D. I have problem with this script

function skin()
if(Self.ItemCount(5908) >= 1 and Self.TargetID() == 0) then
for x = -7, 7, 1 do
for y = -5, 5, 1 do
local item = Map.GetTopUseItem(Self.Position().x + x, Self.Position().y + y, Self.Position().z)
if (item.id == 5999) then
delayWalker(3000)
setWalkerEnabled(false)
elseif (item.id == 4112) then
if ((Self.Position().x + x) ~= Self.Position().x or (Self.Position().y + y) ~= Self.Position().y) then
setLooterEnabled(false)
setWalkerEnabled(false)
delayWalker(3000)
Self.UseItemWithGround(5908, Self.Position().x + x, Self.Position().y + y, Self.Position().z)
wait(1500,2500)
delayWalker(1000)
setLooterEnabled(true)
setWalkerEnabled(true)
else
Self.Step("east")
if ((Self.Position().x + x) ~= Self.Position().x or (Self.Position().y + y) ~= Self.Position().y) then
setLooterEnabled(false)
setWalkerEnabled(false)
delayWalker(3000)
Self.UseItemWithGround(5908, Self.Position().x + x, Self.Position().y + y, Self.Position().z)
wait(1500,2500)
delayWalker(1000)
setLooterEnabled(true)
setWalkerEnabled(true)
else
setLooterEnabled(true)
setWalkerEnabled(true)
end
end
end
end
end
end
wait(400)
end


while (true) do
skin()
end
one or two times per day its turning off walker and its not turning it on again and then i am getting kicked. I cant do also thing with checking it each 30 seconds cuz i am setting targeting off when i am depositing items and if it will check it 1 sec after it open depot then it wont deposit anything :(

Hendy
03-16-2013, 04:32 PM
You are using an outdated skinning script. If at the start you stated that you were trying to make a better skinner you could have saved yourself a lot of trouble. Link below is to the newest skinner script.

http://forums.xenobot.net/showthread.php?11556-Xenobot-Community-Scripts&p=148641&viewfull=1#post148641

kubax36
03-16-2013, 07:34 PM
You are using an outdated skinning script. If at the start you stated that you were trying to make a better skinner you could have saved yourself a lot of trouble. Link below is to the newest skinner script.

http://forums.xenobot.net/showthread.php?11556-Xenobot-Community-Scripts&p=148641&viewfull=1#post148641

Can u help me to edit your script to wait next to body till its possible to skin it? Edron Behemoths spawn is pretty big and all bodies gets rot till i make round around spawn ;s