how to find item stack addy?

09/10/2011 02:04 12sky#1
here is what i get i can only stack 2 pills LoL, but how can you stack all ?

[Only registered and activated users can see links. Click Here To Register...]

btw how can you make move store to not DC when you go over the main town
09/10/2011 09:25 Wazapoo#2
How about experimenting with the addresses near it? Noone told the orginal maker how to make it.
09/10/2011 15:35 Mega Byte#3
Well you see, find item info structure array, find item type, change all items to item type 1.

For a nicer way. Alter the code for each item on pickup and drag and buy so that it gets its type changed to 1 during those actions. Hint find what reads this address. *4 byte since its an integer for the item type of the item you want.*

If you alter the code with detours it will apply to all the items not just the one you began with.

Structure for Inventory items looks something like this its an array of 64 of them. for the inventory.
Code:
struct Item {	
	u_int ID;
	u_int Row;
	u_int Column;
	u_int Amount;
	u_int Enchant;
	u_int Combine;
};
Item Info it looks like this
Code:
struct ItemInfo {	
	unsigned int ID;
	char Name[25];
	char Description1[51];
	char Description2[51];
	char Description3[53];
	int Rareness;
	unsigned int Type;
	unsigned int 2DDisplayID;
......
It has a size of 428 bytes
There is an array of 99999 of them I belive.

Here is what the type is
Code:
Type	Value	Slot Size
Nothing	0	4
AP/Silver	1	4
Support	2	1
Support(Common)	3	4
Quest	4	4
Martial Arts Technique Esoterica	5	4
Acessory	6	4
Necklace(Common)	7	1
Cape	8	4
Armor	9	4
Wristband	10	4
Ring	11	1
Boot	12	4
Sword	13	4
Blade	14	4
Marble	15	4
Katana	16	4
Double Blades	17	4
Lute	18	4
Light Blade	19	4
Long Spear	20	4
Scepter	21	4
Spirit Animal	22	4
You need to be able to work this sorta stuff out
10/08/2011 07:44 dabnoj#4
when i was writting in c# i was doing like this :

-full your inventory of only the same 1jeon blue pills(total : 64 slots)



-search your char name with cheat engine (text search)



-scroll a bit down and try to click on some blue pills in your inventory
if youre at the right adress name youll see using cheat engine that
the bytes change to 0 when you holding a blue pill


- when your sure youre in the right adress try all pills till you find the toppest inventory item spot... add the first byte that change in your adress list

then you can see that the structure of your inventory get always the same memory space so ive done a script like that in c# when i was not enough skilled to work with offsets ^^ so its a long method and not the more efficient but i was proud to find by myself and script this huge code xD

first youhave to declare your pointers by some shit like this :
Code:
            IntPtr StackInv1 = new IntPtr(0x01173E6C + 4);//ive add + 4 cause the base adress is the item ID and if you add +4 youll be in the first item position adress
            IntPtr StackInv2 = new IntPtr(0x01173E6C + 24 + 4);//this time ive calculate the space between first item ID till second item ID and then ive add 4 like the first time ^^
            IntPtr StackInv3 = new IntPtr(0x01173E6C + 24 * 2 + 4);// lets we consider that the structure and the spaces between each items are the same ^^ so you neeed to add this time (base item 48+ 4) (48=24*2)
            IntPtr StackInv4 = new IntPtr(0x01173E6C + 24 * 3 + 4);//ive done that cause i was bored to calculate myself 24*2; 24*3 etc..
            IntPtr StackInv5 = new IntPtr(0x01173E6C + 24 * 4 + 4);
            IntPtr StackInv6 = new IntPtr(0x01173E6C + 24 * 5 + 4);
            IntPtr StackInv7 = new IntPtr(0x01173E6C + 24 * 6 + 4);
            IntPtr StackInv8 = new IntPtr(0x01173E6C + 24 * 7 + 4);
            IntPtr StackInv9 = new IntPtr(0x01173E6C + 24 * 8 + 4);
            IntPtr StackInv10 = new IntPtr(0x01173E6C + 24 * 9 + 4);//... doit till StackInv64

after you can stack items and recognize pills easy with a memory read function that will making you able to separate -> blue pills, red pills, other items ^^.. ive separate them to be able to take blue and red pills even your stacking your items(youll loose 2 spots of item but its better then have your facking pills stacked under other items) ^^

so here is a part of my stacking script '^^ :D

Code:
public int Objecttype = 1;//declare object type variable
        byte[] InvCaseACode = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00 };//after studying on where are the position of items adresses are after items id i discovered that each 64 slots have a x and y position in the inventory(horizontal position and vertical position ) so i can get each item going where i want ^^ (you can try yourself changing horizontal and vertical position)
        byte[] InvCasePillCode = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x06 };
     byte[] InvCasePillHpCode = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x05 }; 


        private void StackInvLBL_Click(object sender, EventArgs e)//when you click on your winform like a lbl it will generate automaticly this
        {


            int Objecttype = Convert.ToInt32(MemRead(StackInv1 - 4, 2)[0]);//  here we read the first itemID 
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)//here are the ID of blue pills( i was bored to add 2 bytes so sometimes other items with the same first byte stack with pills, but not a lot) so if they are blue pills or other items with the same first ID byte they will stack on the spot ive choose for bluepills (InvCasePillCode)
            {

                MemWrite(StackInv1, InvCasePillCode);//here i memwrite where the bluepills need to be stacked(ive choose bottom left xD)

            }
            else if (Objecttype == 0x04 ||  Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19 )//here are the redpills ID's each sort ^^->same explication than blue pills for red pills :P
            {

                MemWrite(StackInv1, InvCasePillHpCode);//here if they are red pills i stack them on the position ive choose for redpills-->InvCasePillHPCode

            }

            else//here is the other items Case

            {
                MemWrite(StackInv1, InvCaseACode);//ive choose to stack them top left-->InvCaseACode (means InvCaseItemsCode)
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv1A - 4, 2)[0]);//here is the second spot youll need to reapeat each case till you have the 64 item's spot's stacked so the code will be hugue(xD)
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv1A, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv1A, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv1A, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv2 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv2, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv2, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv2, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv3 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv3, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv3, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv3, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv4 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv4, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv4, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv4, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv5 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype <= 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv5, InvCasePillCode);

            }

            else
            {
                MemWrite(StackInv5, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv5 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv5, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv5, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv5, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv6 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv6, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv6, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv6, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv6 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv7, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv7, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv7, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv8 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv8, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv8, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv8, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv9 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv9, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv9, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv9, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv10 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv10, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv10, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv10, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv11 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv11, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv11, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv11, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv12 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv12, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv12, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv12, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv13 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv13, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv13, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv13, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv14 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv14, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv14, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv14, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv15 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv15, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv15, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv15, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv16 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv16, InvCasePillCode);

            }
            else if (Objecttype == 0x04 ||  Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv16, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv16, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv17 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv17, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv17, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv17, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv18 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv18, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv18, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv18, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv19 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv19, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv19, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv19, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv20 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv20, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv20, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv20, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv21 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv21, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv21, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv21, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv22 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv22, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv22, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv22, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv23 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv23, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv23, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv23, InvCaseACode);
            }




            Objecttype = Convert.ToInt32(MemRead(StackInv24 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv24, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv24, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv24, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv25 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv25, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv25, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv25, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv26 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv26, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv26, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv26, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv27 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv27, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv27, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv27, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv28 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv28, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv28, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv28, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv29 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv29, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv29, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv29, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv30 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv30, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv30, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv30, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv31 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv31, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv31, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv31, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv32 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv32, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv32, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv32, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv33 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv33, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv33, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv33, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv34 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv34, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv34, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv34, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv35 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv35, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv35, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv35, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv36 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv36, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv36, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv36, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv37 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv37, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv37, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv37, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv38 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv38, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv38, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv38, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv39 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv39, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv39, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv39, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv40 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv40, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv40, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv40, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv41 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv41, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv41, InvCasePillHpCode);

            }


            else
            {
                MemWrite(StackInv41, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv42 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv42, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv42, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv42, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv43 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv43, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv43, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv43, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv44 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv44, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv44, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv44, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv45 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv45, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv45, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv45, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv46 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv46, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv46, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv46, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv47 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv47, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv47, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv47, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv48 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv48, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv48, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv48, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv49 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv49, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv49, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv49, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv50 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv50, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv50, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv50, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv51 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv51, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv51, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv51, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv52 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv52, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv52, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv52, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv53 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv53, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv53, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv53, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv54 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv54, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv54, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv54, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv55 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv55, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv55, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv55, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv56 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv56, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv56, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv56, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv57 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv57, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv57, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv57, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv58 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv58, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv58, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv58, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv59 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv59, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv59, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv59, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv60 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv60, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv60, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv60, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv61 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv61, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv61, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv61, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv62 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv62, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv62, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv62, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv63 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv63, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv63, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv63, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv64 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv64, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv64, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv64, InvCaseACode);
            }

so if you have some c# skills its easy to do it with a bit of reflexion

hope it will help

but i tell you that if you work with offsets it will be more clear and not that long.... when i update adress i only need to change the main adress 64 times in the first code, but with offset you just need to put it one time so youll save lot of time ^^ and not getting that boring to stack your items, but even if theyre some better methods to doit, this is to show you the basis of item stacking that ive post this old method ive found xD
10/08/2011 08:09 12sky#5
LoL i found it long time ago, btw not smart enough to learn c++ <.< current using vb lol

only need to learn how to find multi-hit addy now
10/30/2011 22:40 ts2dropper#6
Quote:
Originally Posted by dabnoj View Post
when i was writting in c# i was doing like this :

-full your inventory of only the same 1jeon blue pills(total : 64 slots)



-search your char name with cheat engine (text search)



-scroll a bit down and try to click on some blue pills in your inventory
if youre at the right adress name youll see using cheat engine that
the bytes change to 0 when you holding a blue pill


- when your sure youre in the right adress try all pills till you find the toppest inventory item spot... add the first byte that change in your adress list

then you can see that the structure of your inventory get always the same memory space so ive done a script like that in c# when i was not enough skilled to work with offsets ^^ so its a long method and not the more efficient but i was proud to find by myself and script this huge code xD

first youhave to declare your pointers by some shit like this :
Code:
            IntPtr StackInv1 = new IntPtr(0x01173E6C + 4);//ive add + 4 cause the base adress is the item ID and if you add +4 youll be in the first item position adress
            IntPtr StackInv2 = new IntPtr(0x01173E6C + 24 + 4);//this time ive calculate the space between first item ID till second item ID and then ive add 4 like the first time ^^
            IntPtr StackInv3 = new IntPtr(0x01173E6C + 24 * 2 + 4);// lets we consider that the structure and the spaces between each items are the same ^^ so you neeed to add this time (base item 48+ 4) (48=24*2)
            IntPtr StackInv4 = new IntPtr(0x01173E6C + 24 * 3 + 4);//ive done that cause i was bored to calculate myself 24*2; 24*3 etc..
            IntPtr StackInv5 = new IntPtr(0x01173E6C + 24 * 4 + 4);
            IntPtr StackInv6 = new IntPtr(0x01173E6C + 24 * 5 + 4);
            IntPtr StackInv7 = new IntPtr(0x01173E6C + 24 * 6 + 4);
            IntPtr StackInv8 = new IntPtr(0x01173E6C + 24 * 7 + 4);
            IntPtr StackInv9 = new IntPtr(0x01173E6C + 24 * 8 + 4);
            IntPtr StackInv10 = new IntPtr(0x01173E6C + 24 * 9 + 4);//... doit till StackInv64

after you can stack items and recognize pills easy with a memory read function that will making you able to separate -> blue pills, red pills, other items ^^.. ive separate them to be able to take blue and red pills even your stacking your items(youll loose 2 spots of item but its better then have your facking pills stacked under other items) ^^

so here is a part of my stacking script '^^ :D

Code:
public int Objecttype = 1;//declare object type variable
        byte[] InvCaseACode = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00 };//after studying on where are the position of items adresses are after items id i discovered that each 64 slots have a x and y position in the inventory(horizontal position and vertical position ) so i can get each item going where i want ^^ (you can try yourself changing horizontal and vertical position)
        byte[] InvCasePillCode = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x06 };
     byte[] InvCasePillHpCode = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x05 }; 


        private void StackInvLBL_Click(object sender, EventArgs e)//when you click on your winform like a lbl it will generate automaticly this
        {


            int Objecttype = Convert.ToInt32(MemRead(StackInv1 - 4, 2)[0]);//  here we read the first itemID 
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)//here are the ID of blue pills( i was bored to add 2 bytes so sometimes other items with the same first byte stack with pills, but not a lot) so if they are blue pills or other items with the same first ID byte they will stack on the spot ive choose for bluepills (InvCasePillCode)
            {

                MemWrite(StackInv1, InvCasePillCode);//here i memwrite where the bluepills need to be stacked(ive choose bottom left xD)

            }
            else if (Objecttype == 0x04 ||  Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19 )//here are the redpills ID's each sort ^^->same explication than blue pills for red pills :P
            {

                MemWrite(StackInv1, InvCasePillHpCode);//here if they are red pills i stack them on the position ive choose for redpills-->InvCasePillHPCode

            }

            else//here is the other items Case

            {
                MemWrite(StackInv1, InvCaseACode);//ive choose to stack them top left-->InvCaseACode (means InvCaseItemsCode)
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv1A - 4, 2)[0]);//here is the second spot youll need to reapeat each case till you have the 64 item's spot's stacked so the code will be hugue(xD)
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv1A, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv1A, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv1A, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv2 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv2, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv2, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv2, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv3 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv3, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv3, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv3, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv4 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv4, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv4, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv4, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv5 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype <= 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv5, InvCasePillCode);

            }

            else
            {
                MemWrite(StackInv5, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv5 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv5, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv5, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv5, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv6 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv6, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv6, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv6, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv6 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv7, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv7, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv7, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv8 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv8, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv8, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv8, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv9 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv9, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv9, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv9, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv10 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv10, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv10, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv10, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv11 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv11, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv11, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv11, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv12 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv12, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv12, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv12, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv13 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv13, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv13, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv13, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv14 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv14, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv14, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv14, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv15 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv15, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv15, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv15, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv16 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv16, InvCasePillCode);

            }
            else if (Objecttype == 0x04 ||  Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv16, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv16, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv17 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv17, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv17, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv17, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv18 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv18, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv18, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv18, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv19 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv19, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv19, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv19, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv20 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv20, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv20, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv20, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv21 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv21, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv21, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv21, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv22 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv22, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv22, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv22, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv23 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv23, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv23, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv23, InvCaseACode);
            }




            Objecttype = Convert.ToInt32(MemRead(StackInv24 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv24, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv24, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv24, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv25 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv25, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv25, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv25, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv26 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv26, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv26, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv26, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv27 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv27, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv27, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv27, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv28 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv28, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv28, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv28, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv29 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv29, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv29, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv29, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv30 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv30, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv30, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv30, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv31 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv31, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv31, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv31, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv32 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv32, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv32, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv32, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv33 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv33, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv33, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv33, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv34 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv34, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv34, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv34, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv35 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv35, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv35, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv35, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv36 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv36, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv36, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv36, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv37 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv37, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv37, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv37, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv38 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv38, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv38, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv38, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv39 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv39, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv39, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv39, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv40 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv40, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv40, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv40, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv41 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv41, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv41, InvCasePillHpCode);

            }


            else
            {
                MemWrite(StackInv41, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv42 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv42, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv42, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv42, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv43 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv43, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv43, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv43, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv44 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv44, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv44, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv44, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv45 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv45, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv45, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv45, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv46 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv46, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv46, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv46, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv47 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv47, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv47, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv47, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv48 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv48, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv48, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv48, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv49 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv49, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv49, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv49, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv50 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv50, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv50, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv50, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv51 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv51, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv51, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv51, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv52 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv52, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv52, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv52, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv53 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv53, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv53, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv53, InvCaseACode);
            }



            Objecttype = Convert.ToInt32(MemRead(StackInv54 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv54, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv54, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv54, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv55 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv55, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv55, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv55, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv56 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv56, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv56, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv56, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv57 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv57, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv57, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv57, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv58 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv58, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv58, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv58, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv59 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv59, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv59, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv59, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv60 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv60, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv60, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv60, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv61 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv61, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv61, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv61, InvCaseACode);
            }

            Objecttype = Convert.ToInt32(MemRead(StackInv62 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv62, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv62, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv62, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv63 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv63, InvCasePillCode);

            }

            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv63, InvCasePillHpCode);

            }

            else
            {
                MemWrite(StackInv63, InvCaseACode);
            }


            Objecttype = Convert.ToInt32(MemRead(StackInv64 - 4, 2)[0]);
            if (Objecttype == 0x1f || Objecttype == 0x1e || Objecttype == 0x1d || Objecttype == 0x1b || Objecttype == 0x1c || Objecttype == 0x1a || Objecttype == 0x22 || Objecttype == 0x21 || Objecttype == 0x20)
            {

                MemWrite(StackInv64, InvCasePillCode);

            }
            else if (Objecttype == 0x04 || Objecttype == 0x02 || Objecttype == 0x03 || Objecttype == 0x05 || Objecttype == 0x17 || Objecttype == 0x18 || Objecttype == 0x19)
            {

                MemWrite(StackInv64, InvCasePillHpCode);

            }
            else
            {
                MemWrite(StackInv64, InvCaseACode);
            }

so if you have some c# skills its easy to do it with a bit of reflexion

hope it will help

but i tell you that if you work with offsets it will be more clear and not that long.... when i update adress i only need to change the main adress 64 times in the first code, but with offset you just need to put it one time so youll save lot of time ^^ and not getting that boring to stack your items, but even if theyre some better methods to doit, this is to show you the basis of item stacking that ive post this old method ive found xD
wow:D you need to learn "FOR" loop:D:D:D:D:
10/31/2011 02:23 12sky#7
item stack FULLY working~