Hello! Is me LongLong
I have write (and copy) a script NPC Refine 100% +1 to +10 with item Ticket and .
Here is this:
prt_in,58,55,5 script Blacksmith 63,{
OnUsed:
set .EquipCheck,1; // Check Equips is refineable or not. [ 0 = Disable / 1 = Enable ]
set .@TicketID,503; // Ticket ID
mes "[blacksmith]";
mes "I'm the Blacksmith.";
mes "I can refine all kinds of weapons, armor and equipment, so let me";
mes "know what you want me to refine.";
next;
setarray .@position$[1], "^0000ffHead^000000","^0000ffBody^000000","^FF0000Left hand^000000","^FF0000Right hand^000000","^0000ffRobe^000000","^0000ffShoes^000000","Accessory 1","Accessory 2","^0000ffHead 2^000000","^0000ffHead 3^000000";
set .@menu$,"";
for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
{
if( getequipisequiped(.@i) )
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
set .@menu$, .@menu$ + ":";
}
set .@part,select(.@menu$);
if(!getequipisequiped(.@part)) {
mes "[blacksmith]";
mes "You're not wearing";
mes "anything there that";
mes "I can refine.";
emotion 6;
close;
}
//Check if the item is refinable...
if(!getequipisenableref(.@part)) {
mes "[blacksmith]";
mes "I don't think I can";
mes "refine this item at all...";
close;
}
//Check if the item is identified... (Don't know why this is in here... but kept it anyway)
if(!getequipisidentify(.@part)) {
mes "[blacksmith]";
mes "You can't refine this";
mes "if you haven't appraised";
mes "it first. Make sure your";
mes "stuff is identified before";
mes "I can refine it.";
close;
}
//Check to see if the items is already +10
if(getequiprefinerycnt(.@part) >= 10) {
mes "[blacksmith]";
mes "I can't refine this";
mes "any more. This is as";
mes "refined as it gets!";
close;
}
set .@refineitemid, getequipid(.@part); // save id of the item
set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count
switch(getequipweaponlv(.@part)){
case 0: //Refine Armor
set .@price,2000;
set .@material,985;
set .@safe,4;
break;
case 1: //Refine Level 1 Weapon
set .@price,50;
set .@material,1010;
set .@safe,7;
break;
case 2: //Refine Level 2 Weapon
set .@price,200;
set .@material,1011;
set .@safe,6;
break;
case 3: //Refine Level 3 Weapon
set .@price,5000;
set .@material,984;
set .@safe,5;
break;
case 4: //Refine Level 4 Weapon
set .@price,20000;
set .@material,984;
set .@safe,4;
break;
case 5: //Refine other stuff?
set .@price,2000;
set .@material,985;
set .@safe,4;
break;
}
if(.@features != 1) {
mes "[blacksmith]";
mes "To refine this I need";
mes "one ^FF0000"+getitemname(.@material)+"^000000, one ^0000ff"+getitemname(.@TicketID)+"^000000";
mes "and a service fee of ^0000ff" + .@price + " Zeny^000000.";
mes "Do you really wish to continue?";
next;
if(select("Yes:No") == 2){
mes "[blacksmith]";
mes "Yeah...";
mes "There's no need to";
mes "rush. Take your time.";
close;
}
if(getequippercentrefinery(.@part) < 100) {
mes "[blacksmith]";
mes "Oh no! If I continue to";
mes "refine this, there's a risk it could";
switch(.@material) {
case 985:
mes "be destroyed! That means that ^FF0000this equipment^000000, and ^FF0000any cards^000000 or special properties added to this armor, ^FF0000will be gone^000000.";
break;
default:
mes "be destroyed, and you'd ^FF0000lose the weapon^000000, any ^FF0000cards in the weapon^000000,";
mes "or any added special properties.";
break;
}
next;
mes "[blacksmith]";
mes "With one ^FF0000"+getitemname(.@TicketID)+"^000000.";
mes "I can refine all item";
mes "to success 100%. And I";
mes "^FF0000NEVER LOST ANY ITEM^000000.";
mes "So, Do you still want to refine?";
next;
if(select("Yes:No") == 2){
mes "[blacksmith]";
mes "I completely agree...";
mes "I might be a great refiner, but sometimes even I make mistakes.";
close;
}
}
if((countitem(.@material) < 1) || (countitem(.@TicketID) < 1) || (Zeny < .@price)) {
mes "[blacksmith]";
mes "You don't seem to have";
mes "enough ^0000ffZeny^000000, ^FF0000"+getitemname(.@material)+"^000000 or ^0000ff"+getitemname(.@TicketID)+"^000000...";
mes "Go get some more. I'll be";
mes "here all day if you need me.";
close;}
else {
mes "[blacksmith]";
successrefitem .@part;
set Zeny,Zeny-.@price;
delitem .@material,1;
if(getequippercentrefinery(.@part) < 100) {
delitem .@TicketID,1;
message strcharinfo(0),"The Equipments has been refined, Ticket will also be removed from your inventory.";}
Emotion e_heh;
set .@win,rand(1,3);
if (.@win == 1) {
mes "[blacksmith]";
mes "Perfect!";
mes "Heh heh!";
mes "Once again,";
mes "flawless work";
mes "from the master~";
} else if(.@win == 2) {
mes "[blacksmith]";
mes "Success...!";
mes "Yet again, my amazing";
mes "talent truly dazzles";
mes "and shines today.";
} else {
mes "[blacksmith]";
mes "Heh heh!";
mes "I'm all done.";
mes "No doubt, my work is";
mes "to your satisfaction.";
mes "Sheer, utter perfection~";
}
close;}
}
}
But i want equip refine have rate Success. if refine fail but u have Ticket item become to safe.
Eg: U have Weapon Lv 4 +4 => Refine if Success ok. => Got Weapon Lv 4 +5
Now u have Weapon Lv 4 +7 => Refine fail and u have Ticket => Got Weapon Lv 4 +4.
And if have multi Ticket with difference Special effects. Safe +7, safe +10, Safe +4, safe +0.
And what about "lucky charm" have 4 lucky charm: + 10%, +15%, +20%, +25%.
With Lucky Charm Success rate be come = rate refine_db + lucky charm = Success to refine equip.
Thank for read my topic. My ideas may be hard but i think we can do it. Thank again.
Blacksmith v1.0.txt