The Wiki for Tale 5 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.

Difference between revisions of "Takhetu/Code"

From ATITD5
Jump to navigationJump to search
Line 1: Line 1:
 
<pre>
 
<pre>
IfWinExist eGenesis Client
+
MineRecord:
 +
MineNum++
 +
MouseGetPos, MineX%MineNum%, MineY%MineNum%
 +
Broke%MineNum% := False
 +
Matrix%MineNum% := GetMatrix(MineX%MineNum%-1,MineY%MineNum%-1,3)
 +
GuiControl, Text, MineNumText, %MineNum% crystals captured
 +
return
 +
</pre>
 +
 
 +
<pre>
 +
ThirdStone := SecondStone+A_Index
 +
 
 +
 
 +
 
 +
;check for broken
 +
Stone1 := FindMatrix(MineX%FirstStone%-1,MineX%FirstStone%+1,MineY%FirstStone%-1,MineY%FirstStone%+1,3,Matrix%FirstStone%)
 +
Stone2 := FindMatrix(MineX%SecondStone%-1,MineX%SecondStone%+1,MineY%SecondStone%-1,MineY%SecondStone%+1,3,Matrix%SecondStone%)
 +
Stone3 := FindMatrix(MineX%ThirdStone%-1,MineX%ThirdStone%+1,MineY%ThirdStone%-1,MineY%ThirdStone%+1,3,Matrix%ThirdStone%)
 +
AllThere := True
 +
If (Stone1=0)
 
{
 
{
WinGet, GameWinHandle, ID, eGenesis Client
+
Broke%FirstStone% := True
} else {
+
AllThere := False
Msgbox, eGenesis client not running, exiting...
+
}
Exit
+
If (Stone2=0)
 +
{
 +
Broke%SecondStone% := True
 +
AllThere := False
 +
}
 +
If (Stone3=0)
 +
{
 +
Broke%ThirdStone% := True
 +
AllThere := False
 
}
 
}
;~ Info
 
WinActivate, eGenesis Client
 
WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos
 
  
;Imagesearch, PlantX, PlantY, 0,0,150,150,Flax.png
+
If (AllThere=True)
PlantX :=18
 
PlantY :=43
 
 
 
loop,
 
 
{
 
{
sleep, 5000
+
MouseMove, MineX%FirstStone%, MineY%FirstStone%
 +
;Msgbox, FirstStone: MineX%FirstStone%, MineY%FirstStone%
 +
Sleep %Delay%
 +
Send {A}
 +
Sleep %Delay%
 +
MouseMove, MineX%SecondStone%, MineY%SecondStone%
 +
;Msgbox, SecondStone: MineX%SecondStone%, MineY%SecondStone%
 +
Sleep %Delay%
 +
Send {A}
 +
Sleep %Delay%
 +
MouseMove, MineX%Thirdstone%, MineY%Thirdstone%
 +
;Msgbox, ThirdStone: MineX%Thirdstone%, MineY%Thirdstone%
 +
Sleep %Delay%
 +
Send {A}
 +
Sleep %Delay%
 +
Send {S}
 +
Sleep %Delay%
 +
Gosub, Popup
 
}
 
}
 +
}
 +
}
 +
}
 +
  
^Right::
 
mouseclick, Left, (Xmax/2)+390, (ymax/2)+37
 
sleep, 500
 
mouseclick, left, PlantX, PlantY
 
return
 
^Left::
 
mouseclick, Left, (Xmax/2)-450, (ymax/2)+37
 
sleep, 500
 
mouseclick, left, PlantX, PlantY
 
return
 
^Up::
 
mouseclick, Left, (Xmax/2), (ymax/2)-410
 
sleep, 500
 
mouseclick, left, PlantX, PlantY
 
return
 
^Down::
 
mouseclick, Left, (Xmax/2), (ymax/2)+450
 
sleep, 500
 
mouseclick, left, PlantX, PlantY
 
return
 
  
^x::ExitApp
+
if ChatWarning = 0
 
</pre>
 
</pre>

Revision as of 06:03, 26 October 2010

	MineRecord:
	MineNum++
	MouseGetPos, MineX%MineNum%, MineY%MineNum%
	Broke%MineNum% := False
	Matrix%MineNum% := GetMatrix(MineX%MineNum%-1,MineY%MineNum%-1,3)
	GuiControl, Text, MineNumText, %MineNum% crystals captured
	return
			ThirdStone := SecondStone+A_Index



;check for broken
Stone1 := FindMatrix(MineX%FirstStone%-1,MineX%FirstStone%+1,MineY%FirstStone%-1,MineY%FirstStone%+1,3,Matrix%FirstStone%)
Stone2 := FindMatrix(MineX%SecondStone%-1,MineX%SecondStone%+1,MineY%SecondStone%-1,MineY%SecondStone%+1,3,Matrix%SecondStone%)
Stone3 := FindMatrix(MineX%ThirdStone%-1,MineX%ThirdStone%+1,MineY%ThirdStone%-1,MineY%ThirdStone%+1,3,Matrix%ThirdStone%)
AllThere := True
If (Stone1=0)
{
	Broke%FirstStone% := True
	AllThere := False
}
If (Stone2=0)
{
	Broke%SecondStone% := True
	AllThere := False
}
If (Stone3=0)
{
	Broke%ThirdStone% := True
	AllThere := False
}

If (AllThere=True)
{
	MouseMove, MineX%FirstStone%, MineY%FirstStone%
	;Msgbox, FirstStone: MineX%FirstStone%, MineY%FirstStone%
	Sleep %Delay%
	Send {A}
	Sleep %Delay%
	MouseMove, MineX%SecondStone%, MineY%SecondStone%
	;Msgbox, SecondStone: MineX%SecondStone%, MineY%SecondStone%
	Sleep %Delay%
	Send {A}
	Sleep %Delay%
	MouseMove, MineX%Thirdstone%, MineY%Thirdstone%
	;Msgbox, ThirdStone: MineX%Thirdstone%, MineY%Thirdstone%
	Sleep %Delay%
	Send {A}
	Sleep %Delay%
	Send {S}
	Sleep %Delay%
	Gosub, Popup
}
		}
	}
}



	if ChatWarning = 0