PDA

View Full Version : Problem with my script



radamanthys
11-20-2005, 01:31 PM
the part of my script in question (edit: order doesnt matter, it seems, it'll still do this)

start:
match quit But it is dead!
match quit You hear a sound like a weeping child as
match quit disappearing into the heavens.
match quit falls to the ground motionless.
put prep 702
put channel target
match start ...wait
match start Ward
match frozed move
match start still stunned
matchwait


does this:

You channel at a ghostly pooka.
CS: +387 - TD: +127 + CvA: +25 + d100: +77 == +362
Warding failed!
Massive internal disruption.
You hear a sound like a weeping child as a white glow separates itself from the ghostly pooka's body as it rises, disappearing into the heavens.
The ghostly pooka falls to the ground motionless.
Cast Roundtime 3 Seconds.
Roundtime: 3 sec.
R>

>prep 702
>channel target

You trace an intricate sign that contorts in the air while forcefully invoking Mana Disruption...
Your spell is ready.
>
You channel at a ghostly pooka.
But it is dead!
Cast Roundtime 3 Seconds.
Roundtime: 3 sec.
R>loot

looted corpse

>look
You search the ghostly pooka.
It had some torn and ragged saddlebags, some heavy chains.

Why does that script take some of my matches on the first go, then need another iteration for others? I can't figure out what i'm doing wrong, and i'm just learning the intracacies of the whole thing. Any help would be well appreciated, as simu's "Scripting help" is pretty basic.

Oh, those numbers are forged as wishful thinking. I also removed some of the useless text... melting and such.

Thanks!

[Edited on 11-20-2005 by radamanthys]

Bobmuhthol
11-20-2005, 01:33 PM
I would say it's match placement. Half the table is loaded, but the other half has to load after it prepares and channels.

Then again, I don't even know wtf you're talking about or what the problem is, heh.

radamanthys
11-20-2005, 01:35 PM
oh, ok. More clear. It'll cast at the dead critter before it loots.

some of the matches work perfectly, but the death ones don't... they need to be run through again.

Even if the matches are set up differently, it'll still need another iteration of the match loop to go to my search label.

edit: that's only one part of my script. The rest was moot for this question. It's going to be part of a "carpel tunnel healing" script for hunting. I'm lost, can't figure this stupid bug out, and it's costing me 2 mana and 9 seconds or so extra. It's annoying.

[Edited on 11-20-2005 by radamanthys]

Bobmuhthol
11-20-2005, 01:37 PM
I think it's because of

match start Ward

Matches go by line. 'Warding failed!' appears before 'You hear a sound like a weeping child as,' so that is matched and all other matches are discarded. The hierarchy goes by line, then by match order. The only time you could have 'Ward' and 'You hear the sound' together is if they appeared on the same line and you put 'You hear the sound' before 'Ward' in your match list.

radamanthys
11-20-2005, 01:40 PM
They go from bottom to top?

Bobmuhthol
11-20-2005, 01:43 PM
No, no. The game loads up your match table, then when you have a matchwait it looks for the first occurrence of any of your matches. If on line 1 it sees 'Warding failed!' and on line 2 it sees the Voln message, it is always going to match 'Warding failed!' first. If on line 1 it said, "Warding You hear a sound like a weeping child as!" (this wouldn't happen ever), the match it registers is whichever one you have listed first in your matches.

radamanthys
11-20-2005, 01:46 PM
Ohhhh. As per simu's instructions, it would take the first match within the script, not the game first, then the second match second as the hierarchy.

That makes sense. Thanks for the explanation, Bob.

Bobmuhthol
11-20-2005, 01:46 PM
Sure thing.