Finding and looting dead bodies
Re: Finding and looting dead bodies
its the only way to get this working
because if someone enter your framspot kill some mobs but dont loot them you get stucked anyway what your settings says.
i tryed max fight distance = 50 (only mage aoe skills) max loot distance = 60 (sometimes we move a bit so the extra distance is needed) result = bot loots fine in my aoe range, but if a lootable mob is near (somthing betwen 150-225 range) bot says "start looting" but dont move.
i test it with skellet farm spot by boddypull. set the waypoints to travel at bombspot i changed them back to normal. works like a charm but if some other player enter the spot bot get stucked by his dead bodies.
workaround must be a timer. sure the bot will try to loot the same bodie again and again but only after the next lootbodies call. and this only happend if we kill the next mob result = we kill mobs and loot them, one mob is to far away, bot try to loot, get stucked for ?5 sec, skip looting, move to next position, kill next mob wave and now the dead bodie we cant loot last time is now in range so he still get the loot.
sorry for my very bad english but i realy try my best
Petz
because if someone enter your framspot kill some mobs but dont loot them you get stucked anyway what your settings says.
i tryed max fight distance = 50 (only mage aoe skills) max loot distance = 60 (sometimes we move a bit so the extra distance is needed) result = bot loots fine in my aoe range, but if a lootable mob is near (somthing betwen 150-225 range) bot says "start looting" but dont move.
i test it with skellet farm spot by boddypull. set the waypoints to travel at bombspot i changed them back to normal. works like a charm but if some other player enter the spot bot get stucked by his dead bodies.
workaround must be a timer. sure the bot will try to loot the same bodie again and again but only after the next lootbodies call. and this only happend if we kill the next mob result = we kill mobs and loot them, one mob is to far away, bot try to loot, get stucked for ?5 sec, skip looting, move to next position, kill next mob wave and now the dead bodie we cant loot last time is now in range so he still get the loot.
sorry for my very bad english but i realy try my best
Petz
Re: Finding and looting dead bodies
I'm testing this function and have little problem with full inventory Wonderful can be function to check inventory space befoure lootBodies() else skip lootBodies().
Re: Finding and looting dead bodies
atm inventory is a little broken specially on detecting empty spaces but the code should be...
this gives you the number of empty spaces on your bag and allows you to check for that yourself.
Code: Select all
inventory:itemTotalCount(0)
Thanks for reading!
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Re: Finding and looting dead bodies
Wich function is to move to next waypoint?
Tested as:
player:moveTo( CWaypoint(waypoint.X, waypoint.Z), true ); rly not works
and
player:moveTo( CWaypoint(nX, nZ), true ); works somehow but dont go to next waypoint.
help pls
Tested as:
player:moveTo( CWaypoint(waypoint.X, waypoint.Z), true ); rly not works
and
player:moveTo( CWaypoint(nX, nZ), true ); works somehow but dont go to next waypoint.
help pls
Last edited by wizzyslo on Sat Dec 18, 2010 2:05 pm, edited 1 time in total.
Re: Finding and looting dead bodies
That is meant to move to a specific location point.
But going to the next waypoint is default! So you should do this:
If "more than X empty spaces" then
"loot bodies"
end
So it only loots if you have empty spaces.
But going to the next waypoint is default! So you should do this:
If "more than X empty spaces" then
"loot bodies"
end
So it only loots if you have empty spaces.
Thanks for reading!
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Re: Finding and looting dead bodies
Tested next code but dont works
Is bot detect inventory:itemTotalCount(1) as item ID in inventory?
Code: Select all
function lootBodies()
repeat
player:update()
if inventory:itemTotalCount(1) then
local Lootable = player:findEnemy(false, nil, evalTargetLootable)
if Lootable and player.Battling == false then
player:target(Lootable)
player.TargetPtr = Lootable.Address
player:loot()
end
end
until not Lootable or player.Battling
end
Re: Finding and looting dead bodies
the code is 0 not 1, try this instead
Given that you need more than 1 Empty bag slot to loot. If you want to sure at least 2 use "> 2" and so on.
Code: Select all
inventory:itemTotalCount(0) > 1
Thanks for reading!
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Re: Finding and looting dead bodies
Why do you need more than 1 empty to loot? If you have 1 empty can't you loot? Maybe you meanjduartedj wrote:Given that you need more than 1 Empty bag slot to loot. If you want to sure at least 2 use "> 2" and so on.
Code: Select all
inventory:itemTotalCount(0) > 0
I'm not sure the 'local Lootable' variable will make it out of the if statement. i think you need to declare it first. try,wizzyslo wrote:Tested next code but dont works
Code: Select all
function lootBodies()
repeat
local Lootable
player:update()
if inventory:itemTotalCount(0) > 0 then
Lootable = player:findEnemy(false, nil, evalTargetLootable)
if Lootable and player.Battling == false then
player:target(Lootable)
player.TargetPtr = Lootable.Address
player:loot()
end
end
until not Lootable or player.Battling
end
- 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
Re: Finding and looting dead bodies
Yes, ofc Rock5. the thing is he might want to secure 2 or more free slots in case the loots has more than 1 item. But that is just my take, >0 is perfectly ok.
I, for one, have a check at the end of my waypoint file. that if I have 3 or less empty slots I load a merchant path to go sell stuff. So I guarantee that the bag isn't full most of the time.
I, for one, have a check at the end of my waypoint file. that if I have 3 or less empty slots I load a merchant path to go sell stuff. So I guarantee that the bag isn't full most of the time.
Thanks for reading!
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Re: Finding and looting dead bodies
As you all know sometimes the bot get stuck looting something it can't reach. I had this idea to put in the number of times the bot loots. Once it loots over a certain times it will stop looting and continue on its way. Assuming no one is going to kill over 10 mobs at a time, I have modified it to break the cycle after looting 10 times.
Can anyone tell me if this works?
Code: Select all
function lootBodies()
repeat
local Lootable
local count
player:update()
if inventory:itemTotalCount(0) > 0 then
Lootable = player:findEnemy(false, nil, evalTargetLootable)
if Lootable and player.Battling == false then
player:target(Lootable)
player.TargetPtr = Lootable.Address
player:loot()
count = count + 1
end
end
until not Lootable or player.Battling or count == 10
end
Re: Finding and looting dead bodies
The code looks fine but do you realize, if it gets stuck, it will try to loot the same mob 10 times ignoring other bodies? And when it finally gives up it wont loot the other bodies? What's probably needed, as well as a counter, is an 'ignore address'. So if it gets stuck it will move on to the next body. It might go back to the first body but, if it gets stuck again, will move on to the next body. The problem is if you have more than 1 body you can't reach and it goes back and forth trying to loot them. That's where a counter would help to stop the cycle.checkii wrote:As you all know sometimes the bot get stuck looting something it can't reach. I had this idea to put in the number of times the bot loots. Once it loots over a certain times it will stop looting and continue on its way. Assuming no one is going to kill over 10 mobs at a time, I have modified it to break the cycle after looting 10 times.
Can anyone tell me if this works?Code: Select all
function lootBodies() repeat local Lootable local count player:update() if inventory:itemTotalCount(0) > 0 then Lootable = player:findEnemy(false, nil, evalTargetLootable) if Lootable and player.Battling == false then player:target(Lootable) player.TargetPtr = Lootable.Address player:loot() count = count + 1 end end until not Lootable or player.Battling or count == 10 end
I intend to release an updated version which will include suggestions from users. Hopefully it won't be much longer.
- 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
Re: Finding and looting dead bodies
dont want to be a ungratefull bitch or whatever, but what about fixing the damn stuck at 67% bug first? xd
seems more important then other addons to the bot if ya ask me
Botje
seems more important then other addons to the bot if ya ask me
Botje
Re: Finding and looting dead bodies
There already multiple threads about this. It very bad form to hijack/off topic another thread, please don't do it.botje wrote:dont want to be a ungratefull bitch or whatever, but what about fixing the damn stuck at 67% bug first? xd
seems more important then other addons to the bot if ya ask me
Botje
Rock5, its no biggie. I am just trying to find an intermediate solution. Its better than the bot getting stuck there for 10mins (or however long it takes for the dead mob to leave).
Re: Finding and looting dead bodies
im in no way hyjacking a thread, just pointing out there should be things done first before adding to the bot as is.
O.o
Botje
O.o
Botje
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Finding and looting dead bodies
How do you propose we fix something when we don't even know what the problem is and do not have the time in our lives to devote to fixing it? I have *still* never been able to reproduce the problem, so I absolutely cannot debug it at all, nor can I even attempt to fix it (as I would be unable to test any changes).botje wrote:im in no way hyjacking a thread, just pointing out there should be things done first before adding to the bot as is.
O.o
Botje
Re: Finding and looting dead bodies
yeah, thats a problem indeed >.<
"luckely" Rock has it, so not all is lost though
and yeah, time is short around these days, trust me i know.
Botje
"luckely" Rock has it, so not all is lost though
and yeah, time is short around these days, trust me i know.
Botje
Re: Finding and looting dead bodies
I've updated my lootBodies function and created a dedicated thread for it here.
http://www.solarstrike.net/phpBB3/viewt ... =27&t=2018
http://www.solarstrike.net/phpBB3/viewt ... =27&t=2018
- 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
Who is online
Users browsing this forum: Ahrefs [Bot] and 4 guests