Page 5 of 6

Re: Cleanbag userfunction 2.5

Posted: Mon Jan 14, 2013 12:26 pm
by botje

Code: Select all

 local forcekeep = {
      "item1",
     "item2",
   }

Re: Cleanbag userfunction 2.5

Posted: Thu Feb 14, 2013 7:02 am
by DestinyJK
Hi,

How do you install this? I already put the file in the Userfunctions folder as usual but does there need to be any text editing? Like adding "CleanBag(1000, 2, true, false)" to any other file?

Thx
Destiny

Re: Cleanbag userfunction 2.5

Posted: Thu Feb 14, 2013 7:19 am
by botje
you add that line in your onleave combat section in your profile :)

Re: Cleanbag userfunction 2.5

Posted: Thu Feb 14, 2013 9:24 am
by DestinyJK
botje wrote:you add that line in your onleave combat section in your profile :)
Could you give me an example please?

Should it be like this?

"<onLeaveCombat>CleanBag(1000, 2, true, false)<![CDATA[
-- Additional Lua code to execute after killing an enemy
]]></onLeaveCombat>"

Re: Cleanbag userfunction 2.5

Posted: Thu Feb 14, 2013 9:36 am
by botje
after
-- Additional Lua code to execute after killing an enemy

and before
]]></onLeaveCombat>"

Re: Cleanbag userfunction 2.5

Posted: Thu Feb 14, 2013 12:52 pm
by DestinyJK
botje wrote:after
-- Additional Lua code to execute after killing an enemy

and before
]]></onLeaveCombat>"
Thx, it works!
Is it also possible to keep some items which are below value of 100? Like simple first aid potion and Experience potion? Because i just lost plenty of those -.-.

Re: Cleanbag userfunction 2.5

Posted: Thu Feb 14, 2013 12:58 pm
by botje

Code: Select all

local forcekeep = {
      "Experience Potion",
     "simple first aid potion ",
   }
you can add items you want to keep in the forcekeep table.

Re: Cleanbag userfunction 2.5

Posted: Sun Mar 17, 2013 8:27 pm
by optnick
Hello, first thank everyone, I'm having this problem when I run
CleanBag()
or
CleanBag(1000,2,true,false) etc...


message is displayed:

Code: Select all

onLoad error: D:/xxxx/xxxx/functions.lua:728: attempt to concatenate field '?' (a nil value)
Ps: I have userfunction_logger.lua.

thank you guys!


I edited the file functions.lua, and commented the line 728:

Code: Select all

--error("IGF:"..ret[2],0)
is working, but with problems.
are selecting all items to drop, but does not drop.

Re: Cleanbag userfunction 2.5

Posted: Sun Mar 17, 2013 11:33 pm
by rock5
What version of the bot are you using?

Re: Cleanbag userfunction 2.5

Posted: Mon Mar 18, 2013 1:59 am
by botje
looks to me a problem with in game functions, but rock knows better xd

Re: Cleanbag userfunction 2.5

Posted: Mon Mar 18, 2013 6:30 am
by optnick
rock5 wrote:What version of the bot are you using?
755 and 744

744 does not stuck when the skill fails.

ty :)

my settings.lua I commented these lines:

Code: Select all

-- Check version
		--if igf_version ~= current_version then
		--	error(string.format(language[1006], current_version, igf_version), 0)
		--end
	--else
	--	error(language[1004], 0)	-- Ingamefunctions addon (igf) is not installed
because it was having trouble with ingamefunction

Re: Cleanbag userfunction 2.5

Posted: Mon Mar 18, 2013 8:36 am
by rock5
Probably the ingamefunctions of 755 and 744 are not compatible. I know it's inconvenient but you will have to change it when changing rombot version. Once you have the new version working you shouldn't need to use both anymore.

Also I do not recommend removing error messages. They are there for a reason.

Re: Cleanbag userfunction 2.5

Posted: Mon Mar 18, 2013 11:45 am
by optnick
rock5 wrote:Probably the ingamefunctions of 755 and 744 are not compatible. I know it's inconvenient but you will have to change it when changing rombot version. Once you have the new version working you shouldn't need to use both anymore.

Also I do not recommend removing error messages. They are there for a reason.

Ok!! thank you very much!! :)

Re: Cleanbag userfunction 2.5

Posted: Thu Dec 19, 2013 2:18 am
by ZZZZZ
edit - nvm, fixed my issue.

Re: Cleanbag userfunction 2.5

Posted: Wed Jun 11, 2014 4:40 pm
by silinky
i think there is a problem with this function, it deleted advanced skill reset stone and experience potions from my bag. can it be modified so that it doesn't delete item shop stuff?

Re: Cleanbag userfunction 2.5

Posted: Wed Jun 11, 2014 4:48 pm
by botje
add them to the forcekeep table.

that should work

Re: Cleanbag userfunction 2.5

Posted: Thu Jun 12, 2014 10:40 am
by silinky
i did that :) that worked.
is there a way to add every item shop item there as a type?

Re: Cleanbag userfunction 2.5

Posted: Thu Jun 12, 2014 10:48 am
by botje
there should be, but i have no idea what the type is called to be honest xd

perhaps rock or lisa could enlighten us :)

Re: Cleanbag userfunction 2.5

Posted: Thu Jun 12, 2014 11:05 am
by rock5
Items have an ItemShopItem value. I remember posting some code to move all itemshop items to the itemshop bag. Here it is.

Code: Select all

   local item
   for slot = 61, 240 do
      item = inventory.BagSlot[slot]
      item:update()
        if item.Available and (not item.InUse) and item.ItemShopItem == true then
         item:moveTo("itemshop")
      end;
   end;

Re: Cleanbag userfunction 2.5

Posted: Fri Jun 13, 2014 1:55 am
by botje
ah cool, that should work just fine, thanx rock ^^