• 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

Lua - Colored Circle Fun!

Coldblooded

Zero Fuchs Given
Creator
Commits
192
A fun Sunday morning project

This is set up for a mage to summon and drop items on the ground in a circle using some basic math and mq2nav.

Certain mage items glow/flash different colors, so for sure have fun finding new ones. If you do, please let us know! Who knows, maybe this could be a fun time waster.
I found that Heatstones glow red, Coldstones glow blue, and Orb of Exploration are yellow color.

How to use
Put this script in your Lua folder, break out that old mage and make sure you mem the spells. If you don't have the spells memed, the script will complain about it and quit.
By default, it will make a 10-unit radius circle with 10 items with a blue-colored item.

You can pass in arguments to control the outcome.
Argument 1 is the number of items to distribute along the circle.
Argument 2 is the size of the circle in EQ units.
Argument 3 is the color of the items.

/lua run circles 20 20 red

Have FUN!

circle.lua
Lua:
---@type Mq
local mq = require('mq')

local args = {...}

local radian_in_circle = 6.28
local items = args[1] or 20
local increment = radian_in_circle/items

local r = args[2] or 15
local Cx = mq.TLO.Me.X()
local Cy = mq.TLO.Me.Y()

local item_color = {
   blue =   'summon coldstone',
   red =    'summon heatstone',
   yellow = 'summon: orb of exploration'
}

local color = args[3] or 'blue'

print('Using item color '..color)
print('Casting: '..item_color[color])

if mq.TLO.Me.Gem(item_color[color]) == nil then
   print('You need to memorize '..item_color[color]..' to continue.')
   mq.exit()
end

for i = 0, radian_in_circle, increment do

   -- Move to our location  
   local x = Cx + (r * math.cos(i))
   local y = Cy + (r * math.sin(i))
   mq.cmdf('/squelch /nav locxy %d %d', x, y)
   repeat mq.delay(250) until not mq.TLO.Navigation.Active()

   -- Cast our item.  Recast if necessary from fizzles or other issues.
   while not mq.TLO.Cursor() do
      -- Check to see if our spell is ready to cast and if not wait for it
      repeat mq.delay(250) until mq.TLO.Me.SpellReady(string.format('%s', item_color[color]))()
      mq.cmdf('/cast "%s"', item_color[color])
      repeat mq.delay(250) until not mq.TLO.Me.Casting()
   end

   -- Drop the item on the ground
   mq.cmd('/drop')
   repeat mq.delay(250) until not mq.TLO.Cursor()

end

-- Move back to to the center of our circle when complete
mq.cmdf('/squelch /nav locxy %d %d', Cx, Cy)



[ICODE]
 
Last edited:
Lua - Colored Circle Fun!

Users who are viewing this thread

Back
Top
Cart