Some problems with waypoints

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Brollyy
Posts: 4
Joined: Thu Dec 15, 2011 12:02 pm

Some problems with waypoints

#1 Post by Brollyy »

Hi there, I was doing my own bot to level up chars in order to make Mana Stones recently and I got some really annoying problems.

First of all, one of waypoint file seems to be bugged somehow. Sometimes it chose the wrong waypoint or one I never remembered to put there.
It should start from Snoop and through Lehman end at Varanas Bank on Central Plaza, but my chars often goes other way or ends under the bridge (yeah, I know it's weird). The funny thing is that it looks like it bugs if I'm not around. I could sit many hours near computer and, for example, read a book and it works fine. But when I go to school or take a nap it happens to the next char which runs the script. I put the code up here, hope you guys will find something about it.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="NORMAL">
	<!-- #1 --><waypoint x="-7062" z="-4297" y="171">	</waypoint>
	<!-- #2 --><waypoint x="-6755" z="-3774" y="166">	</waypoint>
	<!-- #3 --><waypoint x="-6375" z="-3854" y="165">	</waypoint>
	<!-- #4 --><waypoint x="-6341" z="-3914" y="162">		
		player:target_NPC("Snoop the Stubborn"); yrest(1000);
		sendMacro("ChoiceOption(1);");
                waitForLoadingScreen();
		player:update();
	</waypoint>
	<!-- #5 --><waypoint x="2697" z="965" y="49">	</waypoint>
	<!-- #6 --><waypoint x="2777" z="960" y="54">		
		player:target_NPC("Lieve"); yrest(1000);
		sendMacro("ChoiceOption(1);");
		waitForLoadingScreen();
		player:update();
		yrest(2000);
	</waypoint>
	<!-- #7 --><waypoint x="5267" z="-3966" y="60">	</waypoint>
	<!-- #8 --><waypoint x="5232" z="-4009" y="60">	</waypoint>
	<!-- #9 --><waypoint x="5358" z="-4178" y="66">	</waypoint>
	<!-- #10 --><waypoint x="5520" z="-4292" y="61">	</waypoint>
	<!-- #11 --><waypoint x="5522" z="-4426" y="65">		
		player:target_NPC("Lehman"); yrest(1000);
		sendMacro("OnClick_QuestListButton(1,1)"); yrest(2000);
		sendMacro("AcceptQuest()"); yrest(2000);
		player:target_NPC("Lehman");
		sendMacro("OnClick_QuestListButton(3,1)"); yrest(2000);
		sendMacro("CompleteQuest()"); yrest(2000);
	</waypoint>
	<!-- #12 --><waypoint x="5519" z="-4305" y="61">	</waypoint>
	<!-- #13 --><waypoint x="5310" z="-4125" y="66">	</waypoint>
	<!-- #14 --><waypoint x="5225" z="-4006" y="60">	</waypoint>
	<!-- #15 --><waypoint x="5282" z="-3939" y="60">	</waypoint>
	<!-- #16 --><waypoint x="5282" z="-3895" y="60">		
		player:target_NPC("Lyeve"); yrest(1000);
		sendMacro("ChoiceOption(2);");
		waitForLoadingScreen();
		player:update();
		yrest(2000);
	</waypoint>
	<!-- #17 --><waypoint x="4721" z="-2127" y="115">	</waypoint>
	<!-- #18 --><waypoint x="4571" z="-2195" y="103">	
		LogNextToon(); <!-- I'm using modified version of this function, which I found up there, so I don't have to put in this waypoint any ending script -->
		yrest(5000);
                loadPaths("alt1-3"); <!-- Loop script for another char -->
	</waypoint>
</waypoints>
Another problem I have, is to write script which will fuse belts and stones into Mana Stones. I wanted to three alts fuse 8 belts and stones into 2 Mana Stones Tier 5 and 2 Mana Stones Tier 4 and then send it to fourth char (look chars table). He will then fuse 3 belts and stones, 6 Mana Stones T5 and T4 into one Mana Stone Tier 7, which should be send to main char (Brollyy).
I ended up with:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<onLoad>
		chars = {"Brolld","Paraga","Parage","Mudkib","Mudkif"};
		RoMScript("UMMFrame:Hide()");
		if player.Name == "Brollyy" then
			ChangeChar(2,1);
			waitForLoadingScreen();
			yrest(1000); player:update();
			index = 1;
			index1 = 1;
		else
                        <!-- index means order of alt I'm onto now. I use only 7 chars on the one account, so I had to create such enourmous operation -->
			index = (tonumber(RoMScript("CHARACTER_SELECT.selectedIndex;"))-1)+(7*(tonumber(RoMScript("LogID;"))-1));
                        <!-- index1 is for sending mails to chars which make Tier 7 stone -->
			index1 = ((index-(index % 4))/4)+1;
		end
	</onLoad>
	<!-- #  1 --><waypoint x="4569" z="-2205" y="103">
		repeat
			player:target_Object("Mailbox"); yrest(1000);
			UMM_TakeMail(); yrest(1000);
			if index ~= 21 and index % 4 ~= 0 then
				Fusion_MakeMaxStones("Excellent Belt",4); yrest(1000);
				UMM_SendByNameOrId(chars[index1],"Mana Stone Tier 4"); yrest(1000);
				UMM_SendByNameOrId(chars[index1],"Mana Stone Tier 5"); yrest(1000);
				inventory:update();
				if inventory:getItemCount("Excellent Belt") > 0 then
					UMM_SendByNameOrId(chars[index1],"Excellent Belt"); yrest(1000);
				end
				if inventory:getItemCount("Random Fusion Stone") > 0 then
					UMM_SendByNameOrId(chars[index1],"Random Fusion Stone"); yrest(1000);
				end
			elseif index % 4 == 0 then
				Fusion_MakeTier7(); yrest(1000);
				UMM_SendByNameOrId("Brollyy","Mana Stone Tier 7"); yrest(1000);
			elseif index == 21 then
                                <!-- It's the last alt. I know I could do that better. Lazy me. -- >
				Fusion_MakeMaxStones("Excellent Belt", 4); yrest(1000);
				UMM_SendByNameOrId("Brollyy","Mana Stone Tier 4"); yrest(1000);
				UMM_SendByNameOrId("Brollyy","Mana Stone Tier 5"); yrest(1000);
				inventory:update();
				if inventory:getItemCount("Excellent Belt") > 0 then
					UMM_SendByNameOrId("Brollyy","Excellent Belt"); yrest(1000);
				elseif inventory:getItemCount("Random Fusion Stone") > 0 then
					UMM_SendByNameOrId("Brollyy","Random Fusion Stone"); yrest(1000);
				end				
			end
			index = index + 1;
			index1 = ((index-(index % 4))/4)+1;
			RoMScript("UMMFrame:Hide()");
			LogNextToon();
			player:update();
			yrest(2000);
		until index == 22 <!-- number of alts + 1 -- >
		RoMScript("UMMFrame:Hide()");
		ChangeChar(1,1);
		waitForLoadingScreen();
		error("Laczenie zakonczone."); <!-- yeah, I'm from Poland. Happy now? -->
	</waypoint>
</waypoints>
I don't know why, but it's not working properly. Last time I used it, I had to search for missing stones on each alt, so I spent more than two hours on making stones.

Last problem is rather the cause of RoMBot mechanics. When my waypoints go insane and unsticking count is above 10, my char log out and bot stops. Is there any possibility of making script which will change char to another instead of logging it out?

I do realize that my English isn't the best, but I think I told everything clear enough for you to understand. I will be thankful if someone help me up there :).
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Some problems with waypoints

#2 Post by lisa »

Ok well first issue.
Brollyy wrote:It should start from Snoop and through Lehman end at Varanas Bank on Central Plaza
If it is the first time a character has been to varanas the teleporter on the gate will have teleport to classhall as option 1 and option 2 will be to teleport somewhere else. So that can mess up people some times.

I hope the LogNextToon() function you call has waitForLoadingScreen(); in it.
Brollyy wrote:ends under the bridge
That is a game bug, a very annoying game bug, I believe it is an issue with the game teleporting you to coords lower in height then the actual ground and so you go to the next level of ground that is underneath the normal ground. We can't do anything about that unfortunately.
Brollyy wrote:nother problem I have, is to write script which will fuse belts and stones into Mana Stones
Have you tried Rock's fusion stuff?
http://www.solarstrike.net/phpBB3/viewt ... =27&t=1434
Brollyy wrote:When my waypoints go insane and unsticking count is above 10
profile options can change that behaviour with unsticks.

Code: Select all

		<option name="LOGOUT_WHEN_STUCK"	value="true" />
		<option name="CLOSE_WHEN_STUCK"		value="true" />
There is also another option, I added in calls to userfunctions if they exist for unsticks 3,6,9
unStick3()
unStick6()
unStick9()

So in your case you could add into the onload of your profile

Code: Select all

function unStick9()
LogNextToon()
yrest(5000);
loadPaths("alt1-3");
end
So if it reaches 9 unstick tries it will then do your log next character code.

I think that covers your questions/issues ;)
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
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Some problems with waypoints

#3 Post by rock5 »

I can't see anything wrong with your initial script. Maybe the game sometimes glitches and the character just runs too far sometimes.

Like Lisa said, the script will only work for characters who don't have their second class. So make sure you didn't add a second class to some of your characters. If you did, you'll have to change the way you choose your options at Lieve.

I'm not sure what you did with "LogNextToon()" but with the latest version of fastlogin, you can just use

Code: Select all

ChangeChar()
to log in to the next character. If you are going through a few accounts 'LoginNextChar' might be of interest to you too.
http://www.solarstrike.net/phpBB3/viewt ... 350#p10350

Code: Select all

            Fusion_MakeMaxStones("Excellent Belt",4); yrest(1000);
This should work but since the last fix (due to changes in the Fusion Addon) this hasn't really been tested. It's possible it's not working properly. BTW make sure you have the latest version of the fusion addon and fusion userfunctions. The latest Fusion is v1.05 and the userfunction_Fusion_Functions.lua is 0.3.

It might just be easier to use the new simpler function.

Code: Select all

Fusion_MakeMaxManaStones(_maxManaStoneLevel)
I'm not sure what's in this function "Fusion_MakeTier7()" but you could just use

Code: Select all

Fusion_MakeMaxManaStones(7)
Brollyy wrote:I do realize that my English isn't the best, but I think I told everything clear enough for you to understand. I will be thankful if someone help me up there .
Actually, your English is excellent. I didn't even realise it wasn't your first language until you mentioned it. :D
  • 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
Brollyy
Posts: 4
Joined: Thu Dec 15, 2011 12:02 pm

Re: Some problems with waypoints

#4 Post by Brollyy »

I see that I have to clear some things.
rock5 wrote:I can't see anything wrong with your initial script. Maybe the game sometimes glitches and the character just runs too far sometimes.
It doesn't. I have some experience in scripts (I mean that I know how my code does actually works :)) and that's weird thing. After teleport from Class Hall to Plaza my char should go to the mailbox. Instead of this, he runs in other direction, to the stairs that leads to the gate. I'll make a screenshot if I manage to see this situation again, so let's leave it for now.
rock5 wrote:Like Lisa said, the script will only work for characters who don't have their second class. So make sure you didn't add a second class to some of your characters. If you did, you'll have to change the way you choose your options at Lieve.
They don't need second class, I use their Charges as soon as they hit tenth level and then just delete them. I know about this shortcut which was made by Frgoster for new players to not get lost in new city and I'm using it as well. Additionally, this bug I mentioned in last post seem to show only at Plaza since I know from Lisa that bridge problem isn't fault of waypoint.
rock5 wrote:I'm not sure what you did with "LogNextToon()" but with the latest version of fastlogin, you can just use

Code: Select all

ChangeChar()
to log in to the next character. If you are going through a few accounts 'LoginNextChar' might be of interest to you too.
http://www.solarstrike.net/phpBB3/viewt ... 350#p10350
I read that topic when I decided to make my bot more automatic. LogNextToon() is a modified version of forum user's function (I don't remember his nick, though).
To make it all clear, here it is:

Code: Select all

function LogNextToon()
   local MAX_ACC           = 3; -- How many farm accounts do you have?
   local CurrentAccNumber  = tonumber(RoMScript("LogID;"));
   local CurrentCharNumber = tonumber(RoMScript("CHARACTER_SELECT.selectedIndex;"));
   local CurrentNumChars   = tonumber(RoMScript("fastLoginNumChars;"));
   if ((CurrentAccNumber == MAX_ACC) and (CurrentCharNumber == CurrentNumChars)) then
      cprintf(cli.yellow,"Last alt account completed successfully.");
      ChangeChar(1,1);
      yrest(3000);
      player:logout(true);
      return;
   end
   if (CurrentNumChars > CurrentCharNumber) then
      ChangeChar(CurrentCharNumber + 1,CurrentAccNumber);
   else
      ChangeChar(2,CurrentAccNumber + 1);
      yrest(3000);
   end
   waitForLoadingScreen();
   player:update();
end
It suits me more to change one digit than whole table of them when I'll decide to increase my accounts number.
rock5 wrote:This should work but since the last fix (due to changes in the Fusion Addon) this hasn't really been tested. It's possible it's not working properly.
rock5 wrote: It might just be easier to use the new simpler function.

Code: Select all

Fusion_MakeMaxManaStones(_maxManaStoneLevel)
I'm not sure what's in this function "Fusion_MakeTier7()" but you could just use

Code: Select all

Fusion_MakeMaxManaStones(7)
Well, after some very crazy nights spent on logging between several chars because of this script, I lost my faith in algorythms and wrote a function that just manually sets proper amount of stones to be made in order to create Mana Stone Tier 7. Remember that I exactly know how much belts I sent to every char and then to alt which makes Tier 7, so I could do such a thing, although I must admit that fusing belts on most chars seems to work fine when using Fusion_MakeMaxManaStones("Excellent Belt",4). I'll try my script again today and I'll see if it's working properly now.
lisa wrote:There is also another option, I added in calls to userfunctions if they exist for unsticks 3,6,9
unStick3()
unStick6()
unStick9()

So in your case you could add into the onload of your profile


Code:
function unStick9()
LogNextToon()
yrest(5000);
loadPaths("alt1-3");
end



So if it reaches 9 unstick tries it will then do your log next character code.
Thanks for that. At last I can sleep peacefully while my chars will level up without any disturbance. :D
EDIT: I managed to find even better option right now. I changed my profile's options to not logout when unsticks reach max and put

Code: Select all

		LogNextToon()
			yrest(5000);
			loadPaths("alt1-3");
into onUnstickFailure in my profile. Wow, I had no idea that there was something like this right there.
rock5 wrote:Actually, your English is excellent. I didn't even realise it wasn't your first language until you mentioned it. :D
Thanks. My English teacher would be proud of me, if she read this. She always says that I mix up tenses so badly that I'll never be able to communicate with anyone :).
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Some problems with waypoints

#5 Post by rock5 »

Brollyy wrote:It suits me more to change one digit than whole table of them when I'll decide to increase my accounts number.
Whatever works for you. Of course you are stuck to a certain pattern, all the characters from 2 to 8 I believe. Whereas I can use whatever characters from which ever account I like and in any order. Which also allows me to use any of the button. And it's not that difficult to add accounts my way. eg. I use this for my dailies.

Code: Select all

			local CharList = {
				{account=8 , chars= {2,3,4,5,6,7,8}},
				{account=7 , chars= {2,3,4,5,6,7,8}},
				{account=6 , chars= {2,3,4,5,6,7,8}},
				{account=13, chars= {2,3,4,5,6,7,8}},
			}

			SetCharList(CharList)
			LoginNextChar()
That's the first 4 buttons on the right. To add the account on the last button I just copy and paste the last account line and change 13 to 18.

Anyway, don't worry about it. I'm sure you're happy with the work you've done and it does exactly what you want it to do. Can't ask for anymore than that. :)


About making stones, maybe it sometimes fails because you have it set too fast. How much do you have the speed setting on? I set it to 0.7 in my script.


Sorry, I still don't know why it goes to the wrong waypoint. I don't even have any suggestions. :(
  • 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
Brollyy
Posts: 4
Joined: Thu Dec 15, 2011 12:02 pm

Re: Some problems with waypoints

#6 Post by Brollyy »

I found out what was wrong with my script. I just counted wrong when I was setting which alts should make Tier 7 Mana Stones.
When I finally changed it, my script works very fine.
rock5 wrote: About making stones, maybe it sometimes fails because you have it set too fast. How much do you have the speed setting on? I set it to 0.7 in my script.
I thought about it. I set speed to 2.0 to eliminate all lags from my script.
rock5 wrote:Sorry, I still don't know why it goes to the wrong waypoint. I don't even have any suggestions. :(
No problem. Since my alt will now change to another on unstick failure, I have to just manually set all missing alts near mailbox while fusing stones.

Thanks a lot for your help, I believe that my bot will work now properly. Still, if you want, I think I can share my scripts with you.
It level up chars in Heffner Camp (That's why I use only 2-8 characters. I need first one to have teleport to Heffner on the rest of them.), then leave it near mailbox and change to next alt.
It sends all needed ingredients for making Mana Stones to all chars in order to fuse it together on them.
What do you think? Post or not? :)
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Some problems with waypoints

#7 Post by lisa »

Brollyy wrote: I have to just manually set all missing alts near mailbox while fusing stones.
Upu could always inclue a log when you get to the stuck max and before logging next char, then you can easily just open the file and see which chars failed.
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
Brollyy
Posts: 4
Joined: Thu Dec 15, 2011 12:02 pm

Re: Some problems with waypoints

#8 Post by Brollyy »

I think there's no need for this. My script for fusing stops anyway if there isn't any mailbox nearly, so I can easily put chars to Varanas Central Plaza and then start script again.
Post Reply