The Wiki for Tale 4 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:Asnath/Boards

From A Tale in the Desert
Jump to navigationJump to search
// This macro is intended for AC Tools
// Macro will ask for Number of Woodplane you want to use, and quantity of wood to use.
// Please compute exact qte of wood, cause I did not round up figures.
// Please close chat tab before starting.
// It should work on any screen resolution / view / zoom, as long as you can see and reach all carpentry shops from where you are.
// Macro does not change blades when broken but will when I'll find time to do it.

constants
  Nbplanche = 0
  Nbplan = 0
  MouseCoordX = 0
  MouseCoordY = 0
  NbofWoodplane = 6
  QtofWood = 60
  Scrwidth=0
  Nbtime = 0
  I=1
  x=0
  y=0
  totalloop=0
end

Form Plan, Settings
  ed1=Editbox:Nombre de plans de bois:2
  ed2=Editbox:Nombre de planches:2
END

Constructs 
  ListeX=List
  ListeY=List
  OEOffset=List
  File1=File
  File2=File
end

FormLoad Plan, Plan.frm

if ShowForm Plan
  Set Nbplan = Plan[ed1]
  Set Nbplanche = Plan[ed2]
  Set totalloop=0
else
  stop
end

FormSave Plan, Plan.frm

SetActiveWindow eGenesis Client
Delay 500

FileOpen File1, c:\coordx.txt
Fileopen File2, C:\coordy.txt

FileRewrite File1
FileRewrite File2

Loop $nbplan
  Delay 3500
  FileAppend File1
	FileAppend File2
	Setconst x={MouseX}
	Setconst y={MouseY}
	FileWrite File1,$x
	FileWrite File2,$y
	Compute totalloop=$totalloop+1
	keys {RETURN}
	If $totalloop<$nbplan
  	  Say Place mouse on next plane
	Else	
	  Say Thanks, do not touch anything anymore
	End
END		
keys {RETURN}

FileClose File1
FileClose File2

Compute Nbtime = $Nbplanche/$Nbplan

ListLoad ListeX, c:\coordX.txt
ListLoad ListeY, c:\coordY.txt

Loop $nbtime
	Call Cutboard
	Setconst I=1
End
//-------------------------------------------------

Procedure Cutboard
	Loop $Nbplan
		Setconst MousecoordX = 	ListeX[$I]
		Setconst MousecoordY = 	ListeY[$I]
		Mousepos $MouseCoordx,$MouseCoordY
		Delay 100
		Keys p
		Delay 1200
		Compute I=$I+1
	End
End
//--------------------------------------------------