diff --git a/Bast/BastmushChanges.txt b/Bast/BastmushChanges.txt index aecbea27..3070fb67 100644 --- a/Bast/BastmushChanges.txt +++ b/Bast/BastmushChanges.txt @@ -1,5 +1,13 @@ Bastmush Changes List +r2097 snapshot + - miniwin + - updates for changes to the AardMUSH client + - bast_spellup + - add an 'all' function to the senable command + - broadcast_kills + - add a trivia point mob message + r2096 snapshot - PotionQuaffer - bug fix: works for both long and short flags diff --git a/Bast/bast_spellup.xml b/Bast/bast_spellup.xml index c8d33fd9..437cd9e7 100644 --- a/Bast/bast_spellup.xml +++ b/Bast/bast_spellup.xml @@ -605,23 +605,33 @@ end function cmd_senable(cmddict) if #cmddict >= 1 then - phelper:plugin_header() local enabled = false - for i,item in ipairs(cmddict) do - local aspell = find_spell(item) - if aspell then - local sn = tonumber(aspell.sn) - if sn then - if askedself_xref[sn] ~= nil then - phelper.askedself[askedself_xref[sn]].disabled = false - ColourNote(RGBColourToName(var.plugin_colour), "black", aspell.name .. " enabled") - enabled = true - else - ColourNote(RGBColourToName(var.plugin_colour), "black", aspell.name .. " not in list") + phelper:plugin_header() + if cmddict[1] == 'all' then + for i,j in ipairs(phelper.askedself) do + if phelper.askedself[i].disabled then + phelper.askedself[i].disabled = false + enabled = true + end + end + ColourNote(RGBColourToName(var.plugin_colour), "black", "All spells enabled") + else + for i,item in ipairs(cmddict) do + local aspell = find_spell(item) + if aspell then + local sn = tonumber(aspell.sn) + if sn then + if askedself_xref[sn] ~= nil then + phelper.askedself[askedself_xref[sn]].disabled = false + ColourNote(RGBColourToName(var.plugin_colour), "black", aspell.name .. " enabled") + enabled = true + else + ColourNote(RGBColourToName(var.plugin_colour), "black", aspell.name .. " not in list") + end end + else + print('Enable: could not find spell', item) end - else - print('Enable: could not find spell', item) end end if enabled then @@ -1307,6 +1317,19 @@ function pracskill(sn) end end end + +function loadall() + load_spells("all") + --load_spells_xrefs() + load_spells("affected") + load_spells("spellup", true) + load_spells("learned") + load_spells("notpracticed") + load_spells("notlearned") + --print('loading recoveries in enable') + load_recoveries("all") + load_recoveries("affected") +end ]]> @@ -1331,7 +1354,8 @@ function OnPluginBroadcast (msg, id, name, text) phelper.pause = true event_status_change() elseif msg == 6 or msg == 8 then - DoAfterSpecial(5, 'tresume()', 12) + DoAfterSpecial(5, 'loadall()', 12) + DoAfterSpecial(10, 'tresume()', 12) end end if id == '3e7dedbe37e44942dd46d264' then @@ -1422,9 +1446,11 @@ function OnPluginBroadcast (msg, id, name, text) if askedself_xref[tonumber(tag.sn)] ~= nil then local tagsn = tonumber(tag.sn) if tagsn == waiting then - phelper.askedself[askedself_xref[tagsn]].disabled = true - ColourNote("red", "black", spells['all'][tagsn].name .. " disabled because you can't cast this spell.") - make_askedself_xrefs() + if not spells['notlearned'][tag.sn] then + phelper.askedself[askedself_xref[tagsn]].disabled = true + ColourNote("red", "black", spells['all'][tagsn].name .. " disabled because you can't cast this spell.") + make_askedself_xrefs() + end setwaiting(false) nextspellup('spell fail') end diff --git a/Bast/broadcast_kills.xml b/Bast/broadcast_kills.xml index f08c89e2..9812a73e 100644 --- a/Bast/broadcast_kills.xml +++ b/Bast/broadcast_kills.xml @@ -213,7 +213,6 @@ You blend perfectly with your surroundings and avoid Valkur's lab guard's attack sequence="100" > - + + 0 then x = x + wfunction (self.winid, font_id, text, x, Top, Right, Bottom, - colour_conversion [colour] or self.text_colour) + atletter_to_color_value[colour] or self.text_colour) end -- some text to display end -- for each colour run