Old Runback Conversion

For questions regarding conversion of scripts from the old, parm style to the new MQ2Data format. Conversion questions only!

Moderator: MacroQuest Developers

Chamber
orc pawn
orc pawn
Posts: 15
Joined: Sun Jan 05, 2003 4:26 pm

Old Runback Conversion

Post by Chamber » Mon Apr 25, 2005 12:51 am

I've been trying to convert this over and I'm having a fit trying to get it to work if someone wouldn't mind taking the time to convert this for me I'd appreciate it, it's the last piece of scripting I have left to get my old Hunting macro I wrote up and running again and I'm pulling my hair out trying to convert it over.

Original Code

Code: Select all

|Runback.inc written by Compuboy 
|Use /call runback set at the beginning of 
|   a macro to define the loc and heading to face 
|Use /call runback run whenever you want to run 
|   back to where you started and face the direction you were 
|   facing to begin. 

sub RunBack()
/declare v70 global
/declare v71 global
/declare v72 global
/if "@Param0"=="set" { 
/goto :setvars 
}else /if "@Param0"=="run"{ 
/goto :runback 
}else{ 
/echo "Unrecognized runback parameter! Returning to /call point." 
/return 
} 

:setvars 
/varset v70 $char(x) 
/varset v71 $char(y) 
/varset v72 $char(heading) 
/echo "Location set to @v70,@v71 with a heading of @v72." 
/return 

:runback 
/echo "Running back to loc @v70,@v71." 
/face nopredict loc @v71,@v70 
/sendkey down w 

:checkdist 
/delay 0 
/face nopredict loc @v71,@v70 
/if n $abs($calc(@v70-$char(x)))<=5 /if n $abs($calc(@v71-$char(y)))<=5 { 
/sendkey up w 
/delay 5 
/face heading @v72 
/goto :end 
}else{ 
/goto :checkdist 
} 

:end 
/echo RunBack subroutine complete! Sitting.... 
/sit on 
/return
Chamber

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Mon Apr 25, 2005 4:14 am

Can try this... I did it quick though so might need some tweaking:

Code: Select all

|Runback.inc written by Compuboy
|Use /call runback set at the beginning of
|   a macro to define the loc and heading to face
|Use /call runback run whenever you want to run
|   back to where you started and face the direction you were
|   facing to begin.

Sub RunBack(string thisParam)
   /if (!Defined[anchorX]}) /declare anchorX float outer
   /if (!Defined[anchorY]}) /declare anchorY float outer
   /if (!Defined[heading]}) /declare myHeading float outer
   /if (${thisParam.Equal[set]}) {
      /varset anchorX ${Me.X}
      /varset anchorY ${Me.Y}
      /varset heading ${Me.Heading}
      /echo Location set to ${anchorX}, ${anchorY} with a heading of ${heading}
      /goto :done
   }
   /if (${thisParam.Equal[run]}) {
      /call RunBack
   }else{
      /echo "Unrecognized runback parameter! Returning to /call point."
   }
/return


Sub RunBack
   :runback
   /echo Running back to loc ${anchorX},${anchorY}.
   /face loc ${anchorY},${anchorX}
   /keypress forward hold
   
   :checkdist
   /delay 0
   /face nopredict loc ${anchorY},${anchorX}
   /if (${Math.Abs[${Math.Calc[${anchorX}-${Me.X}]}]})<=5 {
      /if (${Math.Abs[${Math.Calc[${anchorY}-${Me.Y}]}]})<=5 {
         /keypress forward
         /delay 5
         /face heading ${heading}
         /goto :end
      }
   }else{
      /goto :checkdist
   }
   
   :end
   /echo RunBack subroutine complete! Sitting....
   /sit on
/return
Last edited by wassup on Tue Apr 26, 2005 2:18 am, edited 1 time in total.

Chamber
orc pawn
orc pawn
Posts: 15
Joined: Sun Jan 05, 2003 4:26 pm

Post by Chamber » Mon Apr 25, 2005 8:20 pm

Ahh thanks man, I'll try it out in a few and see how it goes. You're a life saver.


Chamber

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Tue Apr 26, 2005 2:19 am

Missed a } and missed a few @ variables, but I fixed them.

Sorry for the rush job.

marinatuckson
decaying skeleton
decaying skeleton
Posts: 3
Joined: Thu Jul 03, 2025 1:21 am

Re: Old Runback Conversion

Post by marinatuckson » Thu Jul 03, 2025 5:08 am

Activate your Vizio SmartCast device easily—just visit Vizio.com/setup enter code and enter your unique TV code.
Configure your TV settings and personalize your streaming apps via Vizio.com/setup.
Start watching your favorite content in minutes by setting up your TV at Vizio.com/setup.
If you've purchased a new Smart TV, set it up in a few steps from the website at vizio.com/setup.

FrankJScott
naggy
naggy
Posts: 2349
Joined: Sun Feb 19, 2023 7:11 am

Recommended Mugshot Database Search Blog

Post by FrankJScott » Fri Jul 18, 2025 11:32 am

In reply to the guy asking about police mugshot database, free police records, criminal database, look up public records, look up arrest records free, criminal history information, lookup criminal records, state arrest records, the public records, background record search, I highly suggest this click this on mugshot database search forum or criminal background check sites, reliable background check, lookup records, database background check, local authority data, reliable criminal background check, criminal history, look up arrest records free, best way to look up criminal records, criminal records check free, bearing in mind this agree with about mugshot database search forum as well as data for everyone, background public records, criminal background check websites, criminal background, public arrest records, free public criminal record search, get your criminal background check, public record check, criminal background report, public record criminal charges, as well as this cool mugshot database search forum which is also great. Also, have a look at this great site on mugshot database search blog which is worth considering with background check s, criminal background check, check your criminal record, criminal background check sites, mugshot image search, get your criminal record, public record check, arrest record check, public public records, criminal and arrest records, which is worth considering with this more tips here about mugshot database search details as well as criminal conviction search, criminal mugshots, record information, identity no, get public records, helpful site for not forgetting sites such as personal background check, public records free lookup, look up mugshots free, look up your criminal record, look up someone criminal record, for good measure. Check more @ Great Tajir4d Login Blog 2a1b86b