Skip to content

Instantly share code, notes, and snippets.

@blakepell
Last active June 6, 2021 15:42
Show Gist options
  • Save blakepell/60ce102c41b64c19ad77f90dfe1a7051 to your computer and use it in GitHub Desktop.
Save blakepell/60ce102c41b64c19ad77f90dfe1a7051 to your computer and use it in GitHub Desktop.
Avalon Mud Client (Lua): Alias to identify multiple items
-- Syntax: id <start index> <end index> <keyword>
-- Description: Casts the identify spell on a number of items with the same keyword.
-- Example: id 1 5 sword
-- Result: cast identify 1.sword, cast identify 2.sword, etc.
local startIndex = tonumber(getarg(1, ...))
local endIndex = tonumber(getarg(2, ...))
local item = getarg(3, ...)
for i = startIndex, endIndex, 1
do
lua:Send("cast identify " .. i .. "." .. item)
end
@blakepell
Copy link
Author

Updated for new implementation of Lua engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment