Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- --Defining the colors, ported from Googlesheets.
- Crono=0xB0ebc266
- Frog=0xB077d766
- Marle=0xb000ffff
- Lucca=0xb0eb2121
- Robo=0xb0abb4c0
- Ayla=0xb0e29deb
- Black=0xFF000000
- Transparent=0x00000000
- --Defining the colors that will be used for the RNG visualiser
- Oneminus=0xFFba0000
- OneminusLow=0x55ba0000
- Oneplus=0xFFff7979
- OneplusLow=0x55ff7979
- Twominus=0xFF009318
- TwominusLow=0x55009318
- Twoplus=0xFF47e778
- TwoplusLow=0x5547e778
- Threeminus=0xFF0036ff
- ThreeminusLow=0x550036ff
- Threeplus=0xFF00c4ff
- ThreeplusLow=0x5500c4ff
- Fourminus=0xFF666666
- FourminusLow=0x55666666
- Fourplus=0xFFcccccc
- FourplusLow=0x55cccccc
- Fiveminus=0xFF9432ff
- FiveminusLow=0x559432ff
- Fiveplus=0xFFc436ff
- FiveplusLow=0x55c436ff
- Sixminus=0xFFffa536
- SixminusLow=0x55ffa536
- Sixplus=0xFFe9ff36
- SixplusLow=0x55e9ff36
- Sevenminus=0xFF38a0ab
- SevenminusLow=0x5538a0ab
- Sevenplus=0xFF4cd8e7
- SevenplusLow=0x554cd8e7
- Eightminus=0xFFb185af
- EightminusLow=0x55b185af
- Eightplus=0xFFffc0fd
- EightplusLow=0x55ffc0fd
- --RNG visualiser
- if mainmemory.readbyte(0x0117)==01
- then
- RNGpos=218
- else
- RNGpos=218
- end
- if mainmemory.readbyte(0x0117)==01
- then
- RNGpos2=225
- else
- RNGpos2=225
- end
- --determination of which address to check for RNG
- StoredRNG=mainmemory.readbyte(0x29ad)
- NumStored=tonumber (StoredRNG)
- RawBatRNG=mainmemory.readbyte(0x0026)
- BatRNG=tonumber(RawBatRNG)
- if mainmemory.readbyte(0x0117)==01
- then
- RNG=BatRNG
- else
- RNG=NumStored
- end
- --Color definition
- --1- section
- gui.drawBox(0,RNGpos,8,RNGpos2,OneminusLow,OneminusLow)
- --1+ section
- gui.drawBox(9,RNGpos,12,RNGpos2,OneplusLow,OneplusLow)
- --2- section
- gui.drawBox(13,RNGpos,28,RNGpos2,TwominusLow,TwominusLow)
- --2+ section
- gui.drawBox(29,RNGpos,45,RNGpos2,TwoplusLow,TwoplusLow)
- --3- section
- gui.drawBox(46,RNGpos,54,RNGpos2,ThreeminusLow,ThreeminusLow)
- --3+ section
- gui.drawBox(55,RNGpos,61,RNGpos2,ThreeplusLow,ThreeplusLow)
- --4- section
- gui.drawBox(62,RNGpos,87,RNGpos2,FourminusLow,FourminusLow)
- --4+ section
- gui.drawBox(88,RNGpos,96,RNGpos2,FourplusLow,FourplusLow)
- --5- section
- gui.drawBox(97,RNGpos,135,RNGpos2,FiveminusLow,FiveminusLow)
- --5+ section
- gui.drawBox(136,RNGpos,151,RNGpos2,FiveplusLow,FiveplusLow)
- --6- section
- gui.drawBox(152,RNGpos,170,RNGpos2,SixminusLow,SixminusLow)
- --6+ section
- gui.drawBox(171,RNGpos,184,RNGpos2,SixplusLow,SixplusLow)
- --7- section
- gui.drawBox(185,RNGpos,219,RNGpos2,SevenminusLow,SevenminusLow)
- --7+ section
- gui.drawBox(220,RNGpos,224,RNGpos2,SevenplusLow,SevenplusLow)
- --8- section
- gui.drawBox(225,RNGpos,250,RNGpos2,EightminusLow,EightminusLow)
- --8+ section
- gui.drawBox(251,RNGpos,255,RNGpos2,EightplusLow,EightplusLow)
- --Color Determination
- if RNG < 9
- then
- VisColor=Oneminus
- elseif RNG < 13
- then
- VisColor=Oneplus
- elseif RNG < 29
- then
- VisColor=Twominus
- elseif RNG < 46
- then
- VisColor=Twoplus
- elseif RNG < 55
- then
- VisColor=Threeminus
- elseif RNG < 62
- then
- VisColor=Threeplus
- elseif RNG < 88
- then
- VisColor=Fourminus
- elseif RNG < 97
- then
- VisColor=Fourplus
- elseif RNG < 136
- then
- VisColor=Fiveminus
- elseif RNG < 152
- then
- VisColor=Fiveplus
- elseif RNG < 171
- then
- VisColor=Sixminus
- elseif RNG < 185
- then
- VisColor=Sixplus
- elseif RNG < 220
- then
- VisColor=Sevenminus
- elseif RNG < 225
- then
- VisColor=Sevenplus
- elseif RNG < 251
- then
- VisColor=Eightminus
- else VisColor=Eightplus
- end
- --the box
- gui.drawBox(0,RNGpos,RNG,RNGpos2,VisColor,VisColor)
- --the text
- numRNGpos = tonumber(RNGpos)
- gui.drawText(RNG-8,RNGpos-15,bizstring.hex(RNG), 0xFFFFFFFF,10,"arial")
- --Currentwindow
- if RNG < 9
- then
- CurrentWindow="[1-]"
- elseif RNG < 13
- then
- CurrentWindow="[1+]"
- elseif RNG < 29
- then
- CurrentWindow="[2-]"
- elseif RNG < 46
- then
- CurrentWindow="[2+]"
- elseif RNG < 55
- then
- CurrentWindow="[3-]"
- elseif RNG < 62
- then
- CurrentWindow="[3+]"
- elseif RNG < 88
- then
- CurrentWindow="[4-]"
- elseif RNG < 97
- then
- CurrentWindow="[4+]"
- elseif RNG < 136
- then
- CurrentWindow="[5-]"
- elseif RNG < 152
- then
- CurrentWindow="[5+]"
- elseif RNG < 171
- then
- CurrentWindow="[6-]"
- elseif RNG < 185
- then
- CurrentWindow="[6+]"
- elseif RNG < 220
- then
- CurrentWindow="[7-]"
- elseif RNG < 225
- then
- CurrentWindow="[7+]"
- elseif RNG < 251
- then
- CurrentWindow="[8-]"
- else CurrentWindow="[8+]"
- end
- if RNG < 127
- then
- gui.drawText(RNG+8,RNGpos-16,CurrentWindow,VisColor,8)
- else
- gui.drawText(RNG-26,RNGpos-16,CurrentWindow,VisColor,8)
- end
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement