The Wiki for Tale 7 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:Soak/Macro

From ATITD7
Jump to navigationJump to search

Automato Macros


Firepit V1.2

- The way the macro works is by checking the colors at your mouse position when starting macro, and stoking the flame when colors are correct.

- pin the firepit for macro to stoke.

- only works for 1 firepit

- uses img to stoke

- save as lua

- this is the img I use Stoke2.png ,save the image under automao>games>ATITD>images

- roughly these spot should work when grabbing mosue locations, the macro will wait 4 seconds grab the mouse location and do it 3 times total these are the spots I roughly use and have success the trick is to grab 3 different points on the flame

[[1]]


dofile("common.inc");
-- firepit macro by soak
-- light the firepit and put mouse over the flame
-- when firepit is at 255,255,255 color will stoke the flame using hotkeys
function doit()
 strokes = 0;
 strokeColor = 0xFFFFFF;
 strokeOffset = makePoint(0, 0);
  askForWindow(" Start the firepit and keep mouse over the firepit, the macro only checks at your mouse position. Press shift over ATITD window to continue. Macro by Soak");
 
 
  sleepWithStatus(4000, "getting mouse spot 1 " .. strokes);
  mouseLoc1 = getMousePos();
  sleepWithStatus(4000, "getting mouse spot 2 " .. strokes);
  mouseLoc2 = getMousePos();
  sleepWithStatus(4000, "getting mouse spot 3 " .. strokes);
  mouseLoc3 = getMousePos();
  
  while true do
  
    srReadScreen();
	
	local stokeTime = pixelMatch(mouseLoc1, strokeOffset, strokeColor, 5);
	
	local stokeTime2 = pixelMatch(mouseLoc2, strokeOffset, strokeColor, 5);
	
	local stokeTime3 = pixelMatch(mouseLoc3, strokeOffset, strokeColor, 5);
	
    local pixels = pixelDiffs(mouseLoc1[0], mouseLoc1[1], 0);
	local pixels2 = pixelDiffs(mouseLoc2[0], mouseLoc2[1], 0);
	local pixels3 = pixelDiffs(mouseLoc3[0], mouseLoc3[1], 0);
    local status = "Pos: (" .. mouseLoc1[0] .. ", " .. mouseLoc1[1] .. ")\n";
	 status = status .. "Pos2: (" .. mouseLoc2[0] .. ", " .. mouseLoc2[1] .. ")\n";
	 status = status .. "Pos3: (" .. mouseLoc3[0] .. ", " .. mouseLoc3[1] .. ")\n";
    status = status .. "Color: " .. table.concat(pixels, ", ");
	status = status .. "\nColor2: " .. table.concat(pixels2, ", ");
	status = status .. "\nColor3: " .. table.concat(pixels3, ", ");
	status = status .. "\nTotal Stoke: " .. strokes ;
	

	
	if stokeTime and stokeTime2 and stokeTime3 then
		clickAllImages("This.png"); -- update the firepit UI
		sleepWithStatus(150, "refrshing UI");
		clickAllImages("stoke2.png"); -- clicking the stoke option
		sleepWithStatus(500, "clicking");
		strokes = strokes +  1;
		sleepWithStatus(32000, "Found 255, stokes " .. strokes);
	 end			
		
 sleepWithStatus(150, status);

    
  end
end