viewing paste Progress Report Example | Athena

Posted on the | Last edited on
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 39 40 41 42
    mes .npc_name$;
    
    for(.@i = 0; .@i < getarraysize(.qitem); .@i++) {
        // Check if current item fails to meet prerequisite
        if(countitem(.qitem[.@i] < .qamt) {
            mes "Sorry, you're still missing some items. Here's your progress:";
            next;
            
            // Progress report
            for (.@j = 0; .@j < getarraysize(.qitem); .@j++) {
                if (countitem(.qitem[.@j]) < .qamt) {
                    mes countitem(.qitem[.@j]) +"/"+ .qamt +" "+ getitemname(.qitem[.@j]);
                }
            }
            
            close;
        }
    }
 
    mes "Wow, looks like you have gathered a lot of souls recently.";
    next;
    
    mes .npc_name$;
    mes "I can make them into a special aura everyone can see.";
    next;
    
    if(select("Yes, please.:No, thank you.") == 2) {
        mes .npc_name$;
        mes "Come back if you change your mind.";
        close;
    }
    
    mes .npc_name$;
    mes "Alright, enjoy your new aura!";
    
    // Delete all quest items
    for (.@i = 0; .@i < getarraysize(.qitem); .@i++) {
        delitem .qitem[.@i], .qamt;
    }
    
    getitem .pitem, .pamt;
    close;
Viewed 1051 times, submitted by datmumbles.