Page 1 of 2

Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 03, 2014 3:24 am
by rock5
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)

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 03, 2014 3:25 am
by rock5
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 220 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 223 times

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 03, 2014 4:22 am
by ZZZZZ
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.

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 03, 2014 4:59 am
by rock5
Well I've been testing this Pipi Sap example file and it works fine. So maybe they just fixed some quests but not all.

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 31, 2014 8:02 am
by Desmond
Can Adon divide a pack of by 60 pieces?

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 31, 2014 8:52 am
by rock5
Yes any size.

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 31, 2014 10:28 am
by Desmond
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)

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 31, 2014 10:53 am
by rock5

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?

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 31, 2014 10:57 am
by Desmond
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

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 31, 2014 11:16 am
by rock5
Try

Code: Select all

split(203276, 60)
or

Code: Select all

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

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 31, 2014 3:27 pm
by Desmond
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?

Re: Splitter Addon/Userfunction by Rock5

Posted: Fri Oct 31, 2014 11:10 pm
by rock5
Sorry I didn't understand that.

Re: Splitter Addon/Userfunction by Rock5

Posted: Sat Nov 01, 2014 5:45 am
by Desmond
rock5 wrote:Sorry I didn't understand that.
may have a function to the bot bought the balls at the auction?

Re: Splitter Addon/Userfunction by Rock5

Posted: Sat Nov 01, 2014 5:58 am
by rock5
I don't like to create bots for the auction.

Re: Splitter Addon/Userfunction by Rock5

Posted: Mon May 18, 2015 10:38 pm
by Kansaki
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.

Re: Splitter Addon/Userfunction by Rock5

Posted: Tue May 19, 2015 12:13 am
by rock5
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.

Re: Splitter Addon/Userfunction by Rock5

Posted: Tue May 19, 2015 11:28 am
by Kansaki
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.

Re: Splitter Addon/Userfunction by Rock5

Posted: Tue May 19, 2015 11:53 am
by leroy
I tried splitting or merging items in a locked bag and it does NOT work.

Re: Splitter Addon/Userfunction by Rock5

Posted: Tue May 19, 2015 11:37 pm
by rock5
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.

Re: Splitter Addon/Userfunction by Rock5

Posted: Thu May 21, 2015 11:57 am
by Kansaki
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.