theballaam96

Rareware GB Opcode

Apr 9th, 2021
744
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.95 KB | None | 0 0
  1. if (*(byte *)(behaviour + 0x48) == 0) {
  2.     if (checkFlag(0x31>1,'Permanent') == 0) { // Rareware GB Room Open flag is not set (aka haven't opened the door)
  3.         *(byte *)(behaviour + 0x4B) = 1
  4.     }
  5. }
  6. if (*(byte *)(behaviour + 0x48) == 1) {
  7.     if (isPlayerWithinDistanceOfObject(100) !== 0) { // If within 100 units of Rareware GB
  8.         if (checkFlag(0x31>1,'Permanent') == 0) { // If you haven't opened the door
  9.             // Make Rareware GB disappear
  10.             *(byte *)(behaviour + 0x60) = 1
  11.             *(ushort *)(behaviour + 0x62) = 0
  12.             *(byte *)(behaviour + 0x66) = 40
  13.             *(byte *)(behaviour + 0x4B) = 2
  14.         }
  15.     }
  16. }
  17. if (*(byte *)(behaviour + 0x48) == 2) {
  18.     if (isPlayerWithinDistanceOfObject(140) == 0) { // If not within 140 units of Rareware GB
  19.         // Make Rareware GB reappear
  20.         *(byte *)(behaviour + 0x60) = 1
  21.         *(ushort *)(behaviour + 0x62) = 255
  22.         *(byte *)(behaviour + 0x66) = 40
  23.         *(byte *)(behaviour + 0x4B) = 1
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment