$0 to $9 on the target list

For builders to discuss and ask building questions.
Post Reply
Solaghar
Staff
Staff
Posts: 1283
Joined: Sun Nov 16, 2003 8:33 am
Location: Menzoberranzan

$0 to $9 on the target list

Post by Solaghar » Tue May 31, 2005 11:33 pm

How exactly do these targets work? For instance, could one person say a name of another person and with for instance, an intercept program, force something to happen to that other person? An example.

sayto guardmob Grab Dalvyn!

And the guardmob has a speech program lined up like...

>speech_prog grab $1~
emote grabs $1 by the arms and restrains him!
~

In other words, does it function as a replacement target for whatever we might want to use it for? If not, is it possible we could have a target like this?
Tyr
Sword Grand Master
Sword Grand Master
Posts: 502
Joined: Sat Aug 09, 2003 2:56 am
Location: House of the Triad
Contact:

Post by Tyr » Wed Jun 01, 2005 2:31 am

It $1-$9 are variables that store the nth word in the intercept (and speech I think). You can use these variables within the prog to do various things.

Note that if you want to reference it as if it is an object or mob you need to make sure that the nth word is actually a valid char/obj.

For instance when grabbing do:
>speech_prog grab~
if charinroom($2)
emote $i grabs $2.
endif
~
Image
Post Reply