YASSE Skin(script): Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 32: Line 32:


==Updates==
==Updates==
02 May 2013 - Script Posted<br>
Last Updated:
24 May 2013 - Repaired an issue with sheathing mainhand weapons if the $skinningknife$ variable is not defined.<br>
02 May 2013 - Script Posted
11 Dec 2013 - fixed a bug that caused a creature to be arranged one extra time if you try to specify a specific type of item to harvest and simplified the part of the script that empties your left hand<Br>
24 May 2013 - Repaired an issue with sheathing mainhand weapons if the skinningknife variable is not defined.


==Script==
==Script==


<pre>
<pre>
isetvariable type ""
ifexists stance-evasion
begin
put stance set $stance-evasion$
goto setup-0
end

put stance set 100 100 0 0

setup-0:
setvariable type ""
setvariable number ""
setvariable number ""
setvariable arrange 0
setvariable arrange 0
Line 57: Line 48:
begin
begin
counter set $1$
counter set $1$
if $c$ > 0 goto setup-2
if $c$ > 0
begin
calculate all remove "$1$"
goto setup-2
end
shift
shift
goto setup-1
goto setup-1
end
end
counter set 0
goto setup-2
goto setup-2


Line 90: Line 84:
calculate all remove "hide "
calculate all remove "hide "
end
end
setup-3:
ifexists type
if xx$type$xx excludes xxxx
begin
begin
if $c$ <= 0
if $c$ <= 0
begin
begin
counter set 1
counter set 1
end
end
end
end
if_c > 1
if_c > 1
begin
begin
Line 115: Line 110:
end
end
setvariable arrange $c$
setvariable arrange $c$

if all contains " first "
if all contains " first "
begin
begin
Line 150: Line 144:
if $class$ contains necromancer
if $class$ contains necromancer
begin
begin
setvariable type "harvest"
setvariable ritual "harvest"
calculate all remove " harvest "
calculate all remove " harvest "
calculate all remove " harves "
calculate all remove " harves "
calculate all remove " harve "
calculate all remove " harve "
calculate all remove " harv "
calculate all remove " harv "
end
end
if all contains " ari"
begin
if $class$ contains necromancer
begin
setvariable ritual "arise"
calculate all remove " arise "
calculate all remove " aris "
calculate all remove " ari "
end
end
end
end
setvariable target $all$
setvariable target $all$
setvariable command-skin "skin $number$ $target$"
setvariable command-arrange "arrange $number$ $target$ $type$"
if $arrange$ >= 5
begin
setvariable command-arrange "arrange all $target$ $type$"
end
setvariable command-arrange-2 "arrange $number$ $target$"
setvariable command-ritual "$number$ $target$"


setup-4:
if $command-skin$ contains " "
begin
calculate command-skin replace " " with " "
goto setup-4
end


setup-5:
lefthanditem:
if $command-arrange$ contains " "
setvariable lhand $lefthanditem$
if $lefthanditem$ excludes Empty
begin
begin
calculate command-arrange replace " " with " "
match righthanditem you slide
goto setup-5
match righthanditem you sling
match righthanditem You are already wearing that.
match righthanditem You attach
match lefthanditem-1 You can't wear any more
put wear my $lefthanditem$
end
end

lefthanditem-1:
setup-6:
if $lefthanditem$ excludes Empty
if $command-arrange-2$ contains " "
begin
begin
calculate command-arrange-2 replace " " with " "
match righthanditem you slide
goto setup-6
match righthanditem you sling
end
match righthanditem you stow

match righthanditem you put
setup-7:
match righthanditem that's closed.
if $class$ excludes necromancer goto setup-8
match righthanditem There isn't any more room
if $command-arrange$ contains " "
match righthanditem Stow what?
begin
put stow my $lefthanditem$
calculate command-ritual replace " " with " "
matchwait
goto setup-7
end
setup-8:


if $lefthanditem$ excludes empty
begin
setvariable lefthand $lefthanditem$
put stow $lefthand$
end
else
begin
setvariable lefthand ""
end
ifexists stance-evasion
begin
put stance set $stance-evasion$
end
else
begin
put stance set 100 80 0 0
end
if x$lefthand$x excludes xx
begin
put stow $lefthand$
end
end


Line 202: Line 241:
match righthanditem-2 Stow what?
match righthanditem-2 Stow what?
put stow my $righthanditem$
put stow my $righthanditem$
put stow my $shield$
matchwait
matchwait
end
end
Line 214: Line 254:
match arrange You can't wear any more
match arrange You can't wear any more
put wear my $righthanditem$
put wear my $righthanditem$
put wear my $shield$
end
end


Line 229: Line 270:


arrange:
arrange:
counter set $arrange$
if $class$ contains necromancer
if $class$ contains necromancer
begin
begin
if harvest contains harvest
if ritual contains harvest goto harvest
match arrange but are unable to discern where to direct your thanatological expertise
match arrange but are unable to discern where to direct your thanatological expertise
match arrange-1 This corpse has already been preserved
match arrange-1 This corpse has already been preserved
match arrange-1 Rituals do not work upon the undead.
match arrange-1 Rituals do not work upon the undead.
match arrange-1 roundtime
match arrange-1 roundtime
put perform preserve on $number$ $target$
put perform preserve on $command-ritual$
matchwait
matchwait
end
end
arrange-1:
arrange-1:
if $class$ contains necromancer
if_c <= 0 goto skin
begin
if ritual contains arise goto arise
end
if $c$ <= 0 goto skin
counter sub 1
counter sub 1
arrange-1b:
match sheath already been skinned
match sheath already been skinned
match sheath What were you referring to?
match sheath What were you referring to?
Line 248: Line 295:
match sheath Arrange what?
match sheath Arrange what?
match sheath skin what
match sheath skin what
match skin-check Roundtime:
match arrange-2 cannot produce
put arrange $number$ $target$ $type$
match arrange-3 You don't know how to do that
if xx$command-arrange-2$xx excludes "xxxx"
setvariable type ""
begin
match arrange-4 Roundtime:
end
else
match arrange-1 Roundtime:
match skin You complete arranging the
put $command-arrange$
matchwait
matchwait



skin-check:
if_c > 0 goto arrange-1
arrange-2:
calculate command-arrange remove "for skin"
goto skin
calculate command-arrange remove "for part"
calculate command-arrange remove "for bone"
goto arrange-1b

arrange-3:
calculate command-arrange replace " all " with " $number$ "
goto arrange-1b

arrange-4:
setvariable command-arrange $command-arrange-2$
setvariable command-arrange-2 ""
goto arrange-1


skin:
skin:
match sheath already been skinned
match sheath already been skinned
match sheath What were you referring to?
match sheath What were you referring to?
match sheath roundtime
match sheath that's not dead!
match sheath that's not dead!
match sheath before you arrange it
match sheath before you arrange it
match sheath Arrange what?
match sheath Arrange what?
match sheath skin what
match sheath skin what
match sheath roundtime
put skin $number$ $target$
put $command-skin$
matchwait
matchwait


harvest:
harvest:
setvariable ritual arrange
match arrange-1 but are unable to discern where to direct your thanatological expertise
match arrange-1 but are unable to discern where to direct your thanatological expertise
match arrange-1 may only be performed on a creature's corpse.
match arrange-1 may only be performed on a creature's corpse.
match arrange-1 Rituals do not work upon the undead.
match arrange-1 Rituals do not work upon the undead.
match harvest-1 roundtime
match harvest-1 roundtime
put perform harvest on $target$
put perform harvest on $command-ritual$
matchwait
matchwait


Line 279: Line 346:
put drop mat
put drop mat
goto loot
goto loot

arise:
setvariable ritual arrange
match arise but are unable to discern where to direct your thanatological expertise
match arrange-1 may only be performed on a creature's corpse.
match arrange-1 Rituals do not work upon the undead.
match loot roundtime
put perform arise on $command-ritual$
matchwait


errorhandler:
errorhandler:
Line 319: Line 395:
sheath-6:
sheath-6:
ifexists lhand goto sheath-7
ifexists lhand goto sheath-7
goto sheath-9
goto sheath-8


sheath-7:
sheath-7:
match sheath-9 you get
match sheath-8 you get
match sheath-8 already in your inventory.
match sheath-8 already in your inventory.
match sheath-9 What were you referring to?
match sheath-8 What were you referring to?
put get $lhand$
put get my $lhand$
matchwait
matchwait


sheath-8:
sheath-8:
match sheath-9 you slide
match sheath-9 you sling
match sheath-9 you remove
match sheath-9 remove what?
match sheath-9 aren't wearing that.
put remove $lhand$
matchwait

sheath-9:
loot:
loot:
if x$target$x excludes xx
put loot
begin
callwith loot $target$
end
else
call loot
if x$lefthand$x excludes xx
begin
put get $lefthand$
end
run stance
run stance

end:


</pre>
</pre>

Latest revision as of 20:31, 11 December 2013

YASSE Skin(script)
Category Combat
Front-end YASSE
Author Ithrios


Description

Skinning script that automates the skinning process. Sets your stance to a dodge and parry stance, stows any item held in your left hand, if you use a skinning knife (and set the $skinningknife$ global variable) it will stow whatever is in your right hand and wield your knife, arranges your target 0-5 times. If you enter part, bone or skin it will arrange it the number of times requested. If your a necromancer (and the global variable $class$ is set to necromancer) it will perform preserve on the corpse. If you are a necromancer and enter harvest as a variable it will perform harvest instead. Finally, when finished it will stow your skinning knife, wield your right and left hand items, loots the creature and restores your stance to its previous state (requires my Yasse Stance Script) or to a stance of 100 80 0 100.

Syntax

Syntax Effect
.skin Will skin the last creature slain
.skin n Will arrange the creature n times then skin it
.skin <name> Will arrange a dead <name> n times then skin it (Necromancers will perform preserve if a creature name is provided)
.skin second <name> Will arrange the second dead <name> n times then skin it (Second can be substituted with the words first through sixth)
.skin bone/part/pelt Will arrange the creature for the selected part then skin it
.skin bone/part/pelt n Will arrange the creature for the selected part and n times total then skin it
.skin harv <name> If your character is a necromancer it will perform harvest on <name> (Will not work if a creature name is not provided)

You can enter the above variables in any order and the script should be able to recognize them.

Updates

02 May 2013 - Script Posted
24 May 2013 - Repaired an issue with sheathing mainhand weapons if the $skinningknife$ variable is not defined.
11 Dec 2013 - fixed a bug that caused a creature to be arranged one extra time if you try to specify a specific type of item to harvest and simplified the part of the script that empties your left hand

Script

isetvariable type ""
setvariable number ""
setvariable arrange 0
setvariable all " $1$ $2$ $3$ $4$ $5$ $6$ $7$ $8$ $9$ "

setup-1:
if_1
	begin
	counter set $1$
	if $c$ > 0
		begin
		calculate all remove "$1$"
		goto setup-2
		end
	shift
	goto setup-1
	end
goto setup-2

setup-2:	
if all contains " bone "
	begin
	setvariable type "for bone"
	calculate all remove "bone "
	end
if all contains " part "
	begin
	setvariable type "for part"
	calculate all remove "part "
	end
if all contains " skin "
	begin
	setvariable type "for skin"
	calculate all remove "skin "
	end
if all contains " pelt "
	begin
	setvariable type "for skin"
	calculate all remove "pelt "
	end
if all contains " hide "
	begin
	setvariable type "for skin"
	calculate all remove "hide "
	end
setup-3:
if xx$type$xx excludes xxxx
	begin
	if $c$ <= 0
		begin
		counter set 1
		end	
	end	
if_c > 1
	begin
	if $class$ contains necromancer
		begin
		if_c > 5
			begin
			counter set 4
			end
		end
	if $class$ excludes necromancer
		begin
		if_c > 5
			begin
			counter set 5
			end
		end
	end
setvariable arrange $c$
if all contains " first "
	begin
	setvariable number "first"
	calculate all remove "first "
	end
if all contains " second "
	begin
	setvariable number "second"
	calculate all remove "second "
	end
if all contains " third "
	begin
	setvariable number "third"
	calculate all remove "third "
	end
if all contains " fourth "
	begin
	setvariable number "fourth"
	calculate all remove "fourth "
	end
if all contains " fifth "
	begin
	setvariable number "fifth"
	calculate all remove "fifth "
	end
if all contains " sixth "
	begin
	setvariable number "sixth"
	calculate all remove "sixth "
	end
if all contains " harv"
	begin
	if $class$ contains necromancer
		begin
		setvariable ritual "harvest"
		calculate all remove " harvest "
		calculate all remove " harves "
		calculate all remove " harve "
		calculate all remove " harv "
		end
	end
if all contains " ari"
	begin
	if $class$ contains necromancer
		begin
		setvariable ritual "arise"
		calculate all remove " arise "
		calculate all remove " aris "
		calculate all remove " ari "
		end
	end
setvariable target $all$
setvariable command-skin "skin $number$ $target$"
setvariable command-arrange "arrange $number$ $target$ $type$"
if $arrange$ >= 5
	begin
	setvariable command-arrange "arrange all $target$ $type$"
	end
setvariable command-arrange-2 "arrange $number$ $target$"
setvariable command-ritual "$number$ $target$"

setup-4:
if $command-skin$ contains "  "
	begin
	calculate command-skin replace "  " with " "
	goto setup-4
	end

setup-5:
if $command-arrange$ contains "  "
	begin
	calculate command-arrange replace "  " with " "
	goto setup-5
	end

setup-6:
if $command-arrange-2$ contains "  "
	begin
	calculate command-arrange-2 replace "  " with " "
	goto setup-6
	end

setup-7:
if $class$ excludes necromancer goto setup-8
if $command-arrange$ contains "  "
	begin
	calculate command-ritual replace "  " with " "
	goto setup-7
	end
setup-8:


if $lefthanditem$ excludes empty
	begin
	setvariable lefthand $lefthanditem$
	put stow $lefthand$
	end
	else
		begin
		setvariable lefthand ""
		end
ifexists stance-evasion
	begin
	put stance set $stance-evasion$
	end
	else
		begin
		put stance set 100 80 0 0
		end
if x$lefthand$x excludes xx
	begin
	put stow $lefthand$
	end

righthanditem:
if x$skinningknife$x contains xx goto arrange
ifexists skinningknife goto righthanditem-1
goto arrange

righthanditem-1:
setvariable rhand $righthanditem$
if $righthanditem$ excludes Empty
	begin
	match skinningknife you slide
	match skinningknife you sling
	match skinningknife you stow
	match skinningknife you put
	match righthanditem-2 that's closed.
	match righthanditem-2 There isn't any more room
	match righthanditem-2 Stow what?
	put stow my $righthanditem$
	put stow my $shield$
	matchwait
	end

righthanditem-2:
if $righthanditem$ excludes Empty
	begin
	match skinningknife you slide
	match skinningknife you sling
	match skinningknife You are already wearing that.
	match skinningknife You attach
	match arrange You can't wear any more
	put wear my $righthanditem$
	put wear my $shield$
	end


skinningknife:
if x$skinningknife$x contains xx goto arrange
ifexists skinningknife 
	begin	
	match arrange you get
	match arrange already in your inventory.
	match arrange What were you referring to?
	put get $skinningknife$
	matchwait
	end

arrange:
counter set $arrange$
if $class$ contains necromancer
	begin
	if ritual contains harvest goto harvest
	match arrange but are unable to discern where to direct your thanatological expertise
	match arrange-1 This corpse has already been preserved
	match arrange-1 Rituals do not work upon the undead.
	match arrange-1 roundtime
	put perform preserve on $command-ritual$
	matchwait
	end
arrange-1:
if $class$ contains necromancer
	begin
	if ritual contains arise goto arise
	end
if $c$ <= 0 goto skin
counter sub 1
arrange-1b:
match sheath already been skinned
match sheath What were you referring to?
match sheath that's not dead!
match sheath before you arrange it
match sheath Arrange what?
match sheath skin what
match arrange-2 cannot produce
match arrange-3 You don't know how to do that
if xx$command-arrange-2$xx excludes "xxxx"
	begin
	match arrange-4 Roundtime:
	end
	else
	match arrange-1 Roundtime:
match skin You complete arranging the
put $command-arrange$
matchwait


arrange-2:
calculate command-arrange remove "for skin"
calculate command-arrange remove "for part"
calculate command-arrange remove "for bone"
goto arrange-1b

arrange-3:
calculate command-arrange replace " all " with " $number$ "
goto arrange-1b

arrange-4:
setvariable command-arrange $command-arrange-2$
setvariable command-arrange-2 ""
goto arrange-1

skin:
match sheath already been skinned
match sheath What were you referring to?
match sheath that's not dead!
match sheath before you arrange it
match sheath Arrange what?
match sheath skin what
match sheath roundtime
put $command-skin$
matchwait

harvest:
setvariable ritual arrange
match arrange-1 but are unable to discern where to direct your thanatological expertise
match arrange-1 may only be performed on a creature's corpse.
match arrange-1 Rituals do not work upon the undead.
match harvest-1 roundtime
put perform harvest on $command-ritual$
matchwait

harvest-1: 
put drop mat
goto loot

arise:
setvariable ritual arrange
match arise but are unable to discern where to direct your thanatological expertise
match arrange-1 may only be performed on a creature's corpse.
match arrange-1 Rituals do not work upon the undead.
match loot roundtime
put perform arise on $command-ritual$
matchwait

errorhandler:
sheath: 
put glance
if $righthanditem$ excludes $skinningknife$ goto sheath-3
match sheath-3 You are already wearing that.
match sheath-3 You attach
match sheath-2 You can't wear any more
put wear my $skinningknife$
matchwait

sheath-2:
match sheath-3 you stow
match sheath-3 you put
match sheath-3 Stow what?
put stow my $skinningknife$
matchwait

sheath-3:
ifexists rhand goto sheath-4
goto sheath-6

sheath-4:
match sheath-6 you get
match sheath-5 already in your inventory.
match sheath-6 What were you referring to?
put get $rhand$
matchwait

sheath-5:
match sheath-6 you slide
match sheath-6 you sling
match sheath-6 you remove
match sheath-6 remove what?
match sheath-6 aren't wearing that.
put remove $rhand$
matchwait

sheath-6:
ifexists lhand goto sheath-7
goto sheath-8

sheath-7:
match sheath-8 you get
match sheath-8 already in your inventory.
match sheath-8 What were you referring to?
put get my $lhand$
matchwait

sheath-8:
loot:
if x$target$x excludes xx
	begin
	callwith loot $target$
	end
	else
	call loot
if x$lefthand$x excludes xx
	begin
	put get $lefthand$
	end
run stance

end: