How to make npc give random different question?

hadiesyafiq

New member
Messages
160
Points
0
Age
35
Location
Malaysia
Github
hadiesyafiq
Emulator
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

 
Last edited by a moderator:
Back
Top