PDA

View Full Version : Adjusting a script.



Stunseed
04-11-2006, 07:28 PM
Well, it's time for a new script, I am having trouble remembering how to modify a few things. It is a real base Wizard hunting script for SF, for the EN's Skull Temple.

Starts where you fall in

#Skull temple path:
put sign swords
put sign shields
put sign warding
put sign defending
put sign smiting
put sign striking
COUNTER SET 0
save look
start:
put %s
COUNTER ADD 1
match path%c arrow
match path%c disk
match path%c Obvious
match charcheck1 dogmatist
match charcheck supplicant
match charcheck hierophant
match goon You can't go there
match stand P>
matchwait

charcheck:
match cloud gas cloud
match path%c arrow
match path%c that
match path%c disk
match path%c Also here:
match headcheck Obvious
match stand P>
matchwait

charcheck1:
match cloud gas cloud
match path%c arrow
match path%c that
match path%c disk
match path%c Also here:
match killdira Obvious
match stand P>
matchwait

cloud:
put prep 505
put cast cloud
waitfor A strong blast of air lashes out at a gas cloud
goto goon

doh1:
match path%c leaps from hiding
match path%c arrow
match killdir You feel a sudden rush
match path%c Cast Roundtime
match stand P>
pause 2
put time
put inc 516
matchwait

manacheck:
match path%c arrow
match path%c leaps from hiding
match doh1 You don't have
match killdir I could not find
match stand P>
put send 50 asdf
matchwait

headcheck:
match path%c arrow
match path%c leaps from hiding
match manacheck Your mind is
match leave You must rest!
match stand P>
put exp
matchwait

stand:
match stand You struggle
match goon You stand
put stand
matchwait

#################################
killdira:
put target dogmatist
killdir:
match killdir1 Geez!
match killdir1 Could not find
match goon You do not
match goon You search
match goon What were you
match stand P>
put stance off
put incant 904
put stance gua
put loot
matchwait

killdir1:
match goon You do not
match killdir1 Geez!
match killdir1 Could not find
match goon You search
match goon What were you
match stand P>
pause 3
put stance off
put incant 904
put stance gua
put loot
matchwait

goon:
match dropit won't fit
match fits in your
COUNTER SUBTRACT 1
put stow left
save look
matchwait

dropit:
put drop left
fits:
goto start
#################################
path1:
path2:
path3:
path4:
save ne
goto start

path5:
path6:
path7:
path8:
path9:
save e
goto start

path10:
path11:
path12:
path13:
save se
goto start

path14:
path15:
path16:
path20:
path21:
save s
goto start

path17:
path18:
path19:
path22:
save sw
goto start

path23:
path24:
path25:
path26:
path27:
save w
goto start

path28:
path31:
path32:
path33:
save nw
goto start

path29:
path30:
path34:
path35:
path36:
save n
goto start

path37:
match leave You don't have
match restart I could not find
match stand P>
put send 40 asdf
matchwait

restart:
COUNTER SET 0
save look
goto start

leave:
put rel

gating:
match backtotable A swirling grey-blue mist
match gating You are still
match gating Cast Roundtime
pause 4
put inc 930
matchwait

backtotable:
put go mist
put go XXXX table
put go XXXX table

My first concern is the Gate. I'm not an AFK'er, and I perfer the gold ring method. Secondly, this is set up for a runestaff user, which I later decided my Wizard was going to stay sword/board. This is the second part of a script, which I plan on hooking into your default travel script to the carving. Any help would be much appreciated.

Shaelun
04-13-2006, 04:08 PM
- put: sends a line to the game as if you had typed it.
- match: syntax is MATCH (label) (gameline).
- matchwait: waits until one of the "(gameline)" lines is seen, and jumps to whatever label that "match" command told it to.
- pause: pauses for 1 second, or however many you tell it to.
- counter set: set the `%c' variable.
- counter add/subtract: add or subtract from the `%c' variable.
- goto: "goto" a label.

To debug a script, just go line-by-line thinking to yourself what it's going to do when it executes...

You start the script
-------------
%s (save variable): empty, or whatever was last saved
%c (counter variable): uhh, I can't remember how Wizard handles it... 0 I guess


The following executes
-------------------------
put sign swords
put sign shields
put sign warding
put sign defending
put sign smiting
put sign striking
COUNTER SET 0
save look
start:
put %s
COUNTER ADD 1

At This Point
-------------
%s: look
%c: 1

Now this executes
--------------------
match path%c arrow
match path%c disk
match path%c Obvious
match charcheck1 dogmatist
match charcheck supplicant
match charcheck hierophant
match goon You can't go there
match stand P>
matchwait


... I assume the "match stand P>" is a board paste issue. Anyway, replace the '%c' and '%s' references with whatever the variables hold, which is in this case '1', and you get:

match path1 arrow
match path1 disk
match path1 Obvious

... etc., etc., etc. -- so then it hits the `matchwait' line, and it waits until it sees one of those lines. It then jumps to the corresponding label, and keeps going.


I think that's enough for you to modify it yourself. If you're just too lazy to do the job yourself, and not just too new to scripts to understand how to do it... well... maybe somebody else'll do it for you, but I'm not gonna.

Good luck :)

Jolena
04-13-2006, 05:06 PM
He just doesn't understand the scripting language enough to fix it is all.

Also when he said Wizard hunting script for SF, he meant the profession, not the FE. :)

Shaelun
04-13-2006, 05:17 PM
There I go skimming posts again... yeah, that makes more sense -- it looks more like a Wizard script than an SF script, so I assumed it was written for The Wizard and being used in SF. Well whatever the sentence means, this is of a lot more help than my post:

http://www.play.net/playdotnet/play/stormfront_scripting.asp

Again, g'luck :)