Updates for Nyy's Scripts
Posted: Thu Apr 25, 2024 5:37 pm
If you use the Train script as a Tank and have the nameplates w/ health % prompt display turned on instead of the classic conditions it will not call out when the mob reaches nasty wounds so that any casters can stop mem and come back. Update the "EC: nasty wounds" trigger to add this new pattern match:
Then update the body of the trigger to this:
Code: Select all
.*Target:\s+([A-Za-z' ]+)\s+([0-9]+)\%.*
Code: Select all
local xname=string.lower(matches[2])
if NyyLIB.smtrainposition == nil then
return
end
local xtarget=string.lower(NyyLIB.smtrainstops[NyyLIB.smtrainposition][2])
-- TODO need to capitalize all words in name, not just first
if NyyLIB.trainecho ~= 1 then
if string.findPattern(xtarget, xname) or (matches[3] ~= nil and tonumber(matches[3]) ~= nil and tonumber(matches[3]) < 30) then
NyyLIB.trainecho=1
local str = NyyLIB.smtrainstops[NyyLIB.smtrainposition][2]
local nextmob = string.gsub(" "..str, "%W%l", string.upper):sub(2)
if not silent then
mud:send("gcmd [" .. nextmob .. " has nasty wounds!]")
end
end
end