location,100,100,1 script Example::ex 90,{
if(.speak == 1) goto sorry;
set .speak,1;
set .name$,strcharinfo(0);
mes "[Example]";
mes "Part of this NPC is free, you can talk to him.";
next;
mes "[Example]";
mes "The first player was invited to the menu.";
next;
switch(prompt("The first menu item:The second menu item:The third menu item")) {
case 1:
mes "[Example]";
mes "The first player selected first menu item.";
set .speak,0;
break;
case 2:
mes "[Example]";
mes "The first player selected the second menu item.";
set .speak,0;
break;
case 3:
mes "[Example]";
mes "The first player has chosen the third element of the menu.";
set .speak,0;
break;
default:
set .speak,0;
break;
}
close;
sorry:
mes "";
mes "Sorry. Currently, "+.name$+" is talking to the NPC..";
break;
}