16
Scripting Chat / Re: Text recognition
« on: May 27, 2017, 01:01:53 PM »
Thanks guys!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
sub combat
set %target #findid
repeat
{
gosub castlight %target
gosub castscan
finditem %target g_15
if #finddist < 4
{
call %railsubs TM_GotoClosestWaypoint
call %railsubs TM_DetermineCurrentRailName
call %railsubs TM_RunRail #RESULT PRESENT END FW
}
until #findcnt = 0 || ( #charposx = 5703 && #charposy = 639 )
this does something more .. how can i make it to change dirrection?
mainloop:
for %i 1 17
{
set %rail_filename railfile . %i , .txt
set %rail_label LABEL . %i
call %railsubs TM_Initialize
call %railsubs TM_LoadRail %rail_filename
gosub castinvis
gosub setpagebutton
;gosub hide
gosub setrecallbutton
gosub openrunebook
set %charx #charposx
set %chary #charposy
gosub calculatex %i
click %resultx %y
wait 10
click %recallx %recally
repeat
{
wait 1
}
until #charposx <> %charx || #charposy <> %chary
finditem %dragontypes G
if #findcnt > 0
gosub combat
gosub flybank
gosub checkreagents
}
goto mainloop
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
sub combat
set %target #findid
repeat
{
gosub castlight %target
gosub castscan
finditem %target g_15
if #finddist < 4
call %railsubs TM_GotoClosestWaypoint
}
until #findcnt = 0 || ( #charposx = 5703 && #charposy = 639 )
if ( #charposx = 5703 && #charposy = 639 )
set %recycle #true
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ends up doing a pathfind in the closest waypoint and spams lighting too fast.. hmm.