diff --git a/src/aliases/bashmatic/BM_Addtarget.lua b/src/aliases/bashmatic/BM_Addtarget.lua index dbc8e8b..d0f6be5 100644 --- a/src/aliases/bashmatic/BM_Addtarget.lua +++ b/src/aliases/bashmatic/BM_Addtarget.lua @@ -1,11 +1,11 @@ -if not bashmatic.death.event then - cecho("BASHMATIC: You must configure the death trigger first. Please see bm help for more info.") +if not Bashmatic.death.event then + cecho("Bashmatic: You must configure the death trigger first. Please see bm help for more info.") else - if bashmatic.enemies.group then + if Bashmatic.enemies.group then -- grouping enemies by area local area = GetRoomAreaName(GetRoomArea(GetPlayerRoom())) or nil if area == nil then - cecho("BASHMATIC: We tried to add that enemy but got a bad area.\nGot: " .. area .. "") + cecho("Bashmatic: We tried to add that enemy but got a bad area.\nGot: " .. area .. "") else inlineAddTarget(matches[2], area) end diff --git a/src/aliases/bashmatic/BM_Configset.lua b/src/aliases/bashmatic/BM_Configset.lua index e138251..164850d 100644 --- a/src/aliases/bashmatic/BM_Configset.lua +++ b/src/aliases/bashmatic/BM_Configset.lua @@ -2,32 +2,32 @@ local which = matches[2]:lower() if which == "phrase" then -- death phrase - if Bashmatic.death.event ~= nil then + if Bashmatic.death.event then killTrigger(Bashmatic.death.event) end - Bashmatic.death.phrase = matches[2] + Bashmatic.death.phrase = matches[3] Bashmatic.death.event = tempTrigger(Bashmatic.death.phrase,handleMobDeath) - cecho("Bashmatic: Reset the death event trigger phrase to " .. matches[2] .. ".") + cecho("Bashmatic: Reset the death event trigger phrase to " .. matches[3] .. ".") elseif which == "start" then -- starting battle command - Bashmatic.commands.start = matches[2] - cecho("Bashmatic: Set battle start command to " .. matches[2] .. " target.") + Bashmatic.commands.start = matches[3] + cecho("Bashmatic: Set battle start command to " .. matches[3] .. " target.") elseif which == "before" then -- before battle command - Bashmatic.commands.before = matches[2] - cecho("Bashmatic: Will send " .. matches[2] .. " before battle start.") + Bashmatic.commands.before = matches[3] + cecho("Bashmatic: Will send " .. matches[3] .. " before battle start.") elseif which == "during" then -- during battle command - Bashmatic.comands.during = matches[2] - cecho("Bashmatic: Will send " .. matches[2] .. " during battle every " .. Bashmatic.commands.duringTime .. " seconds.") + Bashmatic.comands.during = matches[3] + cecho("Bashmatic: Will send " .. matches[3] .. " during battle every " .. Bashmatic.commands.duringTime .. " seconds.") elseif which == "duringTime" then -- during battle command time frame - Bashmatic.commands.duringTime = tonumber(mathces[2]) - cecho("Bashmatic: Will send " .. Bashmatic.commands.during .. " during battle every " .. tonumber(matches[2]) .. " seconds.") + Bashmatic.commands.duringTime = tonumber(mathces[3]) + cecho("Bashmatic: Will send " .. Bashmatic.commands.during .. " during battle every " .. tonumber(matches[3]) .. " seconds.") elseif which == "after" then -- after battle command - Bashmatic.commands.after = matches[2] - cecho("Bashmatic: Will send " .. matches[2] .. " after combat.") + Bashmatic.commands.after = matches[3] + cecho("Bashmatic: Will send " .. matches[3] .. " after combat.") elseif which == "group" then -- group by area if #getRooms() == 0 then @@ -46,5 +46,5 @@ elseif which == "group" then end end else - cecho("Bashmatic: Unrecognized option " .. matches[2] .. ". See bm help for a list of options.") + cecho("Bashmatic: Unrecognized option " .. matches[3] .. ". See bm help for a list of options.") end \ No newline at end of file diff --git a/src/scripts/bashmatic/bashmatic_init.lua b/src/scripts/bashmatic/bashmatic_init.lua index a82df95..cedbb60 100644 --- a/src/scripts/bashmatic/bashmatic_init.lua +++ b/src/scripts/bashmatic/bashmatic_init.lua @@ -2,15 +2,15 @@ local ourTables = require("Bashmatic.ftext").TableMaker Bashmatic = Bashmatic or { ["commands"] = { - start = nil, - before = nil, - during = nil, - duringTime = nil, - after = nil + start = false, + before = false, + during = false, + duringTime = 2, + after = false }, ["death"] = { - phrase = nil, - event = nil + phrase = false, + event = false }, ["enemies"] = { group = false, @@ -32,11 +32,11 @@ registerAnonymousEventHandler("sysInstallPackage", handleInstall) function handleShutdown() - if Bashmatic.death.event ~= nil then killTrigger(Bashmatic.death.event) end + if Bashmatic.death.event ~= false then killTrigger(Bashmatic.death.event) end killBashingTriggers() bmDisable() toggleBashing(false) - Bashmatic.death.event = nil + Bashmatic.death.event = false table.save(getMudletHomeDir() .. "/Bashmatic.lua", Bashmatic) @@ -49,7 +49,7 @@ function handleLoadEvent() table.load(getMudletHomeDir() .. "/Bashmatic.lua", Bashmatic) end - if Bashmatic.death.phrase ~= nil then + if Bashmatic.death.phrase ~= false then Bashmatic.death.event = tempTrigger(Bashmatic.death.phrase,handleMobDeath) end