• 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

How do I...?

FunWithUs

New member
I am not sure what to call it... An array perhaps? Basically, I want to be able to set up a structure that will look at my current location, do a check to see if there are any NPCs within a certain range, and if not, move to the next set of locs and check again. If nothing there, it will move to the next one, and so on...

I just want to be able to cycle through coordinates until I get to a point that has mobs in range. Can anyone give me an example of a set of if statements that will cycle through results in a specific order?

I think I can fill in the blanks if I have a good example to base my work off of.

Thanks in advance.
 
Rich (BB code):
Sub Main
/declare coordcount int outer 0
/declare resetcount int outer 5
:Start
/if (!${SpawnCount[NPC Radius 50]}) {
/if (${coordcount}>=${resetcount}) /varset coordcount 0
/call gotonext
} else /call dosomethingsub
/goto :Start
/return

sub gotonext
/if (${coordcount}==5) {
    /call movetoloc -60.43 1513.25
/varcalc coordcount ${coordcount}+1
}
/if (${coordcount}==4) {
    /call movetoloc -72.33 1435.96
/varcalc coordcount ${coordcount}+1
}
/if (${coordcount}==3) {
    /call movetoloc -60.43 1513.25
/varcalc coordcount ${coordcount}+1
}
/if (${coordcount}==2) {
    /call movetoloc -72.33 1435.96
/varcalc coordcount ${coordcount}+1
}
/if (${coordcount}==1) {
    /call movetoloc -60.43 1513.25
/varcalc coordcount ${coordcount}+1
}
/if (${coordcount}==0) {
    /call movetoloc -72.33 1435.96
/varcalc coordcount ${coordcount}+1
}
/return
 
How do I...?

Users who are viewing this thread

Back
Top
Cart