prontera,151,172,4 script loco 813,{
#RRG = 10000;
getitem Poring_Coin, 1000;
disable_items;
mes .npcname$;
mesf "Hello! ^0000CD%s^000000 I am the best blacksmith in all Zone Zero RO, I can refine without breaking up to +10", strcharinfo(PC_NAME);
mesf "To use my service you need: %d Hourly Points and %d Poring Coin", .Houly_Points_needed, .Poring_Coin_needed;
mes "What part of your equipment do you want to refine?";
next;
for ( .@i = 1; .@i <= 10; ++.@i )
.@menu$ += getequipname(.@i) +":";
.@s = select(.@menu$);
if ( !getequipisequiped(.@s) ) {
mes "Please put the equipment first";
emotion e_swt;
close;
}
if ( !getequipisenableref(.@s) ) {
mes "This part of equipment cannot be refine";
close;
}
if ( getequiprefinerycnt(.@s) >= .maxrefine ) {
mes "this item already refined at the maximum level";
close;
}
mes .npcname$;
mes "Refinement [+10].";
mesf "1 Refine = %d Hourly Points.", .Houly_Points_needed;
mesf "You have %d Hourly Points", #RRG;
mesf "1 Refine = %d Poring Coin", .Poring_Coin_needed;
mesf "You have %d Poring Coin", countitem(Poring_Coin);
mes "How much do you want to refine your item?";
next;
input .@amount, 0, .maxrefine - getequiprefinerycnt(.@s);
if ( .@amount <= 0 ) {
mes "See ya";
close;
}
mes .npcname$;
mesf "Do you want to refine %d times", .@amount;
mesf "for %d Hourly Points and %d Poring Coin?", .Houly_Points_needed * .@amount, .Poring_Coin_needed * .@amount;
next;
if ( select ("Yes","No") == 2 ) close;
mes .npcname$;
if ( #RRG < .Houly_Points_needed * .@amount ) {
mes "you don't have enough hourly points";
close;
}
if ( countitem(Poring_Coin) < .Poring_Coin_needed * .@amount ) {
mes "you don't have enough Poring Coin";
close;
}
if ( getequiprefinerycnt(.@s) + .@amount > .maxrefine ) {
mes "you can't refine over +10";
close;
}
#RRG -= .Houly_Points_needed * .@amount;
delitem Poring_Coin, .Poring_Coin_needed * .@amount;
successrefitem .@s, .@amount;
npctalk "See you !! Grax.";
mes "See you !! Grax.";
close;
OnInit:
.npcname$ = "[Refiner]";
.maxrefine = 10;
.Houly_Points_needed = 5;
.Poring_Coin_needed = 1;
end;
}