YASSE Hitbasic-Skin (script): Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
m (updated to latest version)
m (Version 2.2)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Script
This script is part of the [[YASSE Combat Package]].
|cat=combat
--[[User:Hithrael|Hithrael]] 04:10, 20 November 2010 (UTC)
|fe=YASSE
|auth=[[User:Hithrael|Hithrael]]
}}


==Description==
This is part of the [[YASSE Combat Package]].

==Syntax==

==Updates==
Last Updated:
*'''04/01/2011''': Revision 2.2, prevented arrange attempts from going negative
*'''03/31/2011''': Revision 2.1, quashed bugs, added magic support
*'''03/30/2011''': Revision 2
: Now uses global variables
: Improved adjustments to dynamically adjust skinning based on success/failure
: Faster flow
*'''03/18/2011''': Revision 1.1b, fixed bug with addition of crossbow support and skinning
*'''03/14/2011''': Revision 1.1, shouldn't hang on arrange loop.
*'''11/20/2010''': Revision 1.0

==Script==
<pre>
<pre>
set predefined on
set predefined on


skin:
#Local settings
counter set $arrangenumber$
if %c <= 0
goto skinwork
else
counter dec



skinwork:
skin:
boxmessage Number of arranges: $arrangenumber$
pause
pause
boxmessage Attempting to arrange %c more times.
if $yetarrange$ eq yes
if %c <= 0
begin
goto skin2
counter set $arrangenumber$
pause
if %c == 0
for forarrange = 1 to %c
goto skin3
begin
pause
for forarrange = 1 to %c
begin
put arrange
pausetext 3 roundtime
end
goto skin3
end
if $yetarrange$ eq no
begin
boxmessage Calculating optimal number of arranges now, up to the maximum of $skinmax$.
counter set $arrangenumber$
pause
if %c == $skinmax$
begin
boxmessage Already at maximum arranges. (Check #1)
goto arrangesave
end
pause

#Add more messaging
match arrangesave not to damage
match arrangeup properly arrange
match arrangedown worthless now
match arrangeno Cannot be skinned
put arrange
put arrange
pausetext 3 roundtime
matchwait 5
end
end


skin2:
boxmessage Arrange message did not match \nsaving current state and continuing.
goto arrangesave

arrangeup:
if %c == $skinmax$
begin
boxmessage At maximum number of arranges, \nbut the script did not catch earlier.
goto arrangesave
end
boxmessage Increasing number of arranges.
counter inc
counter inc
pause
pause
if $magichunting$ eq yes
goto getknife
if $rangedhunting$ eq no
put sheath $huntingweapon$
else
put wear $huntingweapon$


getknife:
setvariable arrangenumber %c
goto skin2

arrangedown:
boxmessage Too difficult to skin/arrange, reducing number of arranges (if possible).
if %c == 0
begin
setglobalvariable arrangenumber [%c]
setglobalvariable yetarrange [yes]
goto lootstuff
end
counter dec
pause
pause
put wield my $skinknife$
if %c == 0
waitfor $skinningknifemessage$
goto arrangesave
if %c > 0
begin
setglobalvariable arrangenumber [%c]
setglobalvariable yetarranged [no]
goto skin2
end
arrangesave:
boxmessage %c is the optimal number of arranges. \nSaving that number.
pause
pause
if %lefthanditem contains $shield$
setglobalvariable arrangenumber [%c]
setglobalvariable yetarrange [yes]
goto skin3

arrangeno:
boxmessage Critter is unable to be skinned. \nFor now skinning will be bypassed.
setglobalvariable skincheck [do not skin]
goto lootstuff

skin3:
put glance
pause
if %lefthanditem contains skinning
begin
begin
setvariable shieldworn yes
pause
put sheath right
put wear my $shield$
pause
goto skinit
end
end
pause
pause
setvariable $arrangenumber$ %c
put sheath my $huntingweapon$
pause
put wield my $knife$
waitfor $skinningknifemessage$
pause
pause


Line 119: Line 81:
match skinlower sheer incompetence
match skinlower sheer incompetence
match skinlower just barely
match skinlower just barely
match skinhigher impressive skill and grace
match skinhigher working deftly
match skinhigher nearly flawless
match skinhigher you slice away
match skincomplete work hard
match skincomplete work hard
match skincomplete nearly flawless
match skincomplete working deftly
match skincomplete working hard
match skincomplete working hard
match skincomplete you slice away
match skincomplete blood soaks
match skincomplete blood soaks
match skincomplete fairly well
match skincomplete fairly well
match skincomplete oozing flesh
match skincomplete oozing flesh
match skincomplete impressive skill and grace
put skin
put skin
matchwait 5
matchwait 5
Line 133: Line 95:


skinlower:
skinlower:
if $skinmax$ == 0
begin
ifexists skinmaxwarn goto skincomplete
pause
boxmessage At minimum number of max arranges, so you'll continue to hack away and make a mess.
setglobalvariable skinmaxwarn [warned]
goto skincomplete
end
if $arrangenumber$ == 0
if $arrangenumber$ == 0
goto skincomplete
pause
if $arrangenumber$ > 0
begin
begin
boxmessage At minimum number of arranges, so you'll continue to hack away and make a mess.
goto skincomplete
end
if $arrangenumber$ == $skinmax$
begin
boxmessage Having problems arranging consistently, lowering skinmax by 1 and will recalculate.
counter set $arrangenumber$
counter set $arrangenumber$
pause
pause
counter dec
counter dec
pause
pause
setglobalvariable arrangenumber [%c]
setglobalvariable yetarranged [no]
goto skincomplete
goto skincomplete
end
end
pause
if $arrangenumber$ > 0
boxmessage Something funny happening with skinlower.
goto skincomplete

skinhigher:
if $skinmax$ == $arrangenumber$
goto skincomplete
pause
if $arrangenumber$ <= $skinmax$
begin
begin
boxmessage Increasing arranges by 1.
boxmessage Having problems arranging consistently, lowering arrange by 1 and will recalculate.
counter set $arrangenumber$
counter set $arrangenumber$
pause
pause
counter dec
counter inc
pause
setglobalvariable arrangenumber [%c]
goto skincomplete
goto skincomplete
end
end
pause
pause
boxmessage Something funny happening with skinlower.
boxmessage Something funny happening with skinhigher.
goto skincomplete
goto skincomplete


skincomplete:
skincomplete:
if %c <= 0
if %righthanditem contains skinning
counter set 0
setglobalvariable arrangenumber %c
if %righthanditem contains knife
begin
begin
pause
pause
put sheath my $knife$
put sheath my $skinknife$
end
end
pause
pause
if $shieldworn$ eq yes
goto lootstuff
put rem my $shield$
exit
</pre>
</pre>

Latest revision as of 16:11, 1 April 2011

YASSE Hitbasic-Skin (script)
Category combat
Front-end YASSE
Author Hithrael


Description

This is part of the YASSE Combat Package.

Syntax

Updates

Last Updated:

  • 04/01/2011: Revision 2.2, prevented arrange attempts from going negative
  • 03/31/2011: Revision 2.1, quashed bugs, added magic support
  • 03/30/2011: Revision 2
Now uses global variables
Improved adjustments to dynamically adjust skinning based on success/failure
Faster flow
  • 03/18/2011: Revision 1.1b, fixed bug with addition of crossbow support and skinning
  • 03/14/2011: Revision 1.1, shouldn't hang on arrange loop.
  • 11/20/2010: Revision 1.0

Script

set predefined on

skin:
counter set $arrangenumber$
if %c <= 0
	goto skinwork
	else
	counter dec


skinwork:
pause
boxmessage Attempting to arrange %c more times.
if %c <= 0 
	goto skin2
pause
for forarrange = 1 to %c
	begin 
	put arrange
	pausetext 3 roundtime
	end

skin2:
counter inc
pause
if $magichunting$ eq yes
	goto getknife
if $rangedhunting$ eq no
	put sheath $huntingweapon$
	else
	put wear $huntingweapon$

getknife:
pause
put wield my $skinknife$
waitfor $skinningknifemessage$
pause
if %lefthanditem contains $shield$
	begin
	setvariable shieldworn yes
	put wear my $shield$
	end
pause
setvariable $arrangenumber$ %c
pause

skinit:
match skinlower twists and slips
match skinlower destroying the
match skinlower unfortunate failure
match skinlower claw wildly
match skinlower that of mud
match skinlower struggle with
match skinlower worthless now
match skinlower Skin what?
match skinlower sheer incompetence
match skinlower just barely
match skinhigher impressive skill and grace
match skinhigher working deftly
match skinhigher nearly flawless
match skinhigher you slice away
match skincomplete work hard
match skincomplete working hard
match skincomplete blood soaks
match skincomplete fairly well
match skincomplete oozing flesh
put skin
matchwait 5
goto skincomplete

skinlower:
if $arrangenumber$ == 0
	goto skincomplete
pause
if $arrangenumber$ > 0
	begin
		counter set $arrangenumber$
		pause
		counter dec
		pause
		goto skincomplete
	end
pause
boxmessage Something funny happening with skinlower.
goto skincomplete

skinhigher:
if $skinmax$ == $arrangenumber$
	goto skincomplete
pause
if $arrangenumber$ <= $skinmax$
	begin
		boxmessage Increasing arranges by 1.
		counter set $arrangenumber$
		pause
		counter inc
		goto skincomplete
	end
pause
boxmessage Something funny happening with skinhigher.
goto skincomplete

skincomplete:
if %c <= 0
	counter set 0
setglobalvariable arrangenumber %c
if %righthanditem contains knife
	begin
	pause
	put sheath my $skinknife$
	end
pause
if $shieldworn$ eq yes
	put rem my $shield$
exit