Advertisement
Guest User

NinjaGaiden

a guest
Sep 22nd, 2011
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.38 KB | None | 0 0
  1. local function move()
  2.   if emu.framecount() >= 183 and emu.framecount() <= 193 then
  3.    memory.writebyte(0xAD, 2); end
  4.   if emu.framecount() >= 194 and emu.framecount() <= 203 then
  5.    memory.writebyte(0xAD, 3); end
  6.   if emu.framecount() >= 204 and emu.framecount() <= 213 then
  7.    memory.writebyte(0xAD, 4); end
  8.   if emu.framecount() >= 214 and emu.framecount() <= 729 then
  9.    memory.writebyte(0xAD, 5); end
  10.  
  11.   if emu.framecount() == 232 then
  12.    memory.writebyte(0x89, 0); end
  13.   if emu.framecount() >= 234 and emu.framecount() <= 244 then
  14.    memory.writebyte(0xAD, 11); end
  15.   if emu.framecount() == 272 then
  16.    memory.writebyte(0x89, 0); end
  17.   if emu.framecount() == 291 then
  18.    memory.writebyte(0xAD, 3); end
  19.   if emu.framecount() == 293 then
  20.    memory.writebyte(0x89, 0); end
  21.   if emu.framecount() == 294 then
  22.    memory.writebyte(0xAD, 4); end
  23.   if emu.framecount() >= 304 and emu.framecount() <= 309 then
  24.    memory.writebyte(0x89, -13); end
  25.   if emu.framecount() == 310 then
  26.    memory.writebyte(0x89, 0); end
  27.  
  28.   if emu.framecount() == 348 then
  29.    memory.writebyte(0xAD, 3); end
  30.   if emu.framecount() >= 351 and emu.framecount() <= 353 then
  31.    memory.writebyte(0x89, -14); end
  32.   if emu.framecount() >= 359 and emu.framecount() <= 360 then
  33.    memory.writebyte(0xAD, 15); end
  34.   if emu.framecount() >= 356 and emu.framecount() <= 363 then
  35.    memory.writebyte(0x89, 0); memory.writebyte(0x84, 4); end
  36.   if emu.framecount() == 385 then
  37.    memory.writebyte(0xAD, 4); end
  38.   if emu.framecount() == 397 then
  39.    memory.writebyte(0xAD, 9); end
  40.  
  41.   if emu.framecount() == 463 then
  42.    memory.writebyte(0x84, 68); end
  43.   if emu.framecount() == 464 then
  44.    memory.writebyte(0x86, 238); memory.writebyte(0x89, 1); end
  45.   if emu.framecount() == 466 then
  46.    memory.writebyte(0x86, 128); memory.writebyte(0x84, 12); end
  47.  
  48.   if emu.framecount() >= 490 and emu.framecount() <= 500 then
  49.    memory.writebyte(0xAD, 4); end
  50.  
  51.   if emu.framecount() == 521 then
  52.    memory.writebyte(0x8A, 186); memory.writebyte(0x84, 68); end
  53.   if emu.framecount() == 523 then
  54.    memory.writebyte(0x8A, 186); memory.writebyte(0x84, 4); end
  55.   if emu.framecount() == 526 then
  56.    memory.writebyte(0x8A, 162); end
  57.  
  58.   if emu.framecount() == 535 then
  59.    memory.writebyte(0xAD, 2); end
  60.   if emu.framecount() == 556 then
  61.    memory.writebyte(0x8A, 80); memory.writebyte(0x89, 1); end
  62.  
  63.   if emu.framecount() == 618 then
  64.    memory.writebyte(0x86, 42); memory.writebyte(0x8A, 191); end
  65.   if emu.framecount() == 620 then
  66.    memory.writebyte(0x86, 128); end
  67.  
  68.   if emu.framecount() == 647 then
  69.    memory.writebyte(0x89, 4); end
  70.  
  71.   if emu.framecount() == 680 then
  72.    memory.writebyte(0x86, 32); memory.writebyte(0x8A, 206); memory.writebyte(0x84, 68); memory.writebyte(0x89, 1); end
  73.   if emu.framecount() == 682 then
  74.    memory.writebyte(0x86, 128); end
  75.  
  76.   if emu.framecount() >= 685 and emu.framecount() <= 689 then
  77.    memory.writebyte(0x89, -6); end
  78.   if emu.framecount() == 693 then
  79.    memory.writebyte(0x8A, 207); end
  80.   if emu.framecount() == 695 then
  81.    memory.writebyte(0x8A, 145); end
  82.   if emu.framecount() == 698 then
  83.    memory.writebyte(0x89, -2); end
  84.   if emu.framecount() == 699 then
  85.    memory.writebyte(0x89, 0); end
  86.   if emu.framecount() == 705 then
  87.    memory.writebyte(0x8A, 207); end
  88.   if emu.framecount() == 707 then
  89.    memory.writebyte(0x8A, 126); end
  90.   if emu.framecount() == 716 then
  91.    memory.writebyte(0x8A, 207); end
  92.   if emu.framecount() == 718 then
  93.    memory.writebyte(0x8A, 128); end
  94.   if emu.framecount() == 728 then
  95.    memory.writebyte(0x89, 10); end
  96.  
  97. end
  98.  
  99. local function swrd()
  100.  if emu.framecount() >= 230 and emu.framecount() <= 237 then
  101.   memory.writebyte(0x82, 2); end
  102.  if emu.framecount() >= 304 and emu.framecount() <= 318 then
  103.   memory.writebyte(0x82, 2); end  
  104. end
  105.  
  106. local function boss()
  107.   if emu.framecount() == 1015 then
  108.    memory.writebyte(0x86, 34); end
  109.   if emu.framecount() == 1016 then
  110.    memory.writebyte(0x86, 32); end
  111.   if emu.framecount() == 1017 then
  112.    memory.writebyte(0x86, 30); end
  113.   if emu.framecount() == 1018 then
  114.    memory.writebyte(0x86, 32); end
  115.   if emu.framecount() == 1019 then
  116.    memory.writebyte(0x86, 36); end
  117.   if emu.framecount() == 1020 then
  118.    memory.writebyte(0x86, 32); end
  119.   if emu.framecount() == 1021 then
  120.    memory.writebyte(0x86, 28); end
  121.   if emu.framecount() == 1022 then
  122.    memory.writebyte(0x86, 32); end
  123.   if emu.framecount() == 1023 then
  124.    memory.writebyte(0x86, 38); end
  125.   if emu.framecount() == 1024 then
  126.    memory.writebyte(0x86, 32); end
  127.   if emu.framecount() == 1025 then
  128.    memory.writebyte(0x86, 26); end
  129.   if emu.framecount() == 1026 then
  130.    memory.writebyte(0x86, 32); end
  131.   if emu.framecount() == 1027 then
  132.    memory.writebyte(0x86, 40); end
  133.   if emu.framecount() == 1028 then
  134.    memory.writebyte(0x86, 32); end
  135.   if emu.framecount() == 1029 then
  136.    memory.writebyte(0x86, 24); end
  137.   if emu.framecount() == 1030 then
  138.    memory.writebyte(0x86, 32); end
  139.   if emu.framecount() == 1031 then
  140.    memory.writebyte(0x86, 42); end
  141.   if emu.framecount() == 1032 then
  142.    memory.writebyte(0x86, 32); end
  143.   if emu.framecount() == 1033 then
  144.    memory.writebyte(0x86, 22); end
  145.   if emu.framecount() == 1034 then
  146.    memory.writebyte(0x86, 32); end
  147.   if emu.framecount() == 1035 then
  148.    memory.writebyte(0x86, 44); end
  149.   if emu.framecount() == 1036 then
  150.    memory.writebyte(0x86, 32); end
  151.   if emu.framecount() == 1037 then
  152.    memory.writebyte(0x86, 20); end
  153.   if emu.framecount() == 1038 then
  154.    memory.writebyte(0x86, 32); end
  155.   if emu.framecount() == 1039 then
  156.    memory.writebyte(0x86, 46); end
  157.   if emu.framecount() == 1040 then
  158.    memory.writebyte(0x86, 32); end
  159.   if emu.framecount() == 1041 then
  160.    memory.writebyte(0x86, 18); end
  161.   if emu.framecount() == 1042 then
  162.    memory.writebyte(0x86, 32); end
  163.   if emu.framecount() == 1043 then
  164.    memory.writebyte(0x86, 48); end
  165.   if emu.framecount() == 1044 then
  166.    memory.writebyte(0x86, 32); end
  167.   if emu.framecount() == 1045 then
  168.    memory.writebyte(0x86, 16); end
  169.   if emu.framecount() == 1046 then
  170.    memory.writebyte(0x86, 32); end
  171.   if emu.framecount() == 1047 then
  172.    memory.writebyte(0x86, 50); end
  173.   if emu.framecount() == 1048 then
  174.    memory.writebyte(0x86, 32); end
  175.   if emu.framecount() == 1049 then
  176.    memory.writebyte(0x86, 14); end
  177.   if emu.framecount() == 1050 then
  178.    memory.writebyte(0x86, 32); end
  179.   if emu.framecount() == 1051 then
  180.    memory.writebyte(0x86, 52); end
  181.   if emu.framecount() == 1052 then
  182.    memory.writebyte(0x86, 32); end
  183.   if emu.framecount() == 1053 then
  184.    memory.writebyte(0x86, 14); end
  185.   if emu.framecount() == 1054 then
  186.    memory.writebyte(0x86, 32); end
  187.  
  188.   if emu.framecount() == 1056 then
  189.    memory.writebyte(0x86, 211); memory.writebyte(0x84, 64); memory.writebyte(0x63, 1); end
  190.   if emu.framecount() >= 1057 and emu.framecount() <= 1072 then
  191.    memory.writebyte(0x82, 2); memory.writebyte(0x8A, 207); memory.writebyte(0x89, 0); end
  192.   if emu.framecount() == 1060 then
  193.    memory.writebyte(0x86, 160); memory.writebyte(0x84, 12); end
  194.   if emu.framecount() == 1063 then
  195.    memory.writebyte(0x86, 208); memory.writebyte(0x84, 76); end
  196.   if emu.framecount() == 1066 then
  197.    memory.writebyte(0x86, 156); memory.writebyte(0x84, 12); end
  198.   if emu.framecount() == 1069 then
  199.    memory.writebyte(0x86, 205); memory.writebyte(0x84, 76); end
  200. end
  201.    
  202. memory.registerwrite(0xAD, move)
  203. memory.registerwrite(0x82, swrd)
  204. emu.registerbefore(boss)
  205. emu.frameadvance()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement