|
|
|
@ -87,7 +87,7 @@ dbot.version : Module to track version and changelog information and update the
|
|
|
|
|
save_state="y"
|
|
|
|
|
date_written="2017-08-12 08:45:15"
|
|
|
|
|
requires="4.98"
|
|
|
|
|
version="2.0009"
|
|
|
|
|
version="2.0010"
|
|
|
|
|
>
|
|
|
|
|
<description trim="y">
|
|
|
|
|
<![CDATA[
|
|
|
|
@ -136,7 +136,7 @@ Usage
|
|
|
|
|
Equipment sets
|
|
|
|
|
dinv set [display | wear] <priority name> <level>
|
|
|
|
|
dinv snapshot [create | delete | list | display | wear] <snapshot name>
|
|
|
|
|
dinv priority [list | display | create | clone | delete | edit | compare] <name 1> <name 2>
|
|
|
|
|
dinv priority [list | display | create | clone | delete | edit | copy | paste | compare] <name 1> <name 2>
|
|
|
|
|
|
|
|
|
|
Equipment analysis
|
|
|
|
|
dinv analyze [list | create | delete | display] <priority name> <positions>
|
|
|
|
@ -536,7 +536,7 @@ Feature Wishlist
|
|
|
|
|
|
|
|
|
|
<alias
|
|
|
|
|
script="inv.cli.priority.fn"
|
|
|
|
|
match="^[ ]*dinv[ ]+priority[ ]+(list|display|create|delete|clone|compare)([ ]+[^ ]+)?([ ]+[^ ]+)?[ ]*$"
|
|
|
|
|
match="^[ ]*dinv[ ]+priority[ ]+(list|display|create|delete|clone|compare|copy|paste)([ ]+[^ ]+)?([ ]+[^ ]+)?[ ]*$"
|
|
|
|
|
enabled="y"
|
|
|
|
|
regexp="y"
|
|
|
|
|
send_to="12"
|
|
|
|
@ -546,7 +546,7 @@ Feature Wishlist
|
|
|
|
|
|
|
|
|
|
<alias
|
|
|
|
|
script="inv.cli.priority.fn2"
|
|
|
|
|
match="^[ ]*dinv[ ]+priority[ ]+(edit|split|join)([ ]+[^ ]+)?([ ]+[^ ]+)?[ ]*$"
|
|
|
|
|
match="^[ ]*dinv[ ]+priority[ ]+(edit)([ ]+[^ ]+)?([ ]+[^ ]+)?[ ]*$"
|
|
|
|
|
enabled="y"
|
|
|
|
|
regexp="y"
|
|
|
|
|
send_to="12"
|
|
|
|
@ -2405,6 +2405,12 @@ function inv.cli.priority.fn(name, line, wildcards)
|
|
|
|
|
elseif (command == "clone") then
|
|
|
|
|
inv.priority.clone(priorityName1, priorityName2, line)
|
|
|
|
|
|
|
|
|
|
elseif (command == "copy") then
|
|
|
|
|
inv.priority.copy(priorityName1, line)
|
|
|
|
|
|
|
|
|
|
elseif (command == "paste") then
|
|
|
|
|
inv.priority.paste(priorityName1, line)
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
inv.cli.priority.usage()
|
|
|
|
|
return inv.tags.stop(invTagsPriority, line, DRL_RET_INVALID_PARAM)
|
|
|
|
@ -2457,7 +2463,7 @@ end -- inv.cli.priority.fn2
|
|
|
|
|
|
|
|
|
|
function inv.cli.priority.usage()
|
|
|
|
|
dbot.print("@W " .. pluginNameCmd ..
|
|
|
|
|
" priority @G[list | display | create | clone | delete | edit | compare] " ..
|
|
|
|
|
" priority @G[list | display | create | clone | delete | edit | copy | paste | compare] " ..
|
|
|
|
|
"@Y<name 1> <name 2>@w")
|
|
|
|
|
end -- inv.cli.priority.usage
|
|
|
|
|
|
|
|
|
@ -2584,7 +2590,22 @@ Examples:
|
|
|
|
|
mode on a large priority, you may need to resize your edit window to see everything.
|
|
|
|
|
"@Gdinv priority edit mage full@W"
|
|
|
|
|
|
|
|
|
|
8) Compare the stat differences at all levels for the equipment sets generated by two different
|
|
|
|
|
8) Use an external editor to modify a priority. You can copy the priority data to the system
|
|
|
|
|
clipboard to make it easy to transfer the priority to your own editor.
|
|
|
|
|
"@Gdinv priority copy psi-melee@W"
|
|
|
|
|
|
|
|
|
|
9) Paste priority data from the system clipboard and use that data to either create a new
|
|
|
|
|
priority (if it doesn't exist yet) or update an existing priority. This is convenient if you
|
|
|
|
|
used an external editor to modify the priority data and you want to import that data back into
|
|
|
|
|
the plugin.
|
|
|
|
|
"@Gdinv priority paste myThief@W"
|
|
|
|
|
|
|
|
|
|
10) Copy/paste a priority to make a duplicate. Yes, this is essentially the "@Cclone@W" mode,
|
|
|
|
|
but it shows off what you can do with "@Ccopy@W" and "@Cpaste@W".
|
|
|
|
|
"@Gdinv priority copy mage@W"
|
|
|
|
|
"@Gdinv priority paste myMage@W"
|
|
|
|
|
|
|
|
|
|
11) Compare the stat differences at all levels for the equipment sets generated by two different
|
|
|
|
|
priorities. This will generate a big report that I didn't include here because this helpfile
|
|
|
|
|
is already enormous :) If you have not already performed a full analysis of both priorities
|
|
|
|
|
you will be prompted to do so before the comparison can execute. The output shown below is
|
|
|
|
@ -10259,8 +10280,9 @@ end -- inv.cache.clearOld
|
|
|
|
|
-- inv.priority.display(priorityName, endTag)
|
|
|
|
|
--
|
|
|
|
|
-- inv.priority.edit(priorityName, useAllFields, isQuiet, endTag)
|
|
|
|
|
-- inv.priority.split(priorityName, level, endTag)
|
|
|
|
|
-- inv.priority.join(priorityName, level, endTag)
|
|
|
|
|
-- inv.priority.update(priorityName, priorityString, isQuiet)
|
|
|
|
|
-- inv.priority.copy(priorityName, endTag)
|
|
|
|
|
-- inv.priority.paste(priorityName, endTag)
|
|
|
|
|
--
|
|
|
|
|
-- inv.priority.compare(priorityName1, priorityName2, endTag)
|
|
|
|
|
--
|
|
|
|
@ -10521,7 +10543,7 @@ end -- inv.priority.display
|
|
|
|
|
|
|
|
|
|
function inv.priority.edit(priorityName, useAllFields, isQuiet, endTag)
|
|
|
|
|
local retval = DRL_RET_SUCCESS
|
|
|
|
|
local priorityEntry, priorityString = nil, ""
|
|
|
|
|
local priorityString = ""
|
|
|
|
|
|
|
|
|
|
if (priorityName == nil) or (priorityName == "") then
|
|
|
|
|
dbot.warn("inv.priority.edit: priority name is missing!")
|
|
|
|
@ -10573,9 +10595,29 @@ The first column lists the names of each available priority field. Subsequent c
|
|
|
|
|
break
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
priorityEntry, retval = inv.priority.stringToTable(priorityString)
|
|
|
|
|
retval = inv.priority.update(priorityName, priorityString, isQuiet)
|
|
|
|
|
end -- if
|
|
|
|
|
until (retval == DRL_RET_SUCCESS)
|
|
|
|
|
|
|
|
|
|
return inv.tags.stop(invTagsPriority, endTag, retval)
|
|
|
|
|
end -- inv.priority.edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function inv.priority.update(priorityName, priorityString, isQuiet)
|
|
|
|
|
|
|
|
|
|
if (priorityName == nil) or (priorityName == "") then
|
|
|
|
|
dbot.warn("inv.priority.update: Missing priority name parameter")
|
|
|
|
|
return DRL_RET_INVALID_PARAM
|
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
if (priorityString == nil) or (priorityString == "") then
|
|
|
|
|
dbot.warn("inv.priority.update: Missing priority string parameter")
|
|
|
|
|
return DRL_RET_INVALID_PARAM
|
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
local priorityEntry, retval = inv.priority.stringToTable(priorityString)
|
|
|
|
|
if (retval ~= DRL_RET_SUCCESS) then
|
|
|
|
|
dbot.debug("inv.priority.edit: Failed to convert priority string into priority: " ..
|
|
|
|
|
dbot.debug("inv.priority.update: Failed to convert priority string into priority: " ..
|
|
|
|
|
dbot.retval.getString(retval))
|
|
|
|
|
else
|
|
|
|
|
inv.priority.table[priorityName] = priorityEntry
|
|
|
|
@ -10589,29 +10631,69 @@ The first column lists the names of each available priority field. Subsequent c
|
|
|
|
|
inv.set.save()
|
|
|
|
|
|
|
|
|
|
end -- if
|
|
|
|
|
end -- if
|
|
|
|
|
until (retval == DRL_RET_SUCCESS)
|
|
|
|
|
|
|
|
|
|
return inv.tags.stop(invTagsPriority, endTag, retval)
|
|
|
|
|
end -- inv.priority.edit
|
|
|
|
|
return retval
|
|
|
|
|
end -- inv.priority.update
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function inv.priority.split(priorityName, level, endTag)
|
|
|
|
|
local retval = DRL_RET_SUCCESS
|
|
|
|
|
function inv.priority.copy(priorityName, endTag)
|
|
|
|
|
|
|
|
|
|
dbot.note("FIXME: split -- do we want/need this?")
|
|
|
|
|
if (priorityName == nil) or (priorityName == "") then
|
|
|
|
|
dbot.warn("inv.priority.copy: Missing priority name parameter")
|
|
|
|
|
return inv.tags.stop(invTagsPriority, endTag, DRL_RET_INVALID_PARAM)
|
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
if (inv.priority.table[priorityName] == nil) then
|
|
|
|
|
dbot.warn("inv.priority.copy: priority \"@C" .. priorityName .. "@W\" does not exist")
|
|
|
|
|
return inv.tags.stop(invTagsPriority, endTag, DRL_RET_MISSING_ENTRY)
|
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
-- Get a string representation of the priority we want to copy
|
|
|
|
|
local priorityString, retval = inv.priority.tableToString(inv.priority.table[priorityName],
|
|
|
|
|
true, false, true)
|
|
|
|
|
if (retval ~= DRL_RET_SUCCESS) then
|
|
|
|
|
dbot.warn("inv.priority.copy: Failed to get string representation of priority \"@C" ..
|
|
|
|
|
priorityName .. "@W\": " .. dbot.retval.getString(retval))
|
|
|
|
|
else
|
|
|
|
|
SetClipboard(priorityString)
|
|
|
|
|
dbot.info("Copied priority \"@C" .. priorityName .. "@W\" to clipboard")
|
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
return inv.tags.stop(invTagsPriority, endTag, retval)
|
|
|
|
|
end -- inv.priority.split
|
|
|
|
|
end -- inv.priority.copy
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function inv.priority.join(priorityName, level, endTag)
|
|
|
|
|
function inv.priority.paste(priorityName, endTag)
|
|
|
|
|
local retval = DRL_RET_SUCCESS
|
|
|
|
|
local operation
|
|
|
|
|
|
|
|
|
|
dbot.note("FIXME: join -- do we want/need this?")
|
|
|
|
|
if (priorityName == nil) or (priorityName == "") then
|
|
|
|
|
dbot.warn("inv.priority.paste: Missing priority name parameter")
|
|
|
|
|
return inv.tags.stop(invTagsPriority, endTag, DRL_RET_INVALID_PARAM)
|
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
if (inv.priority.table[priorityName] == nil) then
|
|
|
|
|
operation = "Created"
|
|
|
|
|
else
|
|
|
|
|
operation = "Updated"
|
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
local priorityString = GetClipboard()
|
|
|
|
|
if (priorityString == nil) or (priorityString == "") then
|
|
|
|
|
dbot.warn("inv.priority.paste: Failed to get priority from clipboard")
|
|
|
|
|
return inv.tags.stop(invTagsPriority, endTag, DRL_RET_MISSING_ENTRY)
|
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
retval = inv.priority.update(priorityName, priorityString, true)
|
|
|
|
|
if (retval ~= DRL_RET_SUCCESS) then
|
|
|
|
|
dbot.warn("inv.priority.paste: Failed to update priority from clipboard data: " ..
|
|
|
|
|
dbot.retval.getString(retval))
|
|
|
|
|
else
|
|
|
|
|
dbot.info(operation .. " priority \"@C" .. priorityName .. "@W\" from clipboard data")
|
|
|
|
|
end -- if
|
|
|
|
|
|
|
|
|
|
return inv.tags.stop(invTagsPriority, endTag, retval)
|
|
|
|
|
end -- inv.priority.join
|
|
|
|
|
end -- inv.priority.paste
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function inv.priority.compare(priorityName1, priorityName2, endTag)
|
|
|
|
|