User File #638035132090757882

Upload All User Files

#638035132090757882 - FF9 ATB Display and Danger

FF_9(new).lua
117 downloads
Uploaded 11/8/2022 2:06 PM by Lil_Gecko (see all 3)
FF9 ATB Display and Danger
 client.SetGameExtraPadding(0,0,200,0);
 EncounterCheck=0;
 Danger=0;
 
 function resetcounter()
 EncounterCheck=0;
 end;
 
 while true do
 
 event.onloadstate(resetcounter);
 
 if memory.read_u16_le(0x7ae50)>Danger then
EncounterCheck=EncounterCheck+1;
Danger=memory.read_u16_le(0x7ae50);
end;

if memory.read_u16_le(0x7ae50)==0 then
EncounterCheck=0;
Danger=0;
end;

gui.drawText(350,10,"Encounter Checks : "..EncounterCheck,nil,nil,12,"Times New Roman");
gui.drawText(350,25,"Danger Value of the screen : "..memory.readbyte(0x7954F),nil,nil,12,"Times New Roman");
gui.drawText(350,40,"Current Danger : "..memory.read_u16_le(0x7AE50),nil,nil,12,"Times New Roman");
gui.drawRectangle(350,60,100,15,"White");
gui.drawRectangle(351,61,memory.read_u16_le(0x7AE50)/2040*100,13,nil,"Green");

 
if memory.readbyte(0x7AED2)==7 then


for i=1,memory.readbyte(0x8B288) do

speed = (60 - memory.readbyte(0x10926C+(i-1)*208))*160;

 gui.drawText(350,40+(i*40),"ATB "..i.." : ",nil,nil,12,"Times New Roman");
 gui.drawRectangle(350,60+(i*40),102,15,"White");
 gui.drawRectangle(351,61+(i*40),((memory.read_u16_le(0x109268+(i-1)*208))/speed)*100,13,"Green","Green");
end; 
end;
 emu.frameadvance();
 end;