Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- antonius.attacks = antonius.attacks or {
- engaged = false,
- left = "nothing",
- right = "nothing"
- }
- antonius.attacks.namespaces = {
- bard = "voicecraft",
- ["earth elemental lord"] = "earthlord",
- ["air elemental lord"] = "airlord"
- }
- antonius.attacks.namespace = function()
- if ssc.me.isknight(ssc.me.class) then
- return "knight"
- end
- return antonius.attacks.namespaces[ssc.me.class] or ssc.me.class
- end
- antonius.attacks.requeued = 0
- antonius.attacks.requeueafflictions = {}
- antonius.attacks.attack = function(modifier, queue)
- antonius.attacks.lastmodifier = modifier
- local queue = queue == nil and true or queue
- local namespace = antonius.attacks.namespace()
- if not antonius.ubermode.enabled and (not antonius[namespace] or not antonius[namespace].attack) then
- antonius.echo("No attack function as " .. namespace .. ".")
- return
- end
- local commands = nil
- if ssc.inslowcuringmode() then
- commands = antonius[namespace].slowattack(modifier, queue)
- if queue and antonius.attacks.canattack() and #commands > 0 then
- send("curing aeoncommand " .. commands[1], false)
- end
- else
- if antonius.ubermode.enabled then
- commands = antonius.ubermode.attack(modifier, queue)
- else
- commands = antonius[namespace].attack(modifier, queue)
- end
- if ssc.traits.hasmajor("Health Inspector") then
- if antonius.target.assessed then
- table.insert(commands, "assess " .. antonius.target.name)
- else
- table.insert(commands, 1, "assess " .. antonius.target.name)
- end
- end
- if not antonius.roleplay.persist.helm then
- table.insert(commands, 1, "pull 106814")
- end
- commands = antonius.get_commands(commands)
- if commands and #commands > 0 then
- antonius.alias.set("atk", commands)
- if queue then
- antonius.queueing.queue("eqbal", "add", "atk", true)
- end
- else
- antonius.echo("<white>No commands.")
- end
- end
- end
- antonius.attacks.canattack = function()
- if ssc.affs.has("paralysis") then return false end
- if ssc.affs.has("damagedleftarm") or ssc.affs.has("mangledleftarm") then
- if ssc.affs.has("damagedrightarm") or ssc.affs.has("mangledrightarm") or ssc.affs.has("brokenrightarm") then
- return false
- end
- elseif ssc.affs.has("damagedrightarm") or ssc.affs.has("mangledrightarm") then
- if ssc.affs.has("damagedleftarm") or ssc.affs.has("mangledleftarm") or ssc.affs.has("brokenleftarm") then
- return false
- end
- end
- if ssc.affs.has("webbed") or ssc.affs.has("roped") or ssc.affs.has("bound") or ssc.affs.has("transfixed") or ssc.affs.has("impaled") or ssc.affs.has("daeggerimpale") then
- return false
- end
- if ssc.affs.has("prone") then
- if ssc.inslowcuringmode() then return false end
- -- prone with at least one resto break (won't be standing soon)
- if ssc.affs.has("damagedleftleg") or ssc.affs.has("damagedrightleg") or ssc.affs.has("mangledleftleg") or ssc.affs.has("mangledrightleg") then
- return false
- -- prone with two mending breaks (won't be standing immediately)
- elseif ssc.affs.has("brokenleftleg") and ssc.affs.has("brokenrightleg") then
- return false
- end
- end
- return true
- end
- antonius.attacks.raze = function()
- local namespace = antonius.attacks.namespace()
- if not antonius.ubermode.enabled and (not antonius[namespace] or not antonius[namespace].raze) then
- antonius.echo("<white>No raze function for " .. namespace .. ".")
- return
- end
- local commands = nil
- if antonius.ubermode.enabled then
- commands = antonius.ubermode.raze()
- else
- commands = antonius[namespace].raze()
- end
- commands = antonius.get_commands(commands)
- if commands and #commands > 0 then
- antonius.alias.set("raz", commands)
- if not ssc.inslowcuringmode() then
- antonius.queueing.queue("eqbal", "add", "raz", true)
- else
- send("raz", false)
- end
- else
- antonius.echo("<white>No commands.")
- end
- end
- antonius.attacks.razechange = function(event, name)
- if name == antonius.target.name and antonius.target.adventurer then
- antonius.attacks.attack(antonius.attacks.lastmodifier, false)
- if antonius.class() == "Alchemist" then
- antonius.alchemist.wrack(antonius.attacks.lastmodifier, false)
- elseif antonius.class() == "Blademaster" then
- antonius.blademaster.compass(antonius.attacks.lastmodifier, false)
- antonius.blademaster.balance(antonius.attacks.lastmodifier, false)
- antonius.blademaster.pommel(antonius.attacks.lastmodifier, false)
- elseif antonius.class() == "Depthswalker" then
- antonius.depthswalker.cull(antonius.attacks.lastmodifier, false)
- end
- end
- end
- registerAnonymousEventHandler("antonius razing change", "antonius.attacks.razechange")
- antonius.attacks.bashing = function()
- local namespace = antonius.attacks.namespace()
- if not antonius[namespace] or not antonius[namespace].bashing then
- antonius.echo("No bashing function as " .. namespace .. ".")
- return
- end
- local commands = antonius.get_commands()
- for id, item in pairs(antonius.items.lists.room) do
- if item.name == "a chipped tangerine shard"
- or item.name == "a jagged crimson shard"
- or item.name == "a smooth sable shard" then
- if not antonius.queueing.isqueued("eqbal", "get " .. id) then
- table.insert(commands, "get " .. id)
- end
- end
- end
- table.insertAll(commands, antonius[namespace].bashing())
- antonius.alias.set("bashing", commands)
- antonius.queueing.queue("eqbal", "add", "bashing", true)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement