Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- payon,157,146,6 script Special Refiner 85,{
- disable_items;
- mes .@npc_name$ = "[Special Refiner]";
- mes "I am the Armsmith";
- mes "I can refine all kinds of weapons,";
- mes "armor and equipment, so let me";
- mes "know what you want to refine.";
- next;
- setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
- for(set .@i,1; .@i<=10; set .@i,.@i+1) {
- if (getequipisequiped(.@indices[.@i])) {
- set .@menu$, .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
- set .@equipped,1;
- }
- set .@menu$, .@menu$ + ":";
- }
- if (.@equipped == 0) {
- mes .@npc_name$;
- mes "I don't think I can refine any items you have...";
- close;
- }
- set .@part, .@indices[ select(.@menu$) ];
- if (!getequipisequiped(.@part)) //custom check
- close;
- if (!getequipisenableref(.@part)) {
- mes .@npc_name$;
- mes "Go find another Blacksmith. You can't refine this thing.";
- close;
- }
- if (getequiprefinerycnt(.@part) >= 10) {
- mes .@npc_name$;
- mes "Hmm... someone perfected this already. I don't think I can work on it further.";
- close;
- }
- // Make sure you have the neccessary items and Zeny to refine your items
- // Determines chance of failure and verifies that you want to continue.
- switch(getequipweaponlv(.@part)) {
- case 1: callsub S_RefineValidate,1,36003,50,.@part; break;
- case 2: callsub S_RefineValidate,2,36003,200,.@part; break;
- case 3: callsub S_RefineValidate,3,36003,5000,.@part; break;
- case 4: callsub S_RefineValidate,4,36003,20000,.@part; break;
- default: callsub S_RefineValidate,0,36002,2000,.@part; break;
- }
- mes .@npc_name$;
- mes "Clang! Clang! Clang!";
- if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
- successrefitem .@part;
- next;
- emotion e_no1;
- mes .@npc_name$;
- mes "There you go! It's done.";
- mes "It's been a while since I've made such a fine "+((getequipweaponlv(.@part))?"weapon":"armor")+". You must be happy because it has become stronger!";
- close;
- }
- //failedrefitem .@part;
- misceffect 155;
- next;
- emotion (!rand(5))?e_cash:e_omg;
- mes .@npc_name$;
- mes "Uuuuuuuuuummmmmph!!!";
- close;
- S_RefineValidate:
- .@weapon_lvl = getarg(0);
- .@item_req = getarg(1);
- set .@price, getarg(2);
- // If the VIP system is enabled, the prices for non-VIP players are considerably higher.
- if (VIP_SCRIPT && !vip_status(VIP_STATUS_ACTIVE)) {
- switch(.@weapon_lvl){
- case 0: set .@price, .@price * 10; break;
- case 1: set .@price, .@price * 40; break;
- case 2: set .@price, .@price * 50; break;
- case 3: set .@price, .@price * 2; break;
- case 4: set .@price, .@price * 2; break;
- }
- }
- mes .@npc_name$;
- if (.@weapon_lvl)
- mes "You want to refine a level "+ .@weapon_lvl +" weapon?";
- mes "To refine that, you'll need to have one ^ff9999"+ getitemname(.@item_req) +"^000000 and "+ .@price +" zeny.";
- mes "Would you like to continue?";
- next;
- if(select("Yes:No") == 1) {
- if (countitem(.@item_req) > 0 && Zeny > .@price) {
- delitem .@item_req,1;
- set Zeny, Zeny - .@price;
- return;
- }
- mes .@npc_name$;
- mes "Are these all you have?";
- mes "I'm very sorry, but I can't do anything without all the materials. Besides, I deserve some payments for my work, don't I?";
- close;
- }
- mes .@npc_name$;
- mes "I can't help it even if you're not happy about it...";
- close;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement