viewing paste dynamic quest list npc | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
 
 
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;
}
Viewed 1540 times, submitted by Emistry.