User File #11701350473850088

Upload All User Files

#11701350473850088 (unlisted) - NES Zelda: Enemy Information

The Legend of Zelda - EnemyInformation.lua
809 downloads
Uploaded 12/31/2013 10:55 PM by TASeditor (see all 188)
Draw=function()

	Nothing=function()
		gui.text(0,0,"");
	end;

	for i = 0, 10, 1 do
		EnemyX=memory.readbyte(0x0071+i);
		EnemyY=memory.readbyte(0x0085+i);
		EnemyEnergy=memory.readbyte(0x0486+i);
		EnemyRNG=memory.readbyte(0x0413+i);
		E=i+1;
		
		if EnemyEnergy>0 
		then gui.text(EnemyX, EnemyY, "" .. EnemyEnergy );
			 gui.text(EnemyX, EnemyY-8, "E" .. E .. ":" .. EnemyRNG);
		else Nothing();
		end;
	end;
	
	EPRNG=memory.readbyte(0x052A);

gui.text(0,8,"A:"); gui.text(64,8,"B:"); gui.text(128,8,"C:"); gui.text(192,8,"D:");

gui.text(80,16,"EPRNG=" .. EPRNG);

if EPRNG == 0
	then gui.text(10,8,"Rupee"); gui.text(74,8,"Bombs"); gui.text(138,8,"Rupee"); gui.text(202,8,"Heart");
elseif EPRNG == 1
	then gui.text(10,8,"Heart"); gui.text(74,8,"Rupee"); gui.text(138,8,"Heart"); gui.text(202,8,"Fairy");
elseif EPRNG == 2
	then gui.text(10,8,"Rupee"); gui.text(74,8,"Clock"); gui.text(138,8,"Rupee"); gui.text(202,8,"Rupee");
elseif EPRNG == 3
	then gui.text(10,8,"Fairy"); gui.text(74,8,"Rupee"); gui.text(138,8,"5 Rupees"); gui.text(202,8,"Heart");
elseif EPRNG == 4
	then gui.text(10,8,"Rupee"); gui.text(74,8,"Heart"); gui.text(138,8,"Heart"); gui.text(202,8,"Fairy");
elseif EPRNG == 5
	then gui.text(10,8,"Heart"); gui.text(74,8,"Bombs"); gui.text(138,8,"Clock"); gui.text(202,8,"Heart");
elseif EPRNG == 6
	then gui.text(10,8,"Heart"); gui.text(74,8,"Rupee"); gui.text(138,8,"Rupee"); gui.text(202,8,"Heart");
elseif EPRNG == 7
	then gui.text(10,8,"Rupee"); gui.text(74,8,"Bombs"); gui.text(138,8,"Rupee"); gui.text(202,8,"Heart");
elseif EPRNG == 8
	then gui.text(10,8,"Rupee"); gui.text(74,8,"Heart"); gui.text(138,8,"Rupee"); gui.text(202,8,"Rupee");
elseif EPRNG == 9
	then gui.text(10,8,"Heart"); gui.text(74,8,"Heart"); gui.text(138,8,"5 Rupees"); gui.text(202,8,"Heart");
else gui.text(10,8,""); gui.text(74,8,""); gui.text(138,8,""); gui.text(202,8,"");
end;


GIRNG=memory.readbyte(0x0050);

if GIRNG == 10
then gui.text(128,16,"Fairy, Bombs or 5 Rupees")
else gui.text(128,16,"No good item; GIRNG=" .. GIRNG)
end;
	
	

end;

gui.register(Draw);