The Wiki for Tale 8 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

User:Cegaiel/Macros

From A Wiki in the Desert
< User:Cegaiel
Revision as of 18:42, 30 March 2018 by Cegaiel (talk | contribs) (Created page with "LearnLessons.lua <pre> dofile("common.inc"); function doit() local done = false askForWindow("This will always click OK or Yes whenever found. Typical when someone is...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

LearnLessons.lua

dofile("common.inc");


function doit()
	local done = false
	


	askForWindow("This will always click OK or Yes whenever found. Typical when someone is teaching you lessons.") ;

	while not done	
	do
		sleepWithStatus(100, "Looking for Yes/OK");
		srReadScreen();

		local pos = srFindImage("yes3.png");
		if (pos) then
			safeClick(pos[0] + 1, pos[1] + 1);
sleepWithStatus(1000,"Found and clicked Yes!");
		end

		local pos2 = srFindImage("OK.png");
		if (pos2) then
			safeClick(pos2[0] + 1, pos2[1] + 1);
sleepWithStatus(1000,"Found and clicked OK!");

		end


lsSleep(200);


	end

end