Last active
June 6, 2021 15:42
-
-
Save blakepell/60ce102c41b64c19ad77f90dfe1a7051 to your computer and use it in GitHub Desktop.
Avalon Mud Client (Lua): Alias to identify multiple items
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated for new implementation of Lua engine.