@ -3895,12 +3895,12 @@ function inv.cli.tags.examples()
dbot.print(
dbot.print(
[[@W
[[@W
This plugin supports optional end tags for all operations. An end tag has the
This plugin supports optional end tags for all operations. An end tag has the
form "@G{/the command line:return value:return value string}@W". This gives users
form "@G{/the command line:execution time in seconds: return value:return value string}@W".
an easy way to use the plugin in other scripts because those scripts can trigger on
This gives users an easy way to use the plugin in other scripts because those scripts can
the end tag to know an operation is done and what result the operation had.
trigger on the end tag to know an operation is done and what result the operation had.
For example, if you type "@Gdinv refresh@W", you could trigger on an end tag that has
For example, if you type "@Gdinv refresh@W", you could trigger on an end tag that has
this output "@G{/dinv refresh :0:success}@W" to know when the refresh completed. Of
an output like "@G{/dinv refresh:0 :0:success}@W" to know when the refresh completed. Of
course, you would want to double check the return value in the end tag to ensure
course, you would want to double check the return value in the end tag to ensure
that everything happened the way you want.
that everything happened the way you want.
@ -16638,7 +16638,7 @@ function inv.consume.buy(typeName, numItems, containerName)
local curLevel = dbot.gmcp.getLevel()
local curLevel = dbot.gmcp.getLevel()
local bestEntry = nil
local bestEntry = nil
for _, entry in ipairs(inv.consume.table[typeName]) do
for _, entry in ipairs(inv.consume.table[typeName]) do
if (entry.level < curLevel ) t h e n
if (entry.level < = curLevel) then
bestEntry = entry
bestEntry = entry
end -- if
end -- if
end -- for
end -- for
@ -20457,11 +20457,12 @@ function dbot.execute.queue.fence()
wait.time(drlSpinnerPeriodDefault)
wait.time(drlSpinnerPeriodDefault)
totTime = totTime + drlSpinnerPeriodDefault
totTime = totTime + drlSpinnerPeriodDefault
end -- while
end -- while
-- Remove the trigger if an error occurred and the one-shot trigger is still pending
-- Note: You might think that we'd want to delete the fence trigger if there was an error
if (retval ~= DRL_RET_SUCCESS) then
-- and the trigger is still pending. However, there is a chance that the fence echo
DeleteTrigger(dbot.execute.trigger.fenceName)
-- is still pending on the server side so we'd like to keep the trigger around as long
end -- if
-- as possible to suppress the fence echo -- just in case. It won't hurt anything
-- because the next fence will overwrite the previous fence trigger.
dbot.execute.queue.fenceCounter = dbot.execute.queue.fenceCounter + 1
dbot.execute.queue.fenceCounter = dbot.execute.queue.fenceCounter + 1