ScriptUO
Scripting Resources & Utilities => Orion UO Client => Topic started by: The Ghost on May 24, 2022, 09:00:28 PM
-
So trying to make little function once again and can't seen to figure that one out.
I can move items from a bag to my backpack , I decide to move items from backpack to bag and that didn't go well.
function EggToBag() : Do not work, getting Error online 25 Orion.MoveItem. I'm sure it a little mistake so anyone can point me to the right direction.
var eggbag = "0x413DB0DD"
function EggToBackpack()
{
while(true)
{
var egg = Orion.FindTypeEx('0x9F13|0x9F14|0x9F15|0x9F16|0x9F17|0x9F18', any, eggbag, '', 24)[0];
if(egg)
{
Orion.MoveItem(egg.Serial());
Orion.Wait(500);
}
Orion.Wait(500);
}
}
function EggToBag()
{
while(true)
{
var egg = Orion.FindTypeEx('0x9F13|0x9F14|0x9F15|0x9F16|0x9F17|0x9F18', any, 'backpack', '', 24)[0];
if(egg)
{
Orion.MoveItem(eggbag.Serial());
Orion.Wait(500);
}
Orion.Wait(500);
}
}
-
MoveItem needs a count and destination
Orion.MoveItem(egg.Serial(), 0, container.Serial);
0 will move all in a stack, or use a number to move up to that amount, since its just an egg 1 will work the same since they don't stack.
-
Nice, That make lot of sense. That remove the error.
Now trying to figure why it grab the egg and drop it in my backpack.
-
Maybe try MoveItemType as an alternative, see if it works better for you.
Orion.MoveItemType('graphic', 'color', 'containerFrom', count, 'container'); //Can add multiple graphics as usual seperating with |
-
WoW would though that a simple function will take so most of my time. wasted 6 hrs coding 6 lines to move those damm egg to bag. still no joy :( My head hurt, so time to do something lucrative.
-
If it helps, this is one i wrote for a friend to do the same thing.
function moveEggsToContainer(){
var eggTypes = '0x9F13|0x9F14|0x9F15|0x9F16|0x9F17|0x9F18';
Orion.CharPrint(self, 0x43, "Select new Egg Container");
Orion.WaitForAddObject('eggContainer');
Orion.FindType(eggTypes, any, backpack).forEach(function(egg){
Orion.MoveItem(egg, 0, 'eggContainer');
Orion.Wait('moveitemdelay');
});
Orion.CharPrint(self, 0x43, "Move Complete");
}
-
nice, All this make sense, Let see if I can use it.
not a plug and play.
Got an error, referenceerror Can't find variable: moveitem
Let see if I can use that nice function and make it work :0
-
yeah... just throw an Orion. infront of MoveItem lol sorry...
-
How did I miss that, Thx,
This little function is a great example. I can really see the similarity of a sub here.
-
Thanks for the awesome input @The Ghost and @Altric