Jump to content
  • 0

mes


seveneyed

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  02/02/14
  • Last Seen:  

Hello.

I was wondering if you can change the way NPC talks.

 

for example:

mes "[Kafra]";

mes "Tell me where you want to go."

 

menu "Here",Lgo,

"there",Lga,

"cancel",Lend;

 

Lgo:

mes "If you go here than you must pay.";

 

 

When you choose Here(Lgo) for example the NPC will say:

[Kafra]

Tell me where you want to go.

If you go here than you must pay.

 

 

Along with the first words. Instead, I want to know if NPC can just say this when you choose Here(Lgo).

If you go here than you must pay.

 

 

Would you be kind and teach me please?

 

Thank you.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   41
  • Joined:  02/05/14
  • Last Seen:  

You can use a switch to prompt a menu that can adjust the dialogue without a next button:

prontera,160,170,3 script Example NPC 721,{

	mes "[Kafra]";
	mes "Tell me where you want to go.";
	
	switch (select("Here:There:Cancel")) {
		case 1:	// Here
			mes "If you go here, then you must pay.";
			break;
			
		case 2:	// There
			mes "You can go there for free!";
			break;
			
		case 3:	// Cancel
			mes "Okay, see you later!";
			break;
	}
	
	close;

}

Because of the way this is written, the script will continue based on which option you chose. If the first option ("Here") was selected, the switch will switch you over to case 1; similarly, if you choose the second option ("There"), you'll be switched over to case 2. Each case serves as a label (of sorts), but allows for a little more flexibility and readability than something like L_LameLabelName. These case labels also correspond to the value sent in the switch, which was returned by the function select(). At the end of each case label, the script should either breakclose, or end (but only end in switches without a mes dialogue).

 

 

Edit: Fixed typo. D:

Edited by Missingno
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  104
  • Reputation:   6
  • Joined:  01/23/14
  • Last Seen:  

try put things in order by bracketing them "{,}"

you will see the dfrnt..

and do u know there is a "close2;"

..there is nothing wrong in trying and get error from it..

read the error and see how things work..

scramble the script apart and work on it like a puzzle..

its like a HTML code.. for me that is.. if u even know how HTML code work like..

just an advice from my part... you can w8 for btr answer from the other people~

and good luck on everything that you were doing  /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  02/02/14
  • Last Seen:  

Oh, and I forgot to put this on this post. Without using
 

next;

 

Thank you.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  02/02/14
  • Last Seen:  

It works! It works Missingno! and not only that. It looks more "professional" lol. Thank you :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  135
  • Reputation:   41
  • Joined:  02/05/14
  • Last Seen:  

It works! It works Missingno! and not only that. It looks more "professional" lol. Thank you :D

 

Glad it worked out for you, and thanks for the compliment! I try to make my code readable and user-friendly. (:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...