Buenas,

Después de probar diferentes macros, he podido encontrar una para talar / lumberjacking y poder dejarlo en contenedor o el banco usando rail.

Le he metido una pequeña modificación para adaptarlas a los mensajes que muestra el servidor al talar. Es bastante fácil y factible.

Si alguien puede aportar más, mejor

Código:
;==================================
; Script Name:   Simple Lumberjacker (UA-200420)
; Author: Kedrick Valorite
; Version: 2.2e
; Client Tested with: 4.0.6a
; EUO version tested with: 1.42.009D
; Shard OSI / FS: OSI & RunUO FS's
; Revision Date: 07 December 04
; Public Release: 10 October 04
; Global Variables Used: None
; Purpose: Uses tile scan and autorail for Lumberjacking
; and allows you to store the logs in either the bank or
; a container.
;==================================
;_______________________________________________________________________________
;Options
;SimpleDesktopSetup Variables
;If you want to allow the script to run regardless of the language that the client
;is using, Change %CheckLang to #FALSE.
Set %CheckLang #TRUE
;If you dont want the script to move you're Paperdoll, Backpack, and Statusbar,
;Change %MoveContainers to #FALSE.
Set %MoveContainers #TRUE
;If you're playing on a RunUO based shard, Chanfe %Freeshard to #TRUE. Note that
;Sphere, Pol and other Freeshards are NOT supported, although the script may work.
;Also, while I do support the base RunUO freeshard, i simply cannot account for
;custom modifications that may be implemented on you're particular freeshard.
;NOT FULLY IMPLEMENTED YET (AS OF VERSION 2.2)
Set %Freeshard #FALSE								<----------------------------------	ToDo
;If you're required to hold the tool that is used in order to perform the skill
;set this to #TRUE. Otherwise, Set to #FALSE.
Set %UseSkillToolEquiped #TRUE
;These are the ItemTypes for all the possible tools to use in order to perform
;their respective skills.
Set %LumberjackTools LSF_BSF_NSF_ZRF_RMH_LPH_UOH_FSF
Set %CarpentryTools YFG_ZHG_CIG_BIG_AGG_EGG_AIG_WFG_IGG_KGG_ZFG
;This is to define the tool set that is used to perform the primary task of the script.
Set %SkillTools %LumberjackTools
;These variables define all the various resources that are either gathered or crafted.
Set %logs ZLK
Set %Boards TLK
;Autorail Variables
Set %autorail_storageid
Set %autorail_storagetype
Set %autorail_waypointcounter 0
Set %autorail_pointcounter 0
;Tile Scanner Variables
Tile Init
Set %SearchRadius 2
;_______________________________________________________________________________
;Main
Gosub SetupDesktop
Gosub showSimpleLJ
Gosub autorail_setup
For %Main #TRUE #FALSE
	{
	Gosub SimpleStatusCheck
	Gosub autorail_move
	Gosub TileScanner %SearchRadius TREE
	Gosub Lumberjack
	If ! %Error
		Set %Main #TRUE
	}
;_______________________________________________________________________________
Sub lumberjack
For %target_index 1 %tile_index
	{
	Menu List Select Targets %target_index
	For %choptarget #TRUE #FALSE
		{
		Wait 0
		Gosub SimpleStatusCheck
		Set #LOBJECTID %CurrentSkillTool
		Set #LTARGETX %tile_X . %target_index
		Set #LTARGETY %tile_Y . %target_index
		Set #LTARGETZ %tile_Z . %target_index
		Set #LTARGETKIND 3
		Set #LTARGETTILE %tile_type . %target_index
		Event macro 17 0
		Target
		Event macro 22 0
		Wait 3
		Gosub SimpleStatuscheck
		Set %LookForSysmsgTimeout #SCNT + 10
		For %LookForSysmsg #TRUE #FALSE
			{
			Wait 0
			If #SCNT < %LookForSysmsgTimeout
				Set %LookForSysmsg #TRUE
			If CAN'T in #SYSMSG || TOO_FAR in #SYSMSG || NOT_ENOUGH in #SYSMSG || cannot_see in #SYSMSG || No_lo_alcanzas in #SYSMSG || lejos in #SYSMSG || can't_use in #SYSMSG || Aqui_no_hay in #SYSMSG || cannot_be_seen in #SYSMSG || inmune in #SYSMSG || Dismount in #SYSMSG
				{
				Wait 0
				Set %LookForSysmsg #FALSE
				Set %choptarget #FALSE
				}
			If SOME_LOGS in #SYSMSG || YOU_HACK in #SYSMSG || Pones_el in #SYSMSG || Talas_durante_un in #SYSMSG
				{
				Wait 0
				Set %LookForSysmsg #FALSE
				Set %choptarget #TRUE
				}
			}
		}
	Wait 3
	}
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub SimpleStatusCheck
If #WEIGHT = N/A
	Gosub setupdesktop
if #WEIGHT > #MAXWEIGHT - 40 || #WEIGHT > 360
	Gosub overweight
For %FoundSkillTool #FALSE #TRUE
	{
	If %UseSkillToolEquiped #TRUE
		{
		finditem %Skilltools C_ , #CHARID
		if #FINDKIND = 0
			{
			Set %CurrentSkillTool #FINDID
			Set %FoundSkillTool #TRUE
			}
		else
			{
			Set %FoundSkillTool #FALSE
			FINDITEM %Skilltools C_ , #BackpackID
			IF #FINDKIND = 0
				{
				SET %CurrentSkillTool #FINDID
				SET #LHANDID #FINDID
				SET #RHANDID #FINDID
				event macro 24 1
				wait 1s
				event macro 24 2
				WAIT 1s
				}
			Else
				{
				;Gosub SimpleCrafting				<----------------------------------	ToDo
				Display OK You need the proper tool.$Script Paused.
				Paused
				}
			}
		}
	Else
		{
		FINDITEM %Skilltools C_ , #BackpackID
		IF #FINDKIND = 0
			{
			SET %CurrentSkillTool #FINDID
			Set %FoundSkillTool #TRUE
			}
		Else
			{
			Set %FoundSkillTool #FALSE
			;Gosub SimpleCrafting					<----------------------------------	ToDo
			Display OK You need the proper tool.$Script Paused.
			Paused
			}
		}
	}
;Hit point check, #Enemyid check						<----------------------------------	ToDo
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sub overweight
;Finditem %Logs C_ , #BACKPACKID
;if #FINDKIND = 0
;	{
;	Finditem %CarpentryTools C_ , #BACKPACKID
;	If #FINDKIND = 0
;		{
;		Set #LOBJECTID #FINDID
;		Event Macro 17
;
;
;										<----------------------------------	ToDo
;
;
If %autorail_waypointcounter > 0
	Gosub autorail_waypointmove TO
gosub autorail_storagemove
if %autorail_storagetype = BANK
	{
	event macro 4 0 bank
	Set %WaitForBankBox #SCNT + 60
	For %OverweightWaitForBankBox #TRUE #False
		{
		wait 0
		if #CONTID = %autorail_storageid
			{
			wait 10
			Set %autorail_containerclickx #CONTPOSX + 50
			Set %autorail_containerclicky #CONTPOSY + 70
			Set %OverweightWaitForBankBox #FALSE
			}
		else
			Set %OverweightWaitForBankBox #TRUE
		}
	}
finditem %Logs C_ , #BACKPACKID
if #FINDKIND = 0
	{
	event drag #FINDID
	waitforstackgump:
	if #CONTNAME = stack_gump
		msg $
	else
		goto Waitforstackgump
	wait 20
	click %autorail_containerclickx %autorail_containerclicky p
	}
If %autorail_waypointcounter > 0
	Gosub autorail_waypointmove FROM
Gosub autorail_move
Gosub TileScanner %SearchRadius TREE
Return
;_______________________________________________________________________________
;Position the paperdoll, main pack, and Status bar.
Sub SimpleDesktopSetup
Gosub SimpleDesktopSetupWaitForGump 1 paperdoll_gump 262_324 #CHARID
Wait 8
If %MoveContainers
	Contpos 645 0
Wait 8
Gosub SimpleDesktopSetupWaitForGump 7 container_gump 230_204 #BACKPACKID
wait 8
If %MoveContainers
	Contpos 645 275
wait 8
Gosub SimpleDesktopSetupWaitForGump 2 status_gump 432_184 #CHARID
Wait 8
If %MoveContainers
	Contpos 0 500
Wait 8
if #clilang <> enu && %checklang
	{
	display OK # , clilang = #CLILANG $$Your client must be in english mode in order for this script to work. Add the following$
	+ line to your uo.cfg files. $$Note: The line must be added for each character's desktop file.$$
	+ UserLanguageCodeString=ENU$$Script_Halted.$$
	halt
	}
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub SimpleDesktopSetupWaitForGump
If #CONTNAME = %2 && #CONTSIZE = %3  && #CONTID = %4
	Return
Event Macro 9 %1
Wait 10
Event Macro 8 %1
Wait 10
Set %WaitForGumpTimeout #SCNT + 20
For %WaitForGumpLoop #FALSE #TRUE
	{
	Wait 0
	If ! ( #CONTNAME = %2 && #CONTSIZE = %3  && #CONTID = %4 )
		{
		If #SCNT < %WaitForGumpTimeout
			Set %WaitForGumpLoop #FALSE
		}
	Set %WaitForGumpLoop #TRUE
	}
Return
;_______________________________________________________________________________
;Autorail Code
Sub autorail_Setup
autorail_SetupStart:
Set #MENUBUTTON N/A
Menu Text StatusMsg 4 4 To set up a route from the beginning of you're rail to either the bank or a storage
Menu Text StatusMsg 4 24 container, press the Waypoints button. To create a rail, press the Rail button.
Menu Button EUOButton1 8 164 75 25 Waypoints
Menu Button EUOButton2 88 164 75 25 Rail
GetSetupWaitForMenu:
If #MENUBUTTON = EUOButton1
	{
	Menu Delete StatusMsg
	Menu Delete StatusMsgSave
	Menu Delete EUOButton1
	Menu Delete EUOButton2
	Gosub autorail_setwaypoints
	Goto autorail_SetupStart
	}
If #MENUBUTTON = EUOButton2
	{
	Menu Delete StatusMsg
	Menu Delete StatusMsgSave
	Menu Delete EUOButton1
	Menu Delete EUOButton2
	Gosub autorail_setrail
	If %autorail_storageset = #TRUE
		Goto  autorail_setupDone
	}
goto GetSetupWaitForMenu
autorail_setupDone:
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;use this sub to actually move along the rail.
Sub autorail_move
Menu List Select Rail %autorail_targetcounter
autorail_movetotarget:
move %autorail_pointx . %autorail_targetcounter %autorail_pointy . %autorail_targetcounter 0 60s
If ( #CHARPOSX <> %autorail_pointx . %autorail_targetcounter ) && ( #CHARPOSY <> %autorail_pointy . %autorail_targetcounter )
	goto autorail_movetotarget
If %autorail_pointtype . %autorail_targetcounter = WAYPOINT
	Set %autorail_waypointflag #TRUE
else
	Set %autorail_waypointflag #FALSE
If %autorail_movedirection = UP
	Set %autorail_targetcounter %autorail_targetcounter + 1
If %autorail_movedirection = DOWN || %autorail_movedirection = N/A
	Set %autorail_targetcounter %autorail_targetcounter - 1
If %autorail_targetcounter => ( %autorail_pointcounter - 1 ) || %autorail_movedirection = N/A
	Set %autorail_movedirection DOWN
If %autorail_targetcounter < 2
	Set %autorail_movedirection UP
if %autorail_waypointflag = #TRUE
	goto autorail_movetotarget
else
	return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;This sub moves to the point where your storage container is available.
Sub autorail_storagemove
autorail_storagemove:
move %autorail_storagex %autorail_storagey 0 60s
If ( #CHARPOSX <> %autorail_storagex ) && ( #CHARPOSY <> %autorail_storagey )
	Goto autorail_storagemove
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;This sub moves along waypoints to/from the storage location.
Sub autorail_waypointmove
If %1 = TO
	{
	For %autorail_targetwaypoint 1 %autorail_waypointcounter
		{
		autorail_waypointmovetotarget:
		Menu List Select Waypoint %autorail_targetwaypoint
		move %autorail_waypointx . %autorail_targetwaypoint %autorail_waypointy . %autorail_targetwaypoint 0 60s
		If ( #CHARPOSX <> %autorail_waypointx . %autorail_targetwaypoint ) && ( #CHARPOSY <> %autorail_waypointy . %autorail_targetwaypoint )
			Goto autorail_waypointmovetotarget
		}
	}
if %1 = FROM
	{
	For %autorail_targetwaypoint %autorail_waypointcounter 1
		{
		autorail_waypointmovefromtarget:
		Menu List Select Waypoint %autorail_targetwaypoint
		move %autorail_waypointx . %autorail_targetwaypoint %autorail_waypointy . %autorail_targetwaypoint 0 60s
		If ( #CHARPOSX <> %autorail_waypointx . %autorail_targetwaypoint ) && ( #CHARPOSY <> %autorail_waypointy . %autorail_targetwaypoint )
			Goto autorail_waypointmovefromtarget
		}
	}
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub autorail_setrail
Set #MENUBUTTON N/A
Menu Text StatusMsg 4 4 To save a point to move to, press F9 or the Save button. I recommend saving each
Menu Text StatusMsg 4 24 spot where you change direction along the path to you're destination. When the path
Menu Text StatusMsg 4 44 is complete, press F10 or the Done Button. If you make a mistake and wish to delete
Menu Text StatusMsg 4 64 the rail so far and start over from the beginning, Press F12 or the Delete button.
Menu Button EUOButton1 4 164 90 25 F9:Save
Menu Button EUOButton2 98 164 90 25 F10:Done
Menu Button EUOButton3 192 164 90 25 F12:Delete
autorail_setrailgethotkey:
Onhotkey F9
	Gosub autorail_savepoint
Onhotkey F10
	Goto autorail_setrailend
Onhotkey F12
	Gosub autorail_Deleterail
if #MENUBUTTON = EUOButton1
	Gosub autorail_savepoint
if #MENUBUTTON = EUOButton2
	Goto autorail_setrailend
if #MENUBUTTON = EUOButton3
	Gosub autorail_Deleterail
Wait 0
goto autorail_setrailgethotkey
autorail_setrailend:
Set %autorail_targetcounter %autorail_pointcounter
Menu Delete StatusMsg
Menu Delete EUOButton1
Menu Delete EUOButton2
Menu Delete EUOButton3
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub autorail_savepoint
Menu Delete StatusMsgSave
Set %autorail_pointcounter %autorail_pointcounter + 1
Set %autorail_pointx . %autorail_pointcounter #CHARPOSX
Set %autorail_pointy . %autorail_pointcounter #CHARPOSY
Menu Text StatusMsgSave 4 144 Saved point %autorail_pointcounter
Menu List add Rail %autorail_pointcounter , #spc , %autorail_pointx . %autorail_pointcounter , #spc , / , #spc ,  %autorail_pointy . %autorail_pointcounter
Set #MENUBUTTON N/A
Wait 10
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub autorail_Deleterail
Menu Delete StatusSaveMsg
Menu Delete Rail
menu list Create Rail 654 24 150 160
Set %autorail_pointcounter 0
Menu Text StatusMsgSave 4 144 Rail Deleted
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub autorail_setwaypoints
autorail_setwaypointsstart:
Set %autorail_storageset #FALSE
Set #MENUBUTTON N/A
Menu Text StatusMsg 4 4 To save a point to move to press the Save button or F9. I recommend saving each
Menu Text StatusMsg 4 24 spot where you change direction along the path to you're destination. When the path
Menu Text StatusMsg 4 44 is complete, press either the Bank button to open and use a bank box, or press the
Menu Text StatusMsg 4 64 Container button to select and use a container.
Menu Button EUOButton1 4 164 90 25 F9:Save
Menu Button EUOButton2 98 164 90 25 F10:Bank
Menu Button EUOButton3 192 164 90 25 F11:Container
Menu Button EUOButton4 286 164 90 25 F12:Cancel
autorail_setwaypointsWaitForMenu:
Set #MENUBUTTON N/A
onhotkey F9
	Gosub autorail_setwaypoint
onhotkey F10
	Gosub autorail_bank
onhotkey F11
	Gosub autorail_container
onhotkey F12
	Gosub autorail_DeleteWaypoints
if #MENUBUTTON = EUOButton1
	Gosub autorail_setwaypoint
if #MENUBUTTON = EUOButton2
	Gosub autorail_bank
if #MENUBUTTON = EUOButton3
	Gosub autorail_container
if #MENUBUTTON = EUOButton4
	Gosub autorail_DeleteWaypoints
wait 0
If #MENUBUTTON = CANCELSTORAGE
	{
	Goto autorail_setwaypointsstart
	}
If %autorail_storageset = #TRUE
	{
	Gosub autorail_waypointmove FROM
	goto autorail_setwaypointsfinish
	}
If %autorail_storageset = #FALSE
	{
	Goto autorail_setwaypointsWaitForMenu
	}
autorail_setwaypointsfinish:
Menu Delete StatusMsg
Menu Delete StatusMsgSave
Menu Delete EUOButton1
Menu Delete EUOButton2
Menu Delete EUOButton3
Menu Delete EUOButton4
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub autorail_opendoor
ZPC_BQC_HQC_JQC
CQC_MQC_KQC_UQC
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub autorail_setwaypoint
Menu Delete StatusMsgSave
Set %autorail_waypointcounter %autorail_waypointcounter + 1
Set %autorail_waypointx . %autorail_waypointcounter #CHARPOSX
Set %autorail_waypointy . %autorail_waypointcounter #CHARPOSY
Menu Text StatusMsgSave 4 144 Saved waypoint %autorail_waypointcounter
Menu List add Waypoint %autorail_waypointcounter , #spc , %autorail_waypointx . %autorail_waypointcounter , #spc , / , #spc ,  %autorail_waypointy . %autorail_waypointcounter
Set #MENUBUTTON N/A
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub autorail_DeleteWaypoints
Menu Delete StatusSaveMsg
Menu Delete Waypoint
menu list Create Waypoint 502 24 150 160
Set %autorail_waypointcounter 0
Menu Text StatusMsgSave 4 144 Waypoints Deleted
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub autorail_container
Menu Delete StatusMsg
Menu Delete StatusMsgSave
Menu Delete EUOButton1
Menu Delete EUOButton2
Menu Delete EUOButton3
Menu Delete EUOButton4
Set #MENUBUTTON N/A
Set %autorail_storagetype CONTAINER
Set %autorail_storagex #CHARPOSX
Set %autorail_storagey #CHARPOSY
Menu Text StatusMsg 4 4 You should now be at a point that you can target a storage container to use for
Menu Text StatusMsg 4 24 dropping off lumber. Target the container to use with the target cursor. If you've
Menu Text StatusMsg 4 44 Made a mistake and wish to continue creating waypoints, or wish to use a bank
Menu Text StatusMsg 4 64 instead of a container just target anything.
Set #TARGCURS 1
autorail_container_waittarget:
If #TARGCURS = 0
	{
	Set %autorail_containerclickx #CURSORX
	Set %autorail_containerclicky #CURSORY
	}
If #TARGCURS = 1
	{
	Wait 0
	Goto autorail_container_waittarget
	}
Set %autorail_storageid #LTARGETID
Set #LOBJECTID %autorail_storageid
Menu Text StatusMsgSave 4 144 Container: %autorail_storageid %autorail_containerclickx %autorail_containerclicky
Wait 10
Event Macro 17 0
Wait 20
Menu Delete StatusMsg
Menu Text StatusMsg 4 4 Did the container that you wish to use open?
Menu Button EUOButton1 8 164 75 25 Yes
Menu Button EUOButton2 88 164 75 25 No/Cancel
Set #MENUBUTTON N/A
autorail_container_waitconfirmchoice:
If #MENUBUTTON = EUOButton1
	{
	Set %autorail_storageset #TRUE
	}
If #MENUBUTTON = EUOButton2
	{
	Set %autorail_storagetype N/A
	Set %autorail_storagex N/A
	Set %autorail_storagey N/A
	Set %autorail_storageid N/A
	Set #MENUBUTTON CANCELSTORAGE
	Set %autorail_storageset #FALSE
	}
If #MENUBUTTON = N/A
	{
	goto autorail_container_waitconfirmchoice
	Set %autorail_storageset #FALSE
	}
Set #MENUBUTTON N/A
Menu Delete StatusMsg
Menu Delete StatusMsgSave
Menu Delete EUOButton1
Menu Delete EUOButton2
Return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sub autorail_bank
Menu Delete StatusMsg
Menu Delete StatusMsgSave
Menu Delete EUOButton1
Menu Delete EUOButton2
Menu Delete EUOButton3
Menu Delete EUOButton4
Set #MENUBUTTON N/A
Set %autorail_storagetype BANK
Set %autorail_storagex #CHARPOSX
Set %autorail_storagey #CHARPOSY
Menu Text StatusMsg 4 4 You're character should now be at a point where you can say bank and have you're
Menu Text StatusMsg 4 24 character's bank box open. If You're bank box opens, press Accept to save this
Menu Text StatusMsg 4 44 location and use you're bank to store lumber. Otherwise, move to a new location and
Menu Text StatusMsg 4 64 press Retry to adjust you're positioning, or press Cancel to go back to waypoints.
menu Font Transparent #TRUE
menu Font Align Left
menu Font Name Lucinda Sans Unicode
menu Font Size 14
menu Font Style b
menu Font Color Red
Menu Text StatusMsg 4 90 Please Do Not Use The Bank Unattended,
menu Font Style bi
Menu Text StatusMsg 4 110 You Will Be Caught!
menu Font Transparent #TRUE
menu Font Align Left
menu Font Name Lucinda Sans Unicode
menu Font Size 10
menu Font Style
menu Font Color WindowText
Menu Button EUOButton1 8 164 75 25 Accept
Menu Button EUOButton2 87 164 75 25 Retry
Menu Button EUOButton3 166 164 75 25 Cancel
autorail_bankopen:
Event macro 4 0 bank
Wait 20
autorail_bankWaitBtn:
If #MENUBUTTON = EUOButton1
	{
	Set %autorail_storageid #CONTID
	Set %autorail_storageset #TRUE
	Set %autorail_containerclickx #CONTPOSX + 30
	Set %autorail_containerclicky #CONTPOSY + 50
	Menu Delete StatusMsg
	Menu Delete EUOButton1
	Menu Delete EUOButton2
	Menu Delete EUOButton3
	Return
	}
If #MENUBUTTON = EUOButton2
	{
	Set %autorail_storagetype N/A
	Set %autorail_storagex N/A
	Set %autorail_storagey N/A
	Set %autorail_storageid N/A
	Set %autorail_storageset #FALSE
	Goto autorail_bankopen
	}
If #MENUBUTTON = EUOButton3
	{
	Set %autorail_storagetype N/A
	Set %autorail_storagex N/A
	Set %autorail_storagey N/A
	Set %autorail_storageid N/A
	Set #MENUBUTTON CANCELSTORAGE
	Set %autorail_storageset #FALSE
	Menu Delete StatusMsg
	Menu Delete EUOButton1
	Menu Delete EUOButton2
	Menu Delete EUOButton3
	Return
	}
Goto autorail_bankWaitBtn
Return
;_______________________________________________________________________________
;Tile Scan Code
Sub TileScanner
If %0 < 2
	Set %2 ALL
Menu Text 4 4 Target Trees
Menu List Create Targets 4 24 496 160
Set %Scan_Low_X_Point #CHARPOSX - %1
Set %Scan_High_X_Point #CHARPOSX + %1
Set %Scan_Low_Y_Point #CHARPOSY - %1
Set %Scan_High_Y_Point #CHARPOSY + %1
Set %tile_index 0
For %scan_X_Point %scan_Low_X_Point %scan_High_X_Point
	{
	For %scan_Y_point %scan_Low_Y_Point %scan_High_Y_Point
		{
		Tile cnt %Scan_X_Point %Scan_Y_Point
		For %tile_scan 1 #TILECNT
			{
			Tile get %Scan_X_Point %Scan_Y_Point %tile_scan
			Set %ZCompare #CHARPOSZ - #TILEZ abs
			If ( %2 in #TILENAME || %2 = ALL ) && %ZCompare < 19
				{
				Set %tile_index %tile_index + 1
				Set %Tile_Name . %Tile_Index #TILENAME
				Set %Tile_Type . %Tile_Index #TILETYPE
				Set %Tile_X . %Tile_Index %Scan_X_Point
				Set %Tile_Y . %Tile_Index %Scan_Y_Point
				Set %Tile_Z . %Tile_Index #TILEZ
				Set %Tile_CompareDistX abs ( #CHARPOSX - %Tile_X . %Tile_Index )
				Set %Tile_CompareDistY abs ( #CHARPOSY - %Tile_Y . %Tile_Index )
				If %Tile_CompareDistX > %Tile_CompareDistY
					Set %Tile_Distance . %Tile_Index %Tile_CompareDistX
				Else
					Set %Tile_Distance . %Tile_Index %Tile_CompareDistY
				Menu List Add Targets %Tile_Name . %Tile_Index , #spc , Type: , %Tile_Type . %Tile_Index , #spc , X: , %Tile_X . %Tile_Index , #spc , Y: , %Tile_Y . %Tile_Index , #spc , Z: , %Tile_Z . %Tile_Index  , #spc , Dist.: , %Tile_Distance . %Tile_Index
				}
			}
		}
	}
Return
;_______________________________________________________________________________
;Menu Code
sub showSimpleLJ
menu Clear
menu Window Title Simple Lumberjacker
menu Window Color BtnFace
menu Window Size 808 193
menu Font Transparent #true
menu Font Align Left
menu Font Name Lucinda Sans Unicode
menu Font Size 10
menu Font Style
menu Font Color WindowText
menu Font Align Left
menu Font BGColor btnface
Menu Text ListWaypointTitle 502 4 Waypoints
menu list Create Waypoint 502 24 150 160
Menu Text ListRailTitle 654 4 Rail Points
menu list Create Rail 654 24 150 160
menu Show 0 513
return