resource finder
Posted: Thu May 02, 2013 11:37 pm
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.
prints to MM look like this
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.
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>
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