Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- target = {
- ["slot7id"] = 62,
- ["slot7x"] = 12*256+178,
- ["fragmenty"] = 0,
- ["fragmentx"] = 224,
- ["viney"] = 13,
- ["mushroomy"] = 55,
- ["shell0x"] = 10,
- ["shell1x"] = 104,
- ["shell2x"] = 104,
- ["shell3x"] = 74,
- ["shell4x"] = 146,
- ["shell5x"] = 117,
- ["shell6x"] = 96,
- ["slot8id"] = 53,
- ["slot9id"] = 145,
- }
- order = {
- "slot7id",
- "mushroomy",
- "viney",
- "fragmenty",
- "fragmentx",
- "slot7x",
- "slot8id",
- "shell0x",
- "shell1x",
- "shell2x",
- "shell3x",
- "shell4x",
- "shell5x",
- "shell6x",
- "slot9id",
- }
- while true do
- mem = {}
- mem["slot7id"] = memory.readbyte(0xA5)
- slot7xhigh = memory.readbyte(0x14E7)
- slot7xlow = memory.readbyte(0xEB)
- mem["slot7x"] = slot7xhigh*256+slot7xlow
- mem["fragmenty"] = memory.readbyte(0x1806)
- mem["fragmentx"] = memory.readbyte(0x1805)
- mem["viney"] = memory.readbyte(0xE2)
- mem["mushroomy"] = memory.readbyte(0xE3)
- mem["shell0x"] = memory.readbyte(0xE4)
- mem["shell1x"] = memory.readbyte(0xE5)
- mem["shell2x"] = memory.readbyte(0xE6)
- mem["shell3x"] = memory.readbyte(0xE7)
- mem["shell4x"] = memory.readbyte(0xE8)
- mem["shell5x"] = memory.readbyte(0xE9)
- mem["shell6x"] = memory.readbyte(0xEA)
- mem["slot8id"] = memory.readbyte(0xA6)
- mem["slot9id"] = memory.readbyte(0xA7)
- boxx = 3
- for i = 1,#order do
- key = order[i]
- if mem[key] == target[key] or key == "fragmentx" and mem[key] >=216 and mem[key] <= 229 then
- gui.drawBox(boxx, 3, boxx+6, 9, 0xFF000000, 0x8000FF00);
- else
- gui.drawBox(boxx, 3, boxx+6, 9, 0xFF000000, 0x80FF0000);
- end
- boxx = boxx + 8
- end
- for slot = 0,7 do
- status = memory.readbyte(0x14C8+slot)
- id = memory.readbyte(0x9E+slot)
- guide = false
- if id == 5 and slot >= 0 and slot <= 6 then
- guide = true
- name = "shell"..slot.."x"
- end
- if id == 0x3E and slot == 7 then
- guide = true
- name = "slot7x"
- end
- if status == 0xB and guide then
- targetx = target[name]
- layer1x = memory.read_s16_le(0x1A);
- layer1y = memory.read_s16_le(0x1C);
- if id == 5 then
- targetx = targetx + math.ceil((layer1x-targetx)/256)*256
- end
- gui.drawBox(targetx-layer1x, 0, targetx-layer1x+15, 256, 0x60000000)
- spritex = memory.readbyte(0xE4+slot) + memory.readbyte(0x14E0+slot)*256
- spritey = memory.readbyte(0xD8+slot) + memory.readbyte(0x14D4+slot)*256
- gui.drawBox(spritex-layer1x,spritey-layer1y,spritex-layer1x+15, spritey-layer1y+15, 0x60000000)
- end
- end
- emu.frameadvance();
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement