//35000,Grape_Voucher,Grape Voucher,3,0,,10,,,,,,,,,,,,,{},{},{} //Add in import item_db.txt Adding Custom Item
//adds global monster drop of grape voucher
- script Grape_Voucher -1,{
OnNPCKillEvent:
if( rand(100) < 10 ) //drops at 10%
getitem .item,1;
end;
OnInit:
set .item,35000; //item id here
end;
}
//Voucher Exchange
prontera,255,55,4 script Voucher_Exchange 117,{
if(countitem(.grapes) == 0){
mes "[Grape Merchant]";
mes "Good Day, I'm trading my grape juice for grape vouchers!";
next;
mes "[Grape Merchant]";
mes "If you found vouchers feel free to trade it to me";
close;
} else {
mes "[Grape Merchant]";
mes "Seems like you have vouchers do you want to trade?!";
next;
if(select("Yes:Quit")==2) close;
mes "[Grape Merchant]";
mes "How many do you want to exchange?";
input .@amount;
if(countitem(.grapes) >= .@amount){
mes "[Grape Merchant]";
mes "Here you go!";
delitem .grapes,.@amount;
getitem .juice,.@amount;
end;
} else {
mes "[Grape Merchant]";
mes "You dont have this kind of amount";
close;
}
}
OnInit:
set .grapes,35000; //voucher id here
set .juice,533; //grape juice id
end;
}