Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 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) {
- 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;
- }
- //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 .@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;
- }
- 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(1,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;
- }
- 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) {
- getitem 22006,1; //Temporal_Str_Boots_
- } else if (.@equip_id == 22001) {
- getitem 22009,1; //Temporal_Int_Boots_
- } else if (.@equip_id == 22002) {
- getitem 22010,1; //Temporal_Agi_Boots_
- } else if (.@equip_id == 22003) {
- getitem 22007,1; //Temporal_Vit_Boots_
- } else if (.@equip_id == 22004) {
- getitem 22008,1; //Temporal_Dex_Boots_
- } else if (.@equip_id == 22005) {
- getitem 22011,1; //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;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement