//===== rAthena Script ======================================= //= Card Separation System //===== By: ================================================== //= Muad_Dib //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= [Official Conversion] //= Separates cards from equipment. //===== Additional Comments: ================================= //= 1.0 First Version. [Euphy] //= 1.1 Added "Richard" NPC. [Euphy] //============================================================ - script ::CardSeparation_mal -1,{ disable_items; if (checkweight(1201,1) == 0) { mes "You have too many kinds of objects. Let's try to continue after reducing those objects."; close; } if (MaxWeight - Weight < 10000) { mes "Can't continue because you have too many heavy objects. Let's try to continue after reducing the weight."; close; } if (strnpcinfo(1) == "Jeremy") { set .@Jeremy,1; set .@n$, "[Jeremy]"; setarray .@equip_name$[0], "Armor", "Shoes", "Garment", "Upper Hat"; setarray .@equip_slot[0], EQI_ARMOR,EQI_SHOES,EQI_GARMENT,EQI_HEAD_TOP; mes .@n$; mes "Long time no see~"; mes "I have learned a new skill that separates cards from Armor, Shoes, Garment and Headgear. Do you want to try it?"; } else { set .@Jeremy,0; set .@n$, "[Richard]"; setarray .@equip_name$[0], "Left hand", "Right hand"; setarray .@equip_slot[0], EQI_HAND_L, EQI_HAND_R; mes .@n$; mes "Silly Jeremy does not want to touch weapons and shields because of picking several cards that might be damaged. That is why I prepared a card separaion skill for weapons and shields..."; } next; mes .@n$; mes "Generally the fee is 1,000,000 Zeny. During the card separation, you can use ^990000special items that reduce the rate of destroying equipment or cards^000000. We don't charge additional zeny for this."; next; mes .@n$; mes "There is a possibility of destroying them even using a special item. Also, ^ff0000the refine level might be lost^000000. Do you have any equipment to separate?"; next; for(set .@i,0; .@i= 1000000)?"Use 1,000,000z (Do not use special item):":"^999999Use 1,000,000z (Insufficient)^000000:")+ ((countitem(6441))?"Use Premium Lubricant:":"^999999Premium Lubricant (Insufficient)^000000:")+ ((countitem(6440))?"Use Ordinary Lubricant":"^999999Ordinary Lubricant (Insufficient)^000000"); switch(select(.@menu$)) { case 1: mes .@n$; mes "Whenever you need the work, visit me here."; close; case 2: if (Zeny < 1000000) { mes .@n$; mes "You don't have enough zeny. Please come back with enough fees."; close; } mes .@n$; mes "This is pretty old equipment. There is a high rate of destroying the cards or equipment during the work. Are you sure you want to continue?"; next; if(select("Next time...:Continue") == 1) { mes .@n$; mes "Whenever you need the work, visit me here."; close; } set .@sf_c_num,150; set .@sf_r_num,150; set .@sf_w_num,150; set Zeny, Zeny - 1000000; break; case 3: if (countitem(6441) == 0) { mes .@n$; mes "You don't have Premium Lubricant."; close; } mes .@n$; mes "If you use the Premium Lubricant, the rate of destruction will be decreased highly, but I can't give you a 100% guarantee. Are you sure you want to continue?"; next; if(select("Next time...:Continue") == 1) { mes .@n$; mes "Whenever you need the work, visit me here."; close; } set .@sf_c_num,75; set .@sf_r_num,75; set .@sf_w_num,75; delitem 6441,1; //High_RankLubricant break; case 4: if (countitem(6440) == 0) { mes .@n$; mes "You don't have Ordinary Lubricant."; close; } mes .@n$; mes "If you use the Ordinary Lubricant, the rate of destruction will be decreased highly, but I can't give you a 100% guarantee. Are you sure you want to continue?"; next; if(select("Next time...:Continue") == 1) { mes .@n$; mes "Whenever you need the work, visit me here."; close; } set .@sf_c_num,75; set .@sf_r_num,150; set .@sf_w_num,150; delitem 6440,1; //General_Lubricant break; } } else if (.@boss_chk == 1) { mes .@n$; mes "This equipment contains a precious MVP card. This card can't be separated with lubricant. If you bring the super surfactant ^0000ffSillit Pong^000000, I will be able to work."; next; switch(select("Next time...:I have a Sillit Pong.")) { case 1: mes .@n$; mes "Whenever you need the work, visit me here."; close; case 2: if (countitem(6443) == 0) { mes .@n$; mes "You don't have Sillit Pong."; close; } break; } mes .@n$; if (.@Jeremy) { mes "Except cards, ^ff0000all enchanted effects will disappear.^000000 If you agree to this, please choose the work type:"; set .@menu$,"Alright, let's do it!"; } else { mes "May I continue?"; set .@menu$,"I got it. Just do it quickly!"; } next; switch(select("Next time...:"+.@menu$)) { case 1: mes .@n$; mes "Whenever you need the work, visit me here."; close; case 2: set .@sf_c_num,60; set .@sf_r_num,60; set .@sf_w_num,60; delitem 6443,1; //Sillit_Pong_Bottle break; } } set .@equip_id, getequipid(.@equip_num); set .@equip_refine, getequiprefinerycnt(.@equip_num); // anti-hack if (callfunc("F_IsEquipCardHack", .@equip_num, .@check_equip_card[0], .@check_equip_card[1], .@check_equip_card[2], .@check_equip_card[3])) close; delequip .@equip_num; // Chance of retaining refine level. if (rand(1,.@sf_r_num) >= 61) set .@equip_refine,0; if (.@Jeremy) { // Chance of retaining equipment. if (rand(1,.@sf_w_num) < 61) { set .@equip_safe,1; getitem2 .@equip_id,1,1,.@equip_refine,0,0,0,0,0; } // Chance of retaining cards. for(set .@i,0; .@i<4; set .@i,.@i+1) { if (.@equip_card[.@i]) { if (rand(1,.@sf_c_num) < 61) getitem .@equip_card[.@i],1; else set .@card_break,1; } } } else { set .@card, .@equip_card[.@slot]; set .@check_equip_card[.@slot],0; // Chance of retaining equipment (all enchantments are preserved). if (rand(1,.@sf_w_num) < 61) { set .@equip_safe,1; getitem2 .@equip_id,1,1,.@equip_refine,0,.@check_equip_card[0],.@check_equip_card[1],.@check_equip_card[2],.@check_equip_card[3]; } // Chance of retaining card. if (rand(1,.@sf_c_num) < 61) getitem .@card,1; else set .@card_break,1; } // Display corresponding effect. if (!.@equip_safe && .@card_break) specialeffect2 EF_LORD; else if (.@equip_safe && .@card_break) specialeffect2 EF_SUI_EXPLOSION; else if (!.@equip_safe && !.@card_break) specialeffect2 EF_FIREPILLAR; else specialeffect2 EF_MAXPOWER; // Output results. mes "-- Result of Card Separation --"; if (.@equip_safe) { mes "Crack has not occured during the card separation process."; mes "^0000FFEquipment separation is normal.^000000"; } else { mes "Crack has occured during the card separation process."; mes "Equipment has been damaged. ^ff0000Unrecoverable.^000000"; } mes "-------------------"; if (!.@card_break) { mes "Erosion of surface has not occured during the card separation process."; mes "^0000ffCard separation has succeeded.^000000"; } else { mes "Erosion of surface has occured during the card separation process."; mes "Card has been damaged. ^ff0000Unrecoverable.^000000"; } next; mes .@n$; mes "That is all for the results of the card separation. Please come again."; close; } malangdo,215,166,4 duplicate(CardSeparation_mal) Jeremy#pa0829 553 // Armors :: mal_yong malangdo,208,166,6 duplicate(CardSeparation_mal) Richard#pa0829 559 // Weapons :: soc_weapon