YASSE Stance (script): Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
|||
Line 22: | Line 22: | ||
|- |
|- |
||
| .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 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 r || puts you in a Ranged stance (Evasion 100 with the remaining points in shield), equips your shield (if not held) and uses the dodge command |
|||
|- |
|||
| .stance n1 n2 n3 || puts you in a custom stance stance (Evasion n1, Parry n2 and Shield n3), equips your shield or wears/stows your shield (depending on whether you have points in shield stance) and uses the dodge, parry or block command |
|||
|- |
|- |
||
| .stance || returns to your last stance (useful if changed manually or by another script) |
| .stance || returns to your last stance (useful if changed manually or by another script) |
Revision as of 11:15, 13 June 2013
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)
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 r | puts you in a Ranged stance (Evasion 100 with the remaining points in shield), equips your shield (if not held) and uses the dodge command |
.stance n1 n2 n3 | puts you in a custom stance stance (Evasion n1, Parry n2 and Shield n3), equips your shield or wears/stows your shield (depending on whether you have points in shield stance) and uses the dodge, parry or block command |
.stance | returns to your last stance (useful if changed manually or by another script) |
Updates
Last Updated:
02 May 2013 - Script Posted
24 May 2013 - Fixed a problem where shields were equipped after changing to a shield heavy stance or stowed while still in a shield heavy stance and tidied the scripts' functions.
Script
ifexists stance-evasion goto stance-parry setvariable stance-next stance-parry setvariable evasion 100 setvariable parry 80 setvariable shield 0 stance-evasion-check-0: setglobalvariable stance-evasion "$evasion$ $parry$ $shield$ 100" match $stance-next$ 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 stance-parry 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 stance-parry stance-evasion-high: stance-evasion-low: setvariable evasion 100 setvariable parry 80 setvariable shield 0 goto stance-evasion-check-0 stance-parry: setvariable stance-next stance-shield 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-next$ 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 stance-shield 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 stance-shield stance-shield: ifexists stance-shield goto start setvariable stance-next start setvariable parry 80 setvariable evasion 0 setvariable shield 100 stance-shield-check-0: setglobalvariable stance-shield "$evasion$ $parry$ $shield$ 100" match $stance-next$ 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 start 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 start 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 end if x$1$ contains xd begin setglobalvariable stance-current evasion end if x$1$ contains xe begin setglobalvariable stance-current evasion end if x$1$ contains xp begin setglobalvariable stance-current parry end if x$1$ contains xs begin setglobalvariable stance-current shield end put glance waitfor you glance if $righthanditem$ contains $shield$ begin put swap waitfor You move 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 setglobalvariable stance-current evasion put stance set $stance-evasion$ goto end end-evasion: setvariable stance-next end-evasion match end-evasion-0 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-evasion-0: if $lefthanditem$ contains $shield$ begin match end-evasion-2 you slide match end-evasion-2 you sling match end-evasion-2 You are already wearing that. match end-evasion-2 You attach match end-evasion-1 You can't wear any more put wear my $shield$ end end-evasion-1: if $lefthanditem$ contains $shield$ begin match end-evasion-2 you slide match end-evasion-2 you sling match end-evasion-2 you stow match end-evasion-2 you put match end-evasion-2 that's closed. match end-evasion-2 There isn't any more room match end-evasion-2 Stow what? put stow my $shield$ end end-evasion-2: put dodge echo **************************************** Entering EVASION stance: $stance-evasion$ **************************************** goto end end-parry: setvariable stance-next end-parry match end-parry-0 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-parry-0 if $lefthanditem$ contains $shield$ begin match end-parry-2 you slide match end-parry-2 you sling match end-parry-2 You are already wearing that. match end-parry-2 You attach match end-parry-1 You can't wear any more put wear my $shield$ end end-parry-1: if $lefthanditem$ contains $shield$ begin match end-parry-2 you slide match end-parry-2 you sling match end-parry-2 you stow match end-parry-2 you put match end-parry-2 that's closed. match end-parry-2 There isn't any more room match end-parry-2 Stow what? put stow my $shield$ end parry-2: put parry echo **************************************** Entering parry stance: $stance-parry$ **************************************** goto end end-shield: if $lefthanditem$ contains "$shield$" goto end-shield-4 if $lefthanditem$ contains Empty goto end-shield-2 match end-shield-2 you slide match end-shield-2 you sling match end-shield-2 you stow match end-shield-2 you put match end-shield-2 that's closed. match end-shield-2 There isn't any more room match end-shield-2 Stow what? put stow my $lefthanditem$ matchwait end-shield-2: match end-shield-4 you slide match end-shield-4 you sling match end-shield-4 you remove match end-shield-3 remove what? match end-shield-3 aren't wearing that. put remove $shield$ matchwait end-shield-3: match end-shield-4 You draw out match end-shield-4 you get match end-shield-4 already in your inventory. match end-shield-4 What were you referring to? match end-shield-4 already holding that. put wield left my $shield$ matchwait end-shield-4: if righthanditem contains $shield$ begin put swap waitfor You move end put block end-shield-5: setvariable stance-next end-shield-4 match end-shield-6 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-shield-6: echo **************************************** Entering BLOCK stance: $stance-shield$ **************************************** goto end end-custom: put stance set $stance-custom$ if stance-current contains custom begin echo **************************************** Entering a CUSTOM stance: $stance-custom$ **************************************** goto end end goto end end: