Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- if mainmemory.readbyte(0x0117)==01 then
- CritRefs = {}
- for i = 0,4 do
- memory.usememorydomain("CARTROM")
- CritRefs[i] = memory.read_u8(0xFE00+mainmemory.read_u8(0xb3e6)+i)
- end
- CritColor= 0xFFffa536
- NotCritColor = 0xA0555555
- for n = 0,14 do
- CritChance = mainmemory.read_u8(0x5e72 + (math.floor(n/5)*0x80))
- if CritRefs[n%5] <= CritChance then
- Color = CritColor else
- Color = NotCritColor
- end
- Xpos = mainmemory.read_u8(0x975a + (math.floor(n*0.2)))
- Ypos = mainmemory.read_u8(0x9765 + (math.floor(n*0.2)))
- gui.drawRectangle(Xpos+6*((n%5)-1),Ypos-30,3,3,Color,Color)
- end
- end
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement