Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Xenogears "Trainer" script v1.2
- --beta aquarii
- --formatted for use on epsxe
- --jul 29, edited gui text
- adresse_x_position = 0x06EF82
- adresse_y_position = 0x006EF84
- adresse_z_position = 0x006EF86
- adresse_seconde = 0x0059418
- adresse_minute = 0x0059420
- adresse_heure = 0x0059484
- --non overworld step/encounter counts
- free_steps = 0x0B2294
- enc_steps = 0x0B22A0
- --non-gear enemy HP locations
- enemyhp_1 = 0x0CD184
- enemyhp_2 = 0x0CD2F4
- enemyhp_3 = 0x0CD464
- enemyhp_4 = 0x0CD5D4
- enemyhp_5 = 0x0CD744
- --gear based enemy HP locations
- gearenemyhp_1 = 0x0CD23C
- gearenemyhp_2 = 0x0CD3AC
- gearenemyhp_3 = 0x0CD51C
- gearenemyhp_4 = 0x0CD68C
- --group them up together
- enemies = {enemyhp_1, enemyhp_2, enemyhp_3, enemyhp_4, enemyhp_5,
- gearenemyhp_1, gearenemyhp_2, gearenemyhp_3, gearenemyhp_4}
- while true do
- --copy values from mem locs to local variables
- steps = memory.readwordsigned(free_steps)
- encounter = memory.readwordsigned(enc_steps)
- --toss battle screen enemy HP (plus gears) into a table (table-ception)
- ehp = {memory.readwordsigned(enemies[1]), memory.readwordsigned(enemies[2]),
- memory.readwordsigned(enemies[3]), memory.readwordsigned(enemies[4]),
- memory.readwordsigned(enemies[5]), memory.readwordsigned(enemies[6]),
- memory.readwordsigned(enemies[7]), memory.readwordsigned(enemies[8]),
- memory.readwordsigned(enemies[9])}
- --display steps
- --TODO:
- --figure out why some areas the encounters happen earlier
- -- if free steps doesn't change, area has no encounters**
- if encounter > 0 and encounter < 8384 then
- gui.text(4, 80, "Free steps: "..steps)
- gui.text(4, 90, "Steps till encounter: "..encounter)
- end
- --displaying enemy information
- --if encounter has been trigger (value of 8384 signed),
- --display the HPs of enemies
- ehp_x = 4 --x coord to display
- ehp_y = 120 --y coord
- e_num = 1 --Enemy #thisvalue
- --8384 is the value for battle initiated
- if encounter == 8384 then
- for k, v in pairs(ehp) do
- if v ~= 0 then gui.text(ehp_x, ehp_y, "Enemy "..e_num..": "..v) end
- ehp_y = ehp_y + 10
- e_num = e_num + 1
- end
- else
- ehp_y = 120
- e_num = 1
- end
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement