Page 1 of 1

ressources guild

Posted: Thu Apr 14, 2016 12:47 am
by lolau51
Hail.
I'm looking for macro to extrac ressources from ''unknow ressources''.
I have a ingame macro to do 3 ressources but for 6, 9, 12... I do spam m'y keybord.

I needs to do thas 1k or more.

Re: ressources guild

Posted: Thu Apr 14, 2016 7:31 am
by noobbotter
Is that where you click the unknown resource to "use" it and it disappears the resource you get from it goes into your bag?

I quickly threw this together so it might do what you need. One thing you'll need to do is make sure the line "local itemchoice = "Unknown Resource"" has the correct item name. I can't remember if "Unknown Resource" is correct or not.



Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
	local itemchoice = "Unknown Resource"
	
	
	function useItem(myitem)
		repeat
			if inventory:itemTotalCount(myitem) > 0 then
				inventory:useItem(myitem);
				inventory:update()
			end
			yrest(300)
		until inventory:itemTotalCount(myitem) == 0 or inventory:itemTotalCount(0) == 0
	end
	
	useItem(itemchoice)
	error("Completed")
</onLoad>
</waypoints>
That will run until you have no more of the item, or you have no more backpack space.

Re: ressources guild

Posted: Thu Apr 14, 2016 9:17 am
by lolau51
Work very well !
and using "auto guild donate" addon ;-) backpack gone empty quickly !

Ressources name :
"Unknown Wood VI"
"Unknown Ore VII"
"Unknown Agricultural Products VI"


If :
"Lumber Yard" level VI
"Forge" level VII
"Field" level VI

Re: ressources guild

Posted: Thu Apr 14, 2016 10:35 am
by noobbotter
I've updated it to do all 3 of the resources you specified:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
	
	function useItem()
		local resourceTable = {
			"Unknown Wood VI",
			"Unknown Ore VII",
			"Unknown Agricultural Products VI",
		}
	
		for k,v in pairs(resourceTable) do
			repeat
				if inventory:itemTotalCount(v) > 0 then
					inventory:useItem(v);
					inventory:update()
				end
				yrest(300)
			until inventory:itemTotalCount(v) == 0 or inventory:itemTotalCount(0) == 0
		end
	end
	
	useItem()
	error("Completed")
</onLoad>
</waypoints>

Re: ressources guild

Posted: Thu Apr 14, 2016 12:06 pm
by lolau51
Thanks !