Author Topic: MoveItemType  (Read 4745 times)

0 Members and 1 Guest are viewing this topic.

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Referrals: 0
    • View Profile
MoveItemType
« 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.


Code: [Select]
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);
        }
    }
   

Offline altiric

  • Jr. Member
  • **
  • Posts: 81
  • Activity:
    0%
  • Reputation Power: 2
  • altiric has no influence.
  • Referrals: 1
    • View Profile
Re: MoveItemType
« Reply #1 on: May 24, 2022, 09:37:02 PM »
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.


Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Referrals: 0
    • View Profile
Re: MoveItemType
« Reply #2 on: May 25, 2022, 06:28:49 AM »
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.
 

Offline altiric

  • Jr. Member
  • **
  • Posts: 81
  • Activity:
    0%
  • Reputation Power: 2
  • altiric has no influence.
  • Referrals: 1
    • View Profile
Re: MoveItemType
« Reply #3 on: May 25, 2022, 10:58:38 AM »
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 |

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Referrals: 0
    • View Profile
Re: MoveItemType
« Reply #4 on: May 25, 2022, 03:57:32 PM »
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. 


Offline altiric

  • Jr. Member
  • **
  • Posts: 81
  • Activity:
    0%
  • Reputation Power: 2
  • altiric has no influence.
  • Referrals: 1
    • View Profile
Re: MoveItemType
« Reply #5 on: May 27, 2022, 01:25:13 AM »
If it helps, this is one i wrote for a friend to do the same thing.

Quote
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");
}
« Last Edit: May 27, 2022, 04:59:23 PM by altiric »

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Referrals: 0
    • View Profile
Re: MoveItemType
« Reply #6 on: May 27, 2022, 04:13:49 PM »
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 

Offline altiric

  • Jr. Member
  • **
  • Posts: 81
  • Activity:
    0%
  • Reputation Power: 2
  • altiric has no influence.
  • Referrals: 1
    • View Profile
Re: MoveItemType
« Reply #7 on: May 27, 2022, 04:58:42 PM »
yeah... just throw an Orion. infront of MoveItem lol sorry...

Offline The GhostTopic starter

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Referrals: 0
    • View Profile
Re: MoveItemType
« Reply #8 on: May 27, 2022, 07:29:16 PM »
How did I miss that,   Thx, 
This little function is a great example. I can really see the similarity of a sub here.   

Offline Black Widow

  • Jr. Member
  • **
  • Posts: 37
  • Activity:
    0%
  • Reputation Power: 1
  • Black Widow has no influence.
  • Gender: Male
  • Well Hello there....Skippy
  • Referrals: 1
    • View Profile
Re: MoveItemType
« Reply #9 on: September 10, 2023, 02:19:26 PM »
Thanks for the awesome input @The Ghost and @Altric
And I heard as it were the noise of thunder
One of the four beasts saying come and see and I saw
And behold a white horse...
And I heard a voice in the midst of the four beasts
And I looked and behold, a pale horse
And his name that sat on him was Death
And Hell followed with him....

Tags: