A few different Questions about daily's

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
FireWire
Posts: 43
Joined: Tue Oct 04, 2011 2:25 pm

A few different Questions about daily's

#1 Post by FireWire »

So I have been running around the board almost all morning, I have been looking at code and trying to adjust it here and there. I have finally understood how to open up the daily's, accept the quests, after that I am unsure of what to do. I have looked at the wiki and other files that have been posted but I am still a bit confused.

I see some files have an onload function in them while others not. I am looking for just a basic silverfall daily's quest, the questions I have are these.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="-619" z="-5836" y="23"> player:target_NPC(110584) tag="npc";
		AcceptQuestByName("Stolen Tools");

	</waypoint>
</waypoints>
Is what I have been able to establish so far, after trying multiple ways, I found the userfunction for the getquestbyname and put that in got it working perfectly.

Now after that do I simply just enter my waypoints to the goblins and then reverse it so it runs back, and ive seen the item count code for daily's not sure I understand exactly where to put it.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="-619" z="-5836" y="23"> player:target_NPC(110584) tag="npc";
		AcceptQuestByName("Stolen Tools");

local queststate = "incomplete"
      repeat 
         player:target_Object("200619", 10000);
         yrest(500);
         queststate = getQuestStatus("Stolen Tools"); 
      until( queststate == "complete");

	</waypoint>
	<!-- #  1 --><waypoint x="-610" z="-5818" y="24">	</waypoint>
	<!-- #  2 --><waypoint x="-720" z="-5735" y="44">	</waypoint>
	<!-- #  3 --><waypoint x="-878" z="-5596" y="57">	</waypoint>
	<!-- #  4 --><waypoint x="-1070" z="-5503" y="20">	</waypoint>
	<!-- #  5 --><waypoint x="-1200" z="-5397" y="13">	</waypoint>
	<!-- #  6 --><waypoint x="-1419" z="-5282" y="-6">	</waypoint>
	<!-- #  7 --><waypoint x="-1649" z="-5221" y="31">	</waypoint>
	<!-- #  8 --><waypoint x="-1907" z="-5224" y="18">	</waypoint>
	<!-- #  9 --><waypoint x="-2108" z="-5103" y="3">	</waypoint>
	<!-- # 10 --><waypoint x="-2266" z="-4869" y="16">	</waypoint>
	<!-- # 11 --><waypoint x="-2211" z="-4685" y="19">	</waypoint>
	<!-- # 12 --><waypoint x="-2017" z="-4586" y="9">	</waypoint>
	<!-- # 13 --><waypoint x="-1834" z="-4420" y="7">	</waypoint>
	<!-- # 14 --><waypoint x="-1872" z="-4168" y="54">	</waypoint>
	<!-- # 15 --><waypoint x="-2117" z="-4037" y="84">	</waypoint>
	<!-- # 16 --><waypoint x="-2328" z="-3990" y="72">	</waypoint>
	<!-- # 17 --><waypoint x="-2613" z="-3934" y="42">	</waypoint>
	<!-- # 18 --><waypoint x="-2808" z="-3892" y="18">	</waypoint>
	<!-- # 19 --><waypoint x="-3138" z="-3958" y="25">	</waypoint>
	<!-- # 20 --><waypoint x="-3291" z="-3936" y="26">	</waypoint>
</waypoints>

I just guess I dont understand proper placement of the codes, I want learn how to at least make this so it does the first quest, turns it in I just don't really get it.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: A few different Questions about daily's

#2 Post by rock5 »

Ok this is going to be a long post.

Everything is done in sequence like you would do manually. I'll try to avoid fancy code.

First lets just create the path and we'll add the code later.

So first, start createpath at the bulletin board and make a path to the hunting zone. When you are at the beginning of the hunting zone, take note of the waypoint. Let's call it 10 for this example. The index numbers can be off sometimes so take note of the coordinates.

Make a tour around the hunting area and then return to the same spot as waypoint 10. Take note of this waypoint too. Let's call it 20 for this example.

Then head back to the bulleting board. It might be easier to turn in the quests with a separate file or do it manually, so we can save the file here.

Now open the file for editing.

The first waypoint you want to accept the quest. You nearly had that right.

Code: Select all

player:target_NPC(110584) 
AcceptQuestByName("Stolen Tools");

tag="npc" is not needed there and it wasn't used properly anyway. Note: you don't need to have the quest to collect those items so you could leave out this step.

Then what would you do if doing it manually? You would head to the hunting zone and kill stuff. Every now and then you would check to see if you have enough tools. If not you keep killing, if you do you head back to npc.

So in the file, once it does it's first tour around the hunting area you want to decide whether to continue hunting or not. So at point 20 if you want to continue hunting you have to jump over to point 10 so it can go around again. If you don't jump over to waypoint 10, it will head back to npc.

To identify which waypoint to jump to, you add a tag, eg. tag="KeepHunting".

Code: Select all

<!-- # 10 --><waypoint x="-2266" z="-4869" y="16" tag="KeepHunting">   </waypoint>
Then at waypoint 20 you make the decission.

Code: Select all

if 100 > inventory:itemTotalCount(200619) then -- Not enough tools. Go round again.
    __WPL:setWaypointIndex(__WPL:findWaypointTag("KeepHunting"))
end
I'll continue in the next post.
  • 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
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: A few different Questions about daily's

#3 Post by rock5 »

Now create another waypoint from the bulletin board to the npc and back again.

Save it.

Open it for editing.

At the bulleting board, you accept the quest, but you can only do this if you haven't finished your dailies yet. So we check for that first.

Code: Select all

local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()") 
if dailyQuestCount == 10 then -- Finished
    error("Dailies finished.") -- This stops the script
end
Then you accept the quest. Because of the problems we are having with targeting at the moment it's a good idea to put this in a loop.

Code: Select all

repeat
    player:target_Object(110584) 
    AcceptQuestByName("Stolen Tools"); 
    yrest(1000)
until getQuestStatus("Stolen Tools") == "complete"
Put these both into waypoint 1.


Then at the npc waypoint, you just complete the quest.

Code: Select all

repeat
    player:target_Object("George") 
    CompleteQuestByName("Stolen Tools"); 
    yrest(1000)
until getQuestStatus("Stolen Tools") == "not accepted"
That waypoint should just run back and forth accepting and completing the quest until out of dailies(assuming you have enough tools).

Then all that is left is to link the 2 files together. At the last waypoint of the first file add

Code: Select all

loadPaths("secondfilename") -- whatever you called the second file.
I hope that helps. I hope I explained things well.

Ps. These code snippets are untested. There could be bugs in them.
  • 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
FireWire
Posts: 43
Joined: Tue Oct 04, 2011 2:25 pm

Re: A few different Questions about daily's

#4 Post by FireWire »

Rock, I thank you for taking time out of your day and helping me with this. I know that this bot can go far beyond what is just provided with the default scripts/waypoints and all that and I would really like to start making my own. I commend you for taking the time to explain things to someone that hasn't done any coding since 2004 and that was pretty much C#. I am about to go ahead and try this and see if I cant get it done.

Success!!! Thank you so much Rock your awesome for helping me out here. I did read around the forums and just couldn't put the pieces together until your help! It took me a while to get it because it was fighting everything through the waypoints so I searched and found out that I could set it to travel and it would not attack anything and it would just run. Now I only have one more question if I wanted to make my waypoints a little more neat, could I make a separate return file, or would that just be a dumb idea? Because it would then take it to 3 files right? Just to do daily's.

Well here is what my final code looks like. Just in case anyone ever runs into the same problems as me.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="-614" z="-5825" y="24">
	player:target_NPC(110584) 
	AcceptQuestByName("Stolen Tools");	
	</waypoint>
	<!-- #  2 --><waypoint x="-727" z="-5685" y="49" type="TRAVEL">	</waypoint>
	<!-- #  3 --><waypoint x="-990" z="-5427" y="4" type="TRAVEL">	</waypoint>
	<!-- #  4 --><waypoint x="-1183" z="-5280" y="-2" type="TRAVEL">	</waypoint>
	<!-- #  5 --><waypoint x="-1420" z="-5084" y="-20" type="TRAVEL">	</waypoint>
	<!-- #  6 --><waypoint x="-1465" z="-4836" y="-31" type="TRAVEL">	</waypoint>
	<!-- #  7 --><waypoint x="-1424" z="-4506" y="-41" type="TRAVEL">	</waypoint>
	<!-- #  8 --><waypoint x="-1486" z="-4277" y="12" type="TRAVEL">	</waypoint>
	<!-- #  9 --><waypoint x="-1661" z="-4178" y="29" type="TRAVEL">	</waypoint>
	<!-- # 10 --><waypoint x="-1861" z="-4040" y="52" type="TRAVEL">	</waypoint>
	<!-- # 11 --><waypoint x="-2134" z="-3994" y="81" type="TRAVEL">	</waypoint>
	<!-- # 12 --><waypoint x="-2538" z="-3996" y="65" type="TRAVEL">	</waypoint>
	<!-- # 13 --><waypoint x="-2776" z="-3876" y="17" type="TRAVEL">	</waypoint>
	<!-- # 14 --><waypoint x="-3016" z="-3769" y="-13" type="TRAVEL">	</waypoint>
	<!-- # 15 --><waypoint x="-3074" z="-3829" y="-7" type="TRAVEL">	</waypoint>
	<!-- # 16 --><waypoint x="-3266" z="-3764" y="10" tag="KeepHunting"></waypoint>
	<!-- # 17 --><waypoint x="-3349" z="-3865" y="28">	</waypoint>
	<!-- # 18 --><waypoint x="-3454" z="-4085" y="20">	</waypoint>
	<!-- # 19 --><waypoint x="-3454" z="-4085" y="20">	</waypoint>
	<!-- # 20 --><waypoint x="-3556" z="-3992" y="44">	</waypoint>
	<!-- # 21 --><waypoint x="-3542" z="-3651" y="20">	</waypoint>
	<!-- # 22 --><waypoint x="-3460" z="-3467" y="22">	</waypoint>
	<!-- # 23 --><waypoint x="-3343" z="-3564" y="29">	</waypoint>
	<!-- # 24 --><waypoint x="-3269" z="-3751" y="11">
	if 100 > inventory:itemTotalCount(200619) then -- Not enough tools. Go round again.
   	 __WPL:setWaypointIndex(__WPL:findWaypointTag("KeepHunting"))
	end 
	</waypoint>
	<!-- #  25 --><waypoint x="-3269" z="-3751" y="11" type="TRAVEL">	</waypoint>
	<!-- #  26 --><waypoint x="-2999" z="-3808" y="-10" type="TRAVEL">	</waypoint>
	<!-- #  27 --><waypoint x="-2812" z="-3816" y="7" type="TRAVEL">	</waypoint>
	<!-- #  28 --><waypoint x="-2567" z="-3837" y="39" type="TRAVEL">	</waypoint>
	<!-- #  29 --><waypoint x="-2380" z="-3930" y="65" type="TRAVEL">	</waypoint>
	<!-- #  30 --><waypoint x="-2165" z="-4049" y="88" type="TRAVEL">	</waypoint>
	<!-- #  31 --><waypoint x="-1928" z="-4135" y="58" type="TRAVEL">	</waypoint>
	<!-- #  32 --><waypoint x="-1739" z="-4209" y="35" type="TRAVEL">	</waypoint>
	<!-- #  33 --><waypoint x="-1473" z="-4329" y="0" type="TRAVEL">	</waypoint>
	<!-- # 34 --><waypoint x="-1379" z="-4518" y="-34" type="TRAVEL">	</waypoint>
	<!-- # 35 --><waypoint x="-1442" z="-4692" y="-35" type="TRAVEL">	</waypoint>
	<!-- # 36 --><waypoint x="-1479" z="-4855" y="-29" type="TRAVEL">	</waypoint>
	<!-- # 37 --><waypoint x="-1347" z="-5137" y="-23" type="TRAVEL">	</waypoint>
	<!-- # 38 --><waypoint x="-1170" z="-5321" y="0" type="TRAVEL">	</waypoint>
	<!-- # 39 --><waypoint x="-1076" z="-5464" y="12" type="TRAVEL">	</waypoint>
	<!-- # 40 --><waypoint x="-1149" z="-5665" y="41" type="TRAVEL">	</waypoint>
	<!-- # 41 --><waypoint x="-1183" z="-5854" y="41" type="TRAVEL">	</waypoint>
	<!-- # 42 --><waypoint x="-977" z="-5957" y="35" type="TRAVEL">	</waypoint>
	<!-- # 43 --><waypoint x="-720" z="-5897" y="44" type="TRAVEL">	</waypoint>
	<!-- # 44 --><waypoint x="-622" z="-5829" y="24">loadPaths("KoboldTurnIn")</waypoint>

</waypoints>
And the second file.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="-618" z="-5828" y="24">
	local dailyQuestCount, dailyQuestsPerDay=
	RoMScript("Daily_count()")
	if dailyQuestCount == 10 then -- Finished
	error("Dailies Finished.")
	end

	repeat
		player:target_Object(110584)
		AcceptQuestByName("Stolen Tools");
		yrest(1000)
	until getQuestStatus("Stolen Tools") == "complete"
		
	</waypoint>
	<!-- #  2 --><waypoint x="-569" z="-5909" y="23" type="TRAVEL">	</waypoint>
	<!-- #  3 --><waypoint x="-478" z="-5980" y="21" type="TRAVEL">	</waypoint>
	<!-- #  4 --><waypoint x="-396" z="-6037" y="22" type="TRAVEL">	</waypoint>
	<!-- #  5 --><waypoint x="-319" z="-6090" y="11" type="TRAVEL">	</waypoint>
	<!-- #  6 --><waypoint x="-271" z="-6119" y="13" type="TRAVEL">	
	repeat
    		player:target_Object("George") 
    		CompleteQuestByName("Stolen Tools"); 
    		yrest(1000)
	until getQuestStatus("Stolen Tools") == "not accepted"

</waypoint>
	<!-- #  7 --><waypoint x="-308" z="-6093" y="12" type="TRAVEL">	</waypoint>
	<!-- #  8 --><waypoint x="-388" z="-6035" y="22" type="TRAVEL">	</waypoint>
	<!-- #  9 --><waypoint x="-497" z="-5960" y="21" type="TRAVEL">	</waypoint>
	<!-- # 10 --><waypoint x="-576" z="-5906" y="24" type="TRAVEL">	</waypoint>
	<!-- # 11 --><waypoint x="-606" z="-5825" y="24" type="TRAVEL">	</waypoint>
</waypoints>
Post Reply