Side Quest: Parry Codex Example by Jaseowns
# Side Quest: Parry Codex Example by Jaseowns
# UO Outlands
@setvar! jaseowns_ActiveParryCodex 0
@setvar! jaseowns_SwitchToWardingIfBleeding 1
@setvar! jaseowns_SwitchToWardingIfDisease 1
@setvar! jaseowns_SwitchToBulwarkIfStandingStill 1
@setvar! jaseowns_SwitchToShieldBashWhileMoving 1
@setvar! jaseowns_CheckParryCodexMinMana 25
@setvar! jaseowns_CheckParryCodexTimerCD 1000
settimer jaseowns_CheckParryCodexTimer jaseowns_CheckParryCodexTimerCD
if mana >= jaseowns_CheckParryCodexMinMana and timer jaseowns_CheckParryCodexTimer >= jaseowns_CheckParryCodexTimerCD and findtype 11889 backpack as jaseowns_ParryCodex
getlabel jaseowns_ParryCodex jaseowns_ParryCodexDesc
if "Shield Bash" in jaseowns_ParryCodexDesc
@setvar! jaseowns_ActiveParryCodex 1
elseif "Warding" in jaseowns_ParryCodexDesc
@setvar! jaseowns_ActiveParryCodex 2
elseif "Testudo" in jaseowns_ParryCodexDesc
@setvar! jaseowns_ActiveParryCodex 3
elseif "Mirror" in jaseowns_ParryCodexDesc
@setvar! jaseowns_ActiveParryCodex 4
elseif "Bulwark" in jaseowns_ParryCodexDesc
@setvar! jaseowns_ActiveParryCodex 5
endif
if findbuff "bleed" and jaseowns_SwitchToWardingIfBleeding = 1
@setvar! jaseowns_SwitchTo 2
elseif findbuff "disease" and jaseowns_SwitchToWardingIfDisease = 1
@setvar! jaseowns_SwitchTo 2
elseif poisoned and jaseowns_SwitchToWardingIfPoison = 1
@setvar! jaseowns_SwitchTo 2
elseif jaseowns_SwitchToBulwarkIfStandingStill = 1 and not cooldown "Bulwark"
@setvar! jaseowns_SwitchTo 5
elseif jaseowns_SwitchToShieldBashWhileMoving = 1 and cooldown "Moving"
@setvar! jaseowns_SwitchTo 1
endif
if jaseowns_ActiveParryCodex != jaseowns_SwitchTo
if jaseowns_SwitchTo = 1
say "[ShieldsStance1"
elseif jaseowns_SwitchTo = 2
say "[ShieldsStance2"
elseif jaseowns_SwitchTo = 3
say "[ShieldsStance3"
elseif jaseowns_SwitchTo = 4
say "[ShieldsStance4"
elseif jaseowns_SwitchTo = 5
say "[ShieldsStance5"
endif
settimer jaseowns_CheckParryCodexTimer 0
endif
endif
wait 50
loop