Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Chest.cs */
- public static int FindChest(int X, int Y)
- {
- for (int i = 0; i < 0x3e8; i++)
- {
- if (((Main.chest[i] != null) && (Main.chest[i].x == X)) && (Main.chest[i].y == Y))
- {
- return i;
- }
- }
- return -1;
- }
- /* Player.cs */
- if (!flag8)
- {
- num66 = Chest.FindChest(num64, y);
- }
- ...
- if (num66 == this.chest)
- {
- this.chest = -1;
- Main.PlaySound(11, -1, -1, 1);
- }
- else if ((num66 != this.chest) && (this.chest == -1))
- {
- this.chest = num66;
- Main.playerInventory = true;
- Main.PlaySound(10, -1, -1, 1);
- this.chestX = num64;
- this.chestY = y;
- }
- else
- {
- this.chest = num66;
- Main.playerInventory = true;
- Main.PlaySound(12, -1, -1, 1);
- this.chestX = num64;
- this.chestY = y;
- }
Add Comment
Please, Sign In to add comment