Page 1 of 1

Bag dropt after kill - looting?

Posted: Sun May 25, 2014 9:20 am
by booting1
hello,

in high maps sometimes an mop Drops the bag. but how the bot loot this bag on the earth? he only loot the killed mop(enemy) but not the bag.
in this bag often accesiorie with good yellow stats.

i hope my english is understandful, and you know what i will :)

Re: Bag dropt after kill - looting?

Posted: Sun May 25, 2014 10:04 am
by ZZZZZ
Not sure what language your client is in, but a search for "Mysterious bags" bought up a thread with this info already in it. http://www.solarstrike.net/phpBB3/viewt ... g&start=20

Code: Select all

local mBag = player:findNearestNameOrId(GetIdName(105930)) 
   if mBag and inventory:itemTotalCount(0) ~= 0 then
      print("\n\n found bag \n\n")
      player:target_Object(mBag.Id)
      yrest(1000) -- If not enough time to pick up bag, increase it.
      player:target_Object(mBag.Id)
      yrest(1000)
   end
Put that in the onLeaveCombat of your characters profile and it should loot the bags.

Re: Bag dropt after kill - looting?

Posted: Thu May 29, 2014 3:36 am
by booting1
thank you i test this next Weekend!

Re: Bag dropt after kill - looting?

Posted: Sat Jun 07, 2014 5:47 am
by silinky
how do you know from this code if it is your bag? for example in party, the bag sometimes drops, but not for you. this caused problems for me in the past.

Re: Bag dropt after kill - looting?

Posted: Sat Jun 07, 2014 6:29 pm
by lisa
if you are in a party then the bags are randomly for 1 of the party members, other party members will get the message the bag belongs to someone else. If all members are active then it is just a matter of having a different yrest for each character in their profile, keep in mind if using partyhealer that isn't fighting it won't technically do profile onleavecombat code.
So what I did was create a function in the profile onload for party followers and had a different yrest for each char, for the main char I added a line in the posted code which printed in party chat to call the function.
So every character in party would try to open the bag and so it always got looted.