Advertisement
Riremito

JMS v20 Jump Down Test

May 31st, 2023
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. [Enable]
  2. Alloc(Hook, 512)
  3. Label(Return)
  4. Label(_Function)
  5. Label(Hook_End)
  6.  
  7. Hook:
  8. push esi
  9. push edi
  10. mov esi,ecx
  11. cmp [esi+A0],0 // jump check
  12. je Hook_End
  13.  
  14. push 28 // Down Key
  15. call GetAsyncKeyState
  16. and eax,00008000 // Key Down
  17. test eax,eax
  18. je Hook_End
  19. cmp [esi+70],0 // not on platform
  20. je Hook_End
  21. mov [esi+A0],0 // jump flag clear
  22.  
  23. // Jump Sound
  24. push 64
  25. push 0065B91C
  26. call 00599380
  27. add esp,08
  28.  
  29. mov ecx,[0065F40C]
  30. mov eax,[ecx+3E4] // CharY
  31. add eax,#5 // Fall Down
  32. push eax
  33. push [ecx+3E0] // CharX
  34. push [ecx+3C] // Object == esi
  35. call 005B17A0 // teleport
  36.  
  37. xor eax,eax
  38. pop edi
  39. pop esi
  40. ret 0004
  41.  
  42. Hook_End:
  43. push [esp+0C]
  44. mov ecx,esi
  45. call _Function
  46. pop edi
  47. pop esi
  48. ret 0004
  49.  
  50. _Function:
  51. sub esp,30
  52. push ebx
  53. mov ebx,ecx
  54. jmp Return
  55.  
  56. 005ACBF0:
  57. jmp Hook
  58. nop
  59. Return:
  60.  
  61. [Disable]
  62. 005ACBF0:
  63. sub esp,30
  64. push ebx
  65. mov ebx,ecx
  66.  
  67. DeAlloc(Hook)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement