|
@@ -3,7 +3,7 @@
|
|
//===== By: ==================================================
|
|
//===== By: ==================================================
|
|
//= rAthena Dev Team
|
|
//= rAthena Dev Team
|
|
//===== Current Version: =====================================
|
|
//===== Current Version: =====================================
|
|
-//= 1.1
|
|
|
|
|
|
+//= 1.2
|
|
//===== Compatible With: =====================================
|
|
//===== Compatible With: =====================================
|
|
//= rAthena SVN
|
|
//= rAthena SVN
|
|
//===== Description: =========================================
|
|
//===== Description: =========================================
|
|
@@ -12,20 +12,22 @@
|
|
//= 1.0 Moved some scripts to Renewal file, optimized "Austry" NPC. [Euphy]
|
|
//= 1.0 Moved some scripts to Renewal file, optimized "Austry" NPC. [Euphy]
|
|
//= 1.0a Added 'disable_items' command. [Euphy]
|
|
//= 1.0a Added 'disable_items' command. [Euphy]
|
|
//= 1.1 Added Malangdo Refiner "Clink". [Euphy]
|
|
//= 1.1 Added Malangdo Refiner "Clink". [Euphy]
|
|
|
|
+//= 1.2 Added official success calculation, thanks to Helvetica.
|
|
|
|
+//= The safe/multiple refine feature is now functional. [Euphy]
|
|
//============================================================
|
|
//============================================================
|
|
|
|
|
|
// +11 and above Refiners
|
|
// +11 and above Refiners
|
|
//============================================================
|
|
//============================================================
|
|
prt_in,90,72,5 script Bestry#prt 826,{
|
|
prt_in,90,72,5 script Bestry#prt 826,{
|
|
- callfunc "refinenew","Bestry",0,0;
|
|
|
|
|
|
+ callfunc "refinenew","Bestry",0;
|
|
end;
|
|
end;
|
|
}
|
|
}
|
|
morocc_in,64,41,5 script Bestry#moc 826,{
|
|
morocc_in,64,41,5 script Bestry#moc 826,{
|
|
- callfunc "refinenew","Bestry",0,0;
|
|
|
|
|
|
+ callfunc "refinenew","Bestry",0;
|
|
end;
|
|
end;
|
|
}
|
|
}
|
|
payon_in01,18,132,3 script Bestry#pay 826,{
|
|
payon_in01,18,132,3 script Bestry#pay 826,{
|
|
- callfunc "refinenew","Bestry",0,0;
|
|
|
|
|
|
+ callfunc "refinenew","Bestry",0;
|
|
end;
|
|
end;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -37,10 +39,8 @@ payon_in01,18,132,3 script Bestry#pay 826,{
|
|
//= If you enable this function, be sure to edit the value of
|
|
//= If you enable this function, be sure to edit the value of
|
|
//= .@safe to the max safe refine in refine_db.txt as well.
|
|
//= .@safe to the max safe refine in refine_db.txt as well.
|
|
//=
|
|
//=
|
|
-//= The official script uses a command which seems to generate a
|
|
|
|
-//= random result upon refining: success, downgrade, or failure.
|
|
|
|
-//= To enable that feature, set the third argument to '1' in the
|
|
|
|
-//= function call. Otherwise, the chance in refine_db.txt is used.
|
|
|
|
|
|
+//= On official servers, if an item is unsuccessfully refined
|
|
|
|
+//= it will break at a 20% rate and downgrade at an 80% rate.
|
|
//============================================================
|
|
//============================================================
|
|
function script refinenew {
|
|
function script refinenew {
|
|
disable_items;
|
|
disable_items;
|
|
@@ -95,7 +95,12 @@ function script refinenew {
|
|
if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) {
|
|
if ((getequipweaponlv(.@part) >= 1) && (getequipweaponlv(.@part) <= 4)) {
|
|
set .@material,6224;
|
|
set .@material,6224;
|
|
set .@price,100000;
|
|
set .@price,100000;
|
|
- set .@safe,10;
|
|
|
|
|
|
+ switch(getequipweaponlv(.@part)) {
|
|
|
|
+ case 1: set .@safe,17; break;
|
|
|
|
+ case 2: set .@safe,16; break;
|
|
|
|
+ case 3: set .@safe,15; break;
|
|
|
|
+ case 4: set .@safe,14; break;
|
|
|
|
+ }
|
|
mes "["+ getarg(0) +"]";
|
|
mes "["+ getarg(0) +"]";
|
|
mes "Hmm a weapon, is that ok?";
|
|
mes "Hmm a weapon, is that ok?";
|
|
mes "If you want to refine this weapon,";
|
|
mes "If you want to refine this weapon,";
|
|
@@ -104,7 +109,7 @@ function script refinenew {
|
|
} else {
|
|
} else {
|
|
set .@material,6223;
|
|
set .@material,6223;
|
|
set .@price,100000;
|
|
set .@price,100000;
|
|
- set .@safe,10;
|
|
|
|
|
|
+ set .@safe,14;
|
|
mes "["+ getarg(0) +"]";
|
|
mes "["+ getarg(0) +"]";
|
|
mes "Hmm an armor, is that ok?";
|
|
mes "Hmm an armor, is that ok?";
|
|
mes "If you want to refine this armor,";
|
|
mes "If you want to refine this armor,";
|
|
@@ -170,19 +175,17 @@ function script refinenew {
|
|
mes "You switched the item while I wasn't looking! Get out of here!";
|
|
mes "You switched the item while I wasn't looking! Get out of here!";
|
|
close;
|
|
close;
|
|
}
|
|
}
|
|
- if(getarg(2) == 1){
|
|
|
|
- set .@rand,rand(1,3);
|
|
|
|
- if (.@rand == 1) {
|
|
|
|
- mes "Clang! Clang! Clang! Clang!";
|
|
|
|
- successrefitem .@part;
|
|
|
|
- next;
|
|
|
|
- emotion e_no1;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Good! Succes!!!";
|
|
|
|
- mes "I am the best Blacksmith.";
|
|
|
|
- close;
|
|
|
|
- }
|
|
|
|
- if (.@rand == 2) {
|
|
|
|
|
|
+ if (getequippercentrefinery(.@part) > rand(100)) {
|
|
|
|
+ mes "Clang! Clang! Clang! Clang!";
|
|
|
|
+ successrefitem .@part;
|
|
|
|
+ next;
|
|
|
|
+ emotion e_no1;
|
|
|
|
+ mes "["+ getarg(0) +"]";
|
|
|
|
+ mes "Good! Succes!!!";
|
|
|
|
+ mes "I am the best Blacksmith.";
|
|
|
|
+ close;
|
|
|
|
+ } else {
|
|
|
|
+ if (rand(100) < 80) {
|
|
mes "["+ getarg(0) +"]";
|
|
mes "["+ getarg(0) +"]";
|
|
mes "Clang! Clang! Clang! Clang!";
|
|
mes "Clang! Clang! Clang! Clang!";
|
|
downrefitem .@part;
|
|
downrefitem .@part;
|
|
@@ -200,72 +203,26 @@ function script refinenew {
|
|
mes "["+ getarg(0) +"]";
|
|
mes "["+ getarg(0) +"]";
|
|
mes "I will do a better job next time! Don't worry!";
|
|
mes "I will do a better job next time! Don't worry!";
|
|
close;
|
|
close;
|
|
|
|
+ } else {
|
|
|
|
+ mes "["+ getarg(0) +"]";
|
|
|
|
+ mes "Clang! Clang! Clang!";
|
|
|
|
+ failedrefitem .@part;
|
|
|
|
+ next;
|
|
|
|
+ emotion (!rand(5))?e_cash:e_omg;
|
|
|
|
+ mes "["+ getarg(0) +"]";
|
|
|
|
+ mes "Hmmm!";
|
|
|
|
+ next;
|
|
|
|
+ mes "["+ getarg(0) +"]";
|
|
|
|
+ mes "Oh my! I've failed to refine stuff...";
|
|
|
|
+ mes "I didn't mean it!";
|
|
|
|
+ mes "There could've been made an mistake even though I am the best ever.";
|
|
|
|
+ mes "It was out of my hands.";
|
|
|
|
+ next;
|
|
|
|
+ mes "["+ getarg(0) +"]";
|
|
|
|
+ mes "I will do a better job next time! Don't worry!";
|
|
|
|
+ close;
|
|
}
|
|
}
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Clang! Clang! Clang!";
|
|
|
|
- failedrefitem .@part;
|
|
|
|
- next;
|
|
|
|
- emotion (!rand(5))?e_cash:e_omg;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Hmmm!";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Oh my! I've failed to refine stuff...";
|
|
|
|
- mes "I didn't mean it!";
|
|
|
|
- mes "There could've been made an mistake even though I am the best ever.";
|
|
|
|
- mes "It was out of my hands.";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "I will do a better job next time! Don't worry!";
|
|
|
|
- close;
|
|
|
|
- }
|
|
|
|
- set .@rand,rand(100);
|
|
|
|
- if (getequippercentrefinery(.@part) > .@rand) {
|
|
|
|
- mes "Clang! Clang! Clang! Clang!";
|
|
|
|
- successrefitem .@part;
|
|
|
|
- next;
|
|
|
|
- emotion e_no1;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Good! Succes!!!";
|
|
|
|
- mes "I am the best Blacksmith.";
|
|
|
|
- close;
|
|
|
|
}
|
|
}
|
|
- if (getequippercentrefinery(.@part) < .@rand) {
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Clang! Clang! Clang! Clang!";
|
|
|
|
- downrefitem .@part;
|
|
|
|
- next;
|
|
|
|
- emotion (!rand(5))?e_cash:e_omg;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Ahhh!!!";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Oh my!";
|
|
|
|
- mes "The upgrade level has dropped...";
|
|
|
|
- mes "There could've been made an mistake even though I am the best ever.";
|
|
|
|
- mes "It was out of my hands.";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "I will do a better job next time! Don't worry!";
|
|
|
|
- close;
|
|
|
|
- }
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Clang! Clang! Clang!";
|
|
|
|
- failedrefitem .@part;
|
|
|
|
- next;
|
|
|
|
- emotion (!rand(5))?e_cash:e_omg;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Hmmm!";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Oh my! I've failed to refine stuff...";
|
|
|
|
- mes "I didn't mean it!";
|
|
|
|
- mes "There could've been made an mistake even though I am the best ever.";
|
|
|
|
- mes "It was out of my hands.";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "I will do a better job next time! Don't worry!";
|
|
|
|
- close;
|
|
|
|
}
|
|
}
|
|
// New +11 and above Refining Functions ========================
|
|
// New +11 and above Refining Functions ========================
|
|
if(getequiprefinerycnt(.@part) < .@safe) {
|
|
if(getequiprefinerycnt(.@part) < .@safe) {
|
|
@@ -280,13 +237,12 @@ function script refinenew {
|
|
set .@refinecnt,.@safe - getequiprefinerycnt(.@part);
|
|
set .@refinecnt,.@safe - getequiprefinerycnt(.@part);
|
|
break;
|
|
break;
|
|
case 2:
|
|
case 2:
|
|
- next;
|
|
|
|
mes "[" + getarg(0) + "]";
|
|
mes "[" + getarg(0) + "]";
|
|
mes "How many times would you like me to refine your item?";
|
|
mes "How many times would you like me to refine your item?";
|
|
next;
|
|
next;
|
|
input .@refinecnt;
|
|
input .@refinecnt;
|
|
set .@refinecheck,.@refinecnt + getequiprefinerycnt(.@part);
|
|
set .@refinecheck,.@refinecnt + getequiprefinerycnt(.@part);
|
|
- if (.@refinecnt < 1 || .@refinecheck > 10) {
|
|
|
|
|
|
+ if (.@refinecnt < 1 || .@refinecheck > 20) {
|
|
mes "[" + getarg(0) + "]";
|
|
mes "[" + getarg(0) + "]";
|
|
mes "I can't refine this item that many times.";
|
|
mes "I can't refine this item that many times.";
|
|
close;
|
|
close;
|
|
@@ -304,7 +260,6 @@ function script refinenew {
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case 3:
|
|
case 3:
|
|
- next;
|
|
|
|
mes "[" + getarg(0) + "]";
|
|
mes "[" + getarg(0) + "]";
|
|
mes "You said so... So be it.";
|
|
mes "You said so... So be it.";
|
|
close;
|
|
close;
|
|
@@ -338,20 +293,13 @@ function script refinenew {
|
|
mes "Get out before I stun you with my Hammer!!";
|
|
mes "Get out before I stun you with my Hammer!!";
|
|
close;
|
|
close;
|
|
}
|
|
}
|
|
- if(getarg(2) == 1){
|
|
|
|
- set .@rand,rand(1,3);
|
|
|
|
- if (.@rand == 1) {
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Clang! Clang! Clang! Clang!";
|
|
|
|
- successrefitem .@part;
|
|
|
|
- next;
|
|
|
|
- emotion e_no1;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Good! Succes!!!";
|
|
|
|
- mes "I am the best Blacksmith.";
|
|
|
|
- close;
|
|
|
|
- }
|
|
|
|
- if (.@rand == 2) {
|
|
|
|
|
|
+ if (getequippercentrefinery(.@part) > rand(100)) {
|
|
|
|
+ mes "Clang! Clang! Clang! Clang!";
|
|
|
|
+ successrefitem .@part;
|
|
|
|
+ set .@refinecnt,.@refinecnt - 1;
|
|
|
|
+ next;
|
|
|
|
+ } else {
|
|
|
|
+ if (rand(100) < 80) {
|
|
mes "["+ getarg(0) +"]";
|
|
mes "["+ getarg(0) +"]";
|
|
mes "Clang! Clang! Clang! Clang!";
|
|
mes "Clang! Clang! Clang! Clang!";
|
|
downrefitem .@part;
|
|
downrefitem .@part;
|
|
@@ -369,75 +317,31 @@ function script refinenew {
|
|
mes "["+ getarg(0) +"]";
|
|
mes "["+ getarg(0) +"]";
|
|
mes "I will do a better job next time! Don't worry!";
|
|
mes "I will do a better job next time! Don't worry!";
|
|
close;
|
|
close;
|
|
|
|
+ } else {
|
|
|
|
+ mes "["+ getarg(0) +"]";
|
|
|
|
+ mes "Clang! Clang! Clang!";
|
|
|
|
+ failedrefitem .@part;
|
|
|
|
+ next;
|
|
|
|
+ emotion (!rand(5))?e_cash:e_omg;
|
|
|
|
+ mes "["+ getarg(0) +"]";
|
|
|
|
+ mes "Hmmm!";
|
|
|
|
+ next;
|
|
|
|
+ mes "["+ getarg(0) +"]";
|
|
|
|
+ mes "Oh my! I've failed to refine stuff...";
|
|
|
|
+ mes "I didn't mean it!";
|
|
|
|
+ mes "There could've been made an mistake even though I am the best ever.";
|
|
|
|
+ mes "It was out of my hands.";
|
|
|
|
+ next;
|
|
|
|
+ mes "["+ getarg(0) +"]";
|
|
|
|
+ mes "I will do a better job next time! Don't worry!";
|
|
|
|
+ close;
|
|
}
|
|
}
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Clang! Clang! Clang!";
|
|
|
|
- failedrefitem .@part;
|
|
|
|
- next;
|
|
|
|
- emotion (!rand(5))?e_cash:e_omg;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Hmmm!";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Oh my! I've failed to refine stuff...";
|
|
|
|
- mes "I didn't mean it!";
|
|
|
|
- mes "There could've been made an mistake even though I am the best ever.";
|
|
|
|
- mes "It was out of my hands.";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "I will do a better job next time! Don't worry!";
|
|
|
|
- close;
|
|
|
|
- }
|
|
|
|
- set .@rand,rand(100);
|
|
|
|
- if (getequippercentrefinery(.@part) > .@rand) {
|
|
|
|
- mes "Clang! Clang! Clang! Clang!";
|
|
|
|
- successrefitem .@part;
|
|
|
|
- next;
|
|
|
|
- emotion e_no1;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Good! Succes!!!";
|
|
|
|
- mes "I am the best Blacksmith.";
|
|
|
|
- close;
|
|
|
|
}
|
|
}
|
|
- if (getequippercentrefinery(.@part) < .@rand) {
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Clang! Clang! Clang! Clang!";
|
|
|
|
- downrefitem .@part;
|
|
|
|
- next;
|
|
|
|
- emotion (!rand(5))?e_cash:e_omg;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Ahhh!!!";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Oh my!";
|
|
|
|
- mes "The upgrade level has dropped...";
|
|
|
|
- mes "There could've been made an mistake even though I am the best ever.";
|
|
|
|
- mes "It was out of my hands.";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "I will do a better job next time! Don't worry!";
|
|
|
|
- close;
|
|
|
|
- }
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Clang! Clang! Clang!";
|
|
|
|
- failedrefitem .@part;
|
|
|
|
- next;
|
|
|
|
- emotion (!rand(5))?e_cash:e_omg;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Hmmm!";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "Oh my! I've failed to refine stuff...";
|
|
|
|
- mes "I didn't mean it!";
|
|
|
|
- mes "There could've been made an mistake even though I am the best ever.";
|
|
|
|
- mes "It was out of my hands.";
|
|
|
|
- next;
|
|
|
|
- mes "["+ getarg(0) +"]";
|
|
|
|
- mes "I will do a better job next time! Don't worry!";
|
|
|
|
- close;
|
|
|
|
}
|
|
}
|
|
- mes "[" + getarg(0) + "]";
|
|
|
|
- mes "All finished... Come again soon.";
|
|
|
|
|
|
+ emotion e_no1;
|
|
|
|
+ mes "["+ getarg(0) +"]";
|
|
|
|
+ mes "Good! Succes!!!";
|
|
|
|
+ mes "I am the best Blacksmith.";
|
|
close;
|
|
close;
|
|
}
|
|
}
|
|
|
|
|