[Orion] Unstack Jack O'Lanterns

If you make a Client-side script you can publish it here for other players to use
Post Reply
User avatar
MagicUser
Legendary Scribe
Posts: 206
Joined: Mon Nov 03, 2014 2:24 pm
Location: PST

[Orion] Unstack Jack O'Lanterns

Post 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.
Respectfully,
Paroxysmus ILV Master Spellcaster

Image
User avatar
Lach
Legendary Scribe
Posts: 415
Joined: Wed Jul 29, 2020 6:47 am

Re: [Orion] Unstack Jack O'Lanterns

Post by Lach »

ty
@ Me Bro
User avatar
Wil
Legendary Scribe
Posts: 1227
Joined: Mon Dec 30, 2013 1:19 pm
Location: Seattle, WA, USA
Contact:

Re: [Orion] Unstack Jack O'Lanterns

Post by Wil »

Since that works, a Razor restock agent might also.
Post Reply