Page 1 of 4

Coast of Opportunity waypoint file - Levels 20-40

Posted: Tue Aug 16, 2011 11:30 am
by Mushroomstamp
Testers needed, please post feedback on problems or possible improvements.

This waypoint will get you from level 20 to level 40 in Coast of Opportunity. First point is at housemaid in Heffner, but you can begin anywhere near the main path from there to Shuma Valley.

You'll need to have multiple pieces of dirty-statted gear and a good weapon, but nothing super-twinked. For example, my last tester that completed this was a warrior with only a set of wings with yellow VII's, dirty-statted chest, legs, boots, cape, and belt, (chest and legs had yellows on them), all under level 25.

- Waypoint is done entirely on foot for those of us that don't have a mount. Consequently, you'll need to add your own mount points as you see fit.
- This is centered around daily quests and is not intended as a constant-farm bot as not all required checks are present.
- In most cases, I have the character moving on to farm the next level mobs before it achieves the required level so as to optimize daily usage.
- I have getDQCount() set to have bot sleep once 10 dailies are completed.

If anyone goes through the trouble of making a 24/7 version of this, (and cares to share), please post the modified waypoint here.

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Tue Sep 06, 2011 4:57 am
by jasn
Was wondering if theres a way to use item id instead of item name for the dailies?


itemname ExaMPLE getIventoryItemCount("Gazelle Feces")


itemid ExaMPLE getIventoryItemCount(92387569321874659384756923478562938745)

Or if anyone knows what to type to get the item id so i can crash and burn ;)

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Tue Sep 06, 2011 5:38 am
by lisa
I use this as a userfunction to get item Ids

Code: Select all

function printinventory()
bags = {}
	for slot = 61, 240 do
		item = inventory.BagSlot[slot]
 	    if item.Available and  item.Name ~= nil then
			table.insert(bags, {Name = item.Name, Id = item.Id})
		end;
	end;
	table.print(bags)
end
and yeah you can use the id, but wouldn't you just check if the quest status is complete?

Code: Select all

		local queststate = getQuestStatus("The Garrison's Request")
        	if queststate == "complete" then
__WPL:setWaypointIndex(__WPL:findWaypointTag("tgrcomplete"));
end

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Tue Sep 06, 2011 7:26 am
by jasn
it seems that the file does a inventory check to see it the item name is in the bags, and i was gonna see if it worked with item id instead.
Its for my own curiousity and to learn a bit more. :)

Btw how do i call the userfunction, and is it from the chat window?

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Tue Sep 06, 2011 3:35 pm
by kanta
You can always go to

http://www.runesdatabase.com/

and grab the item ID from the url like:

http://www.runesdatabase.com/item/209006/gazelle-feces

where "209006" is the item ID.

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Tue Sep 06, 2011 8:01 pm
by lisa
jasn wrote:it seems that the file does a inventory check to see it the item name is in the bags, and i was gonna see if it worked with item id instead.
Its for my own curiousity and to learn a bit more. :)

Btw how do i call the userfunction, and is it from the chat window?
You can call the function in any of the usual ways, in WP, profile or using commandline.xml as the WP.

It will print the ID and names.

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Tue Sep 27, 2011 12:39 pm
by Alleexx
I get this error on waypoint 10:
Error.jpg

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Tue Sep 27, 2011 9:20 pm
by rock5
What's "getIventoryItemCount"? I think that should be "inventory:getItemCount".

So line 35 should be.

Code: Select all

		if getXP() > 19000 or player.Level > 21 or inventory:getItemCount("Gazelle Feces") > 70 then

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Tue Sep 27, 2011 10:38 pm
by yoyodoggg
waypoint seemed solid to me, i had to comment out the player:sleep()'s and the elite witch def killed me everytime the waypoint tryed to kill the 4 adds around her. prob should comment those out as well and skip that area.

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Wed Sep 28, 2011 2:06 am
by rock5
I killed those adds a few times manually without aggroing the witch so it should be able to do it. Is the witch added to your friends list so it doesn't attack it?

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Wed Sep 28, 2011 11:19 am
by Alleexx
rock5 wrote:What's "getIventoryItemCount"? I think that should be "inventory:getItemCount".

So line 35 should be.

Code: Select all

		if getXP() > 19000 or player.Level > 21 or inventory:getItemCount("Gazelle Feces") > 70 then
Yep that worked :)

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Fri Sep 30, 2011 4:07 pm
by Alleexx
I have a new problem now :/

The bot is "stuck" at waypoint 153-155:
Error2.jpg
It continues to go from 155, to 154, to 153, to 154, and back to 155.

It works when I restart the bot, but then when I come back to do the daily again it's the same thing.

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Sat Oct 01, 2011 12:27 am
by rock5
Alleexx wrote:I have a new problem now :/

The bot is "stuck" at waypoint 153-155:
I hope you realise this is going to take ages to fix because it's riddled with errors.

Anyway, this error is because if this code here around line 325.

Code: Select all

	<!-- # 14 --><waypoint x="121" z="-350" y="121">	yrest(500)	player:target_Object("Swamp Mud")	
		__WPL:setDirection(WPT_FORWARD)	</waypoint>
	<!-- # 16 --><waypoint x="-106" z="-351" y="116">	yrest(500)	player:target_Object("Swamp Mud")	</waypoint>
	<!-- # 18 --><waypoint x="-171" z="-451" y="120">	yrest(500)	player:target_Object("Swamp Mud")	
		yrest(500)
		player:update()
		if dailyQuest == "incomplete" then 
			__WPL:setDirection(WPT_BACKWARD)
		end	</waypoint>
It's supposed to go back and fourth until the quest is finished but it doesn't update the "dailyQuest" variable so can't continue. Just add a "dailyQuest = getQuestStatus("Soil")" and it should work.

Code: Select all

	<!-- # 14 --><waypoint x="121" z="-350" y="121">	yrest(500)	player:target_Object("Swamp Mud")	
		__WPL:setDirection(WPT_FORWARD)	</waypoint>
	<!-- # 16 --><waypoint x="-106" z="-351" y="116">	yrest(500)	player:target_Object("Swamp Mud")	</waypoint>
	<!-- # 18 --><waypoint x="-171" z="-451" y="120">	yrest(500)	player:target_Object("Swamp Mud")	
		yrest(500)
		player:update()
		dailyQuest = getQuestStatus("Soil")
		if dailyQuest == "incomplete" then 
			__WPL:setDirection(WPT_BACKWARD)
		end	</waypoint>
He also does it at line 750.

Code: Select all

	<!-- #  8 --><waypoint x="-9361" z="3027" y="472">	
		if dailyQuest == "incomplete" and 10 > getDailyComplete() then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("chargeUp"))
		end	</waypoint>
Add

Code: Select all

		dailyQuest = getQuestStatus("Miles")
That will do for now.

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Sat Oct 01, 2011 2:19 am
by Alleexx
Thanks rock!

Sorry if I'm annoying but next problem just arrived:
Error3.jpg
When the script runs smoothly I'll upload the fixed one here so that everyone can use it.

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Sat Oct 01, 2011 2:43 am
by rock5
Around line 364 you will find

Code: Select all

		if player.Level > 26 or getXP > 56000 then
'getXP' is a function so it's supposed to be 'getXP()'.

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Wed Oct 19, 2011 9:25 am
by OneofMany
Does the script run smoothly now?

i need 7 characters to 50 :) and i would like to do it with this one to 40, then daily on to 50

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Wed Oct 19, 2011 11:48 am
by jasn
dunno if the corrections are implemented in the d/l script.
But one of the errors/corrections is at the beginning so you should notice it quite fast i think.





Resistance is futile :)

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Thu Oct 20, 2011 8:53 am
by Guest1234
First post needs to be edited to show version & date of mod.

:/

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Thu Oct 20, 2011 12:23 pm
by Shogun
Seems that the file in the first post was never updated since the creation of the thread. I did not find any correction mentioned in the posts.

Yesterday I gave the script a try. I did not trust the addresses used by getDailyComplete(), did not even try and altered to:

Code: Select all

		function getDailyComplete()
			local dailyQuestCount, dailyQuestsPerDay;
			repeat dailyQuestCount, dailyQuestsPerDay = RoMScript("Daily_count()") until dailyQuestCount and dailyQuestsPerDay
			return dailyQuestCount;
			
			--[[
			local dailycomplete_ptr = 0x9CD1E0
			local dailycomplete_offset = 0xACF4
			return memoryReadBytePtr(getProc(),dailycomplete_ptr,dailycomplete_offset)
			--]]
		end	
My char was already at level 23 and started with the "spices"-daily. Here is the code section with my modifications. I did quit at the "Swamp Mud" as the mud could not be looted. False item id? Needs to get verified.

Code: Select all

	<!-- # 24 --><waypoint x="-420" z="-1341" y="182" tag="spices">
		-- Spices; Perfekt harmonierende Gewuerze
		repeat questname=RoMScript("TEXT('Sys423936_name')"); yrest(500) until questname
		-- repeat npcname=RoMScript("TEXT('Sys114930_name')"); yrest(500) until npcname
		npcname="Rebecca"
		
		checkDQCount()
		dailyQuest = getQuestStatus(questname)
		if dailyQuest == "complete" and player.Level == 23 and 10 > getDailyComplete() then 
			player:target_NPC(npcname)
			yrest(200)
			-- CompleteQuestByName("Spices")
			sendMacro("OnClick_QuestListButton(3,1);");
			yrest(200);
			sendMacro("CompleteQuest()"); 
			yrest(200);
			
			checkDQCount()
			player:update()
		end
		
		if player.Level > 23 then
			printf("\a\a\a");
			__WPL:setWaypointIndex(__WPL:findWaypointTag("mud"))
		else
			player:target_NPC(npcname)
			yrest(200)
			-- AcceptQuestByName("Spices")
			sendMacro("OnClick_QuestListButton(1,1);"); 
			yrest(200);
			sendMacro("AcceptQuest()"); 
			yrest(200);
		end	</waypoint>
	<!-- # 16 --><waypoint x="-443" z="-1452" y="187">	</waypoint>
	<!-- # 17 --><waypoint x="-313" z="-1538" y="188">	</waypoint>
	<!-- #  1 --><waypoint x="-320" z="-1567" y="187">	</waypoint>
	<!-- #  2 --><waypoint x="-137" z="-1908" y="179">	</waypoint>
	<!-- #  3 --><waypoint x="162" z="-2807" y="197">	</waypoint>
	<!-- #  4 --><waypoint x="260" z="-2856" y="190" tag="getMoreGrass">	player:target_Object(117312) --Lorssen Grass	</waypoint>
	<!-- # 117 --><waypoint x="206" z="-3138" y="186">	player:target_Object(117312)	</waypoint>
	<!-- #  8 --><waypoint x="25" z="-3297" y="185">	player:target_Object(117312)	</waypoint>
	<!-- # 11 --><waypoint x="-265" z="-3290" y="207">	player:target_Object(117312)	</waypoint>
	<!-- # 13 --><waypoint x="-182" z="-3038" y="191">	player:target_Object(117312)
		if 10 > inventory:getItemCount(208996) then --Luoshen-Grashalm
			__WPL:setWaypointIndex(__WPL:findWaypointTag("getMoreGrass"))
		end	</waypoint>
	<!-- # 16 --><waypoint x="-76" z="-3014" y="187">	</waypoint>
	<!-- # 17 --><waypoint x="-77" z="-2079" y="153">	</waypoint>
	<!-- # 19 --><waypoint x="-139" z="-1966" y="156">	</waypoint>
	<!-- # 20 --><waypoint x="-197" z="-1734" y="171">	</waypoint>
	<!-- # 21 --><waypoint x="-478" z="-1507" y="171">	</waypoint>
	<!-- # 22 --><waypoint x="-481" z="-1453" y="172">	</waypoint>
	<!-- # 23 --><waypoint x="-484" z="-1368" y="182">	__WPL:setWaypointIndex(__WPL:findWaypointTag("spices"))	</waypoint>	
====
========================================================================
====	
	<!-- #  1 --><waypoint x="-567" z="-1528" y="172" tag="mud">		
		-- Soil; Heilige Erde
		repeat questname=RoMScript("TEXT('Sys423940_name')"); yrest(500) until questname
		-- repeat npcname=RoMScript("TEXT('Sys114930_name')"); yrest(500) until npcname
		npcname="Monkatula"

		checkDQCount()
		dailyQuest = getQuestStatus(questname)
		if dailyQuest == "complete" and 26 > player.Level and 10 > getDailyComplete() then 
			player:target_NPC(npcname)
			yrest(500)
			-- CompleteQuestByName("Soil")
			sendMacro("OnClick_QuestListButton(3,1);");
			yrest(200);
			sendMacro("CompleteQuest()"); 
			yrest(200);
			
			checkDQCount()
			player:update()
		end		
		
		if player.Level > 25 or getXP() > 37000 then
			printf("\a\a\a");
			__WPL:setWaypointIndex(__WPL:findWaypointTag("rhino"))
		else
			player:target_NPC(npcname)	
			yrest(500)
			-- AcceptQuestByName("Soil")
			sendMacro("OnClick_QuestListButton(1,1);"); 
			yrest(200);
			sendMacro("AcceptQuest()"); 
			yrest(200);
		end	</waypoint>
	<!-- #  7 --><waypoint x="-357" z="-1496" y="175">	
		if inventory:getItemCount(0) > 4 and inventory:getMainHandDurability() > 80 then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("noMerchant"))
		end		
	</waypoint>
	<!-- #  1 --><waypoint x="-359" z="-1608" y="172" tag="merchant1-NOTREFERENCED">
		player:merchant("Silvershadow Adventurers' Guild Provisioner")	</waypoint>	
	<!-- #  8 --><waypoint x="-49" z="-1126" y="159" tag="noMerchant">	</waypoint>
	<!-- #  1 --><waypoint x="36" z="-1126" y="137">	player:target_NPC("Ailic's Aide") --Lyonside transport	</waypoint>
	<!-- #  9 --><waypoint x="-60" z="-1015" y="151">	</waypoint>
	<!-- # 10 --><waypoint x="-152" z="-870" y="148">	</waypoint>
	<!-- # 11 --><waypoint x="-356" z="-676" y="148">	</waypoint>
	<!-- # 12 --><waypoint x="-395" z="-564" y="146">	</waypoint>
	<!-- # 23 --><waypoint x="-490" z="-144" y="128">	yrest(500); player:target_Object(209100,1000) --Swamp Mud, Sumpfschlamm	</waypoint>
	<!-- # 25 --><waypoint x="-296" z="-10" y="118">	yrest(500); player:target_Object(209100,1000)	</waypoint>
	<!-- # 27 --><waypoint x="-170" z="-63" y="117">	</waypoint>
	<!-- # 28 --><waypoint x="-84" z="-3" y="118">		yrest(500); player:target_Object(209100,1000)	</waypoint>
	<!-- #  1 --><waypoint x="110" z="-114" y="118">	</waypoint>
	<!-- #  3 --><waypoint x="279" z="-19" y="118">	yrest(500); player:target_Object(209100,1000)	</waypoint>
	<!-- #  5 --><waypoint x="350" z="-33" y="118">	</waypoint>
	<!-- #  6 --><waypoint x="503" z="136" y="118">	yrest(500); player:target_Object(209100,1000)	</waypoint>
	<!-- #  8 --><waypoint x="720" z="83" y="118">	yrest(500); player:target_Object(209100,1000)	</waypoint>
	<!-- # 10 --><waypoint x="600" z="-219" y="118">	yrest(500); player:target_Object(209100,1000)	</waypoint>
	<!-- # 12 --><waypoint x="323" z="-519" y="118">	yrest(500); player:target_Object(209100,1000)	</waypoint>
	<!-- # 14 --><waypoint x="121" z="-350" y="121">	yrest(500); player:target_Object(209100,1000)	
		__WPL:setDirection(WPT_FORWARD)	</waypoint>
	<!-- # 16 --><waypoint x="-106" z="-351" y="116">	yrest(500); player:target_Object(209100,1000)	</waypoint>
	<!-- # 18 --><waypoint x="-171" z="-451" y="120">	yrest(500); player:target_Object(209100,1000)	
		yrest(500)
		player:update()
      dailyQuest = getQuestStatus("Soil")
		if dailyQuest == "incomplete" then 
			__WPL:setDirection(WPT_BACKWARD)
		end	</waypoint>
	<!-- # 37 --><waypoint x="-144" z="-426" y="123">	</waypoint>
	<!-- # 38 --><waypoint x="-173" z="-707" y="121">	</waypoint>
	<!-- # 39 --><waypoint x="-170" z="-845" y="131">	</waypoint>
	<!-- #  --><waypoint x="-71" z="-982" y="133">	</waypoint>
	<!-- #  --><waypoint x="-39" z="-1075" y="137">	</waypoint>
	<!-- #  --><waypoint x="-60" z="-1187" y="154">	</waypoint>
	<!-- # 160 --><waypoint x="-341" z="-1434" y="170">	__WPL:setWaypointIndex(__WPL:findWaypointTag("mud"))</waypoint>		

Re: Coast of Opportunity waypoint file - Levels 20-40

Posted: Thu Oct 20, 2011 2:29 pm
by Shogun
Today I got stuck at the gazelles, for any reason they were skipped yesterday. Here is the code I have so far, corrected "gazelles", "spices" and partly "swamp mud". I gave it version number 0.02. It will be a long way to reach 1.0, but it is a good basis to begin with. Thanks for the code, Mushroomstamp!

The bot still does not target the Swamp Mud. findNearestNameOrId() fails, the mud is not entered in CObjectList. Can you have a look at this, rock or lisa?

Code: Select all

	<!-- # 23 --><waypoint x="-490" z="-144" y="128">	player:target_Object(209100)	 </waypoint>