Rock5's Ancient Treasure
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Re: Rock5's Ancient Treasure
assuming we could stop the previous wp code it brings issues to mind.
on the one hand I say loading a new path should force the previous to stop but at the same time how do we know the previous path didn't have important things to finish up, although they should be finished before loading a new path =)
on the one hand I say loading a new path should force the previous to stop but at the same time how do we know the previous path didn't have important things to finish up, although they should be finished before loading a new path =)
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Rock5's Ancient Treasure
I don't think it would be good programming practice to force another process to end. If the need arises it probably just means it could be or should be programmed differently. For instance if my code doesn't work we could try doing a check within each problem loop.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Rock5's Ancient Treasure
i guess instead of the timer calling the function you could just call the function in each loop, so if you ever die it will probably work.rock5 wrote:For instance if my code doesn't work we could try doing a check within each problem loop.
I wonder though if doing that would still have the same issue, would it still continue with the loops code after reloging? If so then would need a variable like
dead = true
and at the start of each loop
if dead then break end
That would probably cover it.
I just noticed you have a return after every checkRelog()
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Rock5's Ancient Treasure
You would unless you exit the current code if it relogs. eg.lisa wrote:I wonder though if doing that would still have the same issue, would it still continue with the loops code after reloging?
Code: Select all
if rezCheck() then return end
Ah you noticed that did you? I had problems until I figured that out. The problem is you can't do that in a function though because it just returns from the function instead of exiting the onload. Which is probably why we might have trouble with the timed event.lisa wrote:I just noticed you have a return after every checkRelog()
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Rock5's Ancient Treasure
After lots of testing and I mean lots I finally tracked down an issue I was having lol
A global value in a waypoint is still a global value even after loading another path, as it should be. *Slaps forehead*
I used a global value in the tests I did and that is why it didn't keep counting because the new WP used the same global which was of course reset to 0, I would expect it to get all messed up after that though but it didn't *shrug*
Anyway, issue with the timer is that the previous WP will leave the onload because of the returns and then error saying no waypoints but if you do it just as a function in the WP and not use timer then it works fine =)
A global value in a waypoint is still a global value even after loading another path, as it should be. *Slaps forehead*
I used a global value in the tests I did and that is why it didn't keep counting because the new WP used the same global which was of course reset to 0, I would expect it to get all messed up after that though but it didn't *shrug*
Anyway, issue with the timer is that the previous WP will leave the onload because of the returns and then error saying no waypoints but if you do it just as a function in the WP and not use timer then it works fine =)
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Rock5's Ancient Treasure
I thought of that and noticed you used local count = 0. Did you change it?lisa wrote:I used a global value in the tests I did and that is why it didn't keep counting because the new WP used the same global which was of course reset to 0, I would expect it to get all messed up after that though but it didn't *shrug*
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Rock5's Ancient Treasure
Yeah when I am testing things I tend to go a silly I guess, change stuff constantly and see what happens.rock5 wrote:I thought of that and noticed you used local count = 0. Did you change it?
Last I was checking went like this
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
local stoppathcoded
function ATdeadcheck()
if player:exists() then
player:update()
if player.MP ~= player.MaxMP then
print("2 stopping")
stoppathcoded = true
ChangeChar()
waitForLoadingScreen();
yrest(3000)
loadProfile()
loadPaths("1.xml");
end
end
end
local count = 0
while(true) do
ATdeadcheck()
if stoppathcoded then return end
yrest(1000)
count = count +1
print(count)
end
</onLoad>
</waypoints>
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Rock5's Ancient Treasure
Code: Select all
6:2am - ...scripts/rom/userfunctions/userfunction_LoginNextChar.lua:60: attempt
to index local '_table' (a nil value)
Here's what the charlist looks like.
Code: Select all
SetCharList({{
{account=10 , chars= {}},
},{
{account=11 , chars= {}},
}})
Re: Rock5's Ancient Treasure
you've got to many {} going on.
Code: Select all
CharList = {
{account=10,chars={}},
{account=11,chars={}},
}
Remember no matter you do in life to always have a little fun while you are at it
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Rock5's Ancient Treasure
I think what he is doing is specifying 2 lists, for use with 2 clients. I think I added support for that at some stage.
Code: Select all
--[[ Example
SetCharList({
{account=1, chars= {1,2,6}},
{account=2, chars= {1,3}},
{account=4, chars= {}},
})
Or for groups of accounts
SetCharList({{
{account=1, chars= {1,2,6}},
{account=2, chars= {1,3}},
},
{
{account=4, chars= {}},
}})
--]]
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Rock5's Ancient Treasure
I can't see the error but I noticed you used the SetCharList command differently that I do. Are you using a modified script?
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Rock5's Ancient Treasure
Lol didn't think what I had in mind was actually pretty complicated. Sorry for the bother lisa, and thanks a lot for helping this much. Really appreciate it.
So I take it that the one rock5 posted on the previous page is the one I should be testing? Will report problems later when my chars do AT. Thanks for the new waypoint, rock!
Btw, just one question, is there a reason why the chars go up through roof a number of times? Will there be obstacles if you do all the traveling underground?
Thanks.
So I take it that the one rock5 posted on the previous page is the one I should be testing? Will report problems later when my chars do AT. Thanks for the new waypoint, rock!
Btw, just one question, is there a reason why the chars go up through roof a number of times? Will there be obstacles if you do all the traveling underground?
Thanks.
Re: Rock5's Ancient Treasure
The reason it always goes up through the roof is because going through the walls wasn't reliable and I think going down through the floor wasn't possible. The reason it does it a few times is because at first, because of the mound of dirt under 2 of the fragements, it needs to go up into the corridors twice to collect them then it should go under one last time to collect all the candles and other fragments.
Yes test my version. If it has problems then my discussion with Lisa has given me more ideas to try.
Actually I just made a small change to it. Could you download it again please. It is now beta 2.
http://www.solarstrike.net/phpBB3/viewt ... 919#p46919
Yes test my version. If it has problems then my discussion with Lisa has given me more ideas to try.
Actually I just made a small change to it. Could you download it again please. It is now beta 2.
http://www.solarstrike.net/phpBB3/viewt ... 919#p46919
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Rock5's Ancient Treasure
I see. Reason I asked is that I'm still searching for a counter-measure on the bot thing. So I'm gonna test for other ways of completing AT.
Probably, entering a room first before going up through roof might fix it. Since as far as I've seen, it only activates in one of the starting rooms.
Anyway, thanks for the new file. Downloaded it and will report problems later.
Probably, entering a room first before going up through roof might fix it. Since as far as I've seen, it only activates in one of the starting rooms.
Anyway, thanks for the new file. Downloaded it and will report problems later.
Re: Rock5's Ancient Treasure
Hey, rock. Well, I've tested the new script a good number of times and so far so good. So thanks a lot for updating this waypoint! I'm still planning to stress test it though to be really sure all's working as intended.
Anyway, just wanted to ask, if I were to put rezcheck to the other 2 minigames waypoint, do I just have to copy these lines:
and insert this to checkRelog():
Is this all I have to add to the 2 other waypoints?
And btw, can you please tell me how to add my char's starting position inside AT to the log file?
Thanks.
Anyway, just wanted to ask, if I were to put rezcheck to the other 2 minigames waypoint, do I just have to copy these lines:
Code: Select all
function rezCheck()
player:update()
if isInGame() and (1 > player.HP or not player.Alive) then
-- Make sure they aren't still trying to run off
keyboardRelease(settings.hotkeys.MOVE_FORWARD.key);
keyboardRelease(settings.hotkeys.MOVE_BACKWARD.key);
keyboardRelease(settings.hotkeys.ROTATE_LEFT.key);
keyboardRelease(settings.hotkeys.ROTATE_RIGHT.key);
keyboardRelease(settings.hotkeys.STRAFF_LEFT.key);
keyboardRelease(settings.hotkeys.STRAFF_RIGHT.key);
RoMScript("PlaySoundByPath('Interface/AddOns/ingamefunctions/threatdetected.wav')")
cprintf(cli.green, language[104]); -- try to resurrect in 5 seconds
rest(5000);
cprintf(cli.green, language[107]); -- use the ingame resurrect macro
RoMScript("UseSelfRevive();"); -- first try self revive
rest(500);
RoMScript("BrithRevive();");
waitForLoadingScreen(30)
rest(settings.profile.options.WAIT_TIME_AFTER_RES);
player:update();
logentry = "Player died."
checkRelog()
return
end
end
registerTimer("rezcheck",2000,rezCheck)
Code: Select all
unregisterTimer("rezcheck")
And btw, can you please tell me how to add my char's starting position inside AT to the log file?
Thanks.
Re: Rock5's Ancient Treasure
Yes, that should do it.kenzu38 wrote:Anyway, just wanted to ask, if I were to put rezcheck to the other 2 minigames waypoint, do I just have to copy these lines:
First you need to record your starting position in variables in the onload. eg.kenzu38 wrote:And btw, can you please tell me how to add my char's starting position inside AT to the log file?
Code: Select all
startx,startz,starty = player.X, player.Z, player.Y
Code: Select all
file:write("Acc: "..RoMScript("GetAccountName()").."\tName: " ..string.format("%-10s",player.Name ).." \tDate: " .. os.date() .. "\tCoords: " .. string.format("%d,%d,%d",startx,startz,starty)..
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Rock5's Ancient Treasure
Ok, thanks for the code! I assume where I place the variables is important?
So is it correct to put...
...before fly() in the code below:
I'm unable to test this myself 'til server resets so I decided to just ask beforehand.
Thanks.
So is it correct to put...
Code: Select all
startx,startz,starty = player.X, player.Z, player.Y
...before fly() in the code below:
Code: Select all
if player:target_NPC(ange) then
yrest(2000);
sendMacro("ChoiceOption(4);");
yrest(2000);
sendMacro("ChoiceOption(1);");
yrest(1000);
if not waitForLoadingScreen(10) then
print("Failed to teleport into Ancient Treasure. Maybe you already done it today.")
logentry = "Failed to teleport into Ancient Treasure. Maybe you already done it today."
checkRelog()
return
end
else
print("Too far from Ange Rasa")
logentry = "Too far from Ange Rasa"
checkRelog()
return
end
end
(insert startx,startz,starty = player.X, player.Z, player.Y here?)
fly()
if not RoMScript("TimeKeeperFrame:IsVisible()") then -- no timer so click NPC and start it
if player:target_NPC(luke) then
yrest(2000);
sendMacro("ChoiceOption(3);");
yrest(2000);
sendMacro("ChoiceOption(1);");
yrest(5000);
player:clearTarget()
UpThroughRoof(1)
else
print("Can't find Luke Xavi")
logentry = "Can't find Luke Xavi"
checkRelog()
return
end
end
Thanks.
Re: Rock5's Ancient Treasure
Ah, you want to record which room you start in. Then, yes, that's a good spot to put it.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Rock5's Ancient Treasure
Ok, thanks. Will try this now. I'll just post here when I encounter problems. Thanks again.
Re: Rock5's Ancient Treasure
Hey rock, thanks for that log entry code, it works!
Btw, just a question. I noticed in the AT waypoint, you have something like facedirection or something like that.
Well, I'm currently writing a waypoint that will keybind the actions I want and one of them is to teleport forward, back, left or right depending on where the char is facing. So I want to know if there is a code built-in to the bot that I can use for this or will I have to come up with a formula for this?
Thanks.
Btw, just a question. I noticed in the AT waypoint, you have something like facedirection or something like that.
Well, I'm currently writing a waypoint that will keybind the actions I want and one of them is to teleport forward, back, left or right depending on where the char is facing. So I want to know if there is a code built-in to the bot that I can use for this or will I have to come up with a formula for this?
Thanks.
Who is online
Users browsing this forum: No registered users and 10 guests