seveneyed Posted February 8, 2014 Posted February 8, 2014 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. Quote
StainSky93 Posted February 8, 2014 Posted February 8, 2014 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 Quote
seveneyed Posted February 8, 2014 Author Posted February 8, 2014 Oh, and I forgot to put this on this post. Without using next; Thank you. Quote
Missingno Posted February 8, 2014 Posted February 8, 2014 (edited) 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 break, close, or end (but only end in switches without a mes dialogue). Edit: Fixed typo. D: Edited February 8, 2014 by Missingno Quote
seveneyed Posted February 9, 2014 Author Posted February 9, 2014 It works! It works Missingno! and not only that. It looks more "professional" lol. Thank you Quote
Missingno Posted February 10, 2014 Posted February 10, 2014 It works! It works Missingno! and not only that. It looks more "professional" lol. Thank you Glad it worked out for you, and thanks for the compliment! I try to make my code readable and user-friendly. (: Quote
Question
seveneyed
Hello.
I was wondering if you can change the way NPC talks.
for example:
When you choose Here(Lgo) for example the NPC will say:
Along with the first words. Instead, I want to know if NPC can just say this when you choose Here(Lgo).
Would you be kind and teach me please?
Thank you.
5 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.