Creating Variables (By means of someone chatting, not using the client)

Posted by Epazon on Mon 08 Nov 2004 01:35 AM — 2 posts, 10,658 views.

#0
I've been playing with MUSHClient for about a week now. I've gotten it to do most of the stuff I've wanted it to do except a trick involving variables. I have a radio-type bot for a game I play, that sends messages to any "radios" that are listening to it. How could I create variables by someone private messaging the bot.

Example: (Player's Name) pms "connect" to you.

Is it possible I could have the program create a variable titled (Player's Name) and then everytime someone says something near the bot (which is located on a seperate map), the bot sends the message to the players that pm-ed connect to it?
USA #1
Yes.

Its possible to create a variable based on a wildcard.

setvariable "%1", "contents"
Put that in your send box, with send to: "script"

although, Im not certain why you want to do this.

Are you going to then check to see if the variable exists?

It would probably be better to make an array of people listening, and then send to everyone in the array.
Or if you want to stay away from arrays, make a variable, and then make a list of people you want to send to in that variable, and then cycle through that to send (theres been a thread on a 'friends list' or, enemies list, they are examples of both, and can be modified to suit your needs).