this is a herc script :)) try this one i tried to make it for rathena
prontera,155,183,5 script Items Seller#tax_shop 4_F_EDEN_OFFICER,{
mes "[ Dealer ]";
mes "-Currency Used-";
mes "- ^00FFFF"+getitemname(.currency)+"^000000 -";
next;
if(select("Open Shop:Information") == 2){
mes "[ Dealer ]";
mes "I collect your money and give it to others.";
close;
}
callshop "tax_shop",1;
npcshopattach "tax_shop";
end;
OnBuyItem:
set .@TotalCost,0;
for(.@i = 0; .@i < getarraysize(@bought_nameid); .@i++)
for(.@i = 0; .@j < getarraysize(.item); .@j++)
if(.item[.@j] == @bought_nameid[.@i])
.@TotalCost = .@TotalCost + ( .price[.@j] * @bought_quantity[.@i] );
if(countitem(.currency) >= .@TotalCost ){
delitem .currency,.@TotalCost;
getitem @bought_nameid[.@i],@bought_quantity[.@i];
$collectedtax += .@TotalCost * 10;
} else {
dispbottom "Your "+getitemname(.currency)+" is not enough";
}
deletearray @bought_quantity, getarraysize(@bought_quantity);
deletearray @bought_nameid, getarraysize(@bought_nameid);
end;
OnInit:
.currency = 673;
setarray .item[0],501,502,503;
setarray .price[0],1,2,3;
npcshopdelitem "tax_shop",501;
for(.@i = 0; .@i < getarraysize( .item ); .@i++)
npcshopadditem "tax_shop",.item[.@i],.price[.@i];
end;
}
- shop tax_shop -1,501:10000
prontera,144,321,6 script Tax Collector#1 4_F_EDEN_OFFICER,{
if(select("View Collected Tax:Collect Tax") == 1){
mes "[ Tax Collector ]";
mes "You have collected [ ^00FFFF"+$collectedtax+"^000000 ]";
close;
}
if($collectedtax >= 0){
mes "[ Tax Collector ]";
mes "Here you go.";
close2;
.@TotalCollected = .@TotalCollected + $collectedtax;
Zeny += .@TotalCollected;
dispbottom "You have collected a total of "+.@TotalCollected+"z Taxes";
$collectedtax = 0;
end;
}
mes "[ Tax Collector ]";
mes "You don't have anything to collect!";
close;
}