Auto Rails by Xyio
Description from the author:
#Auto Rails by Xyio
#Write your starting location below for reference
#Staring location: (example) 2007, 2239 -- Horseshoe Bay
#
#
# <><><><><><><><><><><><><><><><><><><><><>
# ******************************************
# //--------------------------------------//
# //----PASTE RAILS FILE CONTENTS HERE----//
# //-------END RAILS FILE CONTENTS -------//
# //--------------------------------------//
#*******************************************
# <><><><><><><><><><><><><><><><><><><><><>
#
# ----CONFIG BELOW----
#----Use Rails?--- (0 if off, 1 is on)
setvar useRails 1
#
#
# Delay between movement attempts
setvar movementDelay 250
#
#
# Variables to make our location persist.
setvar xListEntry 0
setvar yListEntry 0
#----------------DO NOT EDIT BELOW THIS LINE-----------------------
while not dead
if useRails == 1
if atlist xCoord 0 as x
setvar xListEntry x
endif
if atlist yCoord 0 as y
setvar yListEntry y
endif
if position xListEntry yListEntry
overhead 'at location'
if list moveList > 0
poplist moveList 'front'
poplist xCoord 'front'
poplist yCoord 'front'
else
overhead "::: Back to town rail completed :::"
cast "recall"
waitfortarget 3000
if findtype 'recall rune' backpack
targettype 'recall rune' backpack
overhead "::: Recalled Out :::" 15
endif
if findtype 'Runebook' backpack
targettype 'Runebook' backpack
overhead "::: Recalled Out :::" 15
endif
endif
else
if atlist moveList 0 as firstEntry
#overhead xListEntry
#overhead yListEntry
if firstEntry == 1
overhead '::: moving north :::' 55
walk 'north'
wait movementDelay
endif
if firstEntry == 2
overhead '::: moving right :::' 55
walk 'right'
wait movementDelay
endif
if firstEntry == 3
overhead '::: moving east :::' 55
walk 'east'
wait movementDelay
endif
if firstEntry == 4
overhead '::: moving down :::' 55
walk 'down'
wait movementDelay
endif
if firstEntry == 5
overhead '::: moving south :::' 55
walk 'south'
wait movementDelay
endif
if firstEntry == 6
overhead '::: moving left :::' 55
walk 'left'
wait movementDelay
endif
if firstEntry == 7
overhead '::: moving west :::' 55
walk 'west'
wait movementDelay
endif
if firstEntry == 8
overhead '::: moving up :::' 55
walk 'up'
wait movementDelay
endif
endif
endif
endif
endwhile
This script works hand in hand with the Razor2Rails program which converts a razor .macro file you record of your movements to script compatible lists that you insert. You can use this in any script where you would like pre-recorded movement to be available. This script is the most simple example so you can see the working parts. You must be on the exact square you started recording at when you start this. (I suggest marking a rune and writing the location >info [target self] at the top of the script.) Link to Razor2Rail: https://github.com/malbolger/Razor2Rail (source code available).