- 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
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) ^^
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);
}
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