I tried so many days to fix this bug.. But still failed.. So, i give up to try fix it alone..
1. I manage to make we can add random bonus after upgrade 4th time.. So we can get 1 random bonus stone. But.. After we successfully upgrade.. We still can talk to this NPC.. And reset our upgrade into beginning and restart again and again..
2. I manage to fix the bug which player will get empty boot with slot.. Which supposed to have all upgraded.. Then.. I spend few hours to fix this.. And I manage to get it right.. But later I found out that when adding slot, we dont get the random stone bonus..
This 2 things I cant solved it by my own.. Hope someone can help me.. Below is my script :
// Merchant
//============================================================
glast_01,210,273,5 script Hugin's Buttler 69,{
disable_items;
if (MaxWeight - Weight < 1000) {
mes "Your bag is too heavy. Reduce some weight and come back.";
close;
}
mes "[Hugin's Buttler]";
mes "Bring Temporal Crystal items for various Temporal boots items. Pick something you want.";
next;
switch (select("Cancel","Buy Temporal Boots (Need 1 Temporal Crystal)","Upgrade Temporal Boots (Need 5 Temporal Crystals)")) {
case 1:
mes "[Hugin's Buttler]";
mes "Come back whenever you want.";
close;
case 2:
if (countitem(6607) > 0) {
mes "[Hugin's Buttler]";
mes "Take these Temporal Boots. We can upgrade your Temporal Boots with 5 Temporal Crystals.";
delitem 6607,1; //Temporal_Crystal
getitem 2499,1; //Temporal_Boots
close;
}
mes "[Hugin's Buttler]";
mes "You need more Temporal Crystals. Come back when you get some more Temporal Crystals during your travel through Old Glast Heim.";
close;
case 3:
set .@part,EQI_SHOES;
if (!getequipisequiped(.@part)) {
mes "[Hugin's Buttler]";
mes "Only the item you are wearing can be upgraded.";
mes "Wear the ^0000FFTemporal Boots^000000 you want to upgrade, and then talk to me once again.";
close;
}
if (isequipped(2499)) {
if (countitem(6607) > 4) {
mes "[Hugin's Buttler]";
mes "You can trade ^0000FF1 Temporal Boots and 5 Temporal Crystals^000000 for 1 of the following items. ^FF0000Previous refine rate will not be retained with these new ones^000000.";
next;
setarray .@type$[0],"Strength","Intelligence","Agility","Vitality","Dexterity","Lucky";
setarray .@equip_type[0],22000,22001,22002,22003,22004,22005;
set .@select,select("Cancel","Str Boots","Int Boots","Agi Boots","Vit Boots","Dex Boots","Luk Boots");
switch (.@select) {
case 1:
mes "[Hugin's Buttler]";
mes "Come back anytime you want.";
close;
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
mes "[Hugin's Buttler]";
mes "Are you sure about buying Temporal ^FF0000"+.@type$[.@select-2]+"^000000 Boots? There's no refunds.";
next;
if (select("Think again","Yes, I am sure.") == 2) {
mes "[Hugin's Buttler]";
mes "The boots have been upgraded as you want.";
delequip .@part;
delitem 6607,5; //Temporal_Crystal
getitem .@equip_type[.@select-2],1; //Temporal_Str_Boots,Temporal_Int_Boots,Temporal_Agi_Boots,Temporal_Vit_Boots,Temporal_Dex_Boots,Temporal_Luk_Boots
close;
}
mes "[Hugin's Buttler]";
mes "Ok, come back again when you are sure.";
close;
}
}
mes "[Hugin's Buttler]";
mes "Not enough Temporal Crystals. You need 5 Temporal Crystals to upgrade your item.";
close;
}
mes "[Hugin's Buttler]";
mes "You are not wearing the Temporal Boots. Talk to me once you're wearing them.";
close;
}
}
// Enchant and Socket NPC
//============================================================
glast_01,212,273,4 script Hugin's Magic Master 66,{
disable_items;
if (MaxWeight - Weight < 1000) {
mes "Your bag is too heavy. Reduce some weight and come back.";
close;
}
mes "[Hugin's Magic Master]";
mes "So you came to enchant the Temporal Boots. Be aware that Boots with sockets cannot be enchanted, and this upgrade is only possible for the boots you are wearing.";
next;
if (select("How does the enchanting work?","Give effect to my Temporal Boots") == 1) {
mes "[Hugin's Magic Master]";
mes "You can keep obtain ^0000FFCoagulated Spell^000000 through your travel times.";
next;
mes "[Hugin's Magic Master]";
mes "I can enchant your Temporal Boots items depands on the amount of that item. ^0000FFNot normal type boots^000000. Only possible for those 6 expanded version boots.";
next;
mes "[Hugin's Magic Master]";
mes "But, once you put a socket into the item, you cannot enchant it. Make sure to remember that.";
next;
mes "[Hugin's Magic Master]";
mes "I don't give out effect randomly. You can pick which effect you want for the item.";
next;
mes "[Hugin's Magic Master]";
mes "Of course it is for 4th slot only. You can have small effect at the start, and then the effect gets stronger.";
next;
mes "[Hugin's Magic Master]";
mes "To get to the final option upgrade, it will require way more Coagulated Spell items. Don't forget that.";
next;
mes "[Hugin's Magic Master]";
mes "Once the 4th slot completes the best option, you get to have a random bonus effect to the 3rd slot. With.. certain payment~";
next;
mes "[Hugin's Magic Master]";
mes "Also, you don't lose the item even if the enchant fails, we also guarantee keeping card and refine rate. But we can't initialize enchanting.";
next;
mes "[Hugin's Magic Master]";
mes "Phew...";
mes "Anyways, that's all for basic enchant information. Now you should see for yourself.";
close;
}
set .@part,EQI_SHOES;
if (!getequipisequiped(.@part)) {
mes "[Hugin's Magic Master]";
mes "Are you wearing the item?";
close;
}
set .@equip_id,getequipid(.@part);
set .@equip_name$,getequipname(.@part);
set .@card3,getequipcardid(.@part,3);
setarray .@enchant1st[0],4808,4832,4814,4741,4869,4752; //Fighting_Spirit4,Expert_Archer1,Spell2,Vitality2,DelayafterAttack1Lv,Luck3
setarray .@enchant2nd[0],4820,4833,4813,4742,4872,4753; //Fighting_Spirit5,Expert_Archer2,Spell3,Vitality3,DelayafterAttack2Lv,Luck4
setarray .@enchant3rd[0],4821,4834,4812,4861,4873,4754; //Fighting_Spirit6,Expert_Archer3,Spell4,MHP1,DelayafterAttack3Lv,Luck5
setarray .@enchant4th[0],4822,4835,4826,4862,4881,4755; //Fighting_Spirit7,Expert_Archer4,Spell5,MHP2,DelayafterAttack4Lv,Luck6
setarray .@enchant_cost[0],1,4,15,30,10;
switch (.@equip_id) {
case 22000: //Temporal_Str_Boots
case 22001: //Temporal_Int_Boots
case 22002: //Temporal_Agi_Boots
case 22003: //Temporal_Vit_Boots
case 22004: //Temporal_Dex_Boots
case 22005: //Temporal_Luk_Boots
if (!.@card3) { //4th slot 1st try enchanting
set .@cost,.@enchant_cost[0];
set .@number,1;
mes "[Hugin's Magic Master]";
mes "Want to enchant ^0000FF"+.@equip_name$+"^000000?";
mes "For the "+.@number+"st enchanting, you need ^0000FF"+.@cost+"^000000 Coagulated Spell items.";
next;
set .@select,select("Quit","Fighting Spirit","Archery","Spell","Vitality","Attack Speed","Lucky");
switch (.@select) {
case 1:
mes "[Hugin's Magic Master]";
mes "Ok, come back when you are ready.";
close;
case 2:
set .@enchant,.@enchant1st[.@select-2];
break;
case 3:
set .@enchant,.@enchant1st[.@select-2];
break;
case 4:
set .@enchant,.@enchant1st[.@select-2];
break;
case 5:
set .@enchant,.@enchant1st[.@select-2];
break;
case 6:
set .@enchant,.@enchant1st[.@select-2];
break;
case 7:
set .@enchant,.@enchant1st[.@select-2];
break;
}
} else {
if (.@card3 == .@enchant1st[0] || .@card3 == .@enchant1st[1] || .@card3 == .@enchant1st[2] ||
.@card3 == .@enchant1st[3] || .@card3 == .@enchant1st[4] || .@card3 == .@enchant1st[5]) {
set .@cost,.@enchant_cost[1];
set .@number,2;
} else if (.@card3 == .@enchant2nd[0] || .@card3 == .@enchant2nd[1] || .@card3 == .@enchant2nd[2] ||
.@card3 == .@enchant2nd[3] || .@card3 == .@enchant2nd[4] || .@card3 == .@enchant2nd[5]) {
set .@cost,.@enchant_cost[2];
set .@number,3;
} else if (.@card3 == .@enchant3rd[0] || .@card3 == .@enchant3rd[1] || .@card3 == .@enchant3rd[2] ||
.@card3 == .@enchant3rd[3] || .@card3 == .@enchant3rd[4] || .@card3 == .@enchant3rd[5]) {
set .@cost,.@enchant_cost[3];
set .@number,4;
} else if (.@card3 == .@enchant4th[0] || .@card3 == .@enchant4th[1] || .@card3 == .@enchant4th[2] ||
.@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) {
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 {
//3rd slot random enchanting
switch (.@card3) {
case 4822: //Fighting_Spirit7
case 4835: //Expert_Archer4
case 4826: //Spell5
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.";
mes "For that I can give a random bonus effect to your 3rd slot. And of course, with certain payment...";
next;
mes "[Hugin's Magic Master]";
mes "Enchanting ^0000FF"+.@equip_name$+"^000000's 3rd slot for obtaining a random bonus effect. Requires ^0000FF"+.@cost+"^000000 Coagulated Spell items.";
next;
if (select("Quit","Effect Upgrade!") == 1) {
mes "[Hugin's Magic Master]";
mes "Ok, come back when you are ready.";
close;
}
if (countitem(6608) < .@cost) {
mes "[Hugin's Magic Master]";
mes "Hmm, you are missing "+(.@cost - countitem(6608))+" Coagulated Spell items. Go get more, and then we can talk about more enchants.";
close;
}
specialeffect2 EF_REPAIRWEAPON;
set .@equip_refine,getequiprefinerycnt(.@part);
delitem 6608,.@cost; //Coagulated_Spell
delequip .@part;
mes "[Hugin's Magic Master]";
mes "This is it! This special stone is now yours.";
mes "Hahaha... I am really the only master of these things.";
mes "Thank you for believing in me.";
getitem2 .@equip_id,1,1,.@equip_refine,0,0,0,.@enchant,.@card3;
close;
}
}
}
}
//4th slot 2nd try enchanting
if (.@card3 == .@enchant1st[0])
set .@enchant,.@enchant2nd[0];
else if (.@card3 == .@enchant1st[1])
set .@enchant,.@enchant2nd[1];
else if (.@card3 == .@enchant1st[2])
set .@enchant,.@enchant2nd[2];
else if (.@card3 == .@enchant1st[3])
set .@enchant,.@enchant2nd[3];
else if (.@card3 == .@enchant1st[4])
set .@enchant,.@enchant2nd[4];
else if (.@card3 == .@enchant1st[5])
set .@enchant,.@enchant2nd[5];
//4th slot 3rd try enchanting
if (.@card3 == .@enchant2nd[0])
set .@enchant,.@enchant3rd[0];
else if (.@card3 == .@enchant2nd[1])
set .@enchant,.@enchant3rd[1];
else if (.@card3 == .@enchant2nd[2])
set .@enchant,.@enchant3rd[2];
else if (.@card3 == .@enchant2nd[3])
set .@enchant,.@enchant3rd[3];
else if (.@card3 == .@enchant2nd[4])
set .@enchant,.@enchant3rd[4];
else if (.@card3 == .@enchant2nd[5])
set .@enchant,.@enchant3rd[5];
//4th slot 4th try enchanting
if (.@card3 == .@enchant3rd[0])
set .@enchant,.@enchant4th[0];
else if (.@card3 == .@enchant3rd[1])
set .@enchant,.@enchant4th[1];
else if (.@card3 == .@enchant3rd[2])
set .@enchant,.@enchant4th[2];
else if (.@card3 == .@enchant3rd[3])
set .@enchant,.@enchant4th[3];
else if (.@card3 == .@enchant3rd[4])
set .@enchant,.@enchant4th[4];
else if (.@card3 == .@enchant3rd[5])
set .@enchant,.@enchant4th[5];
mes "[Hugin's Magic Master]";
mes "Enchanting ^0000FF"+.@equip_name$+"^000000's 4th slot as ^0000FF"+.@number+"^000000 level effect. Requires ^0000FF"+.@cost+"^000000 Coagulated Spell items.";
next;
if (select("Quit","Effect Upgrade!") == 1) {
mes "[Hugin's Magic Master]";
mes "Ok, come back when you are ready.";
close;
}
if (countitem(6608) < .@cost) {
mes "[Hugin's Magic Master]";
mes "Hmm, you are missing "+(.@cost - countitem(6608))+" Coagulated Spell items. Go get more, and then we can talk about more enchants.";
close;
}
}
break;
default:
mes "[Hugin's Magic Master]";
mes "This is not the right item for this enchant.";
mes "Remember, only those 6 types of Temporal Boots are available for enchanting.";
close;
}
specialeffect2 EF_REPAIRWEAPON;
set .@equip_refine,getequiprefinerycnt(.@part);
delitem 6608,.@cost; //Coagulated_Spell
delequip .@part;
mes "[Hugin's Magic Master]";
mes "Trying for enchant number ^630000"+.@number+"^000000.";
getitem2 .@equip_id,1,1,.@equip_refine,0,0,0,0,.@enchant;
close;
}
// ------------------------------ Hugin's Craftsman --------------------------------------- //
glast_01,210,270,8 script Hugin's Craftsman 726,{
disable_items;
if (MaxWeight - Weight < 1000) {
mes "Your bag is too heavy. Reduce some weight and come back.";
close;
}
mes "[Hugin's Craftsman]";
mes "That Magic Master always says that enchanting Temporal Boots is the best. But, I think quite different.";
next;
mes "[Hugin's Craftsman]";
mes "I think putting a slot into the item would be the best. Even with some risk of failing.";
next;
mes "[Hugin's Craftsman]";
mes "Bring me ^0000FF5 Temporal Crystals^000000, and I will try to put a slot into your advanced Temporal Boots. But, it's possible to ^FF0000fail and break the item^000000. Is that ok?";
next;
if (select("Cancel","Take the risk and try to add a slot") == 1) {
mes "[Hugin's Craftsman]";
mes "Ok, come back anytime you want.";
close;
}
set .@part,EQI_SHOES;
if (!getequipisequiped(.@part)) {
mes "[Hugin's Craftsman]";
mes "Are you sure you are wearing the item?";
close;
}
set .@equip_id,getequipid(.@part);
switch (.@equip_id) {
case 22000: //Temporal_Str_Boots
case 22001: //Temporal_Int_Boots
case 22002: //Temporal_Agi_Boots
case 22003: //Temporal_Vit_Boots
case 22004: //Temporal_Dex_Boots
case 22005: //Temporal_Luk_Boots
mes "[Hugin's Craftsman]";
mes "And ^FF0000all enchant or refine rates will be lost if you fail this.^000000";
mes "Still want to risk it?";
next;
if (select("Cancel","I am ok with it!") == 1) {
mes "[Hugin's Craftsman]";
mes "Ok, come back anytime you want.";
close;
}
mes "[Hugin's Craftsman]";
mes "Once again, ^FF0000That Magic Master won't enchant any item with a slot.^000000";
mes "Still want to proceed?";
next;
if (select("Cancel","I understand. Try to slot it.") == 1) {
mes "[Hugin's Craftsman]";
mes "Ok, come back anytime you want.";
close;
}
if (countitem(6607) < 5) {
mes "[Hugin's Craftsman]";
mes "You must bring ^0000FF5 Temporal Crystal items^000000. Nothing is free you know...";
close;
}
set .@random,rand(100,100);
if (.@random <= 80) { //Custom rates
mes "[Hugin's Craftsman]";
mes "Arrggg, we failed. Better luck next time.";
specialeffect2 EF_PHARMACY_FAIL;
delitem 6607,5; //Temporal_Crystal
delequip .@part;
close;
}
// Magic Copy
set .@part,EQI_SHOES;
set .@equip_refine,getequiprefinerycnt(.@part);
set .@enchant,.@enchant4th[5];
set .@card3,getequipcardid(.@part,3);
mes "[Hugin's Craftsman]"; //Custom text
mes "Yuhuu~ we succeed. Here you are...";
mes "A slot has been added to your advanced Temporal Boots.";
mes "Thank you for believing in me.";
specialeffect2 EF_PHARMACY_OK;
delitem 6607,5; //Temporal_Crystal
delequip .@part;
if (.@equip_id == 22000) {
getitem2 22006,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; //Temporal_Str_Boots_
} else if (.@equip_id == 22001) {
getitem2 22009,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; //Temporal_Int_Boots_
} else if (.@equip_id == 22002) {
getitem2 22010,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; //Temporal_Agi_Boots_
} else if (.@equip_id == 22003) {
getitem2 22007,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; //Temporal_Vit_Boots_
} else if (.@equip_id == 22004) {
getitem2 22008,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; //Temporal_Dex_Boots_
} else if (.@equip_id == 22005) {
getitem2 22011,1,1,.@equip_refine,0,0,0,.@enchant,.@card3; //Temporal_Luk_Boots_
}
close;
default:
mes "[Hugin's Craftsman]";
mes "This is not it! We need ^0000FFAdvanced Temporal Boots^000000 items! The item ^0000FFwith a stat effect and without a slot^000000!";
close;
}
}
// Glast Heim Nightmare Mode :: nightmare_gh
//============================================================
glast_01,195,273,4 script Hugin's Follower#n_gh 123,{
mes "[Hugin's Follower]";
mes "I can't move between time and dimension like a master Hugin but I can pretend to move.";
next;
mes "[Hugin's Follower]";
mes "What about this Glast Heim is born with powerful dark force?";
next;
if (select("I don't care","That is interesting, please tell me more") == 1) {
mes "[Hugin's Follower]";
mes "Well~ If you are not interested in it, never mind.";
close;
}
mes "[Hugin's Follower]";
mes "As learning ability from Hugin, I just find out the path to Old Glast Heim of more powerful dark force.";
next;
mes "[Hugin's Follower]";
mes "How is it? Do you want to explore there?";
next;
if (select("No, I want to stop it","I really want to do that!") == 1) {
mes "[Hugin's Follower]";
mes "Well~ If you are not interested in it, never mind.";
close;
}
mes "[Hugin's Follower]";
mes "Sure that is not free~ I have to get something little bit. Hoho...";
next;
mes "[Hugin's Follower]";
mes "I can send you just two place. How is it? Do you want to try?";
next;
switch (select("Cancel","Monastery Cemetery (Lv100~130) - 5000z","Corridor of 2nd floor (Over Lv140) - 10000z")) {
case 1:
mes "[Hugin's Follower]";
mes "Alright, please come back whenever you change mind. I think you will have lots of thing to talk with me...";
close;
case 2:
if (Zeny < 5000) {
mes "[Hugin's Follower]";
mes "Please make sure you already have all of the money.";
close;
}
set Zeny,Zeny-5000;
warp "gl_chyard_",148,144;
end;
case 3:
if (Zeny < 10000) {
mes "[Hugin's Follower]";
mes "Please make sure you already have all of the money.";
close;
}
set Zeny,Zeny-10000;
warp "gl_cas02_",104,31;
end;
}
}
gl_chyard_,148,149,4 script Hugin's Follower#n_gh1 123,{
mes "[Hugin's Follower]";
mes "You want to break?";
mes "Ok, let's get out of here.?";
next;
if (select("Ah, wrong click... I mean I was not talk to you","Please let me out from here") == 1) {
mes "[Hugin's Follower]";
mes "Alright just tell me whenever you want to leave.";
close;
}
warp "glast_01",210,269;
end;
}
gl_cas02_,104,36,4 script Hugin's Follower#n_gh2 123,{
mes "[Hugin's Follower]";
mes "You want to break?";
mes "Ok, let's get out of here.?";
next;
if (select("Ah, wrong click... I mean I was not talk to you","Please let me out from here") == 1) {
mes "[Hugin's Follower]";
mes "Alright just tell me whenever you want to leave.";
close;
}
warp "glast_01",210,269;
end;
}
Question
rakuzas
Hi,
I tried so many days to fix this bug.. But still failed.. So, i give up to try fix it alone..
1. I manage to make we can add random bonus after upgrade 4th time.. So we can get 1 random bonus stone. But.. After we successfully upgrade.. We still can talk to this NPC.. And reset our upgrade into beginning and restart again and again..
2. I manage to fix the bug which player will get empty boot with slot.. Which supposed to have all upgraded.. Then.. I spend few hours to fix this.. And I manage to get it right.. But later I found out that when adding slot, we dont get the random stone bonus..
Edited by rakuzasThis 2 things I cant solved it by my own.. Hope someone can help me.. Below is my script :
Link to comment
Share on other sites
2 answers 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.