anyway.
can you help me with this script?
- shop Donation -1,501:500 prontera,187,209,5 script Donation 757,{ // NPC Name set .name$,"[^FF0000 Charity Worker ^000000]"; mes .name$; mes "Are you here to donate? if so please choose from the following categories. "; next; select("Valkyrie Shop:Diablo's Shop Items:Cards Shop"); callsub CaseCH,@menu; npcshopitem "Donation",501,20; npcshopdelitem "Donation",501; for(set .@i,0; .@i < getarraysize( @ItemLists ); set .@i,.@i+1) npcshopadditem "Donation",@ItemLists[.@i],@ItemPrice[.@i]; mes .name$; mes "Please take note that each of the following items are bought using ^008800"+getitemname( @Currency )+"^000000 and not zennies. The zennies only indicate the prices"; next; callsub CaseCH,@menu; callshop "Donation",1; npcshopattach "Donation"; dispbottom "You currently have "+countitem( @Currency )+" "+getitemname( @Currency )+"."; end; OnBuyItem: callsub CaseCH,@menu; for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1) for(set @j,0; @j < getarraysize( @ItemLists ); set @j,@j+1) if( @ItemLists[@j] == @bought_nameid[@i] ) set @TotalCost,@TotalCost + ( @ItemPrice[@j] * @bought_quantity[@i] ); if( countitem( @Currency ) < @TotalCost ){ for( set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1 ){ mes "Item : ^0000FF"+getitemname( @bought_nameid[@i] )+"^000000"; mes "Quantity : ^0000FF"+@bought_quantity[@i]+"^000000"; } mes "^00FF00____________________________^000000"; mes "Total Cost : ^0000FF"+@TotalCost+" x "+getitemname( @Currency )+"^000000"; mes "^00FF00____________________________^000000"; mes "[ ^FF0000X^000000 ] You do not have enough ^0000FF"+getitemname( @Currency )+"^000000 to purchase this."; }else{ for(set @i,0; @i < getarraysize( @bought_nameid ); set @i,@i+1){ getitem @bought_nameid[@i],@bought_quantity[@i]; message strcharinfo(0),"Purchased "+getitemname( @bought_nameid[@i] ); } delitem @Currency,@TotalCost; mes "Thank you for shopping."; mes "You now have ^FF0000"+countitem( @Currency )+" "+getitemname( @Currency )+"^000000 left."; } set @TotalCost,0; deletearray @bought_nameid[0],getarraysize( @bought_nameid ); deletearray @bought_quantity[0],getarraysize( @bought_quantity ); deletearray @ItemLists[0],getarraysize( @ItemLists ); deletearray @ItemPrice[0],getarraysize( @ItemPrice ); close; CaseCH: deletearray @ItemLists[0],getarraysize( @ItemLists ); deletearray @ItemPrice[0],getarraysize( @ItemPrice ); switch( getarg(0) ){ Case 1: // Item Currency set @Currency,7179; // Item ID Lists setarray @ItemLists[0],2524,5171,2357,2421,2115; // Item Price setarray @ItemPrice[0],10,10,10,10,10; return; Case 2: // Item Currency set @Currency,7179; // Item ID Lists setarray @ItemLists[0],5808,2375,2374,2537,2433; // Item Price setarray @ItemPrice[0],30,30,30,30,30; return; Case 3: // Item Currency set @Currency,7179; // Item ID Lists setarray @ItemLists[0],4357,4359,4361,4363,4365,4367; // Item Price setarray @ItemPrice[0],300,500,200,100,100,200; return; // Case 4,5,6.....etc... default: mes "Wrong Selection / Configurations"; close; } OnInit: waitingroom "Donation Items Here",0; end; } morocc,289,215,5 duplicate(Donation) - shop Donation -1,501:500 757 [/codeBOX]
i want to duplicate this npc.
i got this error:
i don't know what's wrong...sorry i'm still learning how to script, i'm not really good.
help would be appreciated.