Added a new lowercase option
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
45f52cd640
commit
ee3bbdb2f8
@ -12,6 +12,7 @@ Again, it's very generic. Because of that it supports pretty much anywhere that
|
||||
* Supports detecting areas using the mudlet mapper
|
||||
* Supports detecting enemies by creating temp triggers based on target names
|
||||
* Provides a function `bmDisable()` that will disable the basher so you can rig a flee/wimpy trigger/alias
|
||||
* Can convert targets to lowercase for some weird muds that use proper casing in display but not in targetting
|
||||
|
||||
# Can I use this on my mud?
|
||||
I don't know. Many muds have rules against this kind of script. Just as many muds don't care if you use a script like this. Yet more sit somewhere in the middle. It's your responsibility to know where the rules on your mud stand.
|
||||
|
@ -40,4 +40,9 @@ if Bashmatic.enemies.group then
|
||||
else
|
||||
cecho("\n<DarkSlateBlue>-- Grouping Enemies by Areas: No")
|
||||
end
|
||||
if Bashmatic.enemies.lowercase then
|
||||
cecho("\n<DarkSlateBlue>-- Sending Targets Lowercase: Yes")
|
||||
else
|
||||
cecho("\n<DarkSlateBlue>-- Sending Targets Lowercase: No")
|
||||
end
|
||||
cecho("<reset>")
|
@ -6,7 +6,7 @@ if which == "phrase" then
|
||||
killTrigger(Bashmatic.death.event)
|
||||
end
|
||||
Bashmatic.death.phrase = matches[3]
|
||||
Bashmatic.death.event = tempTrigger(Bashmatic.death.phrase,handleMobDeath)
|
||||
Bashmatic.death.event = tempRegexTrigger(".*" .. Bashmatic.death.phrase .. ".*",handleMobDeath)
|
||||
cecho("<DarkSlateBlue>Bashmatic: Reset the death event trigger phrase to " .. matches[3] .. ".<reset>")
|
||||
elseif which == "start" then
|
||||
-- starting battle command
|
||||
@ -28,6 +28,14 @@ elseif which == "after" then
|
||||
-- after battle command
|
||||
Bashmatic.commands.after = matches[3]
|
||||
cecho("<DarkSlateBlue>Bashmatic: Will send " .. matches[3] .. " after combat.<reset>")
|
||||
elseif which == "lowercase" then
|
||||
-- Converting target to lowercase in battle start command
|
||||
Bashmatic.enemies.lowercase = not Bashmatic.enemies.lowercase
|
||||
if Bashmatic.enemies.lowercase then
|
||||
cecho("<DarkSlateBlue>Bashmatic: Will now convert targets to lowercase in starting command.")
|
||||
else
|
||||
cecho("<DarkSlateBlue>Bashmatic: Will no longer convert targets to lowercase in starting command.")
|
||||
end
|
||||
elseif which == "group" then
|
||||
-- group by area
|
||||
if #getRooms() == 0 then
|
||||
|
@ -22,6 +22,7 @@ bmc during - commands to execute during combat.
|
||||
bmc duringTime - time delay between during command execution. Default 2 seconds. Wants a number.
|
||||
bmc after - commands to execute after the death trigger fires.
|
||||
bmc group - set to yes or no to toggle grouping enemies by mudlet mapper areas on or off
|
||||
bmc lowercase - This will convert your target to lowercase before starting the fight (So Kill Rat becomes Kill rat)
|
||||
|
||||
Aliases Available
|
||||
-----------------
|
||||
|
@ -14,7 +14,8 @@ Bashmatic = Bashmatic or {
|
||||
},
|
||||
["enemies"] = {
|
||||
group = false,
|
||||
targets = {}
|
||||
targets = {},
|
||||
lowercase = false
|
||||
},
|
||||
["enabled"] = false,
|
||||
["bashing"] = false,
|
||||
@ -24,9 +25,7 @@ Bashmatic = Bashmatic or {
|
||||
}
|
||||
|
||||
function handleInstall(_, name)
|
||||
if name:lower() == "Bashmatic" then
|
||||
cecho("<MediumPurple>Bashmatic: Welcome to Bashmatic. See bm help to get started.")
|
||||
end
|
||||
cecho("\n<MediumPurple>Bashmatic: Welcome to Bashmatic. See bm help to get started.")
|
||||
end
|
||||
registerAnonymousEventHandler("sysInstallPackage", handleInstall)
|
||||
|
||||
@ -50,7 +49,7 @@ function handleLoadEvent()
|
||||
end
|
||||
|
||||
if Bashmatic.death.phrase ~= false then
|
||||
Bashmatic.death.event = tempTrigger(Bashmatic.death.phrase,handleMobDeath)
|
||||
Bashmatic.death.event = tempRegexTrigger(".*" .. Bashmatic.death.phrase .. ".*",handleMobDeath)
|
||||
end
|
||||
|
||||
cecho("<DarkSlateBlue>Bashmatic: Loaded settings. Let's bash some mobs.")
|
||||
@ -97,6 +96,7 @@ function handleBashingMatches()
|
||||
killBashingTriggers()
|
||||
else
|
||||
if Bashmatic.commands.before then send(Bashmatic.commands.before) end
|
||||
if Bashmatic.enemies.lowercase then keyword = keyword:lower() end
|
||||
send(Bashmatic.commands.start .. " " .. keyword)
|
||||
if Bashmatic.commands.during then tempTimer(Bashmatic.commands.duringTime,handleDuringTick) end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user