1/
if (.@card2 == 0) {// <-- condition == 1 => script continue (re-enchant)
if (.@max == 1) {// <-- max is always == 0 in your script
mes "[Hugin's Magic Master]"; //Custom text
mes "Your shoes have reached the maximum option to enchant.";
mes "Please bring me a new one if you want me to enchant again.";
close;
} else {
2/
set .@enchant,.@enchant4th[5];// .@enchant4th[5] unset in your Hugin's Craftsman NPC
@@ -110,8 +110,7 @@ glast_01,212,273,4 script Hugin's Magic Master 66,
.@card3 == .@enchant4th[3] || .@card3 == .@enchant4th[4] || .@card3 == .@enchant4th[5]) {
set .@card2,getequipcardid(.@part,2);
set .@cost,.@enchant_cost[4];
- if (.@card2 == 0) {
- if (.@max == 1) {
+ if (.@card2 > 0) {
mes "[Hugin's Magic Master]"; //Custom text
mes "Your shoes have reached the maximum option to enchant.";
mes "Please bring me a new one if you want me to enchant again.";
@@ -118,7 +117,7 @@ glast_01,212,273,4 script Hugin's Magic Master 66,
close;
} else {
//3rd slot random enchanting
- switch (.@card3) {
+ switch (.@card3) {
case 4822: //Fighting_Spirit7
case 4835: //Expert_Archer4
case 4826: //Spell5
@@ -125,7 +124,6 @@ glast_01,212,273,4 script Hugin's Magic Master 66,
case 4862: //MHP2
case 4881: //DelayafterAttack4Lv
case 4755: //Luck6
- set .@max,1;
set .@enchant,callfunc("F_Rand",4875,4876,4877,4878,4879,4880); //Bear's_Power,Runaway_Magic,Speed_Of_Light,Muscle_Fool,Hawkeye,Lucky_Day
mes "[Hugin's Magic Master]"; //Custom text
mes "Seems you already completed the best upgrade option in your 4th slot.";
@@ -154,11 +152,13 @@ glast_01,212,273,4 script Hugin's Magic Master 66,
mes "Thank you for believing in me.";
getitem2 .@equip_id,1,1,.@equip_refine,0,0,0,.@enchant,.@card3;
close;
- }
}
}
-
}
+ else {
+ mes "An unknown error has occurred.";
+ close;
+ }
//4th slot 2nd try enchanting
if (.@card3 == .@enchant1st[0])
set .@enchant,.@enchant2nd[0];
@@ -289,7 +289,7 @@ glast_01,210,270,8 script Hugin's Craftsman 726,{
mes "You must bring ^0000FF5 Temporal Crystal items^000000. Nothing is free you know...";
close;
}
- set .@random,rand(100,100);
+ set .@random,rand(100);
if (.@random <= 80) { //Custom rates
mes "[Hugin's Craftsman]";
mes "Arrggg, we failed. Better luck next time.";
@@ -301,10 +301,10 @@ glast_01,210,270,8 script Hugin's Craftsman 726,{
// Magic Copy
- set .@part,EQI_SHOES;
- set .@equip_refine,getequiprefinerycnt(.@part);
- set .@enchant,.@enchant4th[5];
- set .@card3,getequipcardid(.@part,3);
+ set .@part,EQI_SHOES;
+ set .@equip_refine,getequiprefinerycnt(.@part);
+ set .@enchant,getequipcardid(.@part,2);
+ set .@card3,getequipcardid(.@part,3);
mes "[Hugin's Craftsman]"; //Custom text