Splitter Addon/Userfunction by Rock5

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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Splitter Addon/Userfunction by Rock5

#1 Post by rock5 » Fri Oct 03, 2014 3:24 am

Splitter Addon

Description:
  • My splitter addon (inspired by the Superstitious Addon) allows you to split items in your backpack to fill your bag so you can use the itemqueue to collect more items (usually daily items) than you can usually collect. I've also included the option to specify the stack size so you can use it to pre-split a stack of items into the correct sized stack for mailing to your alts.
Addon Syntax:
  • /split item, stack_size

    item - Can be the slot number or name of the item you wish to split. Optional. Defaults to splitting all items.
    stack_size - If you wish to split an item into particular stack size then use this option. Optional. Defaults to 1.

    Examples:

    Code: Select all

    /split
    /split 1
    /split "Phirius Token Coin", 5
    /merge item, spaces

    item - Can be the slot number or name of the item you wish to merge. Optional. Defaults to merging the last split item/s, otherwise all items.
    spaces - The number of spaces you want to free up when merging. Used by the splitCollect userfunction. Optional. Defaults to doing a full merge.

    Examples:

    Code: Select all

    /merge
    /merge 2
    /merge "Phirius Token Coin", 5
Userfunction Syntax:
  • split(item, stack_size)

    item - Can be the slot number, id or name of the item you wish to split. Optional. Defaults to splitting all items.
    stack_size - If you wish to split an item into particular stack size then use this option. Optional. Defaults to 1.

    Examples:

    Code: Select all

    split()
    split(1)
    split("Phirius Token Coin", 5)
    split(123456)
    merge(item, spaces)

    item - Can be the slot number, id or name of the item you wish to merge. Optional. Defaults to merging the last split item/s, otherwise all items.
    spaces - The number of spaces you want to free up when merging. Used by the splitCollect userfunction. Optional. Defaults to doing a full merge.

    Examples:

    Code: Select all

    merge()
    merge(2)
    merge("Phirius Token Coin", 5)
    merge(123456)
    splitCollectSetup(harvestId, questItemId, itemStackLimit)

    Sets up the options to use splitCollect(). Must be called before using splitCollect() usually in the onload of your waypoint file.

    harvestId - The id or name of the item to harvest. Mandatory.
    questItemId - The id or name of the harvested item in your bag. Mandatory.
    itemStackSize - The stack size at which the game stops allowing you to collect more. Optional. Defaults to 5.

    Example:

    Code: Select all

    splitCollectSetup("Pipi Tree Sap", "Pipi Tree Sap", 5)
    splitCollect()

    Harvests the item using the settings set up by splitCollectSetup. When the item count reaches 1 less than the maximum allowed it will move the items to the magicbox and do a split before collecting so the item remains in the itemqueue. When the itemqueue is full it will do a merge during harvesting the item so it can collect that last item.

    Accepts no arguments. Returns "finished" when finished and true if it finds something to collect.

    Examples:

    Code: Select all

    splitCollect()
    -- Or if you want to collect all near by
    while splitCollect() == true do yrest(100) end
    findSplitStack(idOrName, size)

    Finds a stack of items in your inventory. If the specified stack size isn't found then it does a split and makes multiple stacks of the item of that size. Useful when sending stacks of daily items to multiple characters.

    idOrName - The id or name of the item you want to find.
    size - The stack size you want to find/create.

    Example:

    Code: Select all

    item = findSplitStack("Pipi Tree Sap", 25)
    UMM_SendInventoryItem(recipient, item)
Attachments
userfunction_Splitter.lua
Version 1.0 - Initial release.
(5.42 KiB) Downloaded 171 times
Splitter.7z
Version 1.0 - Initial release.
(8.74 KiB) Downloaded 171 times
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Splitter Addon/Userfunction by Rock5

#2 Post by rock5 » Fri Oct 03, 2014 3:25 am

Here are a couple of example waypoint files that use the functions.


PipiSap_Send.xml

Collects Pipi Tree Sap in Northern Janost Forest 25 at a time using splitCollect. Then it mails them to an alternate character and then continues collecting. Character needs to be able to kill the mobs.

It has 2 user options
  • Send_To = "recipient name" -- Character to send the Pipi to.
    Send_Amount = 0 -- Stop after sending this many. Set to 0, to not stop.
PipiSap_Send.xml
Initial release
(5.82 KiB) Downloaded 162 times
Daily_Sender.xml

Collects the quest items sent by PipiSap_Send, or other similar waypoint file, and sends them to a list of names, pre-splitting the items using findSplitStack() to speed it up a bit. Will work near any mailbox as it is all run from the onload.

It has 3 user options so you can use it with any dailies or other items.
  • Recipients = {"name1","name2","name3"}
    ItemName = 207435 -- Pipi Tree Sap
    StackSize = 25
Daily_Sender.xml
Initial release
(1.16 KiB) Downloaded 149 times
  • 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

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Splitter Addon/Userfunction by Rock5

#3 Post by ZZZZZ » Fri Oct 03, 2014 4:22 am

I think they fixed the itemQue bug that allowed you to collect 20+items at once. At least they did for 1 quest, so i'm assuming it's for all.

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

Re: Splitter Addon/Userfunction by Rock5

#4 Post by rock5 » Fri Oct 03, 2014 4:59 am

Well I've been testing this Pipi Sap example file and it works fine. So maybe they just fixed some quests but not all.
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: Splitter Addon/Userfunction by Rock5

#5 Post by Desmond » Fri Oct 31, 2014 8:02 am

Can Adon divide a pack of by 60 pieces?

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

Re: Splitter Addon/Userfunction by Rock5

#6 Post by rock5 » Fri Oct 31, 2014 8:52 am

Yes any size.
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: Splitter Addon/Userfunction by Rock5

#7 Post by Desmond » Fri Oct 31, 2014 10:28 am

rock5 wrote:Yes any size.
and I have something that does not make

Code: Select all

split()
split(60)
split("Шар опыта: 10 000 000 очков", 500)
split(203276)

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

Re: Splitter Addon/Userfunction by Rock5

#8 Post by rock5 » Fri Oct 31, 2014 10:53 am

Code: Select all

split()
Should split everything in your bags.

Code: Select all

split(60) 
Should split slot 60 in your bag. That is the last slot of your second bag.

Code: Select all

split("Шар опыта: 10 000 000 очков", 500)
split(203276)
How many of them do you have? Do you have more than 500 "Шар опыта: 10 000 000 очков"? I don't think you can split that. Isn't it 1 item?
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: Splitter Addon/Userfunction by Rock5

#9 Post by Desmond » Fri Oct 31, 2014 10:57 am

rock5 wrote:

Code: Select all

split()
Should split everything in your bags.

Code: Select all

split(60) 
Should split slot 60 in your bag. That is the last slot of your second bag.

Code: Select all

split("Шар опыта: 10 000 000 очков", 500)
split(203276)
How many of them do you have? Do you have more than 500 "Шар опыта: 10 000 000 очков"? I don't think you can split that. Isn't it 1 item?
yes 500 balls I have I need to divide by 60 pieces

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

Re: Splitter Addon/Userfunction by Rock5

#10 Post by rock5 » Fri Oct 31, 2014 11:16 am

Try

Code: Select all

split(203276, 60)
or

Code: Select all

split("Шар опыта: 10 000 000 очков", 60)
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: Splitter Addon/Userfunction by Rock5

#11 Post by Desmond » Fri Oct 31, 2014 3:27 pm

rock5 wrote:Try

Code: Select all

split(203276, 60)
or

Code: Select all

split("Шар опыта: 10 000 000 очков", 60)
well i will check, Rock, and is a function of the bot bought at auction thing well, well I need an example of a ball to the experience he had bought?

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

Re: Splitter Addon/Userfunction by Rock5

#12 Post by rock5 » Fri Oct 31, 2014 11:10 pm

Sorry I didn't understand that.
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: Splitter Addon/Userfunction by Rock5

#13 Post by Desmond » Sat Nov 01, 2014 5:45 am

rock5 wrote:Sorry I didn't understand that.
may have a function to the bot bought the balls at the auction?

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

Re: Splitter Addon/Userfunction by Rock5

#14 Post by rock5 » Sat Nov 01, 2014 5:58 am

I don't like to create bots for the auction.
  • 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

Kansaki
Posts: 14
Joined: Mon Apr 28, 2014 2:08 am

Re: Splitter Addon/Userfunction by Rock5

#15 Post by Kansaki » Mon May 18, 2015 10:38 pm

Rock, I found an issue on this addon. It seems that when you use a /split, sometimes get the items from the locked bag and place in the unlock bags. Could you check it out?

Thanks.
Kan.
Operae pretium est exprimendum sucus

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

Re: Splitter Addon/Userfunction by Rock5

#16 Post by rock5 » Tue May 19, 2015 12:13 am

Are you sure? It shouldn't be possible to remove items from locked bags.

Unfortunately there's no easy way for me to test this myself as I don't currently have any locked bags with items in them.
  • 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

Kansaki
Posts: 14
Joined: Mon Apr 28, 2014 2:08 am

Re: Splitter Addon/Userfunction by Rock5

#17 Post by Kansaki » Tue May 19, 2015 11:28 am

I'm sure. Is seems that if you have some stacked items on a locked backpack, it will ungroup them and then relocated on the unlocked backpack, of course, leaving one there. I had a character with lots of xmas candies locked in one bag, and suddenly start taking off and placing in unlocked bagpack.

Also, you can use /split item,quantity with the itemname of a stack blocked and it will ungroup and move. This also cause a bug that it will start looping without control when you split and when you merge if there are two stack placed on the locked backpack.

This is the last piece of information I could get from the process. If someone could replicate, it would be nice.

Thanks
Kan.
Operae pretium est exprimendum sucus

leroy
Posts: 19
Joined: Thu Sep 19, 2013 11:57 am

Re: Splitter Addon/Userfunction by Rock5

#18 Post by leroy » Tue May 19, 2015 11:53 am

I tried splitting or merging items in a locked bag and it does NOT work.

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

Re: Splitter Addon/Userfunction by Rock5

#19 Post by rock5 » Tue May 19, 2015 11:37 pm

Thanks leroy.

The only thing I can think of is if Kansaki is on a private server and they fugged something up so that locked bags look locked aren't really.

The addon shouldn't even try to use locked bags normally, unless the available bags are not in sequence eg. bag 3 is locked and bag 4 is unlocked. I never catered for that. The addon assumes the bags are in sequence.
  • 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

Kansaki
Posts: 14
Joined: Mon Apr 28, 2014 2:08 am

Re: Splitter Addon/Userfunction by Rock5

#20 Post by Kansaki » Thu May 21, 2015 11:57 am

Rock, I'm playing in the oficial server. I will explain how I reach to this issue. In a locked bad I had food stacked there. If you call the split function with the ID of one stacked item in the locked backpack, it will split the stacked item and placed under an open backpack, it will leave at least one in the locked backpack. I dont have any other character with items in a locked backpack, so I cant recreate the issue. The character where I discover the issue had xmas candies and chocolate there, like 100 of each. If I call the split funcion with the ID or Name of that item, it will split and move part of that stack into an open backpack. If I can replicate I will try to capture some video and post it here.

Leroy can try again and see if you can replicate it with just one item on the backpack?

EDIT

Rock, could it be that, the character I see that had the backpack 5 locked with the xmas items in there, and the 6 open.
Operae pretium est exprimendum sucus

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests