Page 2 of 6

Re: Cleanbag userfunction 2.0

Posted: Sun Dec 02, 2012 11:28 am
by botje
30 downloads and no remarks? guess all is good then :P

Re: Cleanbag userfunction 2.0

Posted: Wed Dec 05, 2012 3:38 pm
by xrozhija
getting the following error when trying to use this function

Code: Select all

9:36pm - .../scripts/rom/userfunctions/userfunction_CleanBag.lua:25: attempt to
call global 'logInfo' (a nil value)
tried adding both
CleanBag(500, 4, true)

and
CleanBag(500, 4, true)
inventory:update();

both get the same error

Re: Cleanbag userfunction 2.0

Posted: Thu Dec 06, 2012 2:15 am
by rock5
I'd say he forgot to add a list of requirements. 'logInfo' is a userfunction. Do a search for it on the forum.

Re: Cleanbag userfunction 2.0

Posted: Thu Dec 06, 2012 2:29 am
by xrozhija
rock5 wrote:I'd say he forgot to add a list of requirements. 'logInfo' is a userfunction. Do a search for it on the forum.
thanks for the info, will try and add that userfunction, when i get home tonight.

Re: Cleanbag userfunction 2.0

Posted: Thu Dec 06, 2012 3:39 am
by botje
yeah my bad, thought everyone would be using that xd

Re: Cleanbag userfunction 2.0

Posted: Thu Dec 06, 2012 5:01 am
by lisa
ooh ooh ooh, I recognize that name, it's one of mine =)

Re: Cleanbag userfunction 2.0

Posted: Thu Dec 06, 2012 11:48 am
by xrozhija
It is now working, after also installing the userfunction HaveCard.

So now i can start on my card farming waypoints to fill up my cardbook.

EDIT: Unfortunately, when using the function, it only deletes armor pieces, and only 6 each time.

With my very limited knowledge (close to zero) in lua coding, I was able to make it also include accessories in the 6 items it destroys each time the function is called.

However, I would like to use it, so it destroys everything except Cards, and only keeps those in the bag, keeping my usual food/pots and other stuff in slot 1-20, so that the function deletes everything from slot 21-60, except Cards. Is that possible?

Re: Cleanbag userfunction 2.0

Posted: Sat Dec 08, 2012 4:22 pm
by silinky
uhmmm, maybe stupid question, but where is the userfunction haveCard? the only result of search is this post O_O

can smone point me to the right direction? :) thx

Re: Cleanbag userfunction 2.0

Posted: Sat Dec 08, 2012 5:55 pm
by botje

Code: Select all

function haveCard(idorname)
   if type(idorname) == "string" and type(tonumber(idorname)) ~= "number" then
      idorname = "\""..idorname.."\""
   end
   return RoMScript("} for x=0,15 do "..
      "local cc=LuaFunc_GetCardMaxCount(x) "..
      "if cc~=nil and cc>0 then "..
         "for y=1,cc do "..
            "local i,f,n=LuaFunc_GetCardInfo(x,y-1) "..
            "if i=="..idorname.." or n=="..idorname.." then "..
               "a={f==1} "..
            "end "..
         "end "..
      "end "..
   "end z={")
end

Re: Cleanbag userfunction 2.0

Posted: Sat Dec 08, 2012 6:21 pm
by silinky
thanks! :)

Re: Cleanbag userfunction 2.0

Posted: Sun Dec 09, 2012 1:01 am
by rock5
silinky wrote:uhmmm, maybe stupid question, but where is the userfunction haveCard? the only result of search is this post O_O
That's because the search function doesn't actually search code on a page and the word "havecard" was never said. If you were more general and searched for "have card" you would have found it. Anyway I've added the word so it will appear in searches now. This is where I posted it BTW
http://www.solarstrike.net/phpBB3/viewt ... 606#p44606

Re: Cleanbag userfunction 2.0

Posted: Sun Dec 09, 2012 3:08 pm
by silinky
rock5 wrote:
silinky wrote:uhmmm, maybe stupid question, but where is the userfunction haveCard? the only result of search is this post O_O
That's because the search function doesn't actually search code on a page and the word "havecard" was never said. If you were more general and searched for "have card" you would have found it. Anyway I've added the word so it will appear in searches now. This is where I posted it BTW
http://www.solarstrike.net/phpBB3/viewt ... 606#p44606
haha everyday i learn something new :) thx for the tip mate.

Re: Cleanbag userfunction 2.1

Posted: Thu Dec 13, 2012 11:41 am
by botje
updated, i fixed a bug, and made log function to be able to turn it off.

included the log and havecard function in it.

Re: Cleanbag userfunction 2.2

Posted: Thu Dec 20, 2012 11:57 am
by botje
updated with code to delete useless potions because their to low to use on the level of the char.

just a few more additions and i dont even need lootfilter anymore :P

Re: Cleanbag userfunction 2.2

Posted: Wed Dec 26, 2012 11:42 am
by gloover
Your addon may be nice, but one thing could be wished:

what about looting runes and throwing only runes type I and II?

Re: Cleanbag userfunction 2.2

Posted: Wed Dec 26, 2012 11:54 am
by botje
open source, add it yourself? :P

edit, i actually thought about it, and i dunno how i can easely do this, except with a user database in which users can store what stuff to NOT drop.

that way you just add the name of the rune, and it keeps it.

and perhaps lua has a findinstring function, so if the item is a rune, and it has II in the name, i can drop it, i dunno man, ill have to do some research on that...

Re: Cleanbag userfunction 2.2

Posted: Thu Dec 27, 2012 4:01 pm
by kuripot
how to ignore item to delete??

i mean i want to delete all item that indicated in userfunction but dont delete an specific item

Re: Cleanbag userfunction 2.2

Posted: Fri Dec 28, 2012 5:28 am
by botje
you cant , well, not yet, im adding a database to force items to keep in bag, next update ^^

Re: Cleanbag userfunction 2.3

Posted: Fri Dec 28, 2012 7:55 am
by botje
updated to 2.3

new database in the file itself, you can add items to force drop, and force keep in there.

also, it drops all runes by default, delete that piece of code, or add them to the keep database.

Re: Cleanbag userfunction 2.2

Posted: Thu Jan 03, 2013 9:30 am
by Rintintin
gloover wrote: what about looting runes and throwing only runes type I and II?
This can be done woth lootomatic, easily. Just add

Code: Select all

$rune1
$rune2
to your lootfilter. It might also be

Code: Select all

$runes1
$runes2
note the additional "s". I can not check which if this two really works but thats the way i get rid of those I+IIer runes.
Its just dangerous in the Minigame "Ancient Treasure", where it will throw those higher rank I+IIer runes away, too.