theballaam96

T&S Portal example Opcode

Apr 22nd, 2021
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 4.06 KB | None | 0 0
  1. if (*(byte *)(behaviour + 0x48) == 0) {
  2.     FUN_80650BBC(param_4,1,0)
  3.     FUN_80650A04(param_4,1,160)
  4. }
  5. if (*(byte *)(behaviour + 0x48) == 0) {
  6.     FUN_80650BBC(param_4,3,0)
  7.     FUN_80650A04(param_4,3,115)
  8. }
  9. if (*(byte *)(behaviour + 0x48) == 0) {
  10.     if (checkFlag(0x05>6,'Permanent') !== 0) {
  11.         *(byte *)(behaviour + 0x60) = 1
  12.         *(ushort *)(behaviour + 0x62) = 0
  13.         *(byte *)(behaviour + 0x66) = 255
  14.         *(byte *)(behaviour + 0x70) = 0
  15.         *(byte *)(behaviour + 0x4B) = 20
  16.     }
  17. }
  18. if (*(byte *)(behaviour + 0x48) == 0) {
  19.     if (checkFlag(0x03>2,'Permanent') == 0) {
  20.         FUN_806508B4(param_4,1,-1)
  21.         FUN_806508B4(param_4,3,-1)
  22.     }
  23. }
  24. if (*(byte *)(behaviour + 0x48) == 0) {
  25.     if (checkFlag(0x05>6,'Permanent') == 0) {
  26.         *(short *)(behaviour + 0x44) = 45
  27.         *(byte *)(behaviour + 0x4B) = 1
  28.     }
  29. }
  30. if (*(byte *)(behaviour + 0x48) == 1) {
  31.     if (isPlayerWithinDistanceOfObject(60) !== 0) {
  32.         *(short *)(behaviour + 0x44) = *(short *)(behaviour + 0x14)
  33.         *(code *)(0x80748040)(behaviour,param_4,0,1)
  34.         BYTE_807F693F = 1
  35.         playCutsceneFromModelTwoScript(behaviour,29,0,15)
  36.     }
  37. }
  38. if (*(byte *)(behaviour + 0x48) == 1) {
  39.     if (isPlayerWithinDistanceOfObject(60) !== 0) {
  40.         setCharacterChangeParameters(90,0,0)
  41.         *(byte *)(behaviour + 0x4B) = 100
  42.     }
  43. }
  44. if (*(byte *)(behaviour + 0x48) == 100) {
  45.     if (*(ushort *)(behaviour + 0x44) == 0) {
  46.         if (checkFlag(0x03>2,'Permanent') !== 0) {
  47.             *(short *)(behaviour + 0x44) = 60
  48.             setFlag(0x05>6,True,'Permanent')
  49.             *(byte *)(behaviour + 0x4B) = 40
  50.         }
  51.     }
  52. }
  53. if (*(byte *)(behaviour + 0x48) == 100) {
  54.     if (*(ushort *)(behaviour + 0x44) == 0) {
  55.         if (checkFlag(0x03>2,'Permanent') == 0) {
  56.             *(byte *)(behaviour + 0x4B) = 2
  57.         }
  58.     }
  59. }
  60. if (*(byte *)(behaviour + 0x48) == 40) {
  61.     if (*(ushort *)(behaviour + 0x44) == 0) {
  62.         *(byte *)(behaviour + 0x60) = 1
  63.         *(ushort *)(behaviour + 0x62) = 0
  64.         *(byte *)(behaviour + 0x66) = 4
  65.         *(byte *)(behaviour + 0x70) = 0
  66.         FUN_806085DC(param_4,994,255,127)
  67.     }
  68. }
  69. if (*(byte *)(behaviour + 0x48) == 40) {
  70.     if (*(ushort *)(behaviour + 0x44) == 0) {
  71.         *(byte *)(behaviour + 0x4B) = 41
  72.     }
  73. }
  74. if (*(byte *)(behaviour + 0x48) == 41) {
  75.     if (FUN_80650D04(param_4,2) !== 0) {
  76.         *(code *)(0x80748040)(behaviour,param_4,0,2)
  77.     }
  78. }
  79. if (*(byte *)(behaviour + 0x48) == 41) {
  80.     if (FUN_80650D04(param_4,2) == 0) {
  81.         *(byte *)(behaviour + 0x4B) = 20
  82.     }
  83. }
  84. if (*(byte *)(behaviour + 0x48) == 1) {
  85.     if (isPlayerWithinDistanceOfObject(60) == 0) {
  86.         *(byte *)(behaviour + 0x4B) = 2
  87.     }
  88. }
  89. if (*(byte *)(behaviour + 0x48) == 2) {
  90.     if (*(ushort *)(behaviour + 0x44) == 0) {
  91.         *(ushort *)(behaviour + 0x68) = 60
  92.         *(ushort *)(behaviour + 0x6A) = 60
  93.         *(ushort *)(behaviour + 0x6C) = 60
  94.         *(byte *)(behaviour + 0x67) = 3
  95.         *(byte *)(behaviour + 0x4B) = 3
  96.     }
  97. }
  98. if (*(byte *)(behaviour + 0x48) == 3) {
  99.     if (checkFlag(0x05>6,'Permanent') !== 0) {
  100.         *(byte *)(behaviour + 0x60) = 1
  101.         *(ushort *)(behaviour + 0x62) = 0
  102.         *(byte *)(behaviour + 0x66) = 255
  103.         *(byte *)(behaviour + 0x70) = 0
  104.         *(byte *)(behaviour + 0x4B) = 20
  105.     }
  106. }
  107. if (*(byte *)(behaviour + 0x48) == 3) {
  108.     if ((((*(byte *)(behaviour + 0x5C) == 0) || (*(byte *)(behaviour + 0x5C) != 1) || (FUN_8067ACC0(*(ushort *)(behaviour + 0x5E)) & 1))) || (FUN_806419F8() == 0)) {
  109.         x10_uvar9 = 0
  110.     } else {
  111.         FUN_80641724(ObjectModel2ArrayPointer[param_4].object_type)
  112.         x10_uvar9 = 1
  113.     }
  114.     if (x10_uvar9 == 1) {
  115.         *(short *)(behaviour + 0x44) = 5
  116.         *(code *)(0x80748040)(behaviour,param_4,0,0)
  117.         BYTE_807F693F = 1
  118.         playCutsceneFromModelTwoScript(behaviour,28,0,15)
  119.     }
  120. }
  121. if (*(byte *)(behaviour + 0x48) == 3) {
  122.     if ((((*(byte *)(behaviour + 0x5C) == 0) || (*(byte *)(behaviour + 0x5C) != 1) || (FUN_8067ACC0(*(ushort *)(behaviour + 0x5E)) & 1))) || (FUN_806419F8() == 0)) {
  123.         x10_uvar9 = 0
  124.     } else {
  125.         FUN_80641724(ObjectModel2ArrayPointer[param_4].object_type)
  126.         x10_uvar9 = 1
  127.     }
  128.     if (x10_uvar9 == 1) {
  129.         setCharacterChangeParameters(89,0,0)
  130.         *(byte *)(behaviour + 0x4B) = 4
  131.     }
  132. }
  133. if (*(byte *)(behaviour + 0x48) == 4) {
  134.     if (*(ushort *)(behaviour + 0x44) == 0) {
  135.         FUN_806CF398(PlayerPointer)
  136.         InitMapChange_TransferredActor(0x2A,0,12,2)
  137.         *(byte *)(behaviour + 0x4B) = 5
  138.     }
  139. }
Advertisement
Add Comment
Please, Sign In to add comment