Hi again ^^. First of all, thank you so much for putting a description for each strings and vars, it taught me more than reading the list of commands in the doc. XD
Yeah I put the first code somewhere after the player return and talk to the npc. So every poring they kill after the 2000th poring will make the dispbottom message shows up (to remind them). But I guess I will add Recording,0 somewhere so I can use the same var again for the 2nd killcount.
set Legendary3,2;
set Recording,0;
Just wondering...., does the first one makes the same char unable to repeat the quest again ? or the whole account ?. Since the reward will be good, I don't want players to spam it, so I want it once per account only. I do put:
if ( (Legendary3 == 0) && (countitem(6048) > 0) ) goto L_NoQuest; //Char did not start quest yet.
if (Legendary3 == 1) goto L_Legendary3_1; //Char accepted quest 1.
if (Legendary3 == 2) goto L_Legendary3_2; //Char accepted quest 2.
goto L_Finish; //Char finished all quests from npc.
for(set .@i,0; .@i<3; set .@i,.@i+1) { // ask 3 questions
// set .@i,0; -- initialize a variable (technically not needed, but a good habit)
// .@i<3; -- run until .@i becomes >= 3
// set .@i,.@i+1 -- increase .@i by 1 upon reaching the end of the for() bracket
switch(rand(20)) {...}
mes .@question$;
input .@str$;
if (.@str$ == .@answer$) {
if (.@i < 2) { // only run this when there's actually a question left, xD
mes "Good! Now for the next question...";
next;
}
}
else {...}
}
mes "You've answered all the questions!";
Thanks man, This works nicely. I had the gist of what to type in the for(), just didnt know where should i put it at, and didnt know about
if (.@i < 2) { // only run this when there's actually a question left, xD
Is it possible in current athena to make NPC roam around the map then stop when someone is accessing them ?
I tried :
OnTimer3000: // <----- I put this at the start of script
npcwalkto 70+rand(50),135+rand(50);
setnpctimer 0;
OnInit: // <---- I put this set at the end of the script
initnpctimer;
end;
But the npc walks after being clicked ^^;;
And does sleep command can be used to make some sort of delay before player gets their reward??, like maybe wait 1 day before they can proceed with the quest. ??