Scripting help 12/04/2009 12:07 PM CST
I'm not sure if this is the right folder for this topic or not.

I'm having problems creating a script (through StormFront). This isn't news; I'm basically scripting illiterate.
I'm playing a new ranger and am using the swimming hole. I'd like her to swim the circle and then have the script check for mind lock. If it's at mind lock, I'd like the script to stop. I figured it for a matchwait command or something.



Thanks,
Lucerella
Reply
Re: Scripting help 12/04/2009 12:11 PM CST
swimexp:
match swimexp ...wait
match end mind lock
match end dazed
match end bewildering
match end bewildered
match swim Time Development
put exp skill sw
matchwait

end:
echo **************************
echo ** Swiming Now LOCKED **
echo **************************
goto headback

swim:
(do whatever swiming path you like here)
Reply
Re: Scripting help 12/04/2009 12:12 PM CST
Just writing this off the cuff since I don't have stormfront open... so hopefully it'll work. Note the version I use for my cleric casts a spell every loop too so you might consider something like that, but I don't know which rooms in there have good mana or what spell you'd use to train.

If you wanted to do that all you'd need to do is figure out the largest spell you can cast in the time it takes to make a loop and add "put prep XXX X" under the "top:" line and "put cast" before the first match line.

top:
put move w
pause
put move s
pause
put move e
pause
put move n
match exit mind lock
match top death
put exp swim
matchwait

exit:
put climb em
echo *Swimming Locked*


SEND[Abasha] It warms my heart to see three people die for a cupcake.
Reply
Re: Scripting help 12/04/2009 12:25 PM CST
Nice! Thanks, both work well.


Thanks,
Lucerella
Reply
Re: Scripting help 12/04/2009 12:38 PM CST
Just another way to do it:

counter set 1
swim1:
counter add 1
direction w
goto swimmer
swim2:
counter add 1
direction s
goto swimmer
swim3:
counter add 1
direction e
goto swimmer
swim4:
counter set 1
direction n
goto swimmer

swimmer:
match swimmer ...wait
match swimmer sorry,
match swimmer You struggle
match swimmer You blunder
match swimmer You flounder
match swimmer seem to make much headway
match expcheck You swim
match expcheck You wade
put swim %w
matchwait

expcheck:
match done 34/34
match return exp help
put sk swim
matchwait

return:
goto swim%c
done:
exit

~Hunter Hanryu
http://drplat.com/CombatEquipmentCompendium.xls
Reply
Re: Scripting help 12/04/2009 12:44 PM CST
Like this one too. But what does the counter thingy do?



Thanks,
Lucerella
Reply
Re: Scripting help 12/04/2009 12:48 PM CST
>what does the counter thingy do?

It's a "poor-man's" way to do gosubs.

~Hunter Hanryu
http://drplat.com/CombatEquipmentCompendium.xls
Reply
Re: Scripting help 12/04/2009 12:52 PM CST
I use them to only use HUNT ever 4th cycle of my attack script:

set:
counter set 0
goto start

start:
goto %c

0:
counter add 1
goto hunt
1:
counter add 1
goto parry
2:
counter add 1
goto parry
3:
counter set 0
goto parry
Reply
Re: Scripting help 12/04/2009 03:04 PM CST
If you want to train some climbing you can use the counters to climb the embankment (and tree, if the ranger is skilled enough) every X laps around the pool.

I dont advise checking the swimming exp every room because it wastes too much time in the long run.

counter set 0
start:
counter add 1
goto loop%c

loop1:
loop2:
loop3:
put move w
pause
put move s
pause
put move e
pause
put move n
match exit mind lock
match exit nearly locked
match start death
put exp sk swim
matchwait

loop4:
counter set 1
move climb embankment
put dive pool
goto loop%c

exit:
put climb em
echo *Swimming Locked*
Reply
Re: Scripting help 12/06/2009 11:06 AM CST
Just a friendly reminder, don't loop your scripts indefinitely, that's how you get scripting warnings! Stay ATK :-)

SGM Audacia


A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort.
Reply
Re: Scripting help 12/06/2009 11:12 AM CST
Honestly I find NOT including exp checks makes me less likely to fire and forget a script since I'm actually watching to stop it :P



SEND[Abasha] It warms my heart to see three people die for a cupcake.
Reply