Jump to content
  • 0

NPC mes loop?


AsuraBro

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  74
  • Reputation:   3
  • Joined:  07/12/14
  • Last Seen:  

Hello

 

i need help with this simple script for ex. i want when you reach a end of the text in npc it repeat it self.

 

ex like this maybe

prontera,149,194,4	script	test	 871,{

mes "Hello how can i help you?";
next;
	switch (select("Nothing, thanks:Cancel")) {
		
		case 1:
			next;
			mes "Ok, see you later";
			close;
			break;  // i want in this end the script go and restart it conversation, goes back to line 1.
			
		case 2:
			close;
			break; // i want in this end the script go and restart it conversation, goes back to line 1.
		}
		close;
		}

what i want is whenever in the end of the case the script go and repeat himself from "mes "Hello how can i help you?";".

 

how can i do this?

Edited by AsuraBro
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


do {

mes "Hello";

switch ( select( "Menu 1", "Menu 2", "Menu 3", "Cancel" ) ) {

case 1:

mes "Hello";

break;

case 2:

mes "Hello";

break;

case 3:

mes "Hello";

break;

case 4:

mes "Hello";

break;

default:

mes "Bye";

close;

}

next;

} while ( 1 );

  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  74
  • Reputation:   3
  • Joined:  07/12/14
  • Last Seen:  

do {
	mes "Hello";
	switch ( select( "Menu 1", "Menu 2", "Menu 3", "Cancel" ) ) {
		case 1:
			mes "Hello";
			break;
		case 2:
			mes "Hello";
			break;
		case 3:
			mes "Hello";
			break;
		case 4:
			mes "Hello";
			break;
		default: 
			mes "Bye";
			close;
	}
	next;
} while ( 1 );

what if i used 2 switchs like

mes "Hello";
	switch ( select( "hello" ) ) {
case 1:
next;
switch ( select( "hello" ) ) {
case 1:
close;
break;
}
break;
}

how to do this? i want all of them to go back to the start

 

edit: nvm i already figured it out lol

Edited by AsuraBro
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...