PDA

View Full Version : new incant script



Josapheen
09-25-2006, 09:24 PM
here:
pause 1.75
echo SCANNING FOR TARGETS
ECHO PLEASE STAND BY...
put look
match mpdonothing Also here:
match leapattack a leaper
match zombieattack a zombie
match nymphattack a sea nymph
match roltonattack a rolton
match kobattack a kobold
match orcattack a lesser orc
match borcattack a lesser burrow orc
match ratattack a giant rat
match gobattack a goblin
match skelattack a skeleton
match ghoulattack a lesser ghoul
match dirgeattack a death dirge
match hobattack a hobgoblin
matchwait
mpdonothing:
waitfor nextroom
goto here
zombieattack:
save zombie
goto attack
nymphattack:
save nymph
goto attack
roltonattack:
save rolton
goto attack
orcattack:
save orc
goto attack
borcattack
save burrow orc
goto attack
ratattack:
save rat
goto attack
goblinattack:
save goblin
goto attack
leapattack:
save leaper
goto attack
skelattack:
save skeleton
goto attack
ghoulattack:
save ghoul
goto attack
dirgeattack:
save dirge
goto attack
hobattack:
save hobgoblin
goto attack

attack:
put stance off
put prep %1
put cast %s
put stance guard
match dead dies
match dead dead
match dead still
match dead motionless
match dead goes out
match gone cast at what
match attackwait roundtime
matchwait
gone:
echo Target Missing...
goto here
attackwait:
pause 3.25
goto attack
attackwait:
pause 3.25
goto here
dead:
put skin %s
match skinned You skinned
match botched You botched
match botched You cannot skin
matchwait
botched:
put search %s
goto here
skinned:
put search %s
pause .5
put look
match tail tail
match claw claw
match scalp scalp
match hide hide
match fur fur
match skin skin
match pelt pelt
match crest crest
match scale scale
match eye eye
match leg leg
match nail nail
match bone bone
matchwait

claw:
put stow right
waitfor you
put get claw
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

tail:
put stow right
waitfor you
put get tail
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

scalp:
put stow right
waitfor you
put get scalp
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

hide:
put stow right
waitfor you
put get hide
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

fur:
put stow right
waitfor you
put get fur
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

skin:
put stow right
waitfor you
put get skin
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

pelt:
put stow right
waitfor you
put get pelt
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

crest:
put stow right
waitfor you
put get crest
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

scale:
put stow right
waitfor you
put get scale
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

eye:
put stow right
waitfor you
put get eye
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

leg:
put stow right
waitfor you
put get leg
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

nail:
put stow right
waitfor you
put get nail
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

bone:
put stow right
waitfor you
put get bone
waitfor you
put stow right
waitfor you
put ready weapon
waitfor you
exit

AestheticDeath
09-25-2006, 09:47 PM
Gotta question:

I tend to put the creature name alone.. once. Does it help in some way to put the creature with a comma or period, etc..

match roltonattack a rolton
match roltonattack a rolton,
match roltonattack a rolton.

To me it seems it will recognize a rolton without the extra lines. Since the script finds something, kills that something, then LOOKs again, it should keep going on until the room is empty. Or empty of the creatures the script will recognize.

What is the reason for adding the different instances of a creature appearing in the room?

Bobmuhthol
09-25-2006, 10:04 PM
I would just use SAVE and make a universal attack label.

Josapheen
09-25-2006, 10:16 PM
aesthetic:
I tried to use just like "rolton" and "lesser burrow orc" and stuff like that, script wouldn't work for me. Might've just been a typo somewhere else that I fixed and didn't remember...but if it works it works, right?

bob:
I don't know anything about "SAVE" or universal attack stuffs or whatever such as that...i'm no programmer, just long, drawn-out simple-kindergarden level scripts and what have you. :D Now...if you could dumb it down and show me whatcha mean?

Bobmuhthol
09-25-2006, 10:30 PM
SAVE works as a variable of sorts; one that the user must define as a specific string. Instead of something like

match label1 string1
match label2 string2
match label3 string3
matchwait

label1:
action1 npc1
action2 npc1
action3 npc1
action4 npc1
action5 npc1

label2:
action1 npc2
action2 npc2
action3 npc2
action4 npc2
action5 npc2

label3:
action1 npc3
action2 npc3
action3 npc3
action4 npc3
action5 npc3

you could instead use a system like this:

match label1 string1
match label2 string2
match label3 string3
matchwait

label1:
save npc1
goto attack

label2:
save npc2
goto attack

label3:
save npc3
goto attack

attack:
action1 %s
action2 %s
action3 %s
action4 %s
action5 %s

You can see that using a universal label in combination with a saved variable cuts down on the repetition of a really long string, which serves to reduce the number of lines in the script (this is a major goal in progamming). It's a lot easier to do in more sophisticated languages, but that's about the most effective way to handle it in Wizard (assumably SF as well, but people try to tell me that SF can do something better).

Josapheen
09-26-2006, 11:06 AM
Ok, so in the above example:

match roltonattack a rolton
match roltondead dead
roltonattack:
put blah blah blah etc
roltondead
skin&search

would come out to

match roltonattack a rolton
match roltondead dead
roltonattack:
save rolton
goto generalattack
generalattack:
put prep %1
put cast %s

where %s is the saved variable of ROLTON in this example?
In this case, would it require seperate checks done by look to identify and gather the different skin/pelt types...of course not, you doofus Jospaheen...oi. Many hundreds of thanks on that explanation, Bob...that would've saved me a lot of time. :D But now I know and can shorten it down some when I get bored later.

Josapheen
09-27-2006, 09:55 PM
Just out of curiosity...would one of you be good enough as to explain just how "counter" works? I keep seeing it, but I have no idea what it is that it's doing or how to make it function, for that matter.

Bobmuhthol
09-27-2006, 10:15 PM
It's an integer number variable. COUNTER SET # sets it, %c is the variable for it. You can use it for a number of things, mostly things that involve counting. From there you can COUNTER ADD #, COUNTER SUBTRACT #, omitting the number is considered a step of 1. Counter can go from something like -(2^16) to 2^16 (maybe 32 on each end?), one of them (probably negative) can handle 1 less to account for 0, so the possibilities are nearly endless.

I forget if COUNTER MULTIPLY and COUNTER DIVIDE work/exist, but I don't think they do.

I actually can't think of stuff that I used counter for in Wizard, but you'll know when you need it when you're preparing a script.