I'm want to know if it is possible to have an NPC greet the player with a random message (of some 5-10 message for example), and how I would do that. Sorry if it's a stupid question, I usually have someone else doing my scripting.
I've been looking through the rAthena wiki at various scripting commands (var/rand/array) and I can't seem to find the solution to my question.
This is taken from the rAthena Wiki article on Variables
If you are using the mes command, or another text displaying command, it works a bit differently:
mes #var; // Will display a line with only the value of #var.
mes "You have killed " + dead_porings + " Porings."; // Will display this:
// "You have killed <value of dead_porings>
// Porings."
mes @name$; // If @name$ contains "[Kafra]", it will display "[Kafra]"
mes "My name is "+@name$; // If @name$ contains "Trevor", it will display: "My name is Trevor"
Any help is appreciated. If possible, please provide an example script.
Question
Azura Skyy
I'm want to know if it is possible to have an NPC greet the player with a random message (of some 5-10 message for example), and how I would do that. Sorry if it's a stupid question, I usually have someone else doing my scripting.
I've been looking through the rAthena wiki at various scripting commands (var/rand/array) and I can't seem to find the solution to my question.
This is taken from the rAthena Wiki article on Variables
Any help is appreciated. If possible, please provide an example script.
Thanks in advance,
~Azura Skyy
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.