Guest User

Untitled

a guest
Jun 25th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. /* Chest.cs */
  2. public static int FindChest(int X, int Y)
  3. {
  4.     for (int i = 0; i < 0x3e8; i++)
  5.     {
  6.         if (((Main.chest[i] != null) && (Main.chest[i].x == X)) && (Main.chest[i].y == Y))
  7.         {
  8.             return i;
  9.         }
  10.     }
  11.     return -1;
  12. }
  13.  
  14. /* Player.cs */
  15. if (!flag8)
  16. {
  17.     num66 = Chest.FindChest(num64, y);
  18. }
  19. ...
  20. if (num66 == this.chest)
  21. {
  22.     this.chest = -1;
  23.     Main.PlaySound(11, -1, -1, 1);
  24. }
  25. else if ((num66 != this.chest) && (this.chest == -1))
  26. {
  27.     this.chest = num66;
  28.     Main.playerInventory = true;
  29.     Main.PlaySound(10, -1, -1, 1);
  30.     this.chestX = num64;
  31.     this.chestY = y;
  32. }
  33. else
  34. {
  35.     this.chest = num66;
  36.     Main.playerInventory = true;
  37.     Main.PlaySound(12, -1, -1, 1);
  38.     this.chestX = num64;
  39.     this.chestY = y;
  40. }
Add Comment
Please, Sign In to add comment