resource finder

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

resource finder

#1 Post by lisa »

This is more usefully when playing manually, I find it painful sometimes to actually see the herbs when walking around farming resources. So I made up this little WP which just runs in the background, it will sound the alarm userfunction and then change the size of the model for the resource and make it bigger and easier to see.

I guess it could be used while creating a farming WP to make it easier to see the resource.

For myself I will probably add in some "defending" code as I tend to go AFK a bit, so it will just kill anything that attacks bot. Might do it tomorrow if I get the time. (only took a couple mins, already added it)

Looks like this.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
	-- Version 1.4
	print("start scanning  ........")
	while(true) do
		if isInGame() and player:exists() and player:isAlive() then
			local objectList = CObjectList()
			objectList:update()
			for i = 0,objectList:size() do
				local obj = objectList:getObject(i)
				obj:update()
				if( obj ~= nil ) then
					if obj.Type == PT_NODE then
						if( database.nodes[obj.Id] ) then
							if memoryReadRepeat("float", getProc(), obj.Address + 0x74) ~= 4 then 
								memoryWriteFloat(getProc(), obj.Address + 0x74, 4)
								print("Found: "..obj.Name.." and made it BIG")
								if playalarm then playalarm() end
							end
						end
					end
				end
				yrest(1)
			end
			-- add defend code here.
			player:update()
			if player.Battling and not player.Mounted then
				if player:target(player:findEnemy(true)) then
					player:fight();
				end
			end
		end
		yrest(500)
	end
</onLoad>
</waypoints>

prints to MM look like this

Code: Select all

start scanning  ........
Found: Dragon Mallow and made it BIG
Alarm has been sounded
Found: Dragon Mallow and made it BIG
Alarm has been sounded
Found: Mirror Sedge and made it BIG
Alarm has been sounded
it will only do it once for each resource node, so it won't just keep sounding alarm over and over for the 1 node.
Attachments
resourcefinder.xml
(995 Bytes) Downloaded 166 times
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: resource finder

#2 Post by lisa »

added option to change which type it uses at the top, added usage for flying and speed using numberpad keys, also made it defend itself if attacked, incase you go afk.

Code: Select all

	--NTYPE_WOOD = 1
	--NTYPE_ORE = 2
	--NTYPE_HERB = 3
	
	_node = 1
that is set to wood, chaqnge the value of _node to 2 or 3 for the other resources.

Code: Select all

		if keyPressed(key.VK_NUMPAD1) and (os.time() - time > delay ) then
			fly()
			time = os.time()
		end
		if keyPressed(key.VK_NUMPAD2) and (os.time() - time > delay ) then
			flyoff()
			time = os.time()
		end
		if keyPressed(key.VK_NUMPAD4) and (os.time() - time > delay ) then
			speed(70)
			time = os.time()
		end		
		if keyPressed(key.VK_NUMPAD5) and (os.time() - time > delay ) then
			speed("off")
			time = os.time()
		end
numpad 1,2,4,5 for the flying and speed hacks.
Attachments
resourcefinder.xml
V 1.5
(1.59 KiB) Downloaded 116 times
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
Post Reply