Page 1 of 1

[Orion] Unstack Jack O'Lanterns

Posted: Sat Nov 02, 2024 4:31 pm
by MagicUser
Yes, you read that right. I figured out how to unstack the glitched multiple Jack O'Lanterns.

Paste the code into an Orion script. Run the function and click on the stacked jack o'lanterns. It will unstack them in place.

Code: Select all

function seperate_stacked_pumpkins() {
	Orion.IgnoreReset();
	Orion.CharPrint(Player.Serial(), 53, "Select a stacked jack o'lantern.");
	Orion.WaitForAddObject('stacked_pumpkin');
	var stacked_pumpkin = Orion.FindObject('stacked_pumpkin');
	var pumpkins = [];
	var searching = true;
	
	while (stacked_pumpkin && searching) {
		if (stacked_pumpkin.Count() > 1) {
			Orion.MoveItem(stacked_pumpkin.Serial(), 1, stacked_pumpkin.Container(), stacked_pumpkin.X(), stacked_pumpkin.Y());
			Orion.Wait(1000);
		}
		
		stacked_pumpkin = Orion.FindObject(stacked_pumpkin.Serial());
		if (stacked_pumpkin && stacked_pumpkin.Count() <= 1) {
			Orion.Ignore(stacked_pumpkin.Serial());
			pumpkins = Orion.FindTypeEx(stacked_pumpkin.Graphic(), any, stacked_pumpkin.Container());
			if (pumpkins.length > 0)
				stacked_pumpkin = pumpkins[0];
			else
				searching = false;
		}
		else {
			searching = false;
		}
		Orion.Wait(50);
	}
	Orion.IgnoreReset();
	Orion.RemoveObject('stacked_pumpkin');
}
For those that are not familiar, if you place a Jack O'Lantern (carved or not) on a bag with another Jack O'Lantern you will stack them (multiple in a trade, manually placing them on the bag instead of in the bag, or using an organizer). When you attempt to pick them up, they do not have a seperation pop up. It is not currently possible to seperate Jack O'Lanterns in the default client. However for some reason Orion can tell that there are more than 1 and is able to remove a selected number bypassing the count selection that is done normally.

I imagine that UOSteam is also capable of this, since if I recall, its organizer has some options.

You're welcome +C :dance.

Re: [Orion] Unstack Jack O'Lanterns

Posted: Sat Nov 02, 2024 6:23 pm
by Lach
ty

Re: [Orion] Unstack Jack O'Lanterns

Posted: Sat Nov 02, 2024 8:52 pm
by Wil
Since that works, a Razor restock agent might also.