prontera,155,181,5 script Sample#quest 757,{
for ( .@i = 0; .@i < .quest_id_size; .@i++ ) {
if ( questprogress( .quest_id[.@i] ) != 2 ) {
.@menu$ = .@menu$ + "Quest - "+.quest_id[.@i];
.@avail_quest_count++;
}
.@menu$ = .@menu$ + ":";
}
if ( .@avail_quest_count >= .quest_id_size ) {
mes "All quest finished.";
close;
}
.@i = select( .@menu$ ) - 1;
mes "Selected Quest "+.quest_id[.@i];
if ( questprogress( .quest_id[.@i] ) == 1 ) {
mes "You've already taken this quest but not yet complete.";
}
else {
mes "quest assigned.";
setquest .quest_id[.@i];
}
close;
OnInit:
setarray .quest_id,
1000,
2000,
3000;
.quest_id_size = getarraysize( .quest_id );
end;
}