PDA

View Full Version : Matches without matchwaits?



Skaster
07-15-2003, 04:42 PM
Anyone have any experience with this? Like..




begin:
put 'Would a cleric bless my broadsword please?
match blessed gestures at you.
pause 30
goto begin

blessed:
exit

Caels
07-16-2003, 01:28 AM
You cannot have a match command without Matchwait.

Match tells the game what you are waiting for, and matchwait actually forces the wait.

A script that asks for blesses is probably not going to get you anywhere, since you'd have to keep an eye on what's going on anyhow. It would be easier to simply ask and wait in the traditional manner.

The reason being that there is no string to match for if your request is unanswered.

imported_Kranar
07-16-2003, 01:42 AM
<< The reason being that there is no string to match for if your request is unanswered. >>

Infuse 2 pulses worth of mana point before you ask for the bless. Then if you feel at full magical power before you recieve a bless, you can rest assured that your request went unanswered.

Captain Amby
07-16-2003, 01:49 AM
can you tell me of some good sites that can teach you how to make scripts? I dont know how.. never learned it.. just use what others have made.

Caels
07-16-2003, 01:52 AM
Welp, there's a topic that contains a list of all the commands available to the Wizard FE; its the top-most topic under the scripting folder. That's probably going to be a good start, then you can post questions here as you come across problems, or email me and I'll see if I can figure them out for ya.

Captain Amby
07-16-2003, 02:09 AM
OOoOOO sounds compleee catereds.. I'll try!

Caels
07-16-2003, 04:30 AM
lol, well once you get used to the script language, its not that hard at all.

Skaster
07-16-2003, 06:22 PM
Well.. I was just citing the bless as an example. Basically, a script that would continually check for a condition and if the condition wasn't met in the set amount of time, it'd perform a task, like repeating it, or going to another label.

I think the problem isn't that it *needs* a matchwait, it's that no matches can be recieved during the 10 second pause, because a pause counts as an action so anything recieved while pausing through the game ignored.

imported_Kranar
07-16-2003, 07:03 PM
<< I think the problem isn't that it *needs* a matchwait >>

Therefore, every match *needs* a matchwait. The only way around that is to infuse some mana and use that as a 2 minute pause, or if you're a wizard you can cast haste on yourself and use that as a 1 minute pause, or whatever else.

Skaster
07-16-2003, 07:33 PM
Well, actually, it could be possible to set something up with the counter and the time verb. In fact, lemme take a look at that now.

Skaster
07-16-2003, 07:43 PM
Heh, using my own deposit code to work with a timer.. if anyone has a use for this, this figures out what time it is in minutes and sets that as the counter. -

#test.Cmd


begin:
put time
match b0 :0
match b1 :1
match b2 :2
match b3 :3
match b4 :4
match b5 :5
matchwait

b0:
save 0
goto r

b1:
save 1
goto r

b2:
save 2
goto

b3:
save 3
goto r

b4:
save 4
goto r

b5:
save 5
goto r


r:
put time
waitfor Today is
match a0 :%s0
match a1 :%s1
match a2 :%s2
match a3 :%s3
match a4 :%s4
match a5 :%s5
match a6 :%s6
match a7 :%s7
match a8 :%s8
match a9 :%s9
matchwait

a1:
save %s1
goto complete

a2:
save %s2
goto complete

a3:
save %s3
goto complete

a4:
save %s4
goto complete

a5:
save %s5
goto complete

a6:
save %s6
goto complete

a7:
save %s7
goto complete

a8:
save %s8
goto complete

a9:
save %s9
goto complete

a0:
save %s0
goto complete

complete:
counter set %s
echo
echo .......................
echo .. Counter's set at %s
echo .......................
echo

Deathravin
08-14-2003, 03:37 AM
you have to have a matchwait at some point in time... but you can stack em up. For instance...

If_2 goto CouldNotBeRoundtime
If_1 goto CouldBeRoundtime

CouldBeRoundtime:
match Roundtime ...wait
goto RestOfTheMatches

CouldNotBeRoundtime:
goto RestOfTheMatches

RestOfTheMatches:
Match LookOut You are still stunned.
Match LookOut A Raving Lunitic just arrived.
Matchwait

see what it does... it breaks up the Matches, so if there is a %2, it won't look for roundtime, and if there is just a %1 it will look for roundtime... This (Obviously) is an AWEFUL example, because wizard checks for roundtime (grr, dont get me started) But you see... You dont HAVE to have a matchwait right under the match... just as long as its Going somewhere with a matchwait... Furthermore... it wouldn't make much sense, because what would you do?

Match LookOut You are still stunned.
then a bunch of "puts" with no waitfors?
There would have to be no waitfors, because while its "waitfor"ing its not looking for your match at all.
no... might as well just toss in a matchwait, and have a LookOut section for your scripts... My hunting scripts all have 3 versions of a standup/staunch "OhCrap" phase, just in case... I have to do it a bunch of times because there are no "GoSub" functions in wizard or escape.

BigWorm
08-14-2003, 08:44 PM
I have to do it a bunch of times because there are no "GoSub" functions in wizard or escape.
True and false. One thing you should always remember about scripting with the Wizard or Escape is that there might not be a simple, easy way to do it, but if you think hard enough, you can probably figure out a way to do it.

Subroutine type functions are actually pretty easy to do with Escape and the Wizard, but in the Wizard, you might have to sacrifice some capabilities, depending on what other commands you are using in that script.

Anyway, let me give an example:

FirstThing:
put fall
save FirstThingReturn
goto StandUp
FirstThingReturn:

SecondThing:
put sit
save SecondThingReturn
goto StandUp
SecondThingReturn:

exit

StandUp:
put stance off
put stand
pause 1
put stance def
goto %s

The problem with the Wizard is that in order to use subroutine type functions, you have to sacrifice the save variable (or the counter, but then your labels start to look pretty ugly). This really takes away some of the power of subroutines, because passing a variable to the subroutine can be pretty useful.

The cool thing about escape is that you get more variables. So the whole save thing really isn't a problem. I don't script much in escape, but you can write some pretty powerful stuff with it.

Hope that makes sense,
Worm

Deathravin
08-15-2003, 09:06 PM
This is true, Bigworm. you CAN do that. but its sort of hard when the %s and %c are already being used. I Was just making the point that programs like Wizbot and Drconnect are 1000times easier with GoSub functions.

However, Dr-Connect just sucks all together. (its slow, and errors out all the time. And they want you to register it! Register a crappy program like that? it would be awesome if they just fixed it)

-Deathravin

[Edited on 8-16-2003 by Deathravin]