Skip to content

Commit

Permalink
Merge pull request #13 from endavis/master
Browse files Browse the repository at this point in the history
pull in r2097
  • Loading branch information
endavis authored Mar 29, 2017
2 parents 9d3bdef + b2ac193 commit e80843f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 20 deletions.
8 changes: 8 additions & 0 deletions Bast/BastmushChanges.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
62 changes: 44 additions & 18 deletions Bast/bast_spellup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
]]>
</script>

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion Bast/broadcast_kills.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ You blend perfectly with your surroundings and avoid Valkur's lab guard's attack
sequence="100"
>
</trigger>

<trigger
enabled="y"
regexp="y"
Expand All @@ -223,6 +222,15 @@ You blend perfectly with your surroundings and avoid Valkur's lab guard's attack
sequence="100"
>
</trigger>
<trigger
enabled="y"
regexp="y"
match="^You killed a Trivia Point bonus mob!! Trivia point added\.$"
name="trivmob3"
script="trivmob"
sequence="100"
>
</trigger>

<trigger
custom_colour="17"
Expand Down
2 changes: 1 addition & 1 deletion Bast/lua/miniwin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,7 @@ function Miniwin:colourtext (font_id, Text, Left, Top, Right, Bottom, Capitalize

if #text > 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
Expand Down

0 comments on commit e80843f

Please sign in to comment.