Good evening to all. Happy New Year. We are back.
How to leave this daily quest, renewing every day 06:00 AM?
Thanks.
* npc by Emistry!
prontera,155,181,5 script Sample 4_F_KAFRA1,{
if (!quest_random) {
quest_random = rand(1, 2);
mes "You have been assigned with a new quest.";
next;
}
switch(quest_random) {
case 1:
setarray .@reward, 4001, 1;
setarray .@item, 512;
setarray .@amount, 100;
break;
case 2:
setarray .@reward, 4002, 1;
setarray .@item, 501, 502, 503;
setarray .@amount, 3, 1, 2;
break;
default:
mes "invalid quest.";
close;
}
mes "Quest Requirement(s):";
.@size = getarraysize(.@item);
for (.@i = 0; .@i < .@size; .@i++) {
mes " > "+.@amount[.@i]+"x "+getitemname(.@item[.@i]);
if (countitem(.@item[.@i]) < .@amount[.@i])
.@fail++;
}
if (!.@fail) {
next;
if (select("Submit Quest", "Cancel") == 1) {
for (.@i = 0; .@i < .@size; .@i++)
delitem .@item[.@i], .@amount[.@i];
getitem .@reward[0], .@reward[1];
quest_random = 0;
}
}
close;
}