Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,164,168,4 script Dwarf 600,{
- .@item = 7420;
- .@quan = 0;
- .@freeRef = 7;
- .@paidRef = 10;
- switch(select("Refino Gratis", "Refino Pago")){
- case 1:
- setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R;
- for(.@i = 0; .@i < getarraysize(.@items); .@i++){
- if(getequiprefinerycnt(.@items[.@i]) < .@freeRef){
- specialeffect2 154;
- successrefitem .@items[.@i],.@freeRef - getequiprefinerycnt(.@items[.@i]);
- }
- }
- end;
- case 2:
- setarray .@items[0],EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R;
- if (countitem(.@item) < .@quan){
- mes "Voce nao tem os items necessarios: " + .@quan + "x "+ getitemname(.@item);
- close;
- }
- for(.@i = 0; .@i < getarraysize(.@items); .@i++){
- // prevent the item consuption
- if(getequiprefinerycnt(.@items[.@i]) != .@paidRef) .@flag = 1;
- if(getequiprefinerycnt(.@items[.@i]) < .@paidRef){
- specialeffect2 154;
- successrefitem .@items[.@i],.@paidRef - getequiprefinerycnt(.@items[.@i]);
- }
- }
- if (.@flag == 1) delitem 7420,10;
- end;
- }
- OnInit:
- waitingroom "Refinador Mestre",0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement