viewing paste Unknown #35669 | 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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
prontera,150,150,4  script  Bard    1_M_BARD,{
    
    if ( BQuest1 ) // Checks to see if quest is finished or not.
    {
        mes .npcname$;
        mes "You have already fulfilled my request! Thanks a ton.";
        close;
    }
    if ( Class != Job_Bard ) // Checks to see if you are bard or not.
    {
        mes .npcname$;
        mes "Sorry but you need to be a Bard to talk to me.";
        close;
    }
    
    if ( !BQTalked ) // Checks to see if you've never talked to the NPC before.
    {
        mes "Hello "+strcharinfo(0)+".";
        mes "I was wondering if you are willing to help me locate some items.";
        mes "It's all for a greater purpose.";
        next;
        mes .npcname$;
        mes "Here's what we need:";
        .@size = getarraysize(.ItemList); // gets array size of the Item List.
        for ( .@i = 1; .@i <= .@size; .@i++ ) // loops
        {
            mes ""+getitemname(.ItemList[.@i])+" x "+.ItemAm[.@i]+".";
        }
            next;
            mes .npcname$;
            mes "Come talk to me again if you wish to see the list of items or if you have gathered them all.";
            BQTalked++;
            close;
    } else
    
    if ( BQTalked ) // Checks to see if you've already talked to the NPC already.
        {
        .@size = getarraysize(.ItemList);
        for ( .@i = 1; .@i <= .@size; .@i++ )
        {
            if( countitem( .ItemList[.@i] ) < .ItemAm[.@i]) // Output what you need and what you have in your inventory.
            {
                mes .npcname$;
                mes "Sorry but you have "+getitemname(.ItemList[.@i])+" x "+countitem(.ItemList[.@i])+".";
                mes "You need "+getitemname(.ItemList[.@i])+" x "+.ItemAm[.@i]+".";
                close;
            }
        }
        mes .npcname$;
        mes "You have all the items!";
        close2;
        BQuest1++;
        .@size = getarraysize(.ItemList);
        for ( .@i = 1; .@i <= .@size; .@i++ )
        {
            delitem .ItemList[.@i], .ItemAm[.@i];
        }
        end;
        }
end;
 
 
OnInit:
 
.npcname$ = "[Bard]";
setarray .ItemList[1],501,502,503;
setarray .ItemAm[1],1,2,3;
end;
}
Viewed 861 times, submitted by Guest.