Cleanbag userfunction 2.5

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Cleanbag userfunction 2.0

#21 Post by botje » Sun Dec 02, 2012 11:28 am

30 downloads and no remarks? guess all is good then :P

xrozhija
Posts: 51
Joined: Sat Apr 25, 2009 2:08 am

Re: Cleanbag userfunction 2.0

#22 Post by xrozhija » Wed Dec 05, 2012 3:38 pm

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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Cleanbag userfunction 2.0

#23 Post by rock5 » Thu Dec 06, 2012 2:15 am

I'd say he forgot to add a list of requirements. 'logInfo' is a userfunction. Do a search for it on the forum.
  • 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

xrozhija
Posts: 51
Joined: Sat Apr 25, 2009 2:08 am

Re: Cleanbag userfunction 2.0

#24 Post by xrozhija » Thu Dec 06, 2012 2:29 am

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.

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Cleanbag userfunction 2.0

#25 Post by botje » Thu Dec 06, 2012 3:39 am

yeah my bad, thought everyone would be using that xd

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Cleanbag userfunction 2.0

#26 Post by lisa » Thu Dec 06, 2012 5:01 am

ooh ooh ooh, I recognize that name, it's one of mine =)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

xrozhija
Posts: 51
Joined: Sat Apr 25, 2009 2:08 am

Re: Cleanbag userfunction 2.0

#27 Post by xrozhija » Thu Dec 06, 2012 11:48 am

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?

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Cleanbag userfunction 2.0

#28 Post by silinky » Sat Dec 08, 2012 4:22 pm

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

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Cleanbag userfunction 2.0

#29 Post by botje » Sat Dec 08, 2012 5:55 pm

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

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Cleanbag userfunction 2.0

#30 Post by silinky » Sat Dec 08, 2012 6:21 pm

thanks! :)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Cleanbag userfunction 2.0

#31 Post by rock5 » Sun Dec 09, 2012 1:01 am

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
  • 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

User avatar
silinky
Posts: 213
Joined: Mon Nov 23, 2009 5:07 am

Re: Cleanbag userfunction 2.0

#32 Post by silinky » Sun Dec 09, 2012 3:08 pm

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.

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Cleanbag userfunction 2.1

#33 Post by botje » Thu Dec 13, 2012 11:41 am

updated, i fixed a bug, and made log function to be able to turn it off.

included the log and havecard function in it.

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Cleanbag userfunction 2.2

#34 Post by botje » Thu Dec 20, 2012 11:57 am

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

User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: Cleanbag userfunction 2.2

#35 Post by gloover » Wed Dec 26, 2012 11:42 am

Your addon may be nice, but one thing could be wished:

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

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Cleanbag userfunction 2.2

#36 Post by botje » Wed Dec 26, 2012 11:54 am

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...

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Cleanbag userfunction 2.2

#37 Post by kuripot » Thu Dec 27, 2012 4:01 pm

how to ignore item to delete??

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

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Cleanbag userfunction 2.2

#38 Post by botje » Fri Dec 28, 2012 5:28 am

you cant , well, not yet, im adding a database to force items to keep in bag, next update ^^

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Cleanbag userfunction 2.3

#39 Post by botje » Fri Dec 28, 2012 7:55 am

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.

User avatar
Rintintin
Posts: 55
Joined: Tue Jan 01, 2013 7:45 am
Location: Germany

Re: Cleanbag userfunction 2.2

#40 Post by Rintintin » Thu Jan 03, 2013 9:30 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests