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

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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