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.

Difference between revisions of "User:Cegaiel/Macros"

From A Tale in the Desert
Jump to navigationJump to search
Line 151: Line 151:
 
The difference between Wheat script above and this script is that the above gather water every 3 minutes. Everything else is exactly the same.
 
The difference between Wheat script above and this script is that the above gather water every 3 minutes. Everything else is exactly the same.
  
Be sure to read all my instructions in the above wheat script.  Make sure are standing along water, where you will be planting wheat.  Make sure you have at least one EMPTY jug (Esc, Skills, Empty Jugs) so that the water icon is showing on top left corner.
+
Be sure to read all my [[User:Cegaiel/Macros#Wheat_.28Final.29_.28Autohotkey.29 |instructions]] in the above wheat script.  Make sure are standing along water, where you will be planting wheat.  Make sure you have at least one EMPTY jug (Esc, Skills, Empty Jugs) so that the water icon is showing on top left corner.
  
 
When you start the script, it will tell you to middle click the water icon.  Once you middle click that, then you will start middle clicking all your wheat beds.  This is exactly the same as above wheat script, except that you are clicking the water icon first.  When you first activate the script, it will wait 3 mins and then click the water icon.  Once it clicks the water icon, then it will wait 3 mins to gather more water.  Most wheat beds need watering every 32-34 seconds.  So every 3 minutes is more than enough for the water icon to appear.
 
When you start the script, it will tell you to middle click the water icon.  Once you middle click that, then you will start middle clicking all your wheat beds.  This is exactly the same as above wheat script, except that you are clicking the water icon first.  When you first activate the script, it will wait 3 mins and then click the water icon.  Once it clicks the water icon, then it will wait 3 mins to gather more water.  Most wheat beds need watering every 32-34 seconds.  So every 3 minutes is more than enough for the water icon to appear.

Revision as of 05:02, 22 December 2009

Information

More Public Macros or links to get AcTools or Auto Hotkey click here.

Grass (AC Tools)

Collect Grass: Enter amount of grass to collect. Walks around in a circle and collects grass without moving too far from where you started. Great to get your Rhythmic_Strength skill up.

Wheat (Final) (Autohotkey)

Set as many wheat beds as you like. It will hover each bed and send the H and W hotkey over each bed, back to back. Then it will wait 4 seconds and repeat the cycle. Note you must have the chat minimized or else you will see HW appear in chat bar (will not send) repeatedly.

This macro you do NOT pin up any menus, it simply remembers where all your beds are and points to them and sends the H and W key back to back.

When you start the script it will tell you to point and middle click (click your mouse scroll wheel) while hovering each bed. Enter as many as you like. Then once you click OK, it will go to work.


I strongly suggest you Lock (Alt+L) your screen so it doesn't move around. If the screen moves, then all your bed coordinates are no longer valid.


Either have alot of jugs of water or stand along water (with water icon on top left) so you can gather water without moving.

Also, if you have a Water Mine, plant your wheat next to it. If a gem pops, then hit Ctrl+P to pause the macro and get your gem. Then hit Ctrl+P again to resume where you left off at. Also do this when you need to refill your jugs.


Tested on 1024x768 resolution but I am almost certain it will run at any resolution.


By the way, I took a shortcut and revamped an old mining script, so you will see alot of references to mining in the script, ^_^


Instructions: Copy and Paste the below script into Notepad and save as "something.ahk". Yes do put the quotation marks in the file name field as this will prevent it from being named something.ahk.txt. Make sure you have AutoHotKey installed (Links are on the Macros page. Then double click the .ahk file from My Computer and it will launch it.

;Ctrl+Alt+W to start macro.
;Ctrl+P to pause script (ie to click Water icon) and Ctrl+P again to resume
;The AHK icon in system tray will turn red while paused.

^p::Pause
^!w::



IfWinExist eGenesis Client
{
	WinActivate
	WinGetPos,,, winWidth, winHeight
	widthOffset := winWidth - 40

	Gui, +AlwaysOnTop +ToolWindow
	Gui, Font, bold
	Gui, Add, Text, vMineNumText, Recording mouse position
	Gui, Font, norm
	Gui, Add, Text,,
	( LTrim
	Hover and middle-click (Click mouse-wheel) on each wheat bed, one by one,
	until you've clicked on all the beds you want to use. Then click the OK button.
	(Drag this box out of the way if any beds are hidden)
	)

	Gui, Add, Button, default gMineSetLoops, OK
	Gui, Show

	MineNum = 0
	MineCycle = 0
	NumPulls = 1000

	WinGet, GameWinHandle, ID, eGenesis Client
	loop
	{
		WinActivate
		CoordMode, Mouse, Relative
		KeyWait, MButton, D
		KeyWait, MButton
		MouseGetPos, TestX, TestY, WinHandle
		if (WinHandle = GameWinHandle)
		{
			Gosub, MineRecord
		}
		else
		{
			Gui, Destroy
			break
		}
	}
	return

	MineRecord:
	MineNum++
	MouseGetPos, MineX%MineNum%, MineY%MineNum%
	GuiControl, Text, MineNumText, %MineNum% wheat beds captured
	TotalBeds := MineNum
	return


	MineSetLoops:
	Gui, Submit
	Gui, Destroy
	Gui, +AlwaysOnTop +ToolWindow
	Gui, Font, bold
	Gui, Add, Text, vMineCycleText, Cycle %NumPulls% of %NumPulls%
	Gui, Font, norm
	Gui, Show
	GuiControl, Text, MineCycleText, Cycle %MineCycle% of %NumPulls%


	loop, %NumPulls%
	{

				Sleep, 4000

			MineNum = 1
			MineCycle++
			MouseGetPos, OldMX, OldMY

			loop, %TotalBeds% {



			WinActivate, eGenesis Client

			;BlockInput, MouseMove

			GuiControl, Text, MineCycleText, Cycle %MineCycle%   Bed %MineNum% 
			MinePosX := MineX%MineNum%
			MinePosY := MineY%MineNum%
			MouseMove, %MinePosX%, %MinePosY%, 0
			Sleep, 250

			Send {H}
			Send {W}
			Sleep, 250	
			MineNum++
			}

			GuiControl, Text, MineCycleText, Cycle %MineCycle%   Pausing 
			MouseMove, %OldMX%, %OldMY%, 0			
			;BlockInput, MouseMoveOff



	}
	Gui, Destroy
	Gui, Add, Text,, Middle-click on this window to end the script.
	Gui, Show
	return
}


Wheat + Gather Water (Beta) (Autohotkey)

The difference between Wheat script above and this script is that the above gather water every 3 minutes. Everything else is exactly the same.

Be sure to read all my instructions in the above wheat script. Make sure are standing along water, where you will be planting wheat. Make sure you have at least one EMPTY jug (Esc, Skills, Empty Jugs) so that the water icon is showing on top left corner.

When you start the script, it will tell you to middle click the water icon. Once you middle click that, then you will start middle clicking all your wheat beds. This is exactly the same as above wheat script, except that you are clicking the water icon first. When you first activate the script, it will wait 3 mins and then click the water icon. Once it clicks the water icon, then it will wait 3 mins to gather more water. Most wheat beds need watering every 32-34 seconds. So every 3 minutes is more than enough for the water icon to appear.



Instructions: Copy and Paste the below script into Notepad and save as "something.ahk". Yes do put the quotation marks in the file name field as this will prevent it from being named something.ahk.txt. Make sure you have AutoHotKey installed (Links are on the Macros page. Then double click the .ahk file from My Computer and it will launch it.

;Ctrl+Alt+W to start macro.
;Ctrl+P to pause script (ie to click Water icon) and Ctrl+P again to resume
;The AHK icon in system tray will turn red while paused.

^p::Pause
^!w::



IfWinExist eGenesis Client
{
	WinActivate
	WinGetPos,,, winWidth, winHeight
	widthOffset := winWidth - 40

	Gui, +AlwaysOnTop +ToolWindow
	Gui, Font, bold
	Gui, Add, Text, vMineNumText, Middle click water icon
	Gui, Font, norm
	Gui, Add, Text,,
	( LTrim
	Hover and middle-click (Click mouse-wheel) on each wheat bed, one by one,
	until you've clicked on all the beds you want to use. Then click the OK button.
	(Drag this box out of the way if any beds are hidden)
	)

	Gui, Add, Button, default gMineSetLoops, OK
	Gui, Show

	MineNum = 0
	MineCycle = 0
	NumPulls = 1000

	WinGet, GameWinHandle, ID, eGenesis Client
	loop
	{
		WinActivate
		CoordMode, Mouse, Relative
		KeyWait, MButton, D
		KeyWait, MButton
		MouseGetPos, TestX, TestY, WinHandle
		if (WinHandle = GameWinHandle)
		{
			Gosub, MineRecord
		}
		else
		{
			Gui, Destroy
			break
		}
	}
	return



Water: 
MineNum = 1
			MinePosX := MineX%MineNum%
			MinePosY := MineY%MineNum%
			Click, %MinePosX%, %MinePosY%
			Sleep, 500
			Click, 513, 423			
return


	MineRecord:
	MineNum++
	MouseGetPos, MineX%MineNum%, MineY%MineNum%

if (MineNum = 1)
{
BedNum = 0
	GuiControl, Text, MineNumText, Middle click wheat beds
}
else
{
BedNum ++
	GuiControl, Text, MineNumText, %BedNum% wheat beds captured
}

	TotalBeds := MineNum-1
	return


	MineSetLoops:
	Gui, Submit
	Gui, Destroy
	Gui, +AlwaysOnTop +ToolWindow
	Gui, Font, bold
	Gui, Add, Text, vMineCycleText, Cycle %NumPulls% of %NumPulls%
	Gui, Font, norm
	Gui, Show
	GuiControl, Text, MineCycleText, Cycle %MineCycle% of %NumPulls%



#Persistent 
;Every 3 mins, get water (180s for 3 mins. SetTimer = s*1000 per min, thus 180,000s for 3 mins)
;Normally each wheat needs watered every 33 seconds, real time, so 3 mins is plenty of time for water icon to appear.
SetTimer, Water, 180000






	loop, %NumPulls%
	{

				Sleep, 5000
			;MinNum = 1 is the water icon location, thus why we are starting at 2. MineNum = 1 is only called during the #Persistent
			BedNum = 1
			MineNum = 2
			MineCycle++
			MouseGetPos, OldMX, OldMY





	loop, %TotalBeds%
	{



			WinActivate, eGenesis Client

			;BlockInput, MouseMove

			GuiControl, Text, MineCycleText, Cycle %MineCycle%   Bed %BedNum% 
			MinePosX := MineX%MineNum%
			MinePosY := MineY%MineNum%
			MouseMove, %MinePosX%, %MinePosY%, 0
			Sleep, 250

			Send {H}
			Send {W}
			Sleep, 250	
			MineNum++
			BedNum ++
			}

			GuiControl, Text, MineCycleText, Cycle %MineCycle%   Pausing 
			MouseMove, %OldMX%, %OldMY%, 0			
			;BlockInput, MouseMoveOff



	}
	Gui, Destroy
	Gui, Add, Text,, Middle-click on this window to end the script.
	Gui, Show
	return
}