KMA_v1 by ProMess
Description from the author:
@setvar! minimumWaitForPing 200
@setvar! cdMushroom 61000
//todo: build toggle off of warmode status to regenerate mushrooms after mobs are dead
@setvar! canYouMakeAMushroom 1
@setvar! cdLightning 20000
@setvar! cdMagicArrow 20000
@setvar! cdHarm 20000
@setvar! cdFireball 60000
@setvar! hpCheckToTriggerGreaterHealSpell 45
@setvar! hpCheckToTriggerMiniEmergencyHealSpell 70
@setvar! hpCheckToTriggerHealPotion 60
//statuses
@setvar! canMushroom 1
@setvar! canDiscord 1
@setvar! isDiscorded 0
if not timerexists magicMushroomTimer
createtimer magicMushroomTimer
endif
if not timerexists meditationTimer
createtimer meditationTimer
endif
if not timerexists statusM
createtimer statusM
settimer statusM 21000
endif
if not timerexists cdMushroom
createtimer cdMushroom
endif
if not timerexists musicTimer
createtimer musicTimer
endif
if not timerexists antispam
createtimer antispam
endif
if not timerexists ssTimer
createtimer ssTimer
endif
if timer statusM > 20000
sysmsg 'Keeping you up'
settimer statusM 0
endif
if diffhits >= hpCheckToTriggerGreaterHealSpell
if targetexists
hotkey 'Cancel Current Target'
endif
while not targetexists 'beneficial'
if diffhits >= hpCheckToTriggerMiniEmergencyHealSpell
cast 'Heal'
else
cast 'Greater Heal'
endif
wait 50
endwhile
if targetexists 'beneficial'
hotkey "Target Self"
endif
replay
endif
if diffhits >= hpCheckToTriggerHealPotion and findtype "Yellow Potion" backpack as pot
getlabel pot desc
if "next usable" in desc
// do nothing
else
dclick pot
wait 650
endif
endif
if diffmana > 50
if timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushroom
if timer antispam > 10000
overhead "Eating shrooms" 66
endif
dclick mushroom
wait 200
if insysmsg "You consume a magic mushroom and restore some mana."
settimer magicMushroomTimer 0
elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
settimer magicMushroomTimer 30000
endif
if followers > 0 and timer antispam > 10000
say "all guard me"
endif
endif
#if not findbuff "actively meditating"
# skill 'Meditation'
# settimer meditationTimer 0
# insysmsg 'meditation'
#
# endif
endif
if targetexists harmful
wait 500
if timer antispam > 10000
sysmsg 'target acquired'
endif
@setvar myKillTarget lasttarget
endif
if skill "Discordance" >= 50 and canDiscord = 1
if isDiscorded = 0
getlabel myKillTarget discordDesc
if "discord" in discordDesc
@setvar! isDiscorded 1
elseif timer musicTimer >= 11000
useskill 'Discordance'
wft 500
if insysmsg "What instrument"
if findtype "bamboo flute" backpack as inny
target inny
elseif findtype "tambourine" backpack as inny
target inny
elseif findtype "drum" backpack as inny
target inny
elseif findtype "lute" backpack as inny
target inny
elseif findtype "harp" backpack as inny
target inny
elseif findtype "lap harp" backpack as inny
target inny
else
overhead "I do not have an inny" 34
@setvar! canDiscord 0
endif
wft 500
endif
if targetexists
target myKillTarget
overhead "Discorded" 88 myKillTarget
endif
settimer musicTimer 5000
endif
endif
if not findbuff "song of discordance" and timer musicTimer >= 11000
useskill 'Discordance'
wft 500
if insysmsg "What instrument"
if findtype "bamboo flute" backpack as inny
target inny
elseif findtype "tambourine" backpack as inny
target inny
elseif findtype "drum" backpack as inny
target inny
elseif findtype "lute" backpack as inny
target inny
elseif findtype "harp" backpack as inny
target inny
elseif findtype "lap harp" backpack as inny
target inny
else
overhead "I do not have an inny" 34
@setvar! canDiscord 0
endif
wft 500
endif
target backpack
settimer musicTimer 0
endif
endif
if poisoned
if automaticallyDrinkCurePot = 1 and diffhits >= hpCheckToTriggerCurePotion and findtype "Orange Potion" backpack as pot
dclick pot
wait 200
endif
while not targetexists beneficial
if not poisoned
hotkey '> Interrupt'
break
else
cast 'Cure'
wait 50
endif
endwhile
if targetexists beneficial
hotkey "Target Self"
wait 500
endif
endif
if dead
overhead "Rip" 34
for 10
if gumpexists 2957810225
gumpresponse 1 2957810225
break
endif
wait 500
endfor
replay
endif
if skill "Tracking" > 0
if not findbuff "tracking"
clearsysmsg
while not gumpexists 4267467659
useskill 'tracking'
wait minimumWaitForPing
endwhile
if gumpexists 4267467659
while not insysmsg "You will now hunt all hostile players."
gumpresponse 8 4267467659
waitforgump 4267467659 5000
endwhile
gumpresponse 6 4267467659
wait minimumWaitForPing
endif
gumpclose 4267467659
endif
endif
if timer antispam > 11000
settimer antispam 0
endif
if not targetexists
@setvar! isDiscorded 0
skill 'spirit speak'
if timer antispam > 10000
sysmsg 'Target is dead' 88
endif
endif
loopThe script right now is a continuous loop. To keep the script going when I need to cast spells but keep the script rolling, I use scripts that cast the spell to restart the script without waiting for target. Since the script is just targeting the script, UO doesn't see it as something to prevent the game from moving along. I like living risky, so I set my numbers to trip the different heals a little later. Save some regs, maybe costs more pots? I'll probably tune them tighter to keep me alive.
Discord Targeting is jacked... I gotta figure out why