Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Zombies Ate My Neighbors HUD and RNG manipulator for TAS
- xBoyP = 0
- xGirlP = 0
- yBoyP = 0
- yGirlP = 0
- xBoy = 0
- xGirl = 0
- yBoy = 0
- yGirl = 0
- shoes = {91, 162, 349, 418, 605, 672, 927, 928, 1118, 1183, 1353, 1374, 1609, 1716, 1971, 1972, 2122, 2227, 2378, 2485, 2632, 2741, 2887, 2888, 3143, 3254, 3505, 3510, 3660, 3761, 3915, 3916, 4171, 4274, 4429, 4530, 4685, 4784, 5039, 5040, 5198, 5295, 5454, 5561, 5700, 5817, 5955, 5956, 6211, 6330, 6469, 6586, 6725, 6840, 7095, 7096, 7238, 7351, 7489, 7494, 7745, 7868, 8123, 8124, 8258, 8379, 8514, 8637, 8768, 8893, 9023, 9024, 9279, 9406, 9577, 9662, 9833, 9876, 10131, 10132, 10346, 10387, 10602, 10645, 10856, 10901, 11111, 11112, 11367, 11414, 11665, 11670, 11884, 11921, 12139, 12140, 12395, 12434, 12653, 12690, 12909, 12944, 13199, 13200, 13422, 13455, 13678, 13721, 13924, 13977, 14179, 14180, 14435, 14490, 14693, 14746, 14949, 15000, 15255, 15256, 15462, 15511, 15713, 15718, 15969, 16028, 16283, 16284, 16482, 16539, 16738, 16797, 16992, 17053, 17247, 17248, 17503, 17566, 17801, 17822, 18036, 18057, 18291, 18292, 18547, 18570, 18805, 18826, 19061, 19080, 19335, 19336, 19574, 19591, 19825, 19830, 20081, 20108, 20363, 20364, 20594, 20619, 20850, 20877, 21104, 21133, 21359, 21360, 21615, 21646, 21881, 21902, 22137, 22148, 22403, 22404, 22650, 22659, 22906, 22917, 23160, 23173, 23415, 23416, 23671, 23686, 23937, 23942, 24188, 24193, 24443, 24444, 24699, 24706, 24957, 24962, 25213, 25216, 25471, 25472, 25726, 25727, 25897, 25982, 26153, 26324, 26579, 26580, 26666, 26835, 26922, 27093, 27176, 27349, 27431, 27432, 27687, 27862, 28113, 28118, 28204, 28369, 28459, 28460, 28715, 28882, 28973, 29138, 29229, 29392, 29647, 29648, 29742, 29903, 29998, 30169, 30244, 30425, 30499, 30500, 30755, 30938, 31013, 31194, 31269, 31448, 31703, 31704, 31782, 31959, 32033, 32038, 32289, 32476, 32731, 32732, 32802, 32987, 33058, 33245, 33312, 33501, 33567, 33568, 33823, 34014, 34249, 34270, 34356, 34505, 34611, 34612, 34867, 35018, 35125, 35274, 35381, 35528, 35783, 35784, 35894, 36039, 36145, 36150, 36401, 36556, 36811, 36812, 36914, 37067, 37170, 37325, 37424, 37581, 37679, 37680, 37935, 38094, 38201, 38350, 38457, 38596, 38851, 38852, 38970, 39107, 39226, 39365, 39480, 39621, 39735, 39736, 39991, 40134, 40385, 40390, 40508, 40641, 40763, 40764, 41019, 41154, 41277, 41410, 41533, 41664, 41919, 41920, 42046, 42175, 42302, 42473, 42516, 42729, 42771, 42772, 43027, 43242, 43285, 43498, 43541, 43752, 44007, 44008, 44054, 44263, 44305, 44310, 44561, 44780, 45035, 45036, 45074, 45291, 45330, 45549, 45584, 45805, 45839, 45840, 46095, 46318, 46361, 46574, 46617, 46820, 47075, 47076, 47130, 47331, 47386, 47589, 47640, 47845, 47895, 47896, 48151, 48358, 48609, 48614, 48668, 48865, 48923, 48924, 49179, 49378, 49437, 49634, 49693, 49888, 50143, 50144, 50206, 50399, 50441, 50462, 50697, 50932, 51187, 51188, 51210, 51443, 51466, 51701, 51720, 51957, 51975, 51976, 52231, 52470, 52721, 52726, 52748, 52977, 53003, 53004, 53259, 53490, 53517, 53746, 53773, 54000, 54255, 54256, 54286, 54511, 54542, 54777, 54788, 55033, 55043, 55044, 55299, 55546, 55557, 55802, 55813, 56056, 56311, 56312, 56326, 56567, 56577, 56582, 56833, 57084, 57339, 57340, 57346, 57595, 57602, 57853, 57856, 58109, 58111, 58112, 58367, 58622, 58793, 58878, 58964, 59049, 59219, 59220, 59475, 59562, 59733, 59818, 59989, 60072, 60327, 60328, 60502, 60583, 60753, 60758, 61009, 61100, 61355, 61356, 61522, 61611, 61778, 61869, 62032, 62125, 62287, 62288, 62543, 62638, 62809, 62894, 63065, 63140, 63395, 63396, 63578, 63651, 63834, 63909, 64088, 64165, 64343, 64344, 64599, 64678, 64929, 64934, 65116, 65185, 65371, 65372 }
- skeletons = {145, 364, 619, 914, 1133, 1424, 1679, 1902, 2201, 2404, 2659, 2970, 3173, 3480, 3735, 3942, 4193, 4508, 4763, 4962, 5277, 5472, 5727, 6046, 6281, 6516, 6771, 7050, 7285, 7560, 7815, 8054, 8305, 8588, 8843, 9074, 9357, 9584, 9839, 10126, 10361, 10628, 10883, 11130, 11397, 11640, 11895, 12166, 12417, 12668, 12923, 13186, 13437, 13696, 13951, 14206, 14377, 14804, 15059, 15146, 15573, 15656, 15911, 16342, 16593, 16684, 16939, 17362, 17453, 17872, 18127, 18222, 18649, 18724, 18979, 19418, 19493, 19928, 20183, 20262, 20513, 20956, 21211, 21282, 21725, 21792, 22047, 22494, 22729, 22836, 23091, 23498, 23605, 24008, 24263, 24374, 24625, 25036, 25291, 25394, 25805, 25904, 26159, 26574, 26681, 27076, 27331, 27450, 27845, 27960, 28215, 28614, 28865, 28988, 29243, 29634, 29757, 30144, 30399, 30526, 30953, 30996, 31251, 31722, 31765, 32232, 32487, 32534, 32785, 33260, 33515, 33554, 34029, 34064, 34319, 34798, 34841, 35300, 35555, 35610, 36069, 36120, 36375, 36838, 37089, 37148, 37403, 37858, 37917, 38368, 38623, 38686, 38921, 39412, 39667, 39690, 40181, 40200, 40455, 40950, 41201, 41228, 41483, 41970, 41997, 42480, 42735, 42766, 43257, 43268, 43523, 44026, 44037, 44536, 44791, 44806, 45057, 45564, 45819, 45826, 46333, 46336, 46591, 47102, 47273, 47444, 47699, 48042, 48213, 48552, 48807, 48982, 49233, 49580, 49835, 50002, 50349, 50512, 50767, 51118, 51289, 51620, 51875, 52058, 52389, 52568, 52823, 53158, 53409, 53596, 53851, 54178, 54365, 54688, 54943, 55134, 55369, 55732, 55987, 56138, 56501, 56648, 56903, 57270, 57521, 57676, 57931, 58290, 58445, 58800, 59055, 59214, 59577, 59716, 59971, 60346, 60485, 60856, 61111, 61254, 61505, 61884, 62139, 62274, 62653, 62784, 63039, 63422, 63593, 63892, 64147, 64362, 64661, 64872, 65127, 65430}
- function readMemory()
- xBoyP = xBoy
- xGirlP = xGirl
- yBoyP = yBoy
- yGirlP = yGirl
- yBoy = memory.readbyte(0x0D1F) + memory.readbyte(0x0D20)*255
- yGirl = memory.readbyte(0x0DAF) + memory.readbyte(0x0DB0)*255
- xBoy = memory.readbyte(0x0D21) + memory.readbyte(0x0D22)*255
- xGirl = memory.readbyte(0x0DB1) + memory.readbyte(0x0DB2)*255
- randomizer = memory.readbyte(0x0024)
- end
- function getRandomizerString()
- x = memory.readbyte(0x0024)+memory.readbyte(0x0025)*256
- randomizerText = 'r:'
- for _,v in pairs(shoes) do
- if v == x then
- randomizerText = randomizerText .. 'SHOE-' .. v
- break
- end
- end
- for _,v in pairs(skeletons) do
- if v == x then
- randomizerText = randomizerText .. 'skeleton-' .. v
- break
- end
- end
- return randomizerText
- end
- function getRandomizerStringOld(randomizer)
- if randomizer == 3 then
- randomizerText = randomizerText .. 'none'
- elseif randomizer == 12 then
- randomizerText = randomizerText .. 'gun'
- elseif randomizer == 13 then
- randomizerText = randomizerText .. 'Extinguisher'
- elseif randomizer == 15 then
- randomizerText = randomizerText .. 'weed'
- elseif randomizer == 16 then
- randomizerText = randomizerText .. 'holy'
- elseif randomizer == 17 then
- randomizerText = randomizerText .. '~Zooka~'
- elseif randomizer == 18 then
- randomizerText = randomizerText .. 'soda'
- elseif randomizer == 19 then
- randomizerText = randomizerText .. 'tomato'
- elseif randomizer == 20 then
- randomizerText = randomizerText .. 'popsicles'
- elseif randomizer == 22 then
- randomizerText = randomizerText .. 'plates'
- elseif randomizer == 23 then
- randomizerText = randomizerText .. 'silverware'
- elseif randomizer == 33 then
- randomizerText = randomizerText .. 'key'
- elseif randomizer == 34 then
- randomizerText = randomizerText .. '~Shoe~'
- elseif randomizer == 35 then
- randomizerText = randomizerText .. 'Red Pot'
- elseif randomizer == 36 then
- randomizerText = randomizerText .. '~Blue Pot~'
- elseif randomizer == 37 then
- randomizerText = randomizerText .. 'Mystery Pot'
- elseif randomizer == 40 then
- randomizerText = randomizerText .. 'Medkit'
- elseif randomizer == 41 then
- randomizerText = randomizerText .. 'pandora'
- elseif randomizer == 42 then
- randomizerText = randomizerText .. '~Skeleton Key~'
- elseif randomizer == 43 then
- randomizerText = randomizerText .. 'Clown'
- elseif randomizer == 47 then
- randomizerText = randomizerText .. 'gold'
- elseif randomizer == 48 then
- randomizerText = randomizerText .. '$$'
- else
- randomizerText = randomizerText .. '?????'
- end
- return randomizerText
- end
- function displayPosition()
- boyPos = 'B: (' .. xBoy .. ', ' .. yBoy .. ')'
- girlPos = 'G: (' .. xGirl .. ', ' .. yGirl .. ')'
- gui.drawText(0, 0, boyPos);
- --gui.drawText(0, 15, girlPos);
- randomizer = memory.readbyte(0x1A74)
- randomizerText = getRandomizerString()
- gui.drawText(0, 210, randomizerText)
- end
- function displayVelocity()
- boyVel = 'vB: (' .. xBoy - xBoyP .. ', ' .. yBoy - yBoyP .. ')'
- girlVel = 'vG: (' .. xGirl - xGirlP .. ', ' .. yGirl - yGirlP .. ')'
- gui.drawText(100, 0, boyVel);
- --gui.drawText(100, 15, girlVel);
- end
- function gatherRNG()
- savestate.saveslot(1)
- savestate.loadslot(1)
- local tab={}
- tab["Up"]=1
- for i=0x0,0xFF do
- for j=0x0,0xFF do
- savestate.loadslot(1)
- memory.writebyte(0x25,i)
- memory.writebyte(0x24,j)
- for c=1,5 do
- joypad.set(tab,2)
- emu.frameadvance()
- end
- displayPosition()
- console.log(i*256+j .. randomizerText)
- if randomizerText == 'r:?????' then
- break
- end
- end
- end
- end
- displayPosition();
- while true do
- emu.frameadvance();
- readMemory();
- displayVelocity();
- displayPosition();
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement