YASSE Stance (script): Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
(→Script) |
||
Line 34: | Line 34: | ||
<pre> |
<pre> |
||
ifexists stance-evasion goto stance-parry |
ifexists stance-evasion goto stance-parry |
||
setvariable stance-next stance-parry |
|||
setvariable evasion 100 |
setvariable evasion 100 |
||
setvariable parry 80 |
setvariable parry 80 |
||
Line 39: | Line 40: | ||
stance-evasion-check-0: |
stance-evasion-check-0: |
||
setglobalvariable stance-evasion "$evasion$ $parry$ $shield$ 100" |
setglobalvariable stance-evasion "$evasion$ $parry$ $shield$ 100" |
||
match stance- |
match $stance-next$ You have 0 stance points left |
||
match stance-evasion-check-1 stance points left |
match stance-evasion-check-1 stance points left |
||
match stance-evasion-check-2 Please try again. |
match stance-evasion-check-2 Please try again. |
||
Line 95: | Line 96: | ||
stance-parry: |
stance-parry: |
||
setvariable stance-next stance-shield |
|||
ifexists stance-parry goto stance-shield |
ifexists stance-parry goto stance-shield |
||
setvariable parry 100 |
setvariable parry 100 |
||
Line 101: | Line 103: | ||
stance-parry-check-0: |
stance-parry-check-0: |
||
setglobalvariable stance-parry "$evasion$ $parry$ $shield$ 100" |
setglobalvariable stance-parry "$evasion$ $parry$ $shield$ 100" |
||
match stance- |
match $stance-next$ You have 0 stance points left |
||
match stance-parry-check-1 stance points left |
match stance-parry-check-1 stance points left |
||
match stance-parry-check-2 Please try again. |
match stance-parry-check-2 Please try again. |
||
Line 158: | Line 160: | ||
stance-shield: |
stance-shield: |
||
ifexists stance-shield goto start |
ifexists stance-shield goto start |
||
setvariable stance-next start |
|||
setvariable parry 80 |
setvariable parry 80 |
||
setvariable evasion 0 |
setvariable evasion 0 |
||
Line 163: | Line 166: | ||
stance-shield-check-0: |
stance-shield-check-0: |
||
setglobalvariable stance-shield "$evasion$ $parry$ $shield$ 100" |
setglobalvariable stance-shield "$evasion$ $parry$ $shield$ 100" |
||
match |
match $stance-next$ You have 0 stance points left |
||
match stance-shield-check-1 stance points left |
match stance-shield-check-1 stance points left |
||
match stance-shield-check-2 Please try again. |
match stance-shield-check-2 Please try again. |
||
Line 222: | Line 225: | ||
begin |
begin |
||
setglobalvariable stance-current shield |
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 |
end |
||
if x$1$ contains xd |
if x$1$ contains xd |
||
begin |
begin |
||
setglobalvariable stance-current evasion |
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 |
end |
||
if x$1$ contains xe |
if x$1$ contains xe |
||
begin |
begin |
||
setglobalvariable stance-current evasion |
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 |
end |
||
if x$1$ contains xp |
if x$1$ contains xp |
||
begin |
begin |
||
setglobalvariable stance-current parry |
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 |
end |
||
if x$1$ contains xs |
if x$1$ contains xs |
||
begin |
begin |
||
setglobalvariable stance-current shield |
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 stance-current contains evasion |
|||
begin |
|||
put stance set $stance-evasion$ |
|||
goto end |
|||
end |
end |
||
put glance |
|||
if stance-current contains parry |
|||
waitfor you glance |
|||
if $righthanditem$ contains $shield$ |
|||
begin |
begin |
||
put swap |
|||
put stance set $stance-parry$ |
|||
waitfor You move |
|||
goto end |
|||
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 evasion goto end-evasion |
||
if stance-current contains parry goto end-parry |
if stance-current contains parry goto end-parry |
||
if stance-current contains shield goto end-shield |
if stance-current contains shield goto end-shield |
||
if stance-current contains custom goto end-custom |
if stance-current contains custom goto end-custom |
||
setglobalvariable stance-current evasion |
|||
goto end-2 |
|||
put stance set $stance-evasion$ |
|||
goto end |
|||
end-evasion: |
end-evasion: |
||
setvariable stance-next end-evasion |
|||
put glance |
|||
match end-evasion-0 You have 0 stance points left |
|||
waitfor you glance |
|||
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$ |
if $lefthanditem$ contains $shield$ |
||
begin |
begin |
||
Line 322: | Line 290: | ||
put dodge |
put dodge |
||
echo **************************************** Entering EVASION stance: $stance-evasion$ **************************************** |
echo **************************************** Entering EVASION stance: $stance-evasion$ **************************************** |
||
goto end |
goto end |
||
end-parry: |
end-parry: |
||
setvariable stance-next end-parry |
|||
put glance |
|||
match end-parry-0 You have 0 stance points left |
|||
waitfor you glance |
|||
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$ |
if $lefthanditem$ contains $shield$ |
||
begin |
begin |
||
Line 351: | Line 325: | ||
put parry |
put parry |
||
echo **************************************** Entering parry stance: $stance-parry$ **************************************** |
echo **************************************** Entering parry stance: $stance-parry$ **************************************** |
||
goto end |
goto end |
||
end-shield: |
end-shield: |
||
if $lefthanditem$ contains "$shield$" goto end-shield-4 |
|||
put glance |
|||
if $lefthanditem$ contains Empty goto end-shield-2 |
|||
waitfor you glance |
|||
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 slide |
||
match end-shield-2 you sling |
match end-shield-2 you sling |
||
Line 378: | Line 350: | ||
end-shield-3: |
end-shield-3: |
||
match end-shield-4 You draw out |
|||
match end-shield-4 you get |
match end-shield-4 you get |
||
match end-shield-4 already in your inventory. |
match end-shield-4 already in your inventory. |
||
match end-shield-4 What were you referring to? |
match end-shield-4 What were you referring to? |
||
match end-shield-4 already holding that. |
match end-shield-4 already holding that. |
||
put |
put wield left my $shield$ |
||
matchwait |
matchwait |
||
end-shield-4: |
end-shield-4: |
||
if righthanditem contains $shield$ |
|||
begin |
|||
put swap |
|||
waitfor You move |
|||
end |
|||
put block |
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$ **************************************** |
echo **************************************** Entering BLOCK stance: $stance-shield$ **************************************** |
||
goto end |
goto end |
||
end-custom: |
end-custom: |
||
put stance set $stance-custom$ |
|||
if stance-current contains custom |
if stance-current contains custom |
||
begin |
begin |
||
Line 396: | Line 388: | ||
goto end |
goto end |
||
end |
end |
||
goto end |
goto end |
||
end: |
|||
end-2: |
|||
</pre> |
</pre> |
Revision as of 12:06, 24 May 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 | 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 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: