• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Moving with out /warp

Yes Advpath, and Move.inc are ways and writing your own movement system is too.

Move.inc
Rich (BB code):
|=================================================  ==|
|- move.inc                                         |
|                                                   |
|Simple moving and object-avoidance routines        |
|                                                   |
|Originally by beatnik007 (Who credits Mckorr)      |
|                                                   |
|Revised and converted to MQ2Data by Terramantian   |
|=================================================  ==|


| Sub MoveToLoc                                     |
|---------------------------------------------------|
|This simply moves the player to within 10 units of |
|the requested location, while avoiding obstacles   |
|                                                   |
|This is beatnik007's original sub, with a few minor|
|changes and rewritten in MQ2Data format            |
|                                                   |
|SYNTAX: /call MoveToLoc Y X                        |


Sub goto(MoveToY, MoveToX)
    /echo Moving to Location: ${MoveToY}, ${MoveToX}.
    /echo Distance: ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}

    /declare running int local
    /declare distanceNow float local
    /declare distanceBefore float local
    /declare distanceModifier int local
    /varset running 0
    /declare distanceTimer timer 15
    /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
    /varset distanceModifier 1
   
    :moveToLocation

    /face nolook loc ${MoveToY},${MoveToX}

    /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) {
        /keypress forward
        /return
    }
   
    /if (${distanceTimer}==0) {
        /if (${Me.Sneaking}) {
            /varset distanceModifier 2
        } else {
            /varset distanceModifier 1
        }

        /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
        /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
      /call strafePastObstacle
        }
        /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
        /varset distanceTimer 15
    }

    /if (${running}==0) {
        /keypress forward
        /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) {
            /varset running 1
            /keypress forward hold
        }
    } else {
        /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) {
            /varset running 0
            /keypress forward
        }
    }
    /goto :moveToLocation
/return


| Sub MoveToSpawn                                   |
|---------------------------------------------------|
|This moves the player to within a provided distance|
|of the provided spawn, while avoiding obstacles    |
|                                                   |
|I "wrote" this, but as you can see, it's the same  |
|as MoveToLoc with a few variable replacements.     |
|                                                   |
|The second parameter, Distance, allows for the     |
|player to stop short of the target by a certain    |
|amount, to provide for different aggro radii, etc. |
|                                                   |
|SYNTAX: /call MoveToSpawn ID Distance              |

Sub MoveToSpawn(MoveToID, StopDistance)

    /if (!(${Defined[MoveToID]})||(${Spawn[MoveToID].ID})) {
        /echo Spawn ID not found or no ID provided. Aborting...
        /return
    }
    /if (!(${Defined[StopDistance]})) {
   /echo Stopping point not defined, using default distance of 70
        /declare StopDistance int local
        /varset StopDistance 70   
    }

    /echo Moving to Spawn: ${MoveToID} (${Spawn[${MoveToID}].CleanName}).
    /echo Current Location: ${Spawn[${MoveToID}].Y}, ${Spawn[${MoveToID}].X}
    /echo Current Distance: ${Spawn[${MoveToID}].Distance}

    /declare running int local
    /declare distanceNow float local
    /declare distanceBefore float local
    /declare distanceModifier int local
    /varset running 0
    /declare distanceTimer timer 15
    /varset distanceBefore ${Spawn[${MoveToID}].Distance}
    /varset distanceModifier 1
   
    :moveToSpawn

    /squelch /face fast nolook id ${MoveToID}

    /if (${Spawn[${MoveToID}].Distance}>${StopDistance}) {
        /keypress forward
        /return
    }
   
    /if (${distanceTimer}==0) {
        /if (${Me.Sneaking}) {
            /varset distanceModifier 2
        } else {
            /varset distanceModifier 1
        }

        /varset distanceNow ${Spawn[${MoveToID}].Distance}
        /if (${Math.Calc[${distanceBefore}-${distanceNow}]}>${Math.Calc[10/${distanceModifier}]}) {
      /call strafePastObstacle
        }
        /varset distanceBefore ${Spawn[${MoveToID}].Distance}
        /varset distanceTimer 15
    }

    /if (${running}==0) {
        /keypress forward
        /if (${Spawn[${MoveToID}].Distance}<=${StopDistance}) {
            /varset running 1
            /keypress forward hold
        }
    } else {
        /if (${Spawn[${MoveToID}].Distance}>${StopDistance}) {
            /varset running 0
            /keypress forward
        }
    }
    /goto :moveToSpawn
/return

| Only to be used by the previous functions - It's obvious what it does. |

sub strafePastObstacle
    /keypress forward
    /keypress back hold
    /delay 2
    /keypress back
    /if (${Math.Rand[99]}>50) {
        /keypress strafe_right hold
    } else {
        /keypress strafe_left hold
    }
    /delay 3
    /keypress strafe_right
    /keypress strafe_left
    /keypress forward hold
/return

How to use move.inc
Rich (BB code):
#include move.inc
/declare Box1Y int outer -1161
/declare Box1X int outer -124
/declare Box2Y int outer -1478
/declare Box2X int outer -71
/declare Box3Y int outer -1468
/declare Box3X int outer -309

Sub SnareIt

/call goto ${Box1Y} ${Box1X}
/varset CurrentBox 1
/delay 1s
/call Cast ${SnareSpell}
/call NextBox
/doevents

/return




Sub NextBox
   /if (${CurrentBox}==1) {
   /call goto ${Box2Y} ${Box2X}
   /varset CurrentBox 2
   /return
   }
   /if (${CurrentBox}==2) {
   /call goto ${Box3Y} ${Box3X}
   /varset CurrentBox 3
   /return
   }
   /if (${CurrentBox}==3) {
   /call goto ${Box1Y} ${Box1X}
   /varset CurrentBox 1
   /return
   }
   /if (${CurrentBox}==4) {
   /call goto ${Box1Y} ${Box1X}
   /varset CurrentBox 1
   /return
   }

i love rez
 
There IS something in moveutils that tries to navagate you around obstacles if you get stuck, "stuck logic" outlander calls it. But yeah, both will work
 
Moving with out /warp

Users who are viewing this thread

Back
Top
Cart