moc_para01,38,185,4 script MightyHammer4_M_DWARF,{
disable_items;set.@name$,"[^0000FFBlacksmith Mighty Hammer^000000]";
mes .@name$;
mes "Unlike others, I am a blacksmith who can refine items without breaking them!";
mes "I refine items that are 7 ~ 9 with ^377664HD Elunium^000000 and ^366664HD Oridecon^000000.";
mes "My specialty is that even if my refining ^FF0000fails, the level decreases by just 1 level without losing the gear.^000000 isn't it great?";
next;
mes .@name$;
mes "I can also use ^377664HD Carnium^000000 and ^377664HD Bradium^000000 + "+callfunc("int__",.HD10RefineCost)+"z to refine items that are ";
mes "^990000+10 and higher.^000000";
mes "If I fail the item will only degrade 1 level except if the item is +10, in which case it ^000099will stay +10^000000!";
mes "Thats where I earned my nickname of ^009900'ole +11'^000000 back in Blacksmith college!";
mes "^FF0000Safe to +n^000000 Armor, Headgear and Weapon Certificates to prevent a downgrade.";
next;
mes .@name$;
mes "By happenstance I can also use the '^000099Safe to +6/7/8/9 Certificates^000000' along with Elunium-Oridecon to make the attempts from 4 to 6 safe.";
next;
mes .@name$;
mes "If by some Miracle you have a ^000099Safe to +10 certificate^000000 then I can attempt to go from +9 to +10,";
mes "consume the Certificate and the HD Ore and ensure the item does NOT degrade on Failure.";
mes "If the item gets to +9, and you have one of the Safe to +10 Certificates in inventory then that special option will open up.";
mes "So lets kick this into overdrive, what d'ya say?";
next;
setarray .@position$[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;set.@menu$,"";for(set.@i,1;.@i<=10;set.@i,.@i+1){if( getequipisequiped(.@i))set.@menu$,.@menu$+.@position$[.@i]+"-"+"[ ^FF0090"+ getequipname(.@i)+"^000000 ]";elseset.@menu$,.@menu$+.@position$[.@i]+"- Empty";set.@menu$,.@menu$+":";}set.@part,select(.@menu$);if(!getequipisequiped(.@part)){
mes .@name$;
mes "You're not wearing anything...";
close;}elseif(!getequipisenableref(.@part)){
mes .@name$;
mes "I don't think this item is refine-able at all.";
close;}set.@equipRefLevel,getequiprefinerycnt(.@part);if(.@equipRefLevel<4){
mes .@name$;
mes "Make sure the item is at least +4, before asking me to upgrade it.";
close;}set.@equipLv,getequipweaponlv(.@part);if(.@equipLv!=0&&.@equipLv<3){
mes .@name$;
mes "I'm sorry your Weapon must be of level 3 or 4 before I can upgrade it.";
close;}RefineStart:set.@certId,0;// Reset CertId on loopset.@equipRefLevel,getequiprefinerycnt(.@part);// Refresh Refine Level
mes .@name$;switch(.@part){case1:// Upper Headif(.@part==1) mes "I'm a blacksmith, not a hairstylist.";case2:// Bodyif(.@part==2) mes "With my hammer, I will make you a star of the sky.";case5:// Robeif(.@part==5) mes "Bring out the item so I can refine it!";case6:// Shoesif(.@part==6) mes "Where is this foot order coming from?";if(.@HD10Refine)gotoHDRef10Armor;switch(.@equipRefLevel){case4:case5:if(.@HDRefine)gotoHDRef7Armor;set.@certId,.SafeTo6ArmorCertificate;// Safe to 6 Armorset.@reqOre,.NormalElunium;// Normal Eluniumbreak;case6:if(.@HDRefine)gotoHDRef7Armor;set.@certId,.SafeTo7ArmorCertificate;// Safe to 7 Armorset.@reqOre,.NormalElunium;// Normal Eluniumbreak;case7:HDRef7Armor:if(countitem(.SafeTo8ArmorCertificate)){set.@certId,.SafeTo8ArmorCertificate;// Safe to 8 Armorset.@reqOre,.NormalElunium;// Normal Elunium}else{set.@reqOre,.HDElunium;// HD Eluniumset.@HDRefine,1;}break;case8:if(countitem(.SafeTo9ArmorCertificate)){set.@certId,.SafeTo9ArmorCertificate;// Safe to 9 Armorset.@reqOre,.NormalElunium;// Normal Elunium}else{set.@reqOre,.HDElunium;// HD Eluniumset.@HDRefine,1;}break;case9:if(countitem(.SafeTo10ArmorCertificate))set.@certId,.SafeTo10ArmorCertificate;// Safe to 10 Certset.@reqOre,.HDElunium;// HD Eluniumbreak;case10:HDRef10Armor:set.@reqOre,.HDCarnium;set.@HD10Refine,1;break;default:if(.@HDRefine)gotoHDRef7Armor;
close;}break;// Weaponscase3:case4:
mes "Making artificial hands is not my specialty.";if(.@HD10Refine)gotoHDRef10Weapon;switch(.@equipRefLevel){case4:case5:if(.@HDRefine)gotoHDRef7Weapon;set.@certId,.SafeTo6WeaponCertificate;// Safe to 6 Weaponset.@reqOre,.NormalOridecon;// Normal Orideconbreak;case6:if(.@HDRefine)gotoHDRef7Weapon;set.@certId,.SafeTo7WeaponCertificate;// Safe to 7 Weaponset.@reqOre,.NormalOridecon;// Normal Orideconbreak;case7:HDRef7Weapon:if(countitem(.SafeTo8WeaponCertificate)){set.@certId,.SafeTo8WeaponCertificate;// Safe to 8 Weaponset.@reqOre,.NormalOridecon;// Normal Oridecon}else{set.@reqOre,.HDOridecon;// HD Orideconset.@HDRefine,1;}break;case8:if(countitem(.SafeTo9WeaponCertificate)){set.@certId,.SafeTo9WeaponCertificate;// Safe to 9 Weaponset.@reqOre,.NormalOridecon;// Normal Oridecon}else{set.@reqOre,.HDOridecon;// HD Orideconset.@HDRefine,1;}break;case9:set.@certId,.SafeTo10WeaponCertificate;// Safe to 10 Certset.@reqOre,.HDOridecon;// HD Orideconbreak;case10:HDRef10Weapon:set.@reqOre,.HDBradium;set.@HD10Refine,1;break;default:if(.@HDRefine)gotoHDRef7Weapon;
close;}break;/* No case for refining other equipments parts/slots.
case 7:
case 8:
case 9:
case 10:
*/default:
mes "What do you want me to refine?";
close;}set.@zenyCost,(.equipRefLevel<10)?.NormalRefineCost:.HD10RefineCost;// Amount of Zeny to be consumed.set.@totalOres,countitem(.@reqOre);if(.@certId){if(!countitem(.@certId)||!.@totalOres)set.@attempts,0;elseif(.@certId){set.@totalCerts,countitem(.@certId);set.@offset,.@totalCerts-.@totalOres;if(.@offset<0).@offset*=-1;set.@attempts,(.@totalCerts+.@totalOres-.@offset)/2;}}elseset.@attempts,.@totalOres;set.@successRate,getequippercentrefinery(.@part);
mes "Attempts remaining: ^000099"+.@attempts+"^000000";
mes "Item : ^990000+"+.@equipRefLevel+"^000000 ^009900"+getequipname(.@part)+"^000000";
mes "Success chance : "+.@successRate+"%";
mes "can be upgraded with -";if(.@equipRefLevel<10){
mes "^009900"+getitemname(.@equipLv?.NormalOridecon:.NormalElunium)+"^000000 : ^FF0000UNSAFE - BREAK^000000!";
mes "^009900"+getitemname(.@equipLv?.HDOridecon:.HDElunium)+"^000000 : ^FF0000UNSAFE -^000000 ^000099DEGRADE^000000!";
mes "Required Zeny - "+callfunc("int__",.@zenyCost)+"z";}else{
mes "^009900"+getitemname(.@equipLv?.HDBradium:.HDCarnium)+"^000000 : ^FF0000UNSAFE -^000000 ^000099DEGRADE^000000!";}
next;set.@option$,(.@certId?(getitemname(.@certId)+" and "):"")+"1 "+getitemname(.@reqOre);if(select(.@option$,"Please stop")==2){
mes .@name$;
mes "Well that is your choice.";
close;}elseif(!.@attempts){
mes .@name$;
mes "Didn't you say you have everything ready?";
mes "1 "+getitemname(.@reqOre);if(.@certId) mes "and 1 "+getitemname(.@certId)+".";
close;}else{if(Zeny<.@zenyCost){
mes .@name$;
mes "I thought you said you were ready!";
mes "You don't have enough Zeny for the upgrade.";
next;
mes .@name$;
mes "Have at least "+callfunc("int__",.@zenyCost)+"z in your inventory.";
close;}// Consume requirements
dispbottom "1 "+getitemname(.@reqOre)+" has been consumed.";
delitem .@reqOre,1;
dispbottom callfunc("int__",.@zenyCost)+"z has been consumed.";setZeny,Zeny-.@zenyCost;// Process refineif(.@successRate> rand(100)){
successrefitem .@part;
emotion e_no1;
mes .@name$;
mes "Did I not tell you that I'm worth it?";
mes "I have refined your item successfully, without a scratch.";
next;}else{// Consume cert if requiredif(.@certId) delitem .@certId,1;
mes .@name$;
mes "By odin's beard... I hadn't expected a negative outcome.";
emotion (!rand(5))?e_cash:e_omg;if(.@certId){
mes "But with your certificate, the item stays safe.";
specialeffect2 155;// Failed Refine Effect}elseif(.@equipRefLevel!=10){// Do not degrade if refine level is less than 10.
mes "I'm sorry! your item has downgraded by 1 refine level.";
downrefitem .@part,1;}else specialeffect2 155;// Failed Refine Effect
mes "May be my next attempt will be a success, please try again.";
next;}gotoRefineStart;}OnStarteffect:
specialeffect 154;
sleep 10000; specialeffect 154;gotoOnStarteffect;
end;OnInit:set.NormalOridecon,984;set.NormalElunium,985;set.HDOridecon,6240;set.HDElunium,6241;set.HDCarnium,6225;set.HDBradium,6226;// Safe Armor Certificatesset.SafeTo6ArmorCertificate,6235;set.SafeTo7ArmorCertificate,6234;set.SafeTo8ArmorCertificate,6233;set.SafeTo9ArmorCertificate,6232;set.SafeTo10ArmorCertificate,6457;// Safe Weapon Certificatesset.SafeTo6WeaponCertificate,6231;set.SafeTo7WeaponCertificate,6230;set.SafeTo8WeaponCertificate,6229;set.SafeTo9WeaponCertificate,6228;set.SafeTo10WeaponCertificate,6457;// same as armorset.HD10RefineCost,100000;set.NormalRefineCost,50000;gotoOnStarteffect;
end;}
Question
LearningRO
i got wrong place equip type
how to fix it
thx

Edited by melv01 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.