Posts: 9
Threads: 2
Joined: Mar 2020
Reputation:
0
01-31-2021, 05:17 AM
(This post was last modified: 01-31-2021, 05:17 AM by Rakkkk.)
I need a code to make it walk North West for example.
But I would like it to walk diagonally instead of walking left then north.
I would like a code that gets the perimeter for example X Y Z + X Y Z +1 2 or 3 as a square around the character.
My mastercores ot bot keeps pausing when my internet connection drops and the character relogs. So it stays on fro 15 mins and logs out once. Then bot stays paused. I've read there is no way to unpause the bot when it is paused. Is this a correct info? I wish I could figure it out.
Since bot is pausing it as it logs back in I wonder if I could try to run a persistent before this pausing thing as of read default 02:01 Welcome to RetroCores! then pausebot(false). But I don't think it would work. I reallt wonder why is the bot pausing just when logging back in.
Thank you so much in advance!
Posts: 2,948
Threads: 492
Joined: Jul 2018
Reputation:
84
Hello.
Mastercores OTBot doesn't pauses when your connection drops, however, it may pause if you enable "Alerts->Disconnected->Pause Bot" or use a similar Lua script.
Once Bot is paused, persistents stops working as well, because Bot is paused. So you cannot unpause it using scripts.
Posts: 9
Threads: 2
Joined: Mar 2020
Reputation:
0
|Only Registered members can see download links. | Click here to buy subscription or here to register.Thanks,. I am trying to troubleshoot but it might be one of my persistens causing it to pause. I wonder if there is any
I wonder if I could only write this squaremeter { X = 32957, Y = 32076, Z = 7 } and have the 8 square meters around it included. If not, how can I write the code below, it won't work because i don't know how to write it.
Plus the if line could be modified as well to include those sqms. Can you help me? Thanks!
local CHARACTER = { X = 32957, Y = 32076, Z = 7 } and { X = 32958, Y = 32076, Z = 7 } and { X = 32956, Y = 32076, Z = 7 } and { X = 32957, Y = 32075, Z = 7 } and { X = 32957, Y = 32077, Z = 7 } and { X = 32956, Y = 32075, Z = 7 } and { X = 32958, Y = 32077, Z = 7 } and { X = 32958, Y = 32075, Z = 7 } and { X = 32956, Y = 32077, Z = 7 } --venore temple
if standtime() >= 0 and (posx() == CHARACTER.X and posy() == CHARACTER.Y and posz() == CHARACTER.Z) then
Posts: 2,948
Threads: 492
Joined: Jul 2018
Reputation:
84
Hello.
You can check based on X + RangeX or check for each sqm.
This check for each sqm.
local TEMPLE_LOCATIONS = {
{ X = 32957, Y = 32076, Z = 7 },
{ X = 32958, Y = 32076, Z = 7 },
{ X = 32956, Y = 32076, Z = 7 },
{ X = 32957, Y = 32075, Z = 7 },
{ X = 32957, Y = 32077, Z = 7 },
{ X = 32956, Y = 32075, Z = 7 },
{ X = 32958, Y = 32077, Z = 7 },
{ X = 32958, Y = 32075, Z = 7 },
{ X = 32956, Y = 32077, Z = 7 }, --venore temple
}
if standtime() >= 5000 then
local player_x = posx()
local player_y = posy()
local player_z = posz()
for _, temple_location in ipairs(TEMPLE_LOCATIONS) do
if player_x == temple_location.X and player_y == temple_location.Y and player_z == temple_location.Z then
-- do something
break
end
end
end
If you wanna check by range, which makes it bit easier.
local TEMPLE_LOCATIONS = {
{ X = 32956, RangeX = 2, Y = 32075, RangeY = 2 } -- This will check if you are on X = 32956, 32957 or 32958 AND Y = 32075, 32076 or 32077.
{ X = 32956, RangeX = 0, Y = 32075, RangeY = 0 } -- If you wanna check for a specific SQM use RangeX and RangeY = 0.
}
if standtime() >= 5000 then
local player_x = posx()
local player_y = posy()
local player_z = posz()
for _, temple_location in ipairs(TEMPLE_LOCATIONS) do
if (player_x >= temple_location.X and player_x <= (temple_location.X + temple_location.RangeX)) and (player_y >= temple_location.Y and player_y <= (temple_location.Y + temple_location.RangeY)) and player_z == temple_location.Z then
-- do something
break
end
end
end
|