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…
TamingCombatBard
Artemis Auto Bard.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/fe50f5e4-58cb-4249-a297-10cea20ba56b for latest2# Automation by Jaseowns3## Script: Artemis Auto Bard4## Created by: abianche#05#############################################6 7# ------------------------------------------------------------8# AutoBard v2.39# by @abianche on Discord (Artemis)10#11# Automates combat and survival tasks for a bard character, managing combat flow,12#�target selection, pet management, and automated utility routines.13#14# Features:15# - Target Acquisition: Offers automatic search and manual targeting modes16# - Bard Ability Execution: Priority-based rotation for Discordance, Provocation (pairing primary and secondary targets), and Peacemaking17# - Bard Buff Maintenance: Keeps self-targeted bard song buffs active (Peacemaking, Discordance, Provocation)18# - Pet Commands: Keeps pets attacking active targets and periodically sends guard commands19# - Survival & Consumables: Automatically heals, cures poison, breaks paralysis with pouches, drinks stat/buff potions, eats food, and applies # bandages via Veterinary20# - Weight Management: Automatically drops configurable amounts of gold when over maximum weight21# ------------------------------------------------------------22 23# =========================24# USER SETTINGS25# =========================26 27# Bard skills to use in combat. 1 = enabled, 0 = disabled.28@setvar! enablePeacemaking 129@setvar! enableProvocation 130@setvar! enableDiscordance 131 32# Buff potions to auto-drink. 1 = enabled, 0 = disabled.33@setvar! useStrengthPots 034@setvar! useAgilityPots 035@setvar! useMagicResistPots 036@setvar! useStaminaPots 037 38# Command your pets to guard/kill alongside you. 1 = enabled, 0 = disabled.39@setvar! usePets 140# Keep self-cast bard songs (Peace/Discord/Provo buffs) refreshed. 1 = enabled, 0 = disabled.41@setvar! useSongBuffs 142# Auto-eat from a food tray when not satisfied. 1 = enabled, 0 = disabled.43@setvar! eatFood 044 45# How much gold to drop at a time when overweight.46@setvar! amountOfGoldToDrop 90047# Missing HP at which the script starts healing.48@setvar! diffHitsToHeal 4049 50# Require warmode to be on before fighting.51@setvar! useWarmode 152 53# How this script picks a primary target54# 0 = Fully automatic - always hunt the closest grey monster.55# 1 = Manual - the script itself opens a target cursor and waits for you56# to click a creature, or press ESC to skip. No extra client setup57# needed. Combine with useWarmode = 1 above if you only want to be58# prompted while you are actually in warmode.59@setvar! targetSelectionMode 060 61# Skip other players summoned, bonded, or tamed creatures when auto-targeting,62# even if they show up grey. Only applies to automatic mode (0).63@setvar! ignoreSummonedBondedTamed 164 65# Creatures to never auto-target, even if they show up grey. Add or remove66# entries as needed - each entry must match the on-screen label text.67# Only applies to automatic mode (0).68removelist TargetIgnoreList69createlist TargetIgnoreList70pushlist TargetIgnoreList "a sheep"71pushlist TargetIgnoreList "a cow"72pushlist TargetIgnoreList "a bull"73pushlist TargetIgnoreList "a goat"74pushlist TargetIgnoreList "a pig"75pushlist TargetIgnoreList "a chicken"76pushlist TargetIgnoreList "a horse"77pushlist TargetIgnoreList "a llama"78pushlist TargetIgnoreList "a cat"79pushlist TargetIgnoreList "a dog"80pushlist TargetIgnoreList "a rabbit"81pushlist TargetIgnoreList "a bird"82pushlist TargetIgnoreList "an eagle"83pushlist TargetIgnoreList "a hawk"84pushlist TargetIgnoreList "a crow"85pushlist TargetIgnoreList "a raven"86 87# =========================88# DO NOT EDIT BELOW UNLESS YOU KNOW THE SCRIPT89# =========================90 91# You can setup this cooldown to know whether the script is running or not.92cooldown "Auto Bard" 500093clearsysmsg94 95# Max distance to issue the attack command.96@setvar! TargetAttackRange 1097# Max distance to look for/keep a target.98@setvar! TargetSearchRange 1299 100# Delay between repeated attack commands.101@setvar! AttackCommandCD 10000102# Delay between all kill pet commands.103@setvar! PetKillCommandCD 3000104# Delay between all guard me pet commands.105@setvar! PetGuardCommandCD 7500106# Delay between all guard me pet commands when not in combat.107@setvar! PetGuardCommandNoCombatCD 30000108# Delay between bandage attempts.109@setvar! VetKitTimerCD 2500110# Delay between primary target searches.111@setvar! TargetSearchCD 1200112# Delay between secondary (provoke) target searches.113@setvar! SecondaryTargetSearchCD 3000114# Delay between re-evaluating discord/provoke/peace state.115@setvar! BardStateCheckCD 2000116# Delay between refreshing the target marker overhead.117@setvar! TargetOverheadCD 5000118# Delay between no target overhead messages.119@setvar! NoTargetMessageCD 4000120# Delay between overweight overhead messages.121@setvar! OverweightMessageCD 3000122 123# Safety / wait tuning.124@setvar! maxwaittimeinms 650125 126# Stable target state.127if not varexist currentTarget128 @setvar! currentTarget 0129endif130 131if not varexist secondaryTarget132 @setvar! secondaryTarget 0133endif134 135if not varexist foundTarget136 @setvar! foundTarget 0137endif138 139if not varexist previousTarget140 @setvar! previousTarget 0141endif142 143# Bard decision state.144@setvar! NeedtoDiscord 0145@setvar! NeedtoProvoke 0146@setvar! NeedtoPacify 0147 148# =========================149# TIMERS INITIALIZATION150# =========================151 152if not timerexists "AttackCommandTimer"153 createtimer "AttackCommandTimer"154 settimer "AttackCommandTimer" AttackCommandCD155endif156 157if not timerexists "PetKillCommandTimer"158 createtimer "PetKillCommandTimer"159 settimer "PetKillCommandTimer" PetKillCommandCD160endif161 162if not timerexists "PetGuardCommandTimer"163 createtimer "PetGuardCommandTimer"164 settimer "PetGuardCommandTimer" PetGuardCommandCD165endif166 167if not timerexists "PetGuardCommandNoCombatTimer"168 createtimer "PetGuardCommandNoCombatTimer"169 settimer "PetGuardCommandNoCombatTimer" PetGuardCommandNoCombatCD170endif171 172if not timerexists "VetKitTimer"173 createtimer "VetKitTimer"174 settimer "VetKitTimer" VetKitTimerCD175endif176 177if not timerexists "TargetSearchTimer"178 createtimer "TargetSearchTimer"179 settimer "TargetSearchTimer" TargetSearchCD180endif181 182if not timerexists "SecondaryTargetSearchTimer"183 createtimer "SecondaryTargetSearchTimer"184 settimer "SecondaryTargetSearchTimer" SecondaryTargetSearchCD185endif186 187if not timerexists "BardStateCheckTimer"188 createtimer "BardStateCheckTimer"189 settimer "BardStateCheckTimer" BardStateCheckCD190endif191 192if not timerexists "TargetOverheadTimer"193 createtimer "TargetOverheadTimer"194 settimer "TargetOverheadTimer" TargetOverheadCD195endif196 197if not timerexists "NoTargetMessageTimer"198 createtimer "NoTargetMessageTimer"199 settimer "NoTargetMessageTimer" NoTargetMessageCD200endif201 202if not timerexists "OverweightMessageTimer"203 createtimer "OverweightMessageTimer"204 settimer "OverweightMessageTimer" OverweightMessageCD205endif206 207# Bard skill cooldown timers.208if not timerexists "Musicianship"209 createtimer "Musicianship"210 settimer "Musicianship" 5000211endif212 213if not timerexists "Discordance"214 createtimer "Discordance"215 settimer "Discordance" 11000216endif217 218if not timerexists "Provocation"219 createtimer "Provocation"220 settimer "Provocation" 11000221endif222 223if not timerexists "Peacemaking"224 createtimer "Peacemaking"225 settimer "Peacemaking" 11000226endif227 228# Song buff timers.229if not timerexists "SongBuffDelay"230 createtimer "SongBuffDelay"231 settimer "SongBuffDelay" 12000232endif233 234if not timerexists "DiscordanceTimer"235 createtimer "DiscordanceTimer"236 settimer "DiscordanceTimer" 11000237endif238 239if not timerexists "PeacemakingTimer"240 createtimer "PeacemakingTimer"241 settimer "PeacemakingTimer" 11000242endif243 244if not timerexists "ProvocationTimer"245 createtimer "ProvocationTimer"246 settimer "ProvocationTimer" 11000247endif248 249# Target effect timers. These are conservative markers only.250# labels are still the main source of truth.251if not timerexists "Discorded"252 createtimer "Discorded"253 settimer "Discorded" 31000254endif255 256if not timerexists "Provoked"257 createtimer "Provoked"258 settimer "Provoked" 31000259endif260 261if not timerexists "Pacified"262 createtimer "Pacified"263 settimer "Pacified" 31000264endif265 266if dead267 overhead "You died" 33268 stop269endif270 271# =========================272# PET GUARD273# =========================274 275if usePets = 1 and timer "PetGuardCommandNoCombatTimer" > PetGuardCommandNoCombatCD276 say "all guard me"277 settimer "PetGuardCommandNoCombatTimer" 0278endif279 280# =========================281# SURVIVAL / UTILITY BLOCK282# =========================283 284# Drink heal potion if missing HP is above configured threshold.285if diffhits >= diffHitsToHeal286 if findtype "Yellow Potion" backpack as HealPot287 getlabel HealPot HealPotlabel288 if "next" in HealPotlabel289 # Potion is still on cooldown. Do nothing.290 else291 dclick HealPot292 wait 250293 endif294 else295 overhead "[ NO HEALING POTS! ]" 337296 endif297endif298 299# Cure poison.300while poisoned301 if findtype "Orange Potion" self302 dclicktype "Orange Potion"303 wait 250304 else305 overhead "[ NO CURE POTS! ]" 337306 endif307 308 # If HP becomes too low, leave cure loop and let other logic run.309 if diffhits > diffHitsToHeal310 break311 endif312endwhile313 314# Refresh stamina.315if useStaminaPots = 1 and diffstam >= 5316 if findtype "Red Potion" self317 dclicktype "Red Potion"318 wait 250319 else320 overhead "[ NO REFRESH POTS! ]" 337321 endif322endif323 324# Strenght potion.325if useStrengthPots = 1 and not findbuff "Strength"326 if findtype "White Potion" self327 dclicktype "White Potion"328 wait 250329 else330 overhead "[ NO STRENGTH POTS! ]" 337331 endif332endif333 334# Agility potion.335if useAgilityPots = 1 and not findbuff "Agility"336 if findtype "Blue Potion" self337 dclicktype "Blue Potion"338 wait 250339 else340 overhead "[ NO AGILITY POTS! ]" 337341 endif342endif343 344# Magic resist potion.345if useMagicResistPots = 1 and not findbuff "Magic Resist"346 if findtype "Black Potion" self347 dclicktype "Black Potion"348 wait 250349 else350 overhead "[ NO RESIST POTS! ]" 337351 endif352endif353 354# Break paralysis with pouch command.355if paralyzed356 if findtype "pouch" self357 yell "[pouch"358 wait 250359 else360 overhead "[ NO POUCHES! ]" 337361 endif362endif363 364if skill "Veterinary" >= 50 and timer "VetKitTimer" >= VetKitTimerCD365 if not bandaging and findtype 25750 backpack as item366 dclick item367 wait 200368 endif369 settimer "VetKitTimer" 0370endif371 372# Drop gold if overweight.373if weight > maxweight374 if timer "OverweightMessageTimer" > OverweightMessageCD375 overhead "OVERWEIGHT!!" 34376 settimer "OverweightMessageTimer" 0377 endif378 379 if amountOfGoldToDrop != 0380 while weight > maxweight381 if findtype "gold coin" backpack as item382 lift item amountOfGoldToDrop383 droprelloc 0 0384 getlabel backpack xxx385 wait 200386 if insysmsg "cannot drop anything"387 drop backpack -1 -1 -1388 endif389 wait maxwaittimeinms390 overhead "* Gold dropped *" 55391 else392 break393 endif394 endwhile395 endif396endif397 398# Eat food if not satisfied.399if eatFood = 1 and not findbuff "food satisfaction" and findtype "tray" self400 if findtype "tray" self as Food401 overhead "[ EATING FOOD ]" 88402 dclick Food403 wait 500404 endif405endif406 407# =========================408# SONG BUFF MAINTENANCE409# =========================410# These are the self/bag-targeted bard songs, not the mob debuffs.411# They are throttled by Musicianship + SongBuffDelay.412 413if useSongBuffs = 1414 415 if not findbuff "Song Of Peacemaking" and timer "Musicianship" > 5000 and timer "PeacemakingTimer" > 11000 and timer "SongBuffDelay" > 10500416 skill "Peacemaking"417 wait 150418 if insysmsg "What instrument shall you play?"419 if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument420 target Instrument421 wait 250422 else423 overhead "[ NO INSTRUMENT! ]" 337424 endif425 endif426 if not insysmsg "This is not a musical instrument"427 wft 1500428 target backpack429 overhead "[ j Peacemaking Buff j ]" 84430 settimer "Musicianship" 0431 settimer "SongBuffDelay" 0432 endif433 endif434 435 if not findbuff "Song Of Discordance" and timer "Musicianship" > 5000 and timer "DiscordanceTimer" > 11000 and timer "SongBuffDelay" > 10500436 skill "Discordance"437 wft 1500438 if insysmsg "What instrument shall you play?"439 if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument440 target Instrument441 wait 250442 else443 overhead "[ NO INSTRUMENT! ]" 337444 endif445 endif446 if not insysmsg "This is not a musical instrument"447 wft 1500448 target backpack449 overhead "[ j Discordance Buff j ]" 69450 settimer "Musicianship" 0451 settimer "SongBuffDelay" 0452 endif453 endif454 455 if not findbuff "Song of Provocation" and timer "Musicianship" > 5000 and timer "ProvocationTimer" > 11000 and timer "SongBuffDelay" > 10500456 skill "Provocation"457 wft 1500458 if insysmsg "What instrument shall you play?"459 if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument460 target Instrument461 wait 250462 else463 overhead "[ NO INSTRUMENT! ]" 337464 endif465 endif466 if not insysmsg "This is not a musical instrument"467 wft 1500468 target backpack469 overhead "[ j Provocation Buff j ]" 2117470 settimer "Musicianship" 0471 settimer "SongBuffDelay" 0472 endif473 endif474endif475 476# =========================477# WAR MODE MAINTENANCE478# =========================479 480if useWarmode = 1 and not warmode481 replay482endif483 484# =========================485# TARGET ACQUISITION486# =========================487# Only search for a new primary target when currentTarget is missing,488# dead, or out of range. targetSelectionMode (see USER SETTINGS) controls489# how the new target is picked: automatically, automatically-but-only-in-490# warmode, or manually.491 492if foundTarget = 1493 if dead currentTarget494 @setvar! foundTarget 0495 @setvar! currentTarget 0496 @setvar! secondaryTarget 0497 elseif not find currentTarget ground -1 -1 TargetSearchRange498 @setvar! foundTarget 0499 @setvar! currentTarget 0500 @setvar! secondaryTarget 0501 endif502endif503 504if foundTarget = 0 and timer "TargetSearchTimer" > TargetSearchCD505 506 @setvar! newPrimaryTarget 0507 508 if targetSelectionMode = 1509 # --------------------------------------------510 # MANUAL: script actively prompts you for a target.511 # This opens a target cursor - click a creature, or press ESC512 # to skip this cycle. No client-side hotkey setup needed.513 # --------------------------------------------514 overhead "[ Pick your target ]" 88515 hotkey "Set Last Target"516 wait 200517 while targetexists518 wait 50519 endwhile520 521 if lasttarget != 0 and not dead lasttarget and find lasttarget ground -1 -1 TargetSearchRange522 @setvar! newPrimaryTarget lasttarget523 endif524 525 if newPrimaryTarget = 0526 if timer "NoTargetMessageTimer" > NoTargetMessageCD527 overhead "[ No target ]" 33528 settimer "NoTargetMessageTimer" 0529 endif530 endif531 532 else533 # --------------------------------------------534 # AUTOMATIC: grab the closest grey monster, skipping anything535 # on the ignore list or, optionally, other players'536 # summoned/bonded/tamed creatures.537 # --------------------------------------------538 if targetexists539 hotkey "cancel current target"540 endif541 542 hotkey "target closest grey monster"543 wait 150544 545 for 5546 @setvar! candidatePrimaryTarget lasttarget547 548 if candidatePrimaryTarget = 0 or dead candidatePrimaryTarget or not find candidatePrimaryTarget ground -1 -1 TargetSearchRange549 break550 endif551 552 getlabel candidatePrimaryTarget candidatePrimaryLabel553 554 if inlist TargetIgnoreList candidatePrimaryLabel555 @ignore candidatePrimaryTarget556 elseif ignoreSummonedBondedTamed = 1 and "(summoned" in candidatePrimaryLabel557 @ignore candidatePrimaryTarget558 elseif ignoreSummonedBondedTamed = 1 and "(bonded" in candidatePrimaryLabel559 @ignore candidatePrimaryTarget560 elseif ignoreSummonedBondedTamed = 1 and "(tame" in candidatePrimaryLabel561 @ignore candidatePrimaryTarget562 elseif "battle trainer" in candidatePrimaryLabel563 @ignore candidatePrimaryTarget564 else565 @setvar! newPrimaryTarget candidatePrimaryTarget566 break567 endif568 569 # The rejected candidate is now ignored, so this cycles to a different one.570 hotkey "Next Grey Monster Target"571 wait 150572 endfor573 574 if newPrimaryTarget = 0575 if timer "NoTargetMessageTimer" > NoTargetMessageCD576 overhead "[ No target ]" 33577 settimer "NoTargetMessageTimer" 0578 endif579 endif580 endif581 582 if newPrimaryTarget != 0583 @setvar! currentTarget newPrimaryTarget584 @setvar! previousTarget currentTarget585 @setvar! foundTarget 1586 @setvar! secondaryTarget 0587 588 getlabel currentTarget currentLabel589 sysmsg "Target: {{currentLabel}}" 55590 591 # Attack immediately on acquisition.592 attack currentTarget593 settimer "AttackCommandTimer" 0594 595 # Pets attack immediately on target change, then only on cooldown.596 if usePets = 1597 say "all kill" 34598 wft 150599 target currentTarget600 settimer "PetKillCommandTimer" 0601 endif602 endif603 604 if targetexists605 hotkey "cancel current target"606 endif607 608 settimer "TargetSearchTimer" 0609endif610 611# =========================612# COMBAT LOOP - STABLE TARGET613# =========================614# Once a target is found, keep operating on the same currentTarget.615# The loop ends naturally when the target dies/leaves range or player HP is too low.616 617while foundTarget = 1 and not dead currentTarget and find currentTarget ground -1 -1 TargetSearchRange and diffhits < diffHitsToHeal618 619 # Exit combat loop if warmode has been disabled.620 if useWarmode = 1 and not warmode621 replay622 endif623 624 if usePets = 1 and timer "PetGuardCommandTimer" > PetGuardCommandCD625 say "all guard me"626 settimer "PetGuardCommandTimer" 0627 endif628 629 cooldown "Auto Bard" 6000630 631 # Keep attacking.632 if timer "AttackCommandTimer" > AttackCommandCD633 if find currentTarget ground -1 -1 TargetAttackRange634 attack currentTarget635 settimer "AttackCommandTimer" 0636 endif637 endif638 639 # Pet kill command is intentionally slower than attack.640 if usePets = 1 and timer "PetKillCommandTimer" > PetKillCommandCD641 if find currentTarget ground -1 -1 TargetAttackRange642 say "all kill" 34643 wft 150644 target currentTarget645 settimer "PetKillCommandTimer" 0646 endif647 endif648 649 # Show current target marker occasionally only.650 if timer "TargetOverheadTimer" > TargetOverheadCD651 overhead "� TARGET �" 69 currentTarget652 settimer "TargetOverheadTimer" 0653 endif654 655 # Re-run critical survival checks inside the combat loop.656 if diffhits >= diffHitsToHeal657 if findtype "Yellow Potion" backpack as HealPotLoop658 getlabel HealPotLoop HealPotLoopLabel659 if "next" in HealPotLoopLabel660 # Heal potion unavailable. Let loop end because HP is high-risk.661 else662 dclick HealPotLoop663 wait 250664 endif665 endif666 @setvar! foundTarget 0667 replay668 endif669 670 while poisoned671 if findtype "Orange Potion" self672 dclicktype "Orange Potion"673 wait 250674 else675 overhead "[ NO CURE POTS! ]" 337676 endif677 if diffhits > diffHitsToHeal678 break679 endif680 endwhile681 682 if skill "Veterinary" >= 50 and timer "VetKitTimer" >= VetKitTimerCD683 if not bandaging and findtype 25750 backpack as item684 dclick item685 wait 200686 endif687 settimer "VetKitTimer" 0688 endif689 690 if useStaminaPots = 1 and diffstam >= 5691 if findtype "Red Potion" self692 dclicktype "Red Potion"693 overhead "[ REFRESH POTION ]" 37694 wait 250695 endif696 endif697 698 if paralyzed699 if findtype "pouch" self700 yell "[pouch"701 wait 250702 endif703 endif704 705 # --------------------------------------------706 # SECONDARY TARGET SEARCH707 # --------------------------------------------708 # Only needed for Provocation. Search occasionally and keep the result stable.709 710 if enableProvocation = 1 and skill "Provocation" >= 50 and timer "SecondaryTargetSearchTimer" > SecondaryTargetSearchCD711 712 @setvar! secondaryTarget 0713 714 if targetexists715 hotkey "cancel current target"716 endif717 718 # Try a few candidates, but do not do this every loop pass.719 # Skip anything on the ignore list or other players pets, same as720 # primary target acquisition.721 for 4722 hotkey "Next Grey Monster Target"723 wait 150724 @setvar! candidateTarget lasttarget725 726 if find candidateTarget ground -1 -1 TargetSearchRange and candidateTarget != currentTarget and not dead candidateTarget727 getlabel candidateTarget candidateLabel728 729 if inlist TargetIgnoreList candidateLabel730 @ignore candidateTarget731 elseif ignoreSummonedBondedTamed = 1 and "(summoned" in candidateLabel732 @ignore candidateTarget733 elseif ignoreSummonedBondedTamed = 1 and "(bonded" in candidateLabel734 @ignore candidateTarget735 elseif ignoreSummonedBondedTamed = 1 and "(tame" in candidateLabel736 @ignore candidateTarget737 elseif "battle trainer" in candidatePrimaryLabel738 @ignore candidatePrimaryTarget739 else740 @setvar! secondaryTarget candidateTarget741 742 if "Paragon" in candidateLabel743 overhead "� PARAGON PROVO TARGET �" 12 secondaryTarget744 else745 overhead "� PROVO TARGET �" 2117 secondaryTarget746 endif747 748 break749 endif750 endif751 endfor752 753 if targetexists754 hotkey "cancel current target"755 endif756 757 settimer "SecondaryTargetSearchTimer" 0758 endif759 760 # If the stored secondary target is no longer valid, clear it.761 if secondaryTarget != 0762 if dead secondaryTarget763 @setvar! secondaryTarget 0764 elseif not find secondaryTarget ground -1 -1 TargetSearchRange765 @setvar! secondaryTarget 0766 endif767 endif768 769 # --------------------------------------------770 # BARD STATE CHECK771 # --------------------------------------------772 773 if timer "BardStateCheckTimer" > BardStateCheckCD774 775 @setvar! NeedtoDiscord 0776 @setvar! NeedtoProvoke 0777 @setvar! NeedtoPacify 0778 779 getlabel currentTarget currentLabel780 781 # ==================================================782 # PRIORITY 1783 # Discord CURRENT target first (if enabled)784 # ==================================================785 786 if enableDiscordance = 1 and skill "Discordance" >= 50787 if "discord" in currentLabel788 @setvar! NeedtoDiscord 0789 else790 @setvar! NeedtoDiscord 1791 endif792 endif793 794 # ==================================================795 # PRIORITY 2796 # Provoke SECONDARY against CURRENT797 #798 # Only after CURRENT is already discorded (if enabled)799 # ==================================================800 801 if NeedtoDiscord = 0 and enableProvocation = 1 and skill "Provocation" >= 50 and secondaryTarget != 0802 if find secondaryTarget ground -1 -1 TargetSearchRange and currentTarget != secondaryTarget803 getlabel secondaryTarget secondaryLabel804 805 if "provoked" in currentLabel806 @setvar! NeedtoProvoke 0807 elseif "provoked" in secondaryLabel808 @setvar! NeedtoProvoke 0809 else810 @setvar! NeedtoProvoke 1811 endif812 endif813 endif814 815 # ==================================================816 # PRIORITY 3817 # Peace CURRENT818 #819 # Only when:820 # - current is discorded (if enabled)821 # - secondary is provoked (if enabled)822 # ==================================================823 if NeedtoDiscord = 0 and NeedtoProvoke = 0 and enablePeacemaking = 1 and skill "Peacemaking" >= 50824 if "pacified" in currentLabel825 @setvar! NeedtoPacify 0826 elseif "provoked" in currentLabel827 # If already provoked, do not pacify the current target.828 @setvar! NeedtoPacify 0829 else830 @setvar! NeedtoPacify 1831 endif832 endif833 834 settimer "BardStateCheckTimer" 0835 endif836 837 # --------------------------------------------838 # BARD EXECUTION - ONE ACTION PER CYCLE839 # --------------------------------------------840 841 if NeedtoDiscord = 1 and enableDiscordance = 1 and skill "Discordance" >= 50 and timer "Discordance" > 11000 and timer "Musicianship" > 5000842 clearsysmsg843 skill "Discordance"844 wft 1500845 846 if insysmsg "What instrument shall you play?"847 if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument848 target Instrument849 wait 250850 else851 overhead "[ NO INSTRUMENT! ]" 337852 endif853 endif854 855 if not insysmsg "This is not a musical instrument"856 target currentTarget857 wait 250858 endif859 860 if insysmsg "Target cannot be seen"861 overhead "[ DISCORD: Cannot see target ]" 337 currentTarget862 settimer "Discordance" 0863 elseif insysmsg "That is too far away."864 overhead "[ DISCORD: Too far ]" 337 currentTarget865 settimer "Discordance" 0866 elseif insysmsg "You must wait"867 wait 500868 elseif insysmsg "You play successfully"869 overhead "[ j DISCORDED! j ]" 69 currentTarget870 settimer "Musicianship" 0871 settimer "Discordance" 0872 settimer "Discorded" 0873 @setvar! NeedtoDiscord 0874 elseif insysmsg "fail to discord"875 overhead "[ DISCORD FAIL ]" 337 currentTarget876 settimer "Discordance" 5500877 endif878 879 elseif NeedtoProvoke = 1 and enableProvocation = 1 and skill "Provocation" >= 50 and timer "Provocation" > 11000 and timer "Musicianship" > 5000880 clearsysmsg881 882 if secondaryTarget = 0883 @setvar! NeedtoProvoke 0884 elseif not find secondaryTarget ground -1 -1 TargetSearchRange885 @setvar! NeedtoProvoke 0886 else887 skill "Provocation"888 wft 1000889 890 if insysmsg "What instrument shall you play?"891 if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument892 target Instrument893 wait 250894 else895 overhead "[ NO INSTRUMENT! ]" 337896 endif897 endif898 899 if not insysmsg "This is not a musical instrument"900 target secondaryTarget901 wait 150902 endif903 904 if insysmsg "Target cannot be seen"905 overhead "[ PROVO: Cannot see target ]" 339 secondaryTarget906 @setvar! NeedtoProvoke 0907 settimer "Provocation" 0908 elseif insysmsg "That is too far away."909 overhead "[ PROVO: Too far ]" 339 secondaryTarget910 @setvar! NeedtoProvoke 0911 settimer "Provocation" 0912 elseif insysmsg "You must wait"913 wait 500914 else915 target currentTarget916 wait 250917 918 if insysmsg "You play successfully, provoking"919 overhead "[ j PROVOKED! j ]" 2117 currentTarget920 overhead "[ j PROVOKED! j ]" 2117 secondaryTarget921 settimer "Musicianship" 0922 settimer "Provocation" 0923 settimer "Provoked" 0924 @setvar! NeedtoProvoke 0925 @setvar! NeedtoPacify 0926 elseif insysmsg "You fail to incite"927 overhead "[ PROVO FAIL ]" 337928 settimer "Provocation" 5500929 elseif insysmsg "The creatures you are trying to provoke are too far away from each"930 overhead "[ PROVO: Too far apart ]" 153 currentTarget931 overhead "[ PROVO: Too far apart ]" 153 secondaryTarget932 @setvar! NeedtoProvoke 0933 settimer "Provocation" 0934 elseif insysmsg "tell someone to attack themselves!"935 overhead "[ PROVO: SELF TARGET FAIL ]" 337936 @setvar! NeedtoProvoke 0937 endif938 endif939 endif940 941 elseif NeedtoPacify = 1 and enablePeacemaking = 1 and skill "Peacemaking" >= 50 and timer "Peacemaking" > 11000 and timer "Musicianship" > 5000942 clearsysmsg943 skill "Peacemaking"944 wft 1500945 946 if insysmsg "What instrument shall you play?"947 if findtype "standing harp|sackbut|bamboo flute|tambourine|drum|lute|lap harp|gemshorn|hurdy gurdy|psaltery|shawm|vielle" as Instrument948 target Instrument949 wait 250950 else951 overhead "[ NO INSTRUMENT! ]" 337952 endif953 endif954 955 if not insysmsg "This is not a musical instrument"956 target currentTarget957 wait 250958 endif959 960 if insysmsg "Target cannot be seen"961 overhead "[ PEACE: Cannot see target ]" 337 currentTarget962 settimer "Peacemaking" 0963 elseif insysmsg "That is too far away."964 overhead "[ PEACE: Too far ]" 337 currentTarget965 settimer "Peacemaking" 0966 elseif insysmsg "You must wait"967 wait 500968 elseif insysmsg "You play successfully, pacifying your"969 overhead "[ j PACIFIED! j ]" 84 currentTarget970 settimer "Musicianship" 0971 settimer "Peacemaking" 0972 settimer "Pacified" 0973 @setvar! NeedtoPacify 0974 elseif insysmsg "you fail to pacify your opponent"975 overhead "[ PEACE FAIL ]" 337 currentTarget976 settimer "Peacemaking" 5500977 endif978 endif979 980 # Small loop wait. This keeps responsiveness while avoiding frantic looping.981 wait 100982endwhile983 984# If the combat loop ended, clear stale state before the next script pass.985if foundTarget = 1986 if dead currentTarget987 @setvar! foundTarget 0988 @setvar! currentTarget 0989 @setvar! secondaryTarget 0990 elseif not find currentTarget ground -1 -1 TargetSearchRange991 @setvar! foundTarget 0992 @setvar! currentTarget 0993 @setvar! secondaryTarget 0994 endif995endif996 997replay