Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- -------------------------- --
- -- Final Fantasy V LUA script --
- -- --
- -- By: samurai goroh --
- -- -------------------------- --
- -- ------- --
- -- GLOBALS --
- -- ------- --
- wwidth = 256 -- window width
- wheight = 224 -- window height
- offsetX = 0 -- To move things in coord X
- offsetY = 0 -- To move things in coord Y
- gapX = 7 -- Text gap in coord X
- gapY = 7 -- Text gap in coord Y
- -- ------ --
- -- Tables --
- -- ------ --
- TableStatusCurable = { 'Darkness',
- 'Zombie',
- 'Poison',
- 'Float',
- 'Mini',
- 'Toad',
- 'Petrify',
- 'Dead'
- }
- TableStatusTemporary = { 'Image (x1)',
- 'Image (x2)',
- 'Mute',
- 'Berserk',
- 'Charm',
- 'Paralyze',
- 'Sleep',
- 'Aging'
- }
- TableStatusDispellable = { 'Regen',
- 'Invul',
- 'Slow',
- 'Haste',
- 'Stop',
- 'Shell',
- 'Armor',
- 'Wall'
- }
- TableStatusPermanent = { 'Hidden',
- 'Near Death',
- 'Singing',
- 'Hp Leak',
- 'Countdown',
- 'Controlled',
- 'False Image',
- 'Erased'
- }
- TableElement = { 'Fire',
- 'Ice',
- 'Lightning',
- 'Poison',
- 'Holy',
- 'Earth',
- 'Wind',
- 'Water'
- }
- TableCantEvade = { 'Blue',
- 'White',
- 'Black',
- 'Dimen',
- 'Summon',
- 'Song',
- 'Aerial',
- 'Physical'
- }
- TableCreature = { 'Undead',
- 'Archaetoad',
- 'Creature',
- 'Avis',
- 'Dragon',
- 'Heavy',
- 'Desert',
- 'Human'
- }
- TableAttackFormula = { 'No effect',
- 'Monster Attack',
- 'Monster Specialty',
- 'Magic Sword - Type 1',
- 'Magic Sword - Type 2',
- 'Magic Sword - Type 3',
- 'Offensive Magic',
- 'Fractional HP based damage',
- 'Pierce Magic defense',
- 'Random Damage',
- 'Physical magic',
- 'Level based damage (+ Status?)',
- 'HP leak',
- 'HP drain',
- 'MP drain',
- 'HP to critical',
- 'Restore HP (Magic)',
- 'Restore full HP (Magic)',
- 'Status 0 infliction',
- 'Status 1 infliction',
- 'Status 2 infliction',
- 'Toggle Status',
- 'Speed Status(Exclusive)',
- 'Instant death',
- 'Instant destroy',
- 'Status removal',
- 'Resurrection(fractional)',
- 'Whispering Wind',
- 'Element attribute change',
- 'View stats',
- 'Drag',
- 'Void',
- 'End battle',
- 'Reset battle',
- 'Double commands',
- 'Earth Wall',
- 'Restore HP (Item)',
- 'Restore MP (Item)',
- 'Restore HP / MP',
- 'Inflict status, ignore immunity',
- 'Fixed damage, ignore defense',
- 'Countdown destroy',
- 'Max HP based damage + HP leak',
- 'Current user HP based damage',
- 'Random effect',
- 'Ground attacks',
- "Reaper's Sword",
- '?',
- 'Unarmed',
- 'Swords',
- 'Knives',
- 'Spears',
- 'Axes , Staves',
- 'Bows (Status effect)',
- 'Bows (Elemental)',
- 'Katanas',
- 'Whips',
- 'Bells',
- 'Long reach axes',
- 'Rods',
- 'Rune weapons',
- 'Reduce HP to critical + Status',
- 'Reduce HP to critical or HP Leak',
- 'Zombie Breath',
- 'Change Row',
- '?',
- 'HP and status restored',
- '!Steal (command)',
- 'Escape (enemy)',
- '!Throw (command)',
- '!GilToss (command)',
- '!Tame (command)',
- '!Catch (command)',
- 'Flirt',
- '!Dance(Command)',
- 'Lv5 Doom',
- 'Lv2 Old',
- 'Lv4 Quarter',
- 'Lv3 Flare',
- 'Revive + Status',
- 'Goblin Punch',
- 'Level/Defense modifier',
- 'HP Leak + Status',
- 'Current MP damage',
- 'Max - Current HP damage',
- 'Kill Caster, Heal Raget',
- '?',
- 'HP Leak + Status',
- 'Flare damage + HP Leak + Status',
- 'HP boost',
- 'Heal HP based on current suser HP',
- '?',
- 'Full Heal + Status',
- 'Zombie magic',
- 'Increase stats while Singing',
- 'Damage creature type while Singing',
- 'Unhide Monster',
- 'Stalker Attack',
- 'Unhide Next Page',
- 'Grand Cross',
- 'Chicken Knife',
- 'Interceptor Rocket',
- 'Targeting',
- 'Pull',
- 'Terminate',
- '!Control (command)',
- "? (Sandworm's Death)",
- 'Status Immunity, Magic Element UP, Creature Type',
- 'Strong vs. Creature type',
- 'Drain HP based on current HP',
- 'Brave Blade',
- 'Strong Fight',
- 'Wormhole',
- 'Level Down',
- 'Bows strong vs. Creature type',
- 'Spears Strong vs. Creature type',
- 'Unhide Monster',
- 'Terminate',
- '?',
- '?',
- '?',
- '?',
- '?',
- '?',
- '?',
- '?',
- 'Innefective',
- 'No Action'
- }
- TableCharacter = { 'Butz',
- 'Lenna',
- 'Galuf',
- 'Faris',
- 'Cara',
- '',
- '',
- ''
- }
- TableJob = { 'Knight',
- 'Monk',
- 'Thief',
- 'Dragoon',
- 'Ninja',
- 'Samurai',
- 'Berserker',
- 'Ranger',
- 'Mystic Knight',
- 'White Mage',
- 'Black Mage',
- 'Time Mage',
- 'Summoner',
- 'Blue Mage',
- 'Red Mage',
- 'Beastmaster',
- 'Chemist',
- 'Geomancer',
- 'Bard',
- 'Dancer',
- 'Mimic',
- 'Freelancer'
- }
- TableBattleground = { 'Plain',
- 'Forest',
- 'Desert',
- 'Swamp',
- 'Beach',
- 'Indoor Ghost Ship',
- 'Cave',
- 'Water',
- 'Castle',
- 'Outdoor Castle',
- 'Castle 2',
- 'Castle 3',
- 'Outdoor Castle 2',
- 'Library',
- 'Indoor Ship',
- 'Forest 2',
- 'Plain 2',
- 'Castle 4',
- 'Pier',
- 'Tree Root',
- 'Castle 5',
- 'Outdoor Ship',
- 'Steel Floor',
- 'Crystal Floor',
- 'Indoor Ruins',
- 'Outdoor Ghost Ship',
- 'Castle in Fire',
- 'Wall',
- 'Space',
- 'Underwater Castle',
- 'Desert 2',
- 'Distorted Space',
- 'Outdoor Castle 3',
- 'Wet Plains'
- }
- TableEnemy = { 'Goblin',
- 'Killer Bee',
- 'Nut Eater',
- 'Stray Cat',
- 'Steel Bat',
- 'Dearo',
- 'Stroper',
- 'Black Goblin',
- 'White Snake',
- 'Mold Wind',
- 'ManiWizard',
- 'Magic Pot',
- 'Sucker',
- 'Octoraken',
- 'Gatlings',
- 'Bighorn',
- 'Tatu',
- 'Bander S.',
- 'Galura',
- 'Skeleton',
- 'Carcurser',
- 'UndeadRusk',
- 'PsychoHead',
- 'RockGarter',
- 'Gala Cat',
- 'Cockatrice',
- 'Blocks',
- 'Elf Toad',
- 'IceSoldier',
- 'RikaldMage',
- 'Wyvern',
- 'Padosule',
- 'Byblos',
- 'Aegil',
- 'Zuu',
- 'Wild Nack',
- 'GrassTurtle',
- 'Silent Bee',
- 'Mithril Drgn',
- 'Ramuh',
- 'Crew Dust',
- 'Poltergeist',
- 'Motor Trap',
- 'Defeater',
- 'Garkimasra',
- 'Sergeant',
- 'Sorcerer',
- 'Karnak',
- 'Gigas',
- 'Page 32',
- 'Page 64',
- 'Page 128',
- 'Page 256',
- 'Ifrit',
- 'Bomb',
- 'TwinLizard',
- 'BioSoldier',
- 'Crescent',
- 'BlackFlame',
- 'StoneGolem',
- 'MiniDragon',
- 'Prototype',
- 'D.Chimera',
- 'Sand Porky',
- 'Sand Killer',
- 'Sand Bear',
- 'Ra Mage',
- 'LonkaKnght',
- 'StonedMask',
- 'Whirl Demon',
- 'Lamia',
- 'ArchaeToad',
- 'Hyudora',
- 'Hydra',
- 'Water Buzz',
- 'Torrent',
- 'Rock Brain',
- 'Tarantula',
- 'Jail Bear',
- 'Lunenta',
- 'Dilure',
- 'Faery Orc',
- 'Devourer',
- 'Mandrake',
- 'Kuzar',
- 'Cactus',
- 'Sand Crawl',
- 'ShieldDrgn',
- 'Blood Slime',
- 'Acrophese',
- 'MooglEater',
- 'Lopros',
- 'Skull Eater',
- 'Aquathone',
- 'Weresnake',
- 'Conago',
- 'Ridicule',
- 'Andagranda',
- 'Drippy',
- 'Likaon',
- 'BoneDragon',
- 'Sting Eagle',
- 'ZombieDrgn',
- 'Golem',
- 'Neon',
- 'Magnetes',
- 'Wall Knight',
- 'Traveler',
- 'Tricker',
- 'Gravido',
- 'Ziggurat',
- 'Cure Beast',
- 'Land Turtle',
- 'Bold Mani',
- 'Shoat',
- 'MiniMage',
- 'GajraGajri',
- 'Mammon',
- 'Imp',
- 'Wyrm',
- 'Twin Lizard',
- 'Blind Wolf',
- 'Arage',
- 'Wall Mage',
- 'Magic Drgn',
- 'DarkWizard',
- 'AdamaGolem',
- 'BalderKuar',
- 'Motodrive',
- 'BlueDragon',
- 'Red Dragon',
- 'Yellow Drgn',
- 'Sleepy',
- 'Treeman',
- 'Hedgehog',
- 'Python',
- 'Shadow',
- 'Elm Gigas',
- 'Pao',
- 'Radiator',
- 'Metamorpha',
- 'Unknown',
- 'Desertpede',
- 'Barette',
- 'Sekmet',
- 'BlandLamia',
- 'Pyra Layer',
- 'Nile',
- 'Archaesaur',
- 'ZephyrZone',
- 'ExdethSoul',
- 'Slug',
- 'GloomWidow',
- 'Mukare',
- 'Ixecrator',
- 'Owazoral',
- 'ShdwDancer',
- 'Cursed one',
- 'Slownin',
- 'TinyMage',
- 'Dim Master',
- 'Bone Dragon',
- 'Flare',
- 'DuelKnight',
- 'Ion',
- 'Berserker',
- 'Zombie Dragon',
- 'Druid',
- 'Iron Dress',
- 'Statue',
- 'Blizzard',
- 'Isteritos',
- 'Spizner',
- 'Unknown',
- 'Unknown',
- 'Unknown',
- 'Unknown',
- 'Mercury Bat',
- 'Coral',
- 'Tonberi',
- 'Gel Water',
- 'Fall Guard',
- 'Alcumia',
- 'Red Dragon (Alcumia)',
- 'Hydra (Alcumia)',
- 'BoneDragon (Alcumia)',
- 'Grenade',
- 'Sword Dancer',
- 'Bardandels',
- 'Doom Dealer',
- 'Anku Heggu',
- 'Ammona',
- 'Land Crawl',
- 'Chamcubia',
- 'Bella Donna',
- 'Cherie',
- 'White Flame',
- 'MossFungus',
- 'Orcat',
- 'Iron Gigas',
- 'Death Claw',
- 'K.Behemoth',
- 'Fanfarerro',
- 'Necromancr',
- 'Ninja',
- 'Great Drgn',
- 'AvisDragon',
- 'Gorchimera',
- 'LevelCheck',
- 'Mind Mage',
- 'Fury',
- 'Thing',
- 'Mover',
- 'CrysDragon',
- 'Achelone',
- 'Bodyguard',
- 'Gilgamesh (Void)',
- 'Sahagin',
- 'Th.Anemone',
- 'Sea Avis',
- 'Corvette',
- 'Armon',
- 'SeaScorpio',
- 'Silvune',
- 'Gel Fish',
- 'Giant Bird',
- 'Sea Devil',
- 'Stingray',
- '???? (Golem)',
- 'Golem',
- 'Chimera',
- 'Shiva (Metamorpha)',
- 'Ifrit (Metamorpha)',
- 'Ramuh (Metamorpha)',
- 'Gala Cat (Metamorpha)',
- 'Wyvern (Metamorpha)',
- 'Elf Toad (Metamorpha)',
- 'Crew Dust (Metamorpha)',
- 'Whirl Demon (Metamorpha)',
- 'ZombieDrgn (Metamorpha)',
- 'D.Chimera (Zephyr Zone)',
- 'AdamaGolem (Zephyr Zone)',
- 'Ziggurat (Zephyr Zone)',
- 'LonkaKnght (Zephyr Zone)',
- 'BioSoldier (Zephyr Zone)',
- 'Lunenta (Zephyr Zone)',
- 'Tote Avis',
- 'Belfegor',
- 'Imp (Exdeath Castle)',
- 'Owazoral (Exdeath Castle)',
- 'Garkimasra (Exdeath Castle)',
- 'Gabbledegak',
- 'Gil Turtle',
- 'Omega',
- 'Big Boss',
- 'None',
- 'WingRaptor (1st Form)',
- 'WingRaptor (2nd Form)',
- 'Karlaboss',
- 'Twin Tania (2nd form)',
- 'Siren (1st Form)',
- 'Siren (2nd Form)',
- 'Forza',
- 'Magisa',
- 'Galura',
- 'LiquiFlame (Human)',
- 'LiquiFlame (Hand)',
- 'LiquiFlame (Whirlwind)',
- 'Commander',
- 'Sandworm',
- 'Hole (Sandworm)',
- '____ (Sandworm)',
- 'AdamanTiMi',
- 'FlameGun',
- 'Rocket',
- 'Exdeath (Final Battle)',
- 'Sol Cannon',
- 'Archaeavis (1st Form)',
- 'Archaeavis (2nd Form)',
- 'Archaeavis (3rd Form)',
- 'Archaeavis (4th Form)',
- 'Archaeavis (Undead)',
- 'Chim.Brain',
- 'Titan',
- 'Puroboros',
- 'Abductor (Butz Battle)',
- 'Gilgamesh (Dungeon)',
- 'Fishman',
- 'FlyingKillr',
- "Lil'Chariot",
- 'NeoGalura',
- 'Gilgamesh (Bridge)',
- 'Tyrasaurus',
- 'Shiva',
- 'Abductor (Val Castle)',
- 'HiryuuPlant',
- 'HiryuuFlowr (1)',
- 'HiryuuFlowr (2)',
- 'HiryuuFlowr (3)',
- 'HiryuuFlowr (4)',
- 'HiryuuFlowr (5)',
- "Gilgamesh (Zeza's Fleet)",
- 'Enkidou',
- 'Atmos',
- '(Seal Guardian - Fire)',
- '(Seal Guardian - Earth)',
- '(Seal Guardian - Water)',
- '(Seal Guardian - Air)',
- 'Carbunkle ()',
- 'Merugene (*Demo)',
- 'Gilgamesh (Morphed - Exdeath Castle)',
- 'Exdeath (Exdeath Castle)',
- 'Antlion',
- 'Mummy',
- 'Aspis',
- 'MachinHead',
- 'Merugene (Form 1)',
- 'Merugene (Form 2)',
- 'Merugene (Form 3)',
- 'Merugene (Form 4)',
- 'Odin',
- 'Gargoyle',
- 'Triton',
- 'Neregeid',
- 'Phobos',
- 'Omniscient',
- 'Minotauros',
- 'Leviathan',
- 'Stalker',
- 'Gogo',
- 'Bahamut',
- 'Jura Avis',
- 'Halicarnaso',
- 'Exdeath (vs Galuf)',
- 'NeoExdeath (Fake 1)',
- 'NeoExdeath (Fake 2)',
- 'Goblin (Butz Fight)',
- 'Iron Claw',
- 'Sergeant ()',
- 'Karnak ()',
- 'Crayclaw',
- 'NeoGoblin',
- 'Calofisteri',
- 'Apocalypse',
- 'Catastroph',
- 'Necrofobia',
- 'Twin Tania (1st form)',
- 'Launcher',
- 'Launcher',
- 'Gigamesh (Exdeath Castle)',
- 'Carbunkle ()',
- 'GrandMummy',
- 'Apanda',
- 'Alte Roite',
- 'Invisible',
- 'Abductor (Exdeath Castle)',
- 'BandelKuar (Phoenix Tower)',
- 'LiquiFlame (Phoenix Tower)',
- 'Kuzar (Phoenix Tower)',
- 'Sol Cannon (Phoenix Tower)',
- 'Pantera',
- 'Shinryuu',
- 'Barrier',
- 'Neo Exdeath (Part 1)',
- 'Neo Exdeath (Part 2)',
- 'Neo Exdeath (Part 3)',
- 'Neo Exdeath (Part 4)',
- 'Gilgamesh (Necrofobia)',
- }
- function BitOn(number, size) -- Determine which bits are 1's
- local bit = {}
- local pos = 0
- for i=1, size do
- bit[i] = 0
- end
- while number > 0 do
- pos = pos+1
- if number % 2 == 1 then
- bit[pos] = 1
- end
- number = math.floor(number / 2)
- end
- return bit
- end
- function drawEmptyBox(X, Y, Width, Height, Color) -- Paints an empty box unlike "gui.drawbox"
- local x0 = X
- local y0 = Y
- local x1 = X+Width
- local y1 = Y+Height
- gui.drawline( x0,y0, x1,y0, Color)
- gui.drawline( x1,y0, x1,y1, Color)
- gui.drawline( x1,y1, x0,y1, Color)
- gui.drawline( x0,y1, x0,y0, Color)
- end
- function EnemyInfo(Enemy) -- Table with the parameters of monsters
- local enemy = Enemy - 1
- local enemyinfo = {}
- enemyinfo = {
- Name = memory.readword(0x7E4008 + enemy*(0x02)) ,
- --Type = memory.readword(0x7E4038 + enemy*(0x04)) ,
- Level = memory.readbyte(0x7E2202 + enemy*(0x80)) ,
- CurrentHp = memory.readword(0x7E2206 + enemy*(0x80)) ,
- TotalHp = memory.readword(0x7E2208 + enemy*(0x80)) ,
- CurrentMp = memory.readword(0x7E220A + enemy*(0x80)) ,
- TotalMp = memory.readword(0x7E220C + enemy*(0x80)) ,
- StatusC = memory.readbyte(0x7E221A + enemy*(0x80)) ,
- StatusT = memory.readbyte(0x7E221B + enemy*(0x80)) ,
- StatusD = memory.readbyte(0x7E221C + enemy*(0x80)) ,
- StatusP = memory.readbyte(0x7E221D + enemy*(0x80)) ,
- --MagicPower = memory.readbyte(0x7E2227 + enemy*(0x80)) ,
- --MagicPower = memory.readbyte(0x7E222B + enemy*(0x80)) ,
- Evade = memory.readbyte(0x7E222C + enemy*(0x80)) ,
- Defense = memory.readbyte(0x7E222D + enemy*(0x80)) ,
- MagicEvade = memory.readbyte(0x7E222E + enemy*(0x80)) ,
- MagicDefense = memory.readbyte(0x7E222F + enemy*(0x80)) ,
- ElementAbsorb = memory.readbyte(0x7E2230 + enemy*(0x80)) ,
- ElementWeakness = memory.readbyte(0x7E2231 + enemy*(0x80)) ,
- ElementImmune = memory.readbyte(0x7E2232 + enemy*(0x80)) ,
- StatusImmunity1 = memory.readbyte(0x7E2235 + enemy*(0x80)) ,
- StatusImmunity2 = memory.readbyte(0x7E2236 + enemy*(0x80)) ,
- StatusImmunity3 = memory.readbyte(0x7E2237 + enemy*(0x80)) ,
- Attack = memory.readbyte(0x7E2244 + enemy*(0x80)) ,
- AttackMult = memory.readbyte(0x7E2262 + enemy*(0x80)) ,
- CantEvade = memory.readbyte(0x7E2264 + enemy*(0x80)) ,
- Type = memory.readbyte(0x7E2265 + enemy*(0x80)) ,
- CommandImmunity = memory.readbyte(0x7E2266 + enemy*(0x80)) ,
- Experience = memory.readword(0x7E2267 + enemy*(0x80)) ,
- Gil = memory.readword(0x7E2269 + enemy*(0x80)) ,
- InitialStatus1 = memory.readbyte(0x7E2270 + enemy*(0x80)) ,
- InitialStatus2 = memory.readbyte(0x7E2271 + enemy*(0x80)) ,
- InitialStatus3 = memory.readbyte(0x7E2272 + enemy*(0x80)) ,
- InitialStatus4 = memory.readbyte(0x7E2273 + enemy*(0x80)) ,
- AttackGauge = memory.readbyte(0x7E3DAB + enemy*(0x0B)) ,
- Position = memory.readbyte(0x7E4000 + enemy*(0x01)) ,
- PositionY = memory.readbyte(0x7E4000 + enemy*(0x01)) % 16 , -- low nibble
- PositionX = math.floor( memory.readbyte(0x7E4000 + enemy*(0x01)) / 16 ) , -- high nibble
- }
- return enemyinfo
- end
- function CharacterInfo(Character) -- Table with the parameters of allies
- local character = Character - 1
- local characterinfo = {}
- characterinfo = {
- Character = memory.readbyte(0x7E2000 + character*(0x80)) ,
- Job = memory.readbyte(0x7E0501 + character*(0x50)) ,
- Level = memory.readbyte(0x7E2002 + character*(0x80)) ,
- CurrentHp = memory.readword(0x7E2006 + character*(0x80)) ,
- TotalHp = memory.readword(0x7E2008 + character*(0x80)) ,
- CurrentMp = memory.readword(0x7E200A + character*(0x80)) ,
- TotalMp = memory.readword(0x7E200C + character*(0x80))
- }
- return characterinfo
- end
- while true do -- Idle loop. Prevents pre-lua pause state
- local character = {} -- Holds the character's information
- local NoCharacters = 4 -- Number of characters in a battle
- local enemy = {} -- Holds the enemy's information
- local NoEnemies = 8 -- Number of enemies in a battle
- local visible = {} -- Determines if an enemy is visible
- local DisplayBattleInfo = true -- Display Battle Information
- local boxwidth = 60 -- Enemy's ATB box width
- local timer = 0 -- In-game clock timer
- if DisplayBattleInfo then
- -- Draws character's Box
- gui.transparency(0) -- Have no transparency
- drawEmptyBox( 104, 159, 143, 55, 'white')
- gui.transparency(1) -- Have small transparency
- gui.drawbox ( 105, 160, 246, 213, 'blue')
- -- Draws enemy's Box
- gui.transparency(0) -- Have no transparency
- drawEmptyBox( 9, 159, 94, 55, 'white')
- gui.transparency(1) -- Have small transparency
- gui.drawbox ( 10, 160, 102, 213, 'blue')
- end
- -- Determine which enemies are hidden or visible
- visible = BitOn( memory.readbyte(0x7E3EF2), 8)
- for i=1,NoEnemies do
- -- Populate the enemy's information
- enemy[i] = EnemyInfo(i)
- -- Display the enemy's information
- -- Need to find a way to hide info when running away from battle
- if DisplayBattleInfo and enemy[i].CurrentHp > 0 and visible[9-i] == 1 then
- -- HP
- gui.text ( offsetX + 10*(enemy[i].PositionX) ,
- offsetY + 10*(enemy[i].PositionY) + 0*(gapY),
- i .. ') HP: ' .. enemy[i].CurrentHp .. '/' .. enemy[i].TotalHp )
- gui.transparency(1)
- -- Attack Gauge (painted)
- gui.drawbox( offsetX + 10*(enemy[i].PositionX),
- offsetY + 10*(enemy[i].PositionY) + 1*(gapY),
- offsetX + 10*(enemy[i].PositionX) + boxwidth,
- offsetY + 10*(enemy[i].PositionY) + 1*(gapY) + 4,
- 'blue')
- gui.drawbox( offsetX + 10*(enemy[i].PositionX) + boxwidth*(enemy[i].AttackGauge / 128),
- offsetY + 10*(enemy[i].PositionY) + 1*(gapY),
- offsetX + 10*(enemy[i].PositionX) + boxwidth,
- offsetY + 10*(enemy[i].PositionY) + 1*(gapY) + 4,
- 'black')
- end
- end
- for i=1,NoCharacters do
- gui.transparency(0) -- Have no transparency
- -- Populate the character's information
- character[i] = CharacterInfo(i)
- -- Display the character's information
- if DisplayBattleInfo then
- if math.floor(character[i].Character / 0x40) % 2 == 0 then -- Display only info of current party
- gui.text ( 108,
- 154 + 12*i,
- TableCharacter[(character[i].Character) % 8 + 1] .. ' - ' .. TableJob[(character[i].Job)+1]
- )
- gui.transparency(1) -- Have small transparency
- gui.text ( 205,
- 47 + 24*i,
- 'HP: ' .. character[i].CurrentHp .. '/' .. character[i].TotalHp
- )
- gui.text ( 205,
- 54 + 24*i,
- 'MP: ' .. character[i].CurrentMp .. '/' .. character[i].TotalMp
- )
- end
- end
- end
- gui.transparency(0) -- Have no transparency
- -- In-game clock timer
- gui.text ( offsetX + 225,
- offsetY + 0*(gapY),
- memory.readdword(0x7E094A) )
- -- In-game event timer
- gui.text ( offsetX + 225,
- offsetY + 1*(gapY),
- memory.readword(0x7E0AFC) )
- -- # of steps in world map
- gui.text ( offsetX + 225,
- offsetY + 2*(gapY),
- memory.readbyte(0x7E16A9) )
- -- Coordinates
- gui.text ( offsetX + 225,
- offsetY + 3*(gapY),
- memory.readbyte(0x7E0AD8) .. ', ' .. memory.readbyte(0x7E0AD9))
- -- # of battles
- gui.text ( offsetX + 225,
- offsetY + 4*(gapY),
- memory.readbyte(0x7E09C0) )
- snes9x.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement