Hello friends,
I did a Lua-script, which shows information about the enemies above them. The information move with the enemies movement.
--The Legend of Zelda - Enemy Information
--Written by TASeditor
--This script displays some information about the enemies in The Legend of Zelda.
--The informations are displayed above the enemies and move with them. It displays the RNG, the number of an enemy and their energy.
--It also shows hidden entrances, like burnable trees, moveable rocks and bombable walls.
--But there some issues with some kind of enemies.
require("auxlib")
local Enemy1XPosition=0x0071;
local Enemy1YPosition=0x0085;
local Enemy1Energy=0x0486;
local Enemy1RNG=0x0413;
local Enemy1X;
local Enemy1Y;
local Enemy1E;
local Enemy1R;
local Enemy2XPosition=0x0072;
local Enemy2YPosition=0x0086;
local Enemy2Energy=0x0487;
local Enemy2RNG=0x0414;
local Enemy2X;
local Enemy2Y;
local Enemy2E;
local Enemy2R;
local Enemy3XPosition=0x0073;
local Enemy3YPosition=0x0087;
local Enemy3Energy=0x0488;
local Enemy3RNG=0x0415;
local Enemy3X;
local Enemy3Y;
local Enemy3E;
local Enemy3R;
local Enemy4XPosition=0x0074;
local Enemy4YPosition=0x0088;
local Enemy4Energy=0x0489;
local Enemy4RNG=0x0416;
local Enemy4X;
local Enemy4Y;
local Enemy4E;
local Enemy4R;
local Enemy5XPosition=0x0075;
local Enemy5YPosition=0x0089;
local Enemy5Energy=0x048A;
local Enemy5RNG=0x0417;
local Enemy5X;
local Enemy5Y;
local Enemy5E;
local Enemy5R;
local Enemy6XPosition=0x0076;
local Enemy6YPosition=0x008A;
local Enemy6Energy=0x048B;
local Enemy6RNG=0x0418;
local Enemy6X;
local Enemy6Y;
local Enemy6E;
local Enemy6R;
local Enemy7XPosition=0x0077;
local Enemy7YPosition=0x008B;
local Enemy7Energy=0x048C;
local Enemy7RNG=0x0419;
local Enemy7X;
local Enemy7Y;
local Enemy7E;
local Enemy7R;
local Enemy8XPosition=0x0078;
local Enemy8YPosition=0x008C;
local Enemy8Energy=0x048D;
local Enemy8RNG=0x041A;
local Enemy8X;
local Enemy8Y;
local Enemy8E;
local Enemy8R;
local Enemy9XPosition=0x0079;
local Enemy9YPosition=0x008D;
local Enemy9Energy=0x048E;
local Enemy9RNG=0x041B;
local Enemy9X;
local Enemy9Y;
local Enemy9E;
local Enemy9R;
local Enemy10XPosition=0x007A;
local Enemy10YPosition=0x008E;
local Enemy10Energy=0x048F;
local Enemy10RNG=0x041C;
local Enemy10X;
local Enemy10Y;
local Enemy10E;
local Enemy10R;
local Enemy11XPosition=0x007B;
local Enemy11YPosition=0x008F;
local Enemy11Energy=0x0490;
local Enemy11RNG=0x041D;
local Enemy11X;
local Enemy11Y;
local Enemy11E;
local Enemy11R;
while (true) do
function Nothing() --This is used to undisplay the informations, when Link walks into another room.
gui.text(0,0,""); --Actually very pointless, but if it isn't there the information wont be undisplayed.
end;
Enemy1X=memory.readbyte(Enemy1XPosition);
Enemy1Y=memory.readbyte(Enemy1YPosition);
Enemy1E=memory.readbyte(Enemy1Energy);
Enemy1R=memory.readbyte(Enemy1RNG);
if Enemy1E>0 then
gui.text(Enemy1X,Enemy1Y,"" .. Enemy1E);
gui.text(Enemy1X,Enemy1Y - 8,Enemy1R .. ",E1");
else
Nothing();
end;
Enemy2X=memory.readbyte(Enemy2XPosition);
Enemy2Y=memory.readbyte(Enemy2YPosition);
Enemy2E=memory.readbyte(Enemy2Energy);
Enemy2R=memory.readbyte(Enemy2RNG);
if Enemy2E>0 then
gui.text(Enemy2X,Enemy2Y,"" .. Enemy2E);
gui.text(Enemy2X,Enemy2Y - 8,Enemy2R .. ",E2");
else
Nothing();
end;
Enemy3X=memory.readbyte(Enemy3XPosition);
Enemy3Y=memory.readbyte(Enemy3YPosition);
Enemy3E=memory.readbyte(Enemy3Energy);
Enemy3R=memory.readbyte(Enemy3RNG);
if Enemy3E>0 then
gui.text(Enemy3X,Enemy3Y,"" .. Enemy3E);
gui.text(Enemy3X,Enemy3Y - 8,Enemy3R .. ",E3");
else
Nothing();
end;
Enemy4X=memory.readbyte(Enemy4XPosition);
Enemy4Y=memory.readbyte(Enemy4YPosition);
Enemy4E=memory.readbyte(Enemy4Energy);
Enemy4R=memory.readbyte(Enemy4RNG);
if Enemy4E>0 then
gui.text(Enemy4X,Enemy4Y,"" .. Enemy4E);
gui.text(Enemy4X,Enemy4Y - 8,Enemy4R .. ",E4");
else
Nothing();
end;
Enemy5X=memory.readbyte(Enemy5XPosition);
Enemy5Y=memory.readbyte(Enemy5YPosition);
Enemy5E=memory.readbyte(Enemy5Energy);
Enemy5R=memory.readbyte(Enemy5RNG);
if Enemy5E>0 then
gui.text(Enemy5X,Enemy5Y,"" .. Enemy5E);
gui.text(Enemy5X,Enemy5Y - 8,Enemy5R .. ",E5");
else
Nothing();
end;
Enemy6X=memory.readbyte(Enemy6XPosition);
Enemy6Y=memory.readbyte(Enemy6YPosition);
Enemy6E=memory.readbyte(Enemy6Energy);
Enemy6R=memory.readbyte(Enemy6RNG);
if Enemy6E>0 then
gui.text(Enemy6X,Enemy6Y,"" .. Enemy6E);
gui.text(Enemy6X,Enemy6Y - 8,Enemy6R .. ",E6");
else
Nothing();
end;
Enemy7X=memory.readbyte(Enemy7XPosition);
Enemy7Y=memory.readbyte(Enemy7YPosition);
Enemy7E=memory.readbyte(Enemy7Energy);
Enemy7R=memory.readbyte(Enemy7RNG);
if Enemy7E>0 then
gui.text(Enemy7X,Enemy7Y,"" .. Enemy7E);
gui.text(Enemy7X,Enemy7Y - 8,Enemy7R .. ",E7");
else
Nothing();
end;
Enemy8X=memory.readbyte(Enemy8XPosition);
Enemy8Y=memory.readbyte(Enemy8YPosition);
Enemy8E=memory.readbyte(Enemy8Energy);
Enemy8R=memory.readbyte(Enemy8RNG);
if Enemy8E>0 then
gui.text(Enemy8X,Enemy8Y,"" .. Enemy8E);
gui.text(Enemy8X,Enemy8Y - 8,Enemy8R .. ",E8");
else
Nothing();
end;
Enemy9X=memory.readbyte(Enemy9XPosition);
Enemy9Y=memory.readbyte(Enemy9YPosition);
Enemy9E=memory.readbyte(Enemy9Energy);
Enemy9R=memory.readbyte(Enemy9RNG);
if Enemy9E>0 then
gui.text(Enemy9X,Enemy9Y,"" .. Enemy9E);
gui.text(Enemy9X,Enemy9Y - 8,Enemy9R .. ",E9");
else
Nothing();
end;
Enemy10X=memory.readbyte(Enemy10XPosition);
Enemy10Y=memory.readbyte(Enemy10YPosition);
Enemy10E=memory.readbyte(Enemy10Energy);
Enemy10R=memory.readbyte(Enemy10RNG);
if Enemy10E>0 then
gui.text(Enemy10X,Enemy10Y,"" .. Enemy10E);
gui.text(Enemy10X,Enemy10Y - 8,Enemy10R .. ",E10");
else
Nothing();
end;
Enemy11X=memory.readbyte(Enemy11XPosition);
Enemy11Y=memory.readbyte(Enemy11YPosition);
Enemy11E=memory.readbyte(Enemy11Energy);
Enemy11R=memory.readbyte(Enemy11RNG);
if Enemy11E>0 then
gui.text(Enemy11X,Enemy11Y,"" .. Enemy11E);
gui.text(Enemy11X,Enemy11Y - 8,Enemy11R .. ",E11");
else
Nothing();
end;
FCEU.frameadvance();
end;