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 "User:Cegaiel/Temp2"

From ATITD5
Jump to navigationJump to search
(Created page with "<googlemap lat=1010 lon=0 zoom=2 width=600 height=1020 icons="/wiki/tale5/images/markers/marker{label}.png" showposition=yes showregion=yes iconsize="32x32" iconlabels=A,B,...")
 
Line 1: Line 1:
<googlemap lat=1010 lon=0 zoom=2 width=600 height=1020
+
<pre>
icons="/wiki/tale5/images/markers/marker{label}.png"
+
#SingleInstance force
showposition=yes
+
 
showregion=yes
+
^r::reload
iconsize="32x32"
+
; Reload the script when you make changes
iconlabels=A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9, Ball,Cir,Dot,DP,Pin,PP,bee,beetle,camel,cobra,drink,fire,fish,flower,GH,grape,plus,pyramid,sheep,tick, Ag,Al,An,Au,Co,Cu,Fe,Go,Ir,Le,Li,Ma,Mg,Pb,Pl,Pt,Sb,Si,Sn,Sr,St,Ti,Tn,Tu,W,Zi,Zn"
+
reload
type=game>
+
return
(V) 821,1089, Vigil (821,1089)
+
 
</googlemap>
+
!s::
 +
suspend toggle
 +
return
 +
 
 +
!q::
 +
ExitApp
 +
return
 +
 
 +
 
 +
 
 +
^!w::
 +
InitGui()
 +
return
 +
 
 +
 
 +
 
 +
 
 +
 
 +
ButtonFLAX:
 +
Gui, Submit
 +
; Validate input
 +
 
 +
 
 +
if (dimension > 5) {
 +
MsgBox "Make sure your number of objects setting is maxed in video options"
 +
}
 +
 
 +
Gui, Destroy
 +
 
 +
 
 +
Flax()
 +
return
 +
 
 +
 
 +
InitGui()
 +
{
 +
;global cycles
 +
global weedings
 +
global dimension
 +
 
 +
 
 +
Gui, Add, Text,, Plot dimensions (NxN):
 +
Gui, Add, DropDownList, vdimension Choose1, 3|4|5
 +
Gui, Add, Text,, Screen set and locked from previous flaxing?`nNo = Automatically zoom in to correct position.`nYes = Skip this step.
 +
 
 +
Gui, Add, DropDownList, vLocked Choose2, Yes|No
 +
 
 +
Gui, Add, Button, Default, FLAX
 +
Gui, Show
 +
}
 +
 
 +
Flax()
 +
{
 +
 
 +
global Xcenter
 +
global Ycenter
 +
global width
 +
global cycles
 +
global dimension
 +
global Locked
 +
 
 +
 
 +
message := "Please close your friends list and minimize chat and stat tabs in order to ensure proper macroage.`n"
 +
message .= "Also disable camera moves very fast and camera moves unreasonably fast.`n`n"
 +
message .= "Pin the plant menu at the very top left corner of the screen`n`n"
 +
message .= "IN CASE OF EMERGENCY: HIT ALT-Q"
 +
MsgBox,,, %message%, 5
 +
 
 +
 
 +
; Wait for the window to become active, then get the window stats
 +
WinWait, eGenesis Client,  
 +
IfWinNotActive, eGenesis Client, , WinActivate, eGenesis Client,  
 +
WinWaitActive, eGenesis Client,
 +
WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos
 +
 
 +
if (Locked == "No")
 +
{
 +
Send {F5}{F8}{F8}
 +
MouseMove, 0,0
 +
Sleep 5000
 +
MouseMove, 0, 0
 +
Sleep 5000
 +
}
 +
 
 +
 
 +
 
 +
Xcenter := Xmax//2 - 3
 +
Ycenter := Ymax//2 + 16
 +
MouseMove, Xcenter, Ycenter, 0
 +
 
 +
 
 +
if (Locked == "No")
 +
{
 +
 
 +
Loop 9 {
 +
MouseClick, WheelDown
 +
Sleep 1000
 +
}
 +
 
 +
}
 +
 
 +
 
 +
 
 +
;Flax beds are ~55 coords wide at this zoom level @ 1280 x 1024 (50 @ 1024 x 768)
 +
width := 50
 +
 
 +
 
 +
Plant:
 +
 
 +
Loop 1
 +
{
 +
Sleep 500
 +
i = 0
 +
Loop {
 +
i += 1
 +
Plant_Row("right", dimension)
 +
Move("down")
 +
if (i >= dimension)
 +
break
 +
 
 +
i += 1
 +
Plant_Row("left", dimension)
 +
Move("down")
 +
if (i >= dimension)
 +
break
 +
}
 +
 
 +
 
 +
 
 +
 
 +
Sleep 1000
 +
Move("left", half_dim)
 +
Move("up", half_dim)
 +
 
 +
Locked = "Yes"
 +
; end of cycle loop
 +
}
 +
 
 +
if !(F2Warning = 1)
 +
Msgbox, After gathering your flax, press F2 to plant another batch...`n`nThis message will not appear in future, but F2 will always work to plant a new batch.`n`nOtherwise hit Ctrl+R to reload script.
 +
 
 +
KeyWait, F2, D
 +
F2Warning = 1
 +
 
 +
Gosub Plant
 +
 
 +
 
 +
; end of function
 +
}
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
Move(direction, count = 1) {
 +
global width
 +
global Xcenter
 +
global Ycenter
 +
 
 +
distance := width * count
 +
time := 650 * count
 +
MouseMove, Xcenter, Ycenter, 0
 +
 
 +
if (direction == "right") {
 +
MouseClick,, distance, 0,, 0,, R
 +
} else if (direction == "left") {
 +
MouseClick,, -(distance), 0,, 0,, R
 +
} else if (direction == "down") {
 +
MouseClick,, 0, distance,, 0,, R
 +
} else if (direction == "up") {
 +
MouseClick,, 0, -(distance),, 0,, R
 +
}
 +
Sleep %time%
 +
}
 +
 +
 
 +
Plant_Row(direction, num)
 +
{
 +
 
 +
;Look at 40,40 to see if the pinup menu is there. If you pinup menu is not at 40,40, then adjust...
 +
 
 +
 
 +
PixelSearch, Px, Py, 40, 40, 40, 40, 0xF2EBD3, 50, Fast|RGB
 +
if ErrorLevel = 0
 +
{
 +
MouseClick,, 40, 40,, 0
 +
if (num <= 0) {
 +
return
 +
}
 +
num -= 1
 +
Loop %num% {
 +
Move(direction)
 +
MouseClick,, 40, 40,, 0
 +
}
 +
 
 +
} else {
 +
Msgbox, Plant menu, pinned in upper left corner, not found!`n`nExiting script. Restart script with Ctrl+Alt+W after you pin up the menu!
 +
Exit
 +
}
 +
 
 +
return
 +
}
 +
 
 +
 
 +
^p::Pause
 +
</pre>

Revision as of 02:38, 13 October 2010

#SingleInstance force

^r::reload
; Reload the script when you make changes
reload
return

!s::
suspend toggle
return

!q::
ExitApp
return



^!w::
InitGui()
return





ButtonFLAX:
Gui, Submit
; Validate input


if (dimension > 5) {
	MsgBox "Make sure your number of objects setting is maxed in video options"
}

Gui, Destroy


Flax()
return


InitGui()
{
	;global cycles
	global weedings
	global dimension


	Gui, Add, Text,, Plot dimensions (NxN):
	Gui, Add, DropDownList, vdimension Choose1, 3|4|5
	Gui, Add, Text,, Screen set and locked from previous flaxing?`nNo = Automatically zoom in to correct position.`nYes = Skip this step.

	Gui, Add, DropDownList, vLocked Choose2, Yes|No

	Gui, Add, Button, Default, FLAX
	Gui, Show
}

Flax()
{

	global Xcenter
	global Ycenter
	global width
	global cycles
	global dimension
	global Locked	


	message := "Please close your friends list and minimize chat and stat tabs in order to ensure proper macroage.`n"
	message .= "Also disable camera moves very fast and camera moves unreasonably fast.`n`n"
	message .= "Pin the plant menu at the very top left corner of the screen`n`n"
	message .= "IN CASE OF EMERGENCY: HIT ALT-Q"
	MsgBox,,, %message%, 5


	; Wait for the window to become active, then get the window stats
	WinWait, eGenesis Client, 
	IfWinNotActive, eGenesis Client, , WinActivate, eGenesis Client, 
	WinWaitActive, eGenesis Client,
	WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos

	if (Locked == "No")
	{
	Send {F5}{F8}{F8}
	MouseMove, 0,0
	Sleep 5000
	MouseMove, 0, 0
	Sleep 5000
	}



	Xcenter := Xmax//2 - 3
	Ycenter := Ymax//2 + 16
	MouseMove, Xcenter, Ycenter, 0


	if (Locked == "No")
	{

	Loop 9 {
		MouseClick, WheelDown
		Sleep 1000
	}

	}



	;Flax beds are ~55 coords wide at this zoom level @ 1280 x 1024 (50 @ 1024 x 768)
	width := 50


Plant:

Loop 1
{
	Sleep 500
	i = 0
	Loop {	
		i += 1
		Plant_Row("right", dimension)
		Move("down")
		if (i >= dimension)
			break

		i += 1
		Plant_Row("left", dimension)
		Move("down")
		if (i >= dimension)
			break
	}




	Sleep 1000
	Move("left", half_dim)
	Move("up", half_dim)

	Locked = "Yes"
; end of cycle loop
}

if !(F2Warning = 1)
Msgbox, After gathering your flax, press F2 to plant another batch...`n`nThis message will not appear in future, but F2 will always work to plant a new batch.`n`nOtherwise hit Ctrl+R to reload script.

KeyWait, F2, D
F2Warning = 1

Gosub Plant


; end of function
}
























Move(direction, count = 1) {
	global width
	global Xcenter
	global Ycenter

	distance := width * count
	time := 650 * count
	MouseMove, Xcenter, Ycenter, 0

	if (direction == "right") {
		MouseClick,, distance, 0,, 0,, R
	} else if (direction == "left") {
		MouseClick,, -(distance), 0,, 0,, R
	} else if (direction == "down") {
		MouseClick,, 0, distance,, 0,, R
	} else if (direction == "up") {
		MouseClick,, 0, -(distance),, 0,, R
	}
	Sleep %time%
}
	

Plant_Row(direction, num)
{

;Look at 40,40 to see if the pinup menu is there. If you pinup menu is not at 40,40, then adjust...


	PixelSearch, Px, Py, 40, 40, 40, 40, 0xF2EBD3, 50, Fast|RGB
	if ErrorLevel = 0
	{
	MouseClick,, 40, 40,, 0
	if (num <= 0) {
		return
	}
	num -= 1
	Loop %num% {
		Move(direction)
		MouseClick,, 40, 40,, 0
	}

} else {
Msgbox, Plant menu, pinned in upper left corner, not found!`n`nExiting script. Restart script with Ctrl+Alt+W after you pin up the menu!
Exit
}

	return
}


^p::Pause