YASSE Stance (script)
Jump to navigation
Jump to search
YASSE Stance (script) | |
---|---|
Category | combat |
Front-end | YASSE |
Author | Ithrios |
Description
Changes stances, equips or wears/stows a shield and uses the block, parry or dodge defensive manoeuvre based on player input. Will calculate the maximum stance if you have extra stance points and stores them in a global variable.
In order to equip or wear/stow a shield the following global variables need to be defined:
shield: The name of your shield (e.g. target shield)
optional (without these both defined the shield will be stowed and retrieved via get):
shield-w: The command to wield your shield (e.g. remove my $shield$ or get my $shield$)
shield-s: The command to unequip your shield (e.g. wear my $shield$ or remove my $shield$
Syntax
Syntax | Effect |
---|---|
.stance e or .stance d | puts you in an Evasion stance (evasion 100 with the remaining points in parry), wears/stows your shield (if held) and uses the dodge command |
.stance p | puts you in a Parry stance (parry 100 with the remaining points in evasion), wears/stows your shield (if held) and uses the parry command |
.stance s or .stance b | puts you in a Shield stance (Shield 100 with the remaining points in parry), equips your shield (if not held) and uses the block command |
.stance n1 n2 n3 | puts you in a Custom Stance (based on the numbers) and saves this stance for the future |
.stance custom | puts you in your last custom stance |
.stance | returns to your last stance (useful if changed manually or by another script) |
Updates
Last Updated: 02 May 2013 - Script Posted
Script
ifexists stance-evasion goto stance-parry setvariable evasion 100 setvariable parry 80 setvariable shield 0 stance-evasion-check-0: setglobalvariable stance-evasion "$evasion$ $parry$ $shield$ 100" match stance-parry You have 0 stance points left match stance-evasion-check-1 stance points left match stance-evasion-check-2 Please try again. put stance set $stance-evasion$ matchwait stance-evasion-check-1: counter set $evasion$ if_c < 100 begin counter add 1 setvariable evasion $c$ goto stance-evasion-check-0 end counter set $parry$ if_c < 100 begin counter add 1 setvariable parry $c$ goto stance-evasion-check-0 end counter set $shield$ if_c < 100 begin counter add 1 setvariable shield $c$ goto stance-evasion-check-0 end goto end stance-evasion-check-2: counter set $shield$ if_c > 0 begin counter sub 1 setvariable shield $c$ goto stance-evasion-check-0 end counter set $parry$ if_c > 80 begin counter sub 1 setvariable parry $c$ goto stance-evasion-check-0 end goto end stance-evasion-high: stance-evasion-low: setvariable evasion 100 setvariable parry 80 setvariable shield 0 goto stance-evasion-check-0 stance-parry: ifexists stance-parry goto stance-shield setvariable parry 100 setvariable evasion 80 setvariable shield 0 stance-parry-check-0: setglobalvariable stance-parry "$evasion$ $parry$ $shield$ 100" match stance-shield You have 0 stance points left match stance-parry-check-1 stance points left match stance-parry-check-2 Please try again. put stance set $stance-parry$ matchwait stance-parry-check-1: echo 1 counter set $parry$ if_c < 100 begin counter add 1 setvariable parry $c$ goto stance-parry-check-0 end counter set $evasion$ if_c < 100 begin counter add 1 setvariable evasion $c$ goto stance-parry-check-0 end counter set $shield$ if_c < 100 begin counter add 1 setvariable shield $c$ goto stance-parry-check-0 end goto end stance-parry-high: stance-parry-low: setvariable evasion 80 setvariable parry 100 setvariable shield 0 goto stance-parry-check-0 stance-parry-check-2: counter set $shield$ if_c > 0 begin counter sub 1 setvariable shield $c$ goto stance-parry-check-0 end counter set $evasion$ if_c > 80 begin counter sub 1 setvariable evasion $c$ goto stance-parry-check-0 end goto end stance-shield: ifexists stance-shield goto start setvariable parry 80 setvariable evasion 0 setvariable shield 100 stance-shield-check-0: setglobalvariable stance-shield "$evasion$ $parry$ $shield$ 100" match start You have 0 stance points left match stance-shield-check-1 stance points left match stance-shield-check-2 Please try again. put stance set $stance-shield$ matchwait stance-shield-check-1: counter set $shield$ if_c < 100 begin counter add 1 setvariable shield $c$ goto stance-shield-check-0 end counter set $parry$ if_c < 100 begin counter add 1 setvariable parry $c$ goto stance-shield-check-0 end counter set $evasion$ if_c < 100 begin counter add 1 setvariable evasion $c$ goto stance-shield-check-0 end goto end stance-shield-check-2: counter set $evasion$ if_c > 0 begin counter sub 1 setvariable evasion $c$ goto stance-shield-check-0 end counter set $parry$ if_c > 80 begin counter sub 1 setvariable parry $c$ goto stance-shield-check-0 end goto end stance-shield-high: stance-shield-low: setvariable evasion 0 setvariable parry 80 setvariable shield 100 goto stance-shield-check-0 start: if x$1$ contains xb begin setglobalvariable stance-current shield match end You have 0 stance points left match stance-shield-low stance points left match stance-shield-high Please try again. put stance set $stance-shield$ matchwait end if x$1$ contains xd begin setglobalvariable stance-current evasion match end You have 0 stance points left match stance-evasion-low stance points left match stance-evasion-high Please try again. put stance set $stance-evasion$ matchwait end if x$1$ contains xe begin setglobalvariable stance-current evasion match end You have 0 stance points left match stance-evasion-low stance points left match stance-evasion-high Please try again. put stance set $stance-evasion$ matchwait end if x$1$ contains xp begin setglobalvariable stance-current parry match end You have 0 stance points left match stance-parry-low stance points left match stance-parry-high Please try again. put stance set $stance-parry$ matchwait end if x$1$ contains xs begin setglobalvariable stance-current shield match end You have 0 stance points left match stance-shield-low stance points left match stance-shield-high Please try again. put stance set $stance-shield$ matchwait if_1 begin setglobalvariable stance-current custom if_1 begin counter set $1$ setvariable evasion $c$ if_c > 100 begin setvariable evasion 100 end if_c < 0 begin setvariable evasion 0 end shift end setvariable parry 0 if_1 begin counter set $1$ setvariable parry $c$ if_c > 100 begin setvariable parry 100 end if_c < 0 begin setvariable parry 0 end shift end setvariable shield 0 if_1 begin counter set $1$ setvariable shield $c$ if_c > 100 begin setvariable shield 100 end if_c < 0 begin setvariable shield 0 end end stance-custom-check-0: counter set $evasion$ counter add $parry$ counter add $shield$ if_c < 180 goto stance-custom-check-1 if_c > 190 goto stance-custom-check-2 setglobalvariable stance-custom "$evasion$ $parry$ $shield$ 100" match end You have 0 stance points left match stance-custom-check-1 stance points left match stance-custom-check-2 Please try again. put stance set $stance-custom$ matchwait stance-custom-check-1: counter set $evasion$ if_c < 100 begin counter add 1 setvariable evasion $c$ goto stance-custom-check-0 end counter set $parry$ if_c < 100 begin counter add 1 setvariable parry $c$ goto stance-custom-check-0 end counter set $shield$ if_c < 100 begin counter add 1 setvariable shield $c$ goto stance-custom-check-0 end goto end stance-custom-check-2: counter set $parry$ if_c > 80 begin counter sub 1 setvariable parry $c$ goto stance-custom-check-0 end counter set $shield$ if_c > 0 begin counter sub 1 setvariable shield $c$ goto stance-custom-check-0 end goto end stance-evasion-check-2: counter set $shield$ if_c > 0 begin counter sub 1 setvariable shield $c$ goto stance-custom-check-0 end counter set $parry$ if_c > 80 begin counter sub 1 setvariable parry $c$ goto stance-custom-check-0 end goto end stance-evasion-check-1: counter set $evasion$ if_c < 100 begin counter add 1 setvariable evasion $c$ goto stance-custom-check-0 end counter set $parry$ if_c < 80 begin counter add 1 setvariable parry $c$ goto stance-custom-check-0 end goto end end if stance-current contains evasion begin put stance set $stance-evasion$ goto end end if stance-current contains parry begin put stance set $stance-parry$ goto end end if stance-current contains shield begin put stance set $stance-shield$ goto end end if stance-current contains custom begin put stance set $stance-custom$ goto end end setglobalvariable stance-current evasion put stance set $stance-evasion$ end: if stance-current contains evasion goto end-evasion if stance-current contains parry goto end-parry if stance-current contains shield goto end-shield if stance-current contains custom goto end-custom goto end-2 end-evasion: if $lefthanditem$ contains $shield$ begin match evasion-2 you slide match evasion-2 you sling match evasion-2 you stow match evasion-2 you put match evasion-2 $shield-ss$ ifexists shield-s begin put $shield-s$ end else put stow my $shield$ matchwait end evasion-2: put dodge echo **************************************** Entering EVASION stance: $stance-evasion$ **************************************** goto end-2 end-parry: if $lefthanditem$ contains $shield$ begin match parry-2 you slide match parry-2 you sling match parry-2 you stow match parry-2 you put match parry-2 $shield-ss$ ifexists shield-s begin put $shield-s$ end else put stow my $shield$ matchwait end parry-2: put parry echo **************************************** Entering parry stance: $stance-parry$ **************************************** goto end-2 end-shield: if stance-current contains shield begin if $lefthanditem$ excludes $shield$ begin if $lefthanditem$ excludes Empty begin put stow $lefthanditem$ waitfor you end match block-2 you slide match block-2 you sling match block-2 you get match block-2 you remove match block-2 $shield-ws$ ifexists shield-s begin put $shield-w$ end else put get my $shield$ matchwait end block-2: put block echo **************************************** Entering BLOCK stance: $stance-shield$ **************************************** goto end-2 end-custom: if stance-current contains custom begin echo **************************************** Entering a CUSTOM stance: $stance-custom$ **************************************** goto end end goto end-2 end-2: