Jump to content
  • 0
Sign in to follow this  
hadiesyafiq

How to make npc give random different question?

Question

if (!quest_random) {
				mes "[Swordman Guildsman]";
				mes("Last Question.");
				mes("If.....");
				next();
			}
			switch(quest_random) {
				case 1:
					mes "[Swordman Guildsman]";
					mes("1+3+5 = ???");
					next();
					input(.@guess);
					if (.@guess == 9) {
						mes "[Swordman Guildsman]";
						mes "Then I'll end your training process and send you to the Swordman Guild.";
						callfunc "F_NvErase",1;
						close2;
						savepoint "izlude",128,98; // Old coordinates: (95,104)
						warp "izlude_in",74,167;
						close();
					} else {
						mes("[Swordman Guildsman]");
						mes("Sorry.");
						close();
					}
				case 2:
					mes "[Swordman Guildsman]";
					mes("5+9+5 = ???");
					next();
					input(.@guess);
					if (.@guess == 19) {
						mes "[Swordman Guildsman]";
						mes "Then I'll end your training process and send you to the Swordman Guild.";
						callfunc "F_NvErase",1;
						close2;
						savepoint "izlude",128,98; // Old coordinates: (95,104)
						warp "izlude_in",74,167;
						close();
					} else {
						mes("[Swordman Guildsman");
						mes("Sorry.");
						close();
				}
			}
		}
	}
}

is this right way to make npc ask random different kind of questions?

not only 1 questions but many

Edited by hadiesyafiq

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.