Artemis Auto Bard by abianche
Description from the author:
# ------------------------------------------------------------
# AutoBard v2.3
# by @abianche on Discord (Artemis)
#
# Automates combat and survival tasks for a bard character, managing combat flow,
# target selection, pet management, and automated utility routines.
#
# Features:
# - Target Acquisition: Offers automatic search and manual targeting modes
# - Bard Ability Execution: Priority-based rotation for Discordance, Provocation (pairing primary and secondary targets), and Peacemaking
# - Bard Buff Maintenance: Keeps self-targeted bard song buffs active (Peacemaking, Discordance, Provocation)
# - Pet Commands: Keeps pets attacking active targets and periodically sends guard commands
# - Survival & Consumables: Automatically heals, cures poison, breaks paralysis with pouches, drinks stat/buff potions, eats food, and applies # bandages via Veterinary
# - Weight Management: Automatically drops configurable amounts of gold when over maximum weight
# ------------------------------------------------------------
# =========================
# USER SETTINGS
# =========================
# Bard skills to use in combat. 1 = enabled, 0 = disabled.
@setvar! enablePeacemaking 1
@setvar! enableProvocation 1
@setvar! enableDiscordance 1
# Buff potions to auto-drink. 1 = enabled, 0 = disabled.
@setvar! useStrengthPots 0
@setvar! useAgilityPots 0
@setvar! useMagicResistPots 0
@setvar! useStaminaPots 0
# Command your pets to guard/kill alongside you. 1 = enabled, 0 = disabled.
@setvar! usePets 1
# Keep self-cast bard songs (Peace/Discord/Provo buffs) refreshed. 1 = enabled, 0 = disabled.
@setvar! useSongBuffs 1
# Auto-eat from a food tray when not satisfied. 1 = enabled, 0 = disabled.
@setvar! eatFood 0
# How much gold to drop at a time when overweight.
@setvar! amountOfGoldToDrop 900
# Missing HP at which the script starts healing.
@setvar! diffHitsToHeal 40
# Require warmode to be on before fighting.
@setvar! useWarmode 1
# How this script picks a primary target
# 0 = Fully automatic - always hunt the closest grey monster.
# 1 = Manual - the script itself opens a target cursor and waits for you
# to click a creature, or press ESC to skip. No extra client setup
# needed. Combine with useWarmode = 1 above if you only want to be
# prompted while you are actually in warmode.
@setvar! targetSelectionMode 0
# Skip other players summoned, bonded, or tamed creatures when auto-targeting,
# even if they show up grey. Only applies to automatic mode (0).
@setvar! ignoreSummonedBondedTamed 1
# Creatures to never auto-target, even if they show up grey. Add or remove
# entries as needed - each entry must match the on-screen label text.
# Only applies to automatic mode (0).
removelist TargetIgnoreList
createlist TargetIgnoreList
pushlist TargetIgnoreList "a sheep"
pushlist TargetIgnoreList "a cow"
pushlist TargetIgnoreList "a bull"
pushlist TargetIgnoreList "a goat"
pushlist TargetIgnoreList "a pig"
pushlist TargetIgnoreList "a chicken"
pushlist TargetIgnoreList "a horse"
pushlist TargetIgnoreList "a llama"
pushlist TargetIgnoreList "a cat"
pushlist TargetIgnoreList "a dog"
pushlist TargetIgnoreList "a rabbit"
pushlist TargetIgnoreList "a bird"
pushlist TargetIgnoreList "an eagle"
pushlist TargetIgnoreList "a hawk"
pushlist TargetIgnoreList "a crow"
pushlist TargetIgnoreList "a raven"
# =========================
# DO NOT EDIT BELOW UNLESS YOU KNOW THE SCRIPT
# =========================
# You can setup this cooldown to know whether the script is running or not.
cooldown "Auto Bard" 5000
clearsysmsg
# Max distance to issue the attack command.
@setvar! TargetAttackRange 10
# Max distance to look for/keep a target.
@setvar! TargetSearchRange 12
# Delay between repeated attack commands.
@setvar! AttackCommandCD 10000
# Delay between all kill pet commands.
@setvar! PetKillCommandCD 3000
# Delay between all guard me pet commands.
@setvar! PetGuardCommandCD 7500
# Delay between all guard me pet commands when not in combat.
@setvar! PetGuardCommandNoCombatCD 30000
# Delay between bandage attempts.
@setvar! VetKitTimerCD 2500
# Delay between primary target searches.
@setvar! TargetSearchCD 1200
# Delay between secondary (provoke) target searches.
@setvar! SecondaryTargetSearchCD 3000
# Delay between re-evaluating discord/provoke/peace state.
@setvar! BardStateCheckCD 2000
# Delay between refreshing the target marker overhead.
@setvar! TargetOverheadCD 5000
# Delay between no target overhead messages.
@setvar! NoTargetMessageCD 4000
# Delay between overweight overhead messages.
@setvar! OverweightMessageCD 3000
# Safety / wait tuning.
@setvar! maxwaittimeinms 650
# Stable target state.
if not varexist currentTarget
@setvar! currentTarget 0
endif
if not varexist secondaryTarget
@setvar! secondaryTarget 0
endif
if not varexist foundTarget
@setvar! foundTarget 0
endif
if not varexist previousTarget
@setvar! previousTarget 0
endif
# Bard decision state.
@setvar! NeedtoDiscord 0
@setvar! NeedtoProvoke 0
@setvar! NeedtoPacify 0
# =========================
# TIMERS INITIALIZATION
# =========================
if not timerexists "AttackCommandTimer"
createtimer "AttackCommandTimer"
settimer "AttackCommandTimer" AttackCommandCD
endif
if not timerexists "PetKillCommandTimer"
createtimer "PetKillCommandTimer"
settimer "PetKillCommandTimer" PetKillCommandCD
endif
if not timerexists "PetGuardCommandTimer"
createtimer "PetGuardCommandTimer"
settimer "PetGuardCommandTimer" PetGuardCommandCD
endif
if not timerexists "PetGuardCommandNoCombatTimer"
createtimer "PetGuardCommandNoCombatTimer"
settimer "PetGuardCommandNoCombatTimer" PetGuardCommandNoCombatCD
endif
if not timerexists "VetKitTimer"
createtimer "VetKitTimer"
settimer "VetKitTimer" VetKitTimerCD
endif
if not timerexists "TargetSearchTimer"
createtimer "TargetSearchTimer"
settimer "TargetSearchTimer" TargetSearchCD
endif
if not timerexists "SecondaryTargetSearchTimer"
createtimer "SecondaryTargetSearchTimer"
settimer "SecondaryTargetSearchTimer" SecondaryTargetSearchCD
endif
if not timerexists "BardStateCheckTimer"
createtimer "BardStateCheckTimer"
settimer "BardStateCheckTimer" BardStateCheckCD
endif
if not timerexists "TargetOverheadTimer"
createtimer "TargetOverheadTimer"
settimer "TargetOverheadTimer" TargetOverheadCD
endif
if not timerexists "NoTargetMessageTimer"
createtimer "NoTargetMessageTimer"
settimer "NoTargetMessageTimer" NoTargetMessageCD
endif
if not timerexists "OverweightMessageTimer"
createtimer "OverweightMessageTimer"
settimer "OverweightMessageTimer" OverweightMessageCD
endif
# Bard skill cooldown timers.
if not timerexists "Musicianship"
createtimer "Musicianship"
settimer "Musicianship" 5000
endif
if not timerexists "Discordance"
createtimer "Discordance"
settimer "Discordance" 11000
endif
if not timerexists "Provocation"
createtimer "Provocation"
settimer "Provocation" 11000
endif
if not timerexists "Peacemaking"
createtimer "Peacemaking"
settimer "Peacemaking" 11000
endif
# Song buff timers.
if not timerexists "SongBuffDelay"
createtimer "SongBuffDelay"
settimer "SongBuffDelay" 12000
endif
if not timerexists "DiscordanceTimer"
createtimer "DiscordanceTimer"
settimer "DiscordanceTimer" 11000
endif
if not timerexists "PeacemakingTimer"
createtimer "PeacemakingTimer"
settimer "PeacemakingTimer" 11000
endif
if not timerexists "ProvocationTimer"
createtimer "ProvocationTimer"
settimer "ProvocationTimer" 11000
endif
# Target effect timers. These are conservative markers only.
# labels are still the main source of truth.
if not timerexists "Discorded"
createtimer "Discorded"
settimer "Discorded" 31000
endif
if not timerexists "Provoked"
createtimer "Provoked"
settimer "Provoked" 31000
endif
if not timerexists "Pacified"
createtimer "Pacified"
settimer "Pacified" 31000
endif
if dead
overhead "You died" 33
stop
endif
# =========================
# PET GUARD
# =========================
if usePets = 1 and timer "PetGuardCommandNoCombatTimer" > PetGuardCommandNoCombatCD
say "all guard me"
settimer "PetGuardCommandNoCombatTimer" 0
endif
# =========================
# SURVIVAL / UTILITY BLOCK
# =========================
# Drink heal potion if missing HP is above configured threshold.
if diffhits >= diffHitsToHeal
if findtype "Yellow Potion" backpack as HealPot
getlabel HealPot HealPotlabel
if "next" in HealPotlabel
# Potion is still on cooldown. Do nothing.
else
dclick HealPot
wait 250
endif
else
overhead "[ NO HEALING POTS! ]" 337
endif
endif
# Cure poison.
while poisoned
if findtype "Orange Potion" self
dclicktype "Orange Potion"
wait 250
else
overhead "[ NO CURE POTS! ]" 337
endif
# If HP becomes too low, leave cure loop and let other logic run.
if diffhits > diffHitsToHeal
break
endif
endwhile
# Refresh stamina.
if useStaminaPots = 1 and diffstam >= 5
if findtype "Red Potion" self
dclicktype "Red Potion"
wait 250
else
overhead "[ NO REFRESH POTS! ]" 337
endif
endif
# Strenght potion.
if useStrengthPots = 1 and not findbuff "Strength"
if findtype "White Potion" self
dclicktype "White Potion"
wait 250
else
overhead "[ NO STRENGTH POTS! ]" 337
endif
endif
# Agility potion.
if useAgilityPots = 1 and not findbuff "Agility"
if findtype "Blue Potion" self
dclicktype "Blue Potion"
wait 250
else
overhead "[ NO AGILITY POTS! ]" 337
endif
endif
# Magic resist potion.
if useMagicResistPots = 1 and not findbuff "Magic Resist"
if findtype "Black Potion" self
dclicktype "Black Potion"
wait 250
else
overhead "[ NO RESIST POTS! ]" 337
endif
endif
# Break paralysis with pouch command.
if paralyzed
if findtype "pouch" self
yell "[pouch"
wait 250
else
overhead "[ NO POUCHES! ]" 337
endif
endif
if skill "Veterinary" >= 50 and timer "VetKitTimer" >= VetKitTimerCD
if not bandaging and findtype 25750 backpack as item
dclick item
wait 200
endif
settimer "VetKitTimer" 0
endif
# Drop gold if overweight.
if weight > maxweight
if timer "OverweightMessageTimer" > OverweightMessageCD
overhead "OVERWEIGHT!!" 34
settimer "OverweightMessageTimer" 0
endif
if amountOfGoldToDrop != 0
while weight > maxweight
if findtype "gold coin" backpack as item
lift item amountOfGoldToDrop
droprelloc 0 0
getlabel backpack xxx
wait 200
if insysmsg "cannot drop anything"
drop backpack -1 -1 -1
endif
wait maxwaittimeinms
overhead "* Gold dropped *" 55
else
break
endif
endwhile
endif
endif
# Eat food if not satisfied.
if eatFood = 1 and not findbuff "food satisfaction" and findtype "tray" self
if findtype "tray" self as Food
overhead "[ EATING FOOD ]" 88
dclick Food
wait 500
endif
endif
# =========================
# SONG BUFF MAINTENANCE
# =========================
# These are the self/bag-targeted bard songs, not the mob debuffs.
# They are throttled by Musicianship + SongBuffDelay.
if useSongBuffs = 1
if not findbuff "Song Of Peacemaking" and timer "Musicianship" > 5000 and timer "PeacemakingTimer" > 11000 and timer "SongBuffDelay" > 10500
skill "Peacemaking"
wait 150
if insysmsg "What instrument shall you play?"
if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument
target Instrument
wait 250
else
overhead "[ NO INSTRUMENT! ]" 337
endif
endif
if not insysmsg "This is not a musical instrument"
wft 1500
target backpack
overhead "[ ♪ Peacemaking Buff ♪ ]" 84
settimer "Musicianship" 0
settimer "SongBuffDelay" 0
endif
endif
if not findbuff "Song Of Discordance" and timer "Musicianship" > 5000 and timer "DiscordanceTimer" > 11000 and timer "SongBuffDelay" > 10500
skill "Discordance"
wft 1500
if insysmsg "What instrument shall you play?"
if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument
target Instrument
wait 250
else
overhead "[ NO INSTRUMENT! ]" 337
endif
endif
if not insysmsg "This is not a musical instrument"
wft 1500
target backpack
overhead "[ ♪ Discordance Buff ♪ ]" 69
settimer "Musicianship" 0
settimer "SongBuffDelay" 0
endif
endif
if not findbuff "Song of Provocation" and timer "Musicianship" > 5000 and timer "ProvocationTimer" > 11000 and timer "SongBuffDelay" > 10500
skill "Provocation"
wft 1500
if insysmsg "What instrument shall you play?"
if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument
target Instrument
wait 250
else
overhead "[ NO INSTRUMENT! ]" 337
endif
endif
if not insysmsg "This is not a musical instrument"
wft 1500
target backpack
overhead "[ ♪ Provocation Buff ♪ ]" 2117
settimer "Musicianship" 0
settimer "SongBuffDelay" 0
endif
endif
endif
# =========================
# WAR MODE MAINTENANCE
# =========================
if useWarmode = 1 and not warmode
replay
endif
# =========================
# TARGET ACQUISITION
# =========================
# Only search for a new primary target when currentTarget is missing,
# dead, or out of range. targetSelectionMode (see USER SETTINGS) controls
# how the new target is picked: automatically, automatically-but-only-in-
# warmode, or manually.
if foundTarget = 1
if dead currentTarget
@setvar! foundTarget 0
@setvar! currentTarget 0
@setvar! secondaryTarget 0
elseif not find currentTarget ground -1 -1 TargetSearchRange
@setvar! foundTarget 0
@setvar! currentTarget 0
@setvar! secondaryTarget 0
endif
endif
if foundTarget = 0 and timer "TargetSearchTimer" > TargetSearchCD
@setvar! newPrimaryTarget 0
if targetSelectionMode = 1
# --------------------------------------------
# MANUAL: script actively prompts you for a target.
# This opens a target cursor - click a creature, or press ESC
# to skip this cycle. No client-side hotkey setup needed.
# --------------------------------------------
overhead "[ Pick your target ]" 88
hotkey "Set Last Target"
wait 200
while targetexists
wait 50
endwhile
if lasttarget != 0 and not dead lasttarget and find lasttarget ground -1 -1 TargetSearchRange
@setvar! newPrimaryTarget lasttarget
endif
if newPrimaryTarget = 0
if timer "NoTargetMessageTimer" > NoTargetMessageCD
overhead "[ No target ]" 33
settimer "NoTargetMessageTimer" 0
endif
endif
else
# --------------------------------------------
# AUTOMATIC: grab the closest grey monster, skipping anything
# on the ignore list or, optionally, other players'
# summoned/bonded/tamed creatures.
# --------------------------------------------
if targetexists
hotkey "cancel current target"
endif
hotkey "target closest grey monster"
wait 150
for 5
@setvar! candidatePrimaryTarget lasttarget
if candidatePrimaryTarget = 0 or dead candidatePrimaryTarget or not find candidatePrimaryTarget ground -1 -1 TargetSearchRange
break
endif
getlabel candidatePrimaryTarget candidatePrimaryLabel
if inlist TargetIgnoreList candidatePrimaryLabel
@ignore candidatePrimaryTarget
elseif ignoreSummonedBondedTamed = 1 and "(summoned" in candidatePrimaryLabel
@ignore candidatePrimaryTarget
elseif ignoreSummonedBondedTamed = 1 and "(bonded" in candidatePrimaryLabel
@ignore candidatePrimaryTarget
elseif ignoreSummonedBondedTamed = 1 and "(tame" in candidatePrimaryLabel
@ignore candidatePrimaryTarget
elseif "battle trainer" in candidatePrimaryLabel
@ignore candidatePrimaryTarget
else
@setvar! newPrimaryTarget candidatePrimaryTarget
break
endif
# The rejected candidate is now ignored, so this cycles to a different one.
hotkey "Next Grey Monster Target"
wait 150
endfor
if newPrimaryTarget = 0
if timer "NoTargetMessageTimer" > NoTargetMessageCD
overhead "[ No target ]" 33
settimer "NoTargetMessageTimer" 0
endif
endif
endif
if newPrimaryTarget != 0
@setvar! currentTarget newPrimaryTarget
@setvar! previousTarget currentTarget
@setvar! foundTarget 1
@setvar! secondaryTarget 0
getlabel currentTarget currentLabel
sysmsg "Target: {{currentLabel}}" 55
# Attack immediately on acquisition.
attack currentTarget
settimer "AttackCommandTimer" 0
# Pets attack immediately on target change, then only on cooldown.
if usePets = 1
say "all kill" 34
wft 150
target currentTarget
settimer "PetKillCommandTimer" 0
endif
endif
if targetexists
hotkey "cancel current target"
endif
settimer "TargetSearchTimer" 0
endif
# =========================
# COMBAT LOOP - STABLE TARGET
# =========================
# Once a target is found, keep operating on the same currentTarget.
# The loop ends naturally when the target dies/leaves range or player HP is too low.
while foundTarget = 1 and not dead currentTarget and find currentTarget ground -1 -1 TargetSearchRange and diffhits < diffHitsToHeal
# Exit combat loop if warmode has been disabled.
if useWarmode = 1 and not warmode
replay
endif
if usePets = 1 and timer "PetGuardCommandTimer" > PetGuardCommandCD
say "all guard me"
settimer "PetGuardCommandTimer" 0
endif
cooldown "Auto Bard" 6000
# Keep attacking.
if timer "AttackCommandTimer" > AttackCommandCD
if find currentTarget ground -1 -1 TargetAttackRange
attack currentTarget
settimer "AttackCommandTimer" 0
endif
endif
# Pet kill command is intentionally slower than attack.
if usePets = 1 and timer "PetKillCommandTimer" > PetKillCommandCD
if find currentTarget ground -1 -1 TargetAttackRange
say "all kill" 34
wft 150
target currentTarget
settimer "PetKillCommandTimer" 0
endif
endif
# Show current target marker occasionally only.
if timer "TargetOverheadTimer" > TargetOverheadCD
overhead "▼ TARGET ▼" 69 currentTarget
settimer "TargetOverheadTimer" 0
endif
# Re-run critical survival checks inside the combat loop.
if diffhits >= diffHitsToHeal
if findtype "Yellow Potion" backpack as HealPotLoop
getlabel HealPotLoop HealPotLoopLabel
if "next" in HealPotLoopLabel
# Heal potion unavailable. Let loop end because HP is high-risk.
else
dclick HealPotLoop
wait 250
endif
endif
@setvar! foundTarget 0
replay
endif
while poisoned
if findtype "Orange Potion" self
dclicktype "Orange Potion"
wait 250
else
overhead "[ NO CURE POTS! ]" 337
endif
if diffhits > diffHitsToHeal
break
endif
endwhile
if skill "Veterinary" >= 50 and timer "VetKitTimer" >= VetKitTimerCD
if not bandaging and findtype 25750 backpack as item
dclick item
wait 200
endif
settimer "VetKitTimer" 0
endif
if useStaminaPots = 1 and diffstam >= 5
if findtype "Red Potion" self
dclicktype "Red Potion"
overhead "[ REFRESH POTION ]" 37
wait 250
endif
endif
if paralyzed
if findtype "pouch" self
yell "[pouch"
wait 250
endif
endif
# --------------------------------------------
# SECONDARY TARGET SEARCH
# --------------------------------------------
# Only needed for Provocation. Search occasionally and keep the result stable.
if enableProvocation = 1 and skill "Provocation" >= 50 and timer "SecondaryTargetSearchTimer" > SecondaryTargetSearchCD
@setvar! secondaryTarget 0
if targetexists
hotkey "cancel current target"
endif
# Try a few candidates, but do not do this every loop pass.
# Skip anything on the ignore list or other players pets, same as
# primary target acquisition.
for 4
hotkey "Next Grey Monster Target"
wait 150
@setvar! candidateTarget lasttarget
if find candidateTarget ground -1 -1 TargetSearchRange and candidateTarget != currentTarget and not dead candidateTarget
getlabel candidateTarget candidateLabel
if inlist TargetIgnoreList candidateLabel
@ignore candidateTarget
elseif ignoreSummonedBondedTamed = 1 and "(summoned" in candidateLabel
@ignore candidateTarget
elseif ignoreSummonedBondedTamed = 1 and "(bonded" in candidateLabel
@ignore candidateTarget
elseif ignoreSummonedBondedTamed = 1 and "(tame" in candidateLabel
@ignore candidateTarget
elseif "battle trainer" in candidatePrimaryLabel
@ignore candidatePrimaryTarget
else
@setvar! secondaryTarget candidateTarget
if "Paragon" in candidateLabel
overhead "▼ PARAGON PROVO TARGET ▼" 12 secondaryTarget
else
overhead "▼ PROVO TARGET ▼" 2117 secondaryTarget
endif
break
endif
endif
endfor
if targetexists
hotkey "cancel current target"
endif
settimer "SecondaryTargetSearchTimer" 0
endif
# If the stored secondary target is no longer valid, clear it.
if secondaryTarget != 0
if dead secondaryTarget
@setvar! secondaryTarget 0
elseif not find secondaryTarget ground -1 -1 TargetSearchRange
@setvar! secondaryTarget 0
endif
endif
# --------------------------------------------
# BARD STATE CHECK
# --------------------------------------------
if timer "BardStateCheckTimer" > BardStateCheckCD
@setvar! NeedtoDiscord 0
@setvar! NeedtoProvoke 0
@setvar! NeedtoPacify 0
getlabel currentTarget currentLabel
# ==================================================
# PRIORITY 1
# Discord CURRENT target first (if enabled)
# ==================================================
if enableDiscordance = 1 and skill "Discordance" >= 50
if "discord" in currentLabel
@setvar! NeedtoDiscord 0
else
@setvar! NeedtoDiscord 1
endif
endif
# ==================================================
# PRIORITY 2
# Provoke SECONDARY against CURRENT
#
# Only after CURRENT is already discorded (if enabled)
# ==================================================
if NeedtoDiscord = 0 and enableProvocation = 1 and skill "Provocation" >= 50 and secondaryTarget != 0
if find secondaryTarget ground -1 -1 TargetSearchRange and currentTarget != secondaryTarget
getlabel secondaryTarget secondaryLabel
if "provoked" in currentLabel
@setvar! NeedtoProvoke 0
elseif "provoked" in secondaryLabel
@setvar! NeedtoProvoke 0
else
@setvar! NeedtoProvoke 1
endif
endif
endif
# ==================================================
# PRIORITY 3
# Peace CURRENT
#
# Only when:
# - current is discorded (if enabled)
# - secondary is provoked (if enabled)
# ==================================================
if NeedtoDiscord = 0 and NeedtoProvoke = 0 and enablePeacemaking = 1 and skill "Peacemaking" >= 50
if "pacified" in currentLabel
@setvar! NeedtoPacify 0
elseif "provoked" in currentLabel
# If already provoked, do not pacify the current target.
@setvar! NeedtoPacify 0
else
@setvar! NeedtoPacify 1
endif
endif
settimer "BardStateCheckTimer" 0
endif
# --------------------------------------------
# BARD EXECUTION - ONE ACTION PER CYCLE
# --------------------------------------------
if NeedtoDiscord = 1 and enableDiscordance = 1 and skill "Discordance" >= 50 and timer "Discordance" > 11000 and timer "Musicianship" > 5000
clearsysmsg
skill "Discordance"
wft 1500
if insysmsg "What instrument shall you play?"
if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument
target Instrument
wait 250
else
overhead "[ NO INSTRUMENT! ]" 337
endif
endif
if not insysmsg "This is not a musical instrument"
target currentTarget
wait 250
endif
if insysmsg "Target cannot be seen"
overhead "[ DISCORD: Cannot see target ]" 337 currentTarget
settimer "Discordance" 0
elseif insysmsg "That is too far away."
overhead "[ DISCORD: Too far ]" 337 currentTarget
settimer "Discordance" 0
elseif insysmsg "You must wait"
wait 500
elseif insysmsg "You play successfully"
overhead "[ ♪ DISCORDED! ♪ ]" 69 currentTarget
settimer "Musicianship" 0
settimer "Discordance" 0
settimer "Discorded" 0
@setvar! NeedtoDiscord 0
elseif insysmsg "fail to discord"
overhead "[ DISCORD FAIL ]" 337 currentTarget
settimer "Discordance" 5500
endif
elseif NeedtoProvoke = 1 and enableProvocation = 1 and skill "Provocation" >= 50 and timer "Provocation" > 11000 and timer "Musicianship" > 5000
clearsysmsg
if secondaryTarget = 0
@setvar! NeedtoProvoke 0
elseif not find secondaryTarget ground -1 -1 TargetSearchRange
@setvar! NeedtoProvoke 0
else
skill "Provocation"
wft 1000
if insysmsg "What instrument shall you play?"
if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument
target Instrument
wait 250
else
overhead "[ NO INSTRUMENT! ]" 337
endif
endif
if not insysmsg "This is not a musical instrument"
target secondaryTarget
wait 150
endif
if insysmsg "Target cannot be seen"
overhead "[ PROVO: Cannot see target ]" 339 secondaryTarget
@setvar! NeedtoProvoke 0
settimer "Provocation" 0
elseif insysmsg "That is too far away."
overhead "[ PROVO: Too far ]" 339 secondaryTarget
@setvar! NeedtoProvoke 0
settimer "Provocation" 0
elseif insysmsg "You must wait"
wait 500
else
target currentTarget
wait 250
if insysmsg "You play successfully, provoking"
overhead "[ ♪ PROVOKED! ♪ ]" 2117 currentTarget
overhead "[ ♪ PROVOKED! ♪ ]" 2117 secondaryTarget
settimer "Musicianship" 0
settimer "Provocation" 0
settimer "Provoked" 0
@setvar! NeedtoProvoke 0
@setvar! NeedtoPacify 0
elseif insysmsg "You fail to incite"
overhead "[ PROVO FAIL ]" 337
settimer "Provocation" 5500
elseif insysmsg "The creatures you are trying to provoke are too far away from each"
overhead "[ PROVO: Too far apart ]" 153 currentTarget
overhead "[ PROVO: Too far apart ]" 153 secondaryTarget
@setvar! NeedtoProvoke 0
settimer "Provocation" 0
elseif insysmsg "tell someone to attack themselves!"
overhead "[ PROVO: SELF TARGET FAIL ]" 337
@setvar! NeedtoProvoke 0
endif
endif
endif
elseif NeedtoPacify = 1 and enablePeacemaking = 1 and skill "Peacemaking" >= 50 and timer "Peacemaking" > 11000 and timer "Musicianship" > 5000
clearsysmsg
skill "Peacemaking"
wft 1500
if insysmsg "What instrument shall you play?"
if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument
target Instrument
wait 250
else
overhead "[ NO INSTRUMENT! ]" 337
endif
endif
if not insysmsg "This is not a musical instrument"
target currentTarget
wait 250
endif
if insysmsg "Target cannot be seen"
overhead "[ PEACE: Cannot see target ]" 337 currentTarget
settimer "Peacemaking" 0
elseif insysmsg "That is too far away."
overhead "[ PEACE: Too far ]" 337 currentTarget
settimer "Peacemaking" 0
elseif insysmsg "You must wait"
wait 500
elseif insysmsg "You play successfully, pacifying your"
overhead "[ ♪ PACIFIED! ♪ ]" 84 currentTarget
settimer "Musicianship" 0
settimer "Peacemaking" 0
settimer "Pacified" 0
@setvar! NeedtoPacify 0
elseif insysmsg "you fail to pacify your opponent"
overhead "[ PEACE FAIL ]" 337 currentTarget
settimer "Peacemaking" 5500
endif
endif
# Small loop wait. This keeps responsiveness while avoiding frantic looping.
wait 100
endwhile
# If the combat loop ended, clear stale state before the next script pass.
if foundTarget = 1
if dead currentTarget
@setvar! foundTarget 0
@setvar! currentTarget 0
@setvar! secondaryTarget 0
elseif not find currentTarget ground -1 -1 TargetSearchRange
@setvar! foundTarget 0
@setvar! currentTarget 0
@setvar! secondaryTarget 0
endif
endif
replayAutomates combat and survival tasks for a bard character, managing combat flow, target selection, pet management, and automated utility routines.








