Jump to content
  • 0

Custom enchant script , +1 to +10 stats


Potatoe

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  01/20/13
  • Last Seen:  

I modify an enchant script to add shield enchant and random enchant +1 ~ +10 but don"t work and , npc appear but not the tchat screen

//============================================================
s_atelier,176,69,1 script Enchanteuse 73,{
if (Zeny > 399999) {
 mes "[Enchanteuse]";
 mes "I've been studying ways to enhance an armor to maximize it's capability.";
 next;
 mes "[Enchanteuse]";
 mes "Enchanting is an awesome skill that infuses a mysterious status power into the armor's hidden socket.";
 next;
 mes "[Enchanteuse]";
 mes "However, you have to keep in mind that if there are two armors of the same kind in your possession, the Enchantment will be applied in the order they are placed in your inventory.";
 next;
 mes "[Enchanteuse]";
 mes "In that case, the Enchantment may be applied to an item which you didn't mean to Enchant. So just bring ^5555ffONE Armor^000000 you want enchanted to be safe..";
 next;
 mes "[Enchanteuse]";
 mes "I'm not responsible for what would happen if you have more than one of the same kind in your inventory.";
 next;
 switch(select("Armures sans slot.:Armures avec slot.:Armure de haut grade.:Boucliers.:La prochaine fois peut-être.")) {
 case 1:
  switch(select("Mantle:Coat:Chain Mail:Full Plate:Silk Robe:Saint's Robe:Holy Robe:Wooden Mail:Tights:Silver Robe:Mage Coat:Thief Clothes:Legion Plate Armor:Lucius's Fierce Armor of Volcano:Saphien's Armor of Ocean:Aebeccee's Raging Typhoon Armor:Claytos Cracking Earth Armor:Ninja Suit:Chameleon Armor:Glorious Suit:Glorious Popularized Suit:Glorious Mass-Production Suit")) {
  case 1:
callsub S_EnchantArmor,2307,50;
  case 2:
callsub S_EnchantArmor,2309,50;
  case 3:
callsub S_EnchantArmor,2314,50;
  case 4:
callsub S_EnchantArmor,2316,50;
  case 5:
callsub S_EnchantArmor,2321,50;
  case 6:
callsub S_EnchantArmor,2325,50;
  case 7:
callsub S_EnchantArmor,2327,50;
  case 8:
callsub S_EnchantArmor,2328,50;
  case 9:
callsub S_EnchantArmor,2330,50;
  case 10:
callsub S_EnchantArmor,2332,50;
  case 11:
callsub S_EnchantArmor,2334,50;
  case 12:
callsub S_EnchantArmor,2335,50;
  case 13:
callsub S_EnchantArmor,2341,50;
  case 14:
callsub S_EnchantArmor,2344,50;
  case 15:
callsub S_EnchantArmor,2346,50;
  case 16:
callsub S_EnchantArmor,2348,50;
  case 17:
callsub S_EnchantArmor,2350,50;
  case 18:
callsub S_EnchantArmor,2337,50;
  case 19:
callsub S_EnchantArmor,2386,50;
  case 20:
callsub S_EnchantArmor,2394,50;
  case 21:
callsub S_EnchantArmor,2395,50;
  case 22:
callsub S_EnchantArmor,2396,50;
  }
 case 2:
  switch(select("Mink Coat:Lord's Clothes:Glittering Jacket:Formal Suit:Mantle(1):Coat(1):Chain Mail(1):Full Plate(1):Silk Robe(1):Scapulare(1):Saint's Robe(1):Tights(1):Silver Robe(1):Thief Clothes(1):Legion Plate Armor(1):Lucius's Fierce Armor of Volcano(1):Saphien's Armor of Ocean(1):Aebeccee's Raging Typhoon Armor(1):Claytos Cracking Earth Armor(1):Pantie")) {
  case 1:
callsub S_EnchantArmor,2311,55;
  case 2:
callsub S_EnchantArmor,2318,55;
  case 3:
callsub S_EnchantArmor,2319,55;
  case 4:
callsub S_EnchantArmor,2320,55;
  case 5:
callsub S_EnchantArmor,2308,55;
  case 6:
callsub S_EnchantArmor,2310,55;
  case 7:
callsub S_EnchantArmor,2315,55;
  case 8:
callsub S_EnchantArmor,2317,55;
  case 9:
callsub S_EnchantArmor,2322,55;
  case 10:
callsub S_EnchantArmor,2324,55;
  case 11:
callsub S_EnchantArmor,2326,55;
  case 12:
callsub S_EnchantArmor,2331,55;
  case 13:
callsub S_EnchantArmor,2333,55;
  case 14:
callsub S_EnchantArmor,2336,55;
  case 15:
callsub S_EnchantArmor,2342,55;
  case 16:
callsub S_EnchantArmor,2345,55;
  case 17:
callsub S_EnchantArmor,2347,55;
  case 18:
callsub S_EnchantArmor,2349,55;
  case 19:
callsub S_EnchantArmor,2351,55;
  case 20:
callsub S_EnchantArmor,2371,55;
  }
 case 3:
  switch(select("Meteor Plate Armor:Orlean's Gown:Life Link:Diablos Robe:Diablos Armor:Assaulter Plate:Elite Engineer Armor:Assassin Robe:Warlock's Battle Robe:Medic's Robe:Elite Archer Suit:Elite Shooter Suit:Sprint Mail:Kandura:Armor of Naga:Improved Tights")) {
  case 1:
callsub S_EnchantArmor,2364,60;
  case 2:
callsub S_EnchantArmor,2365,60;
  case 3:
callsub S_EnchantArmor,2391,60;
  case 4:
callsub S_EnchantArmor,2374,60;
  case 5:
callsub S_EnchantArmor,2375,60;
  case 6:
callsub S_EnchantArmor,2376,60;
  case 7:
callsub S_EnchantArmor,2377,60;
  case 8:
callsub S_EnchantArmor,2378,60;
  case 9:
callsub S_EnchantArmor,2379,60;
  case 10:
callsub S_EnchantArmor,2380,60;
  case 11:
callsub S_EnchantArmor,2381,60;
  case 12:
callsub S_EnchantArmor,2382,60;
  case 13:
callsub S_EnchantArmor,2387,60;
  case 14:
callsub S_EnchantArmor,2388,60;
  case 15:
callsub S_EnchantArmor,2389,60;
  case 16:
callsub S_EnchantArmor,2390,60;
  }
 case 4:
  switch(select("Novice Shield:Valkyrja's Shield")) {
  case 1:
callsub S_EnchantArmor,2113,60;
  case 2:
callsub S_EnchantArmor,2115,60;
  }
 case 5:
  mes "[Enchanteuse]";
  mes "Reviens quand tu veux.";
  close;
 }
}
else {
 mes "[Enchanteuse]";
 mes "I am in charge of Enchanting Armors. Simply put, I've been studying ways to power-up armor.";
 next;
 mes "[Enchanteuse]";
 mes "Si par hasard tu veux enchanter ton équipement, donne moi 400,000 zeny et l'objet que tu veux enchanter.";
 close;
}
S_EnchantArmor:
set .@itemid,getarg(0);
set .@failrate,getarg(1);
if ((countitem(.@itemid) > 0) && (countitem(.@itemid) < 2)) {
 mes "[Enchanteuse]";
 mes "L'enchantement te coûtera 400,000 zeny. Tu auras un enchantement aléatoire et une chance de détruire ton équipement.";
 next;
 mes "[Enchanteuse]";
 mes "First and most importantly.";
 mes "^ff5555L'upgrade actuel de ton équipement";
 mes "et les cartes dedans disparaitrons.^000000";
 mes "Tu veux toujours enchanter ton équipement?";
 next;
 switch(select("Laissez moi réfléchir.:C'est parti!")) {
 case 1:
  mes "[Enchanteuse]";
  mes "Comme tu voudras.";
  mes "Passe une bonne journée.";
  close;
 case 2:
  mes "[Enchanteuse]";
  mes "Quel type d'enchantement veux-tu?";
  next;
  switch(select("Str:Agi:Vit:Int:Dex:Luk")) {
  case 1:
mes "[Enchanteuse]";
mes "Tu as tout d'un aventurier, hein? Eh bien, allons-y?";
close2;
specialeffect2 EF_MAPPILLAR;
if (Zeny < 400000) {
 mes "[Enchanteuse]";
 mes "Désolé mais tu n'as pas assez de Zeny.";
 close;
}
progressbar "ffff00",7;
set .@enc_ran,rand(1,.@failrate);
set zeny,zeny-400000;
delitem .@itemid,1;
if (.@enc_ran == 1) {
 set .@addpart,4700;
}
else if (.@enc_ran == 2) {
 set .@addpart,4701;
}
else if (.@enc_ran == 3) {
 set .@addpart,4702;
}
else if (.@enc_ran == 4) {
 set .@addpart,4703;
}
else if (.@enc_ran == 5) {
 set .@addpart,4704;
}
else if (.@enc_ran == 6) {
 set .@addpart,4705;
}
else if (.@enc_ran == 7) {
 set .@addpart,4706;
}
else if (.@enc_ran == 8) {
 set .@addpart,4707;
}
else if (.@enc_ran == 9) {
 set .@addpart,4708;
}
else if (.@enc_ran == 10) {
 set .@addpart,4709;
}
else {
 specialeffect2 EF_PHARMACY_FAIL;
 mes "[Enchanteuse]";
 mes "Ah mince!";
 mes "L'enchantement à raté , désolé.";
 close;
}
getitem2 .@itemid, 1, 1, 0, 0, 0, 0, 0, .@addpart;
  }
  case 2:
mes "[Enchanteuse]";
mes "Tu as tout d'un aventurier, hein? Eh bien, allons-y?";
close2;
specialeffect2 EF_MAPPILLAR;
if (Zeny < 400000) {
 mes "[Enchanteuse]";
 mes "Désolé mais tu n'as pas assez de Zeny.";
 close;
}
progressbar "ffff00",7;
set .@enc_ran,rand(1,.@failrate);
set zeny,zeny-400000;
delitem .@itemid,1;
if (.@enc_ran == 1) {
 set .@addpart,4730;
}
else if (.@enc_ran == 2) {
 set .@addpart,4731;
}
else if (.@enc_ran == 3) {
 set .@addpart,4732;
}
else if (.@enc_ran == 4) {
 set .@addpart,4733;
}
else if (.@enc_ran == 5) {
 set .@addpart,4734;
}
else if (.@enc_ran == 6) {
 set .@addpart,4735;
}
else if (.@enc_ran == 7) {
 set .@addpart,4736;
}
else if (.@enc_ran == 8) {
 set .@addpart,4737;
}
else if (.@enc_ran == 9) {
 set .@addpart,4738;
}
else if (.@enc_ran == 10) {
 set .@addpart,4739;
}
else {
 specialeffect2 EF_PHARMACY_FAIL;
 mes "[Enchanteuse]";
 mes "Ah mince!";
 mes "L'enchantement à raté , désolé.";
 close;
}
getitem2 .@itemid, 1, 1, 0, 0, 0, 0, 0, .@addpart;
  }  
  case 3:
mes "[Enchanteuse]";
mes "Tu as tout d'un aventurier, hein? Eh bien, allons-y?";
close2;
specialeffect2 EF_MAPPILLAR;
if (Zeny < 400000) {
 mes "[Enchanteuse]";
 mes "Désolé mais tu n'as pas assez de Zeny.";
 close;
}
progressbar "ffff00",7;
set .@enc_ran,rand(1,.@failrate);
set zeny,zeny-400000;
delitem .@itemid,1;
if (.@enc_ran == 1) {
 set .@addpart,4740;
}
else if (.@enc_ran == 2) {
 set .@addpart,4741;
}
else if (.@enc_ran == 3) {
 set .@addpart,4742;
}
else if (.@enc_ran == 4) {
 set .@addpart,4743;
}
else if (.@enc_ran == 5) {
 set .@addpart,4744;
}
else if (.@enc_ran == 6) {
 set .@addpart,4745;
}
else if (.@enc_ran == 7) {
 set .@addpart,4746;
}
else if (.@enc_ran == 8) {
 set .@addpart,4747;
}
else if (.@enc_ran == 9) {
 set .@addpart,4748;
}
else if (.@enc_ran == 10) {
 set .@addpart,4749;
}
else {
 specialeffect2 EF_PHARMACY_FAIL;
 mes "[Enchanteuse]";
 mes "Ah mince!";
 mes "L'enchantement à raté , désolé.";
 close;
}
getitem2 .@itemid, 1, 1, 0, 0, 0, 0, 0, .@addpart;
  }  
  case 4:
mes "[Enchanteuse]";
mes "Tu as tout d'un aventurier, hein? Eh bien, allons-y?";
close2;
specialeffect2 EF_MAPPILLAR;
if (Zeny < 400000) {
 mes "[Enchanteuse]";
 mes "Désolé mais tu n'as pas assez de Zeny.";
 close;
}
progressbar "ffff00",7;
set .@enc_ran,rand(1,.@failrate);
set zeny,zeny-400000;
delitem .@itemid,1;
if (.@enc_ran == 1) {
 set .@addpart,4710;
}
else if (.@enc_ran == 2) {
 set .@addpart,4711;
}
else if (.@enc_ran == 3) {
 set .@addpart,4712;
}
else if (.@enc_ran == 4) {
 set .@addpart,4713;
}
else if (.@enc_ran == 5) {
 set .@addpart,4714;
}
else if (.@enc_ran == 6) {
 set .@addpart,4715;
}
else if (.@enc_ran == 7) {
 set .@addpart,4716;
}
else if (.@enc_ran == 8) {
 set .@addpart,4717;
}
else if (.@enc_ran == 9) {
 set .@addpart,4718;
}
else if (.@enc_ran == 10) {
 set .@addpart,4719;
}
else {
 specialeffect2 EF_PHARMACY_FAIL;
 mes "[Enchanteuse]";
 mes "Ah mince!";
 mes "L'enchantement à raté , désolé.";
 close;
}
getitem2 .@itemid, 1, 1, 0, 0, 0, 0, 0, .@addpart;
  }  
  case 5:
mes "[Enchanteuse]";
mes "Tu as tout d'un aventurier, hein? Eh bien, allons-y?";
close2;
specialeffect2 EF_MAPPILLAR;
if (Zeny < 400000) {
 mes "[Enchanteuse]";
 mes "Désolé mais tu n'as pas assez de Zeny.";
 close;
}
progressbar "ffff00",7;
set .@enc_ran,rand(1,.@failrate);
set zeny,zeny-400000;
delitem .@itemid,1;
if (.@enc_ran == 1) {
 set .@addpart,4720;
}
else if (.@enc_ran == 2) {
 set .@addpart,4721;
}
else if (.@enc_ran == 3) {
 set .@addpart,4722;
}
else if (.@enc_ran == 4) {
 set .@addpart,4723;
}
else if (.@enc_ran == 5) {
 set .@addpart,4724;
}
else if (.@enc_ran == 6) {
 set .@addpart,4725;
}
else if (.@enc_ran == 7) {
 set .@addpart,4726;
}
else if (.@enc_ran == 8) {
 set .@addpart,4727;
}
else if (.@enc_ran == 9) {
 set .@addpart,4728;
}
else if (.@enc_ran == 10) {
 set .@addpart,4729;
}
else {
 specialeffect2 EF_PHARMACY_FAIL;
 mes "[Enchanteuse]";
 mes "Ah mince!";
 mes "L'enchantement à raté , désolé.";
 close;
}
getitem2 .@itemid, 1, 1, 0, 0, 0, 0, 0, .@addpart;
  }
  case 6:
mes "[Enchanteuse]";
mes "Tu as tout d'un aventurier, hein? Eh bien, allons-y?";
close2;
specialeffect2 EF_MAPPILLAR;
if (Zeny < 400000) {
 mes "[Enchanteuse]";
 mes "Désolé mais tu n'as pas assez de Zeny.";
 close;
}
progressbar "ffff00",7;
set .@enc_ran,rand(1,.@failrate);
set zeny,zeny-400000;
delitem .@itemid,1;
if (.@enc_ran == 1) {
 set .@addpart,4750;
}
else if (.@enc_ran == 2) {
 set .@addpart,4751;
}
else if (.@enc_ran == 3) {
 set .@addpart,4752;
}
else if (.@enc_ran == 4) {
 set .@addpart,4753;
}
else if (.@enc_ran == 5) {
 set .@addpart,4754;
}
else if (.@enc_ran == 6) {
 set .@addpart,4755;
}
else if (.@enc_ran == 7) {
 set .@addpart,4756;
}
else if (.@enc_ran == 8) {
 set .@addpart,4757;
}
else if (.@enc_ran == 9) {
 set .@addpart,4758;
}
else if (.@enc_ran == 10) {
 set .@addpart,4759;
}
else {
 specialeffect2 EF_PHARMACY_FAIL;
 mes "[Enchanteuse]";
 mes "Ah mince!";
 mes "L'enchantement à raté , désolé.";
 close;
}
getitem2 .@itemid, 1, 1, 0, 0, 0, 0, 0, .@addpart;
  }  
 }
}
else {
 mes "[Enchanteuse]";
 mes "Hmm? There's nothing to be enchanted!";
 mes "Please come back with just ONE equipment to be enchanted.";
 close;
}
}

Edited by Potatoe
use [codebox] if the script > 10 lines
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  01/30/19
  • Last Seen:  

Hi, may I know how do I modify the script into upgrading refinements for the players step by step from +1 stats to +10 stats with different success rate and failed rate? Because I have added this npc into my server but it will straight away upgraded into +10 stats and skipped from the below refinements between +1 stats to +9 stats but turn up to the max +10 stats once it's successful upgraded. 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

Try using this script, It works fine with me :)

http://rathena.org/board/topic/61734-custom-enchantment-system/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  01/20/13
  • Last Seen:  

It's a good one but i need to get only // str+1~10 , agi+1~10, vit+1~10,int+1~10,dex+1~10,luk+1~10

i've try to modify the other script but someting wrong again ...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

Try editing the item(stone) that gives +1~10 str etc... check your item_db

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  01/20/13
  • Last Seen:  

I've said i already do it , but not work


if (.@class_type == 1) { set .@class_type$, "Str"; set .@rand_bonus, rand(4700,4709); }
else if (.@class_type == 2) { set .@class_type$, "Agi"; set .@rand_bonus, rand(4730,4739); }
else if (.@class_type == 3) { set .@class_type$, "Vit"; set .@rand_bonus, rand(4740,4749); }
else if (.@class_type == 4) { set .@class_type$, "Int"; set .@rand_bonus, rand(4710,4719); }
else if (.@class_type == 5) { set .@class_type$, "Dex"; set .@rand_bonus, rand(4720,4729); }
else if (.@class_type == 6) { set .@class_type$, "Luk"; set .@rand_bonus, rand(4750,4759); }

But not work

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  01/20/13
  • Last Seen:  

How to explain me propely , i want this npc : http://rathena.org/b...antment-system/

With only // str+1~10 , agi+1~10, vit+1~10,int+1~10,dex+1~10,luk+1~10

And without "Mvp enchant selection and Gm selection"

It's work when i keep "mvp section and Gm selection" but don't work when i delete it...

and i need to keep the enchant for ALL armors , i'm not awesome with script modification , but i learn if u can help me , will be cool

The actually working script with only stats modification ON :

[/font][/color]
//===== rAthena Script ============================================
//= Enchantment System
//===== By: =======================================================
//= Kenedos
//===== Current Version: ==========================================
//= 1.0
//===== Compatible With: ==========================================
//= rAthena SQL/TXT
//===== Description: ==============================================
//= Uses the 2nd, 3rd and 4th slot on armors (headgears, footgears
//= garments, shields and armors) to add extra bonus status and
//= diverse attributes.
//===== Topic =====================================================
//= Unknown
//===== Additional Comments: ======================================
//= BE WARNED : The use of decarder NPCs, Sign your Name on items
//= NPCs and any other kind of NPC that make use of the extra armor
//= slots will bug this whole system. Also make sure every armor
//= in your server only have 1 slot at max, otherwise it will also
//= cause unexpected behaviour.
//=
//= If you wish to change the GM level to access the command menu,
//= just find the command "getgmlevel()" in this script.
//= It is located a few lines bellow the header.
//=
//= If you wish to change the cost for the Power Stones, look for
//= the "MvP Power Stone Conversion Table" in the end of the script.
//=================================================================

zhakastia,94,55,3 script Special Enchanter#r1 64,{

mes "["+strnpcinfo(1)+"]";
if (Sex)
mes "Hello sir ^0000FF"+strcharinfo(0)+"^000000, how may I help you?";
else
mes "Hello lady ^0000FF"+strcharinfo(0)+"^000000, how may I help you?";
next;
if (getgmlevel() < 80)
set .@menu, select("Enchant:Information:Trade MvP Misc Items");
else {
set .@menu, select("Enchant:Information:Trade MvP Misc Items:^FF0000GM Special Enchant^000000");
if (.@menu == 4) {
set .@gmlevel, 1;
goto L_EnchantLoc;
}
}
if (.@menu == 2) {
mes "["+strnpcinfo(1)+"]";
mes "Aah so you are looking information about the ^009900New Special Enchantment System^000000? Very well, I shall answer you. What's the matter?";
next;
while (1) {
set .@menu, select("Prices:General:Chances:Bonuses:MvP Special Enchanting");
if (.@menu == 2) {
mes "["+strnpcinfo(1)+"]";
mes "The ^009900Special Enchantment System^000000 is rather simple, first, you show me your currently equipped gear, then I will show you a list of everything I can try to enchant.";
next;
mes "["+strnpcinfo(1)+"]";
mes "I can only work on ^FF0000Armors^000000, ^FF0000Footgears^000000, ^FF0000Upper Headgears^000000, ^FF0000Garments^000000 and ^FF0000Shields.^000000";
next;
mes "["+strnpcinfo(1)+"]";
mes "Each refine attempt will cost you some ^0000FFZeny^000000, depending on which slot you wish to try. You can have three enchantments at total per equipment piece, one in each slot.";
next;
mes "["+strnpcinfo(1)+"]";
mes "Enchantments in the ^0000FFSame Slot^000000 will ^FF0000Overplace^000000 currently existing ones, so be carefull not to choose the wrong slot!";
next;
mes "["+strnpcinfo(1)+"]";
mes "Enchantments obviously, give you bonuses such as statuses, Hp, Sp, and many other bonuses depending on what type of enchantment you choose.";
next;
mes "["+strnpcinfo(1)+"]";
mes "You can choose an enchantment for a specific type of class, but not necessarily that enchantment will be restricted only to that class. After choosing a class, the specific enchantment will be given randomly.";
next;
mes "["+strnpcinfo(1)+"]";
mes "You can collect ^009900MvP Special Misc Items^000000 to trade them in for better enchantments, or making you able to choose one enchantment instead of giving it randomly. But be aware, those type of enchantments will be more costy!";
next;
}
else if (.@menu == 1) {
mes "["+strnpcinfo(1)+"]";
mes "The prices depend on which enchanting slot you pick.";
mes "1st Slot - ^0000FF500,000z^000000";
mes "2nd Slot - ^0000FF1,000,000z^000000";
mes "3rd Slot - ^0000FF2,000,000z^000000";
mes "MvP Special Enchanting - ^0000FF10,000,000z^000000";
next;
mes "["+strnpcinfo(1)+"]";
mes "Note that the MvP Special Enchanting does not depend on the slot number, it's a fixed price.";
mes "If an enchantment fail, I'm sorry but you won't be refunded.";
next;
}
else if (.@menu == 3) {
mes "["+strnpcinfo(1)+"]";
mes "The chances depend on which enchanting slot you pick.";
mes "1st Slot - ^0000FF80% Success^000000";
mes "2nd Slot - ^0000FF70% Success^000000";
mes "3rd Slot - ^0000FF60% Success^000000";
mes "MvP Special Enchanting - ^0000FF50% Success^000000";
next;
mes "["+strnpcinfo(1)+"]";
mes "^0000FFAttention^000000, when an enchantment fail, the equipment will be completely ^0000FFDestroyed^000000.";
mes "The MvP Special Enchanting has a fixed chance, that means, even if you attempt to do it in the first slot, the chance will always be 50%.";
next;
}
else if (.@menu == 4) {
mes "["+strnpcinfo(1)+"]";
mes "Once you succeed enchanting, you will get a bonus for the slot you chose. Upon choosing a class, the chance to get each random bonus for that class is exactly the same.";
next;
mes "["+strnpcinfo(1)+"]";
mes "The class type just helps you getting a good bonus for you, but you are not obligated to follow it. Every class can benefit from every class bonus. Now, Tell me a class, and i'll show you the available bonuses for it.";
next;
set .@menu2, select("Str:Agi:Vit:Int:Dex:Luk");
if (.@menu2 == 1) {
mes "["+strnpcinfo(1)+"]";
mes "^0000FFSTR+1^000000";
mes "^0000FFSTR+2^000000";
mes "^0000FFSTR+3^000000";
mes "^0000FFSTR+4^000000";
mes "^0000FFSTR+5^000000";
mes "^0000FFSTR+6^000000";
mes "^0000FFSTR+7^000000";
mes "^0000FFSTR+8^000000";
mes "^0000FFSTR+9^000000";
mes "^0000FFSTR+10^000000";
next;
}
else if (.@menu2 == 2) {
mes "["+strnpcinfo(1)+"]";
mes "^0000FFAGI+1^000000";
mes "^0000FFAGI+2^000000";
mes "^0000FFAGI+3^000000";
mes "^0000FFAGI+4^000000";
mes "^0000FFAGI+5^000000";
mes "^0000FFAGI+6^000000";
mes "^0000FFAGI+7^000000";
mes "^0000FFAGI+8^000000";
mes "^0000FFAGI+9^000000";
mes "^0000FFAGI+10^000000";
next;
}
else if (.@menu2 == 3) {
mes "["+strnpcinfo(1)+"]";
mes "^0000FFVIT+1^000000";
mes "^0000FFVIT+2^000000";
mes "^0000FFVIT+3^000000";
mes "^0000FFVIT+4^000000";
mes "^0000FFVIT+5^000000";
mes "^0000FFVIT+6^000000";
mes "^0000FFVIT+7^000000";
mes "^0000FFVIT+8^000000";
mes "^0000FFVIT+9^000000";
mes "^0000FFVIT+10^000000";
next;
}
else if (.@menu2 == 4) {
mes "["+strnpcinfo(1)+"]";
mes "^0000FFINT+1^000000";
mes "^0000FFINT+2^000000";
mes "^0000FFINT+3^000000";
mes "^0000FFINT+4^000000";
mes "^0000FFINT+5^000000";
mes "^0000FFINT+6^000000";
mes "^0000FFINT+7^000000";
mes "^0000FFINT+8^000000";
mes "^0000FFINT+9^000000";
mes "^0000FFINT+10^000000";
next;
}
else if (.@menu2 == 5) {
mes "["+strnpcinfo(1)+"]";
mes "^0000FFDEX+1^000000";
mes "^0000FFDEX+2^000000";
mes "^0000FFDEX+3^000000";
mes "^0000FFDEX+4^000000";
mes "^0000FFDEX+5^000000";
mes "^0000FFDEX+6^000000";
mes "^0000FFDEX+7^000000";
mes "^0000FFDEX+8^000000";
mes "^0000FFDEX+9^000000";
mes "^0000FFDEX+10^000000";
next;
}
else if (.@menu2 == 6) {
mes "["+strnpcinfo(1)+"]";
mes "^0000FFLUK+1^000000";
mes "^0000FFLUK+2^000000";
mes "^0000FFLUK+3^000000";
mes "^0000FFLUK+4^000000";
mes "^0000FFLUK+5^000000";
mes "^0000FFLUK+6^000000";
mes "^0000FFLUK+7^000000";
mes "^0000FFLUK+8^000000";
mes "^0000FFLUK+9^000000";
mes "^0000FFLUK+10^000000";
next;
}
}
else if (.@menu == 5) {
mes "["+strnpcinfo(1)+"]";
mes "So you are talking about big stuff now, eh? ^009900MvP Special Enchanting^000000 is very difficult for me, therefore ^FF0000Any^000000 MvP Special enchantments will have a fixed price of 5,000,000z and a (80% - 10% * Slot Number) chance of success.";
next;
mes "["+strnpcinfo(1)+"]";
mes "That means, it doesn't matter if it's in the first, second or third slots, the chance will always be the same. As well as the price.";
next;
mes "["+strnpcinfo(1)+"]";
mes "Oh and I almost forgot, obviously, you must bring me the ^009900MvP Special Misc Items^000000, so I can trade them for ^0000FFUnique Power Stones^000000.";
next;
mes "["+strnpcinfo(1)+"]";
mes "Those ^0000FFUnique Power Stones^000000 are made from the extract of an MvP's power, meaning the more powerful the MvP is, the more ^0000FFUnique Power Stones^000000 it can give you.";
next;
mes "["+strnpcinfo(1)+"]";
mes "Here, I'll give you a list of every ^009900MvP Special Misc Items^000000 you can get, as well as how many ^0000FFUnique Power Stones^000000 they would give you...";
next;
mes "["+strnpcinfo(1)+"]";
mes "^009900U.P.S^000000 = ^0000FFUnique Power Stones^000000";
callfunc("c_enchant_mvplist",1);
next;
mes "["+strnpcinfo(1)+"]";
mes "So now you must be wondering what you can do with those stones, well it's simple. Each ^0000FFUnique Power Stone^000000 can be traded for one normal enchantment, but by using a power stone, you can choose the specific enchantment!";
next;
mes "["+strnpcinfo(1)+"]";
mes "That means, you can choose precisely what you want, meaning if you had enough power stones, you could have all the best enchantments you could ever get!";
next;
mes "["+strnpcinfo(1)+"]";
mes "But not just that, the ^0000FFUnique Power Stones^000000 magic are so strong, that if you get ^FF0000Three^000000 of them together, you can try to make a ^0000FFMvP Unique Enchantment^000000";
next;
mes "["+strnpcinfo(1)+"]";
mes "The chance is (60% - 10% * Slot Number) and zeny cost for those enchantments is always 1000000z, no matter the slot. The biggest difference is that their given bonus is completely different from the rest.";
next;
mes "["+strnpcinfo(1)+"]";
mes "If it succeeds, it will give you one of the following bonuses, note that the bonuses cannot be chosen specifically this time! They will be given randomly!";
next;
mes "["+strnpcinfo(1)+"]";
mes "^0000FFUnique MHp+4%/MSp+4%^000000";
mes "^0000FFUnique MHp+6%/MSp+6%^000000";
mes "^0000FFUnique STR+3/VIT+3/DEX+3^000000";
mes "^0000FFUnique STR+3/AGI+3/LUK+3^000000";
mes "^0000FFUnique DEX+3/VIT+3/LUK+3^000000";
mes "^0000FFUnique INT+3/VIT+3/DEX+3^000000";
mes "^0000FFUnique INT+3/STR+3/AGI+3^000000";
mes "^0000FFUnique DEF+4/MDEF+4^000000";
mes "^0000FFUnique DEF+6/MDEF+6^000000";
mes "^0000FFUnique DaAgi Reflect5%^000000";
mes "^0000FFUnique DaAgi Reflect7%^000000";
mes "^0000FFUnique P.DaAgi+5%/MATK+5%^000000";
mes "^0000FFUnique P.DaAgi+7%/MATK+7%^000000";
mes "^0000FFUnique Skill/Spell Delay-7%^000000";
mes "^0000FFUnique Skill/Spell Delay-9%^000000";
mes "^0000FFUnique DEF/MDEF Ignore+3%^000000";
mes "^0000FFUnique DEF/MDEF Ignore+6%^000000";
mes "^0000FFUnique ASPD+5%/Cast Time-5%^000000";
mes "^0000FFUnique ASPD+7%/Cast Time-7%^000000";
mes "^0000FFUnique Skill/Spell Sp Cost-5%^000000";
mes "^0000FFUnique Skill/Spell Sp Cost-7%^000000";
next;
}
}
}
else if (.@menu == 3) {

callfunc("c_enchant_mvplist",0);
mes "["+strnpcinfo(1)+"]";
mes "There, I gave you all the power stones I could, please come back with more ^009900MvP Misc Items^000000 later!";
close;

}
else if (.@menu == 1) {

L_EnchantLoc:
mes "["+strnpcinfo(1)+"]";
mes "Select an equipment first, then I'll ask you the ^FF0000Enchantment Type^000000, ^FF0000Class Type^000000 (If necessary), ^0000FFSlot Number^000000, and give you the final ^009900Zeny Cost^000000 for my services.";
next;
setarray .@position$[1], "Headgear","Armor","Shield","Invalid","Garment","Footgear";
set .@menu$,"";
deletearray .@arr;
set .@j, 1;
for( set .@i,1; .@i <= 6; set .@i,.@i+1 )
{
if ((.@i == 3) && (getiteminfo(getequipid(3),5) == 32) && (getequipisequiped(.@i))) { // Only catch shields
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
set .@arr[.@j], .@i;
set .@j, .@j + 1;
set .@menu$, .@menu$ + ":";
}
if(getequipisequiped(.@i) && (.@i != 4) && (.@i != 3)) {
set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
set .@arr[.@j], .@i;
set .@j, .@j + 1;
set .@menu$, .@menu$ + ":";
}


}

if (.@menu$ == "") {
mes "["+strnpcinfo(1)+"]";
mes "Errr wait. Oh Sorry but you must have armors equipped to enchant them!";
close;
}

// Calibrating menu
set .@part, select(.@menu$);
if (.@arr[.@part] == 1)
set .@part, 1;
else if (.@arr[.@part] == 2)
set .@part, 2;
else if (.@arr[.@part] == 3)
set .@part, 3;
else if (.@arr[.@part] == 5)
set .@part, 5;
else if (.@arr[.@part] == 6)
set .@part, 6;

if (.@gmlevel) goto L_SelectSlot;

// Selecting Types
set .@menu, select("Normal Enchantment:MvP Special Enchantment");
if (.@menu == 1) {
set .@enchant_type, 0;
}
else {
set .@menu, select ("Specific Normal Enchant:Random Unique Enchant");
if (.@menu == 1)
set .@enchant_type,1;
else
set .@enchant_type,2;
}

// Class Types
if (.@enchant_type == 0)
set .@class_type, select("Str:Agi:Vit:Int:Dex:Luk");


// Selecting Slots
L_SelectSlot:
set .@slot_num, 0;
set .@slot_num, select("1st Slot:2nd Slot:3rd Slot");
if ((.@slot_num <= 0) || (.@slot_num > 3)) {
mes "["+strnpcinfo(1)+"]";
mes "Sorry but you must select a valid slot number.";
close;
}

// Gm Option Select
if (.@gmlevel) set .@enchant_type, 1;

// Special Specific Enchant Selection
if (.@enchant_type == 1) {
L_SelectEnc:
mes "["+strnpcinfo(1)+"]";
mes "Please now select the specific enchantment. First you choose the class type, then you select the specific enchant.";
next;
set .@menu$, "";
set .@selected_bonus, 0;
if (.@gmlevel) {

set .@menu2, select("Str:Agi:Vit:Int:Dex:Luk:^FF0000MvP Special Enchant^000000");
if (.@menu2 == 7) {
set .@menu$, "^0000FFUnique MHp+4%/MSp+4%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique MHp+6%/MSp+6%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique STR+3/VIT+3/DEX+3^000000";
set .@menu$, .@menu$ + ":^0000FFUnique STR+3/AGI+3/LUK+3^000000";
set .@menu$, .@menu$ + ":^0000FFUnique DEX+3/VIT+3/LUK+3^000000";
set .@menu$, .@menu$ + ":^0000FFUnique INT+3/VIT+3/DEX+3^000000";
set .@menu$, .@menu$ + ":^0000FFUnique INT+3/STR+3/AGI+3^000000";
set .@menu$, .@menu$ + ":^0000FFUnique DEF+4/MDEF+4^000000";
set .@menu$, .@menu$ + ":^0000FFUnique DEF+6/MDEF+6^000000";
set .@menu$, .@menu$ + ":^0000FFUnique DaAgi Reflect5%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique DaAgi Reflect7%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique P.DaAgi+5%/MATK+5%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique P.DaAgi+7%/MATK+7%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique Skill/Spell Delay-7%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique Skill/Spell Delay-9%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique DEF/MDEF Ignore+3%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique DEF/MDEF Ignore+6%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique ASPD+5%/Cast Time-5%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique ASPD+7%/Cast Time-7%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique Skill/Spell Sp Cost-5%^000000";
set .@menu$, .@menu$ + ":^0000FFUnique Skill/Spell Sp Cost-7%^000000";
set .@selected_bonus, select(.@menu$) + 25126;
next;
}
}
else {
set .@menu2, select("Str:Agi:Vit:Int:Dex:Luk");
}
if (.@menu2 == 1) {
set .@menu$, "^0000FFStr STR+1^000000";
set .@menu$, .@menu$ + ":^0000FFStr STR+2^000000";
set .@menu$, .@menu$ + ":^0000FFStr VIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFStr VIT+2^000000";
set .@menu$, .@menu$ + ":^0000FFStr VIT+3^000000";
set .@menu$, .@menu$ + ":^0000FFStr STR+1/VIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFStr STR+2/VIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFStr STR+1/VIT+2^000000";
set .@menu$, .@menu$ + ":^0000FFStr MHp+1%^000000";
set .@menu$, .@menu$ + ":^0000FFStr MHp+2%^000000";
set .@menu$, .@menu$ + ":^0000FFStr ATK+5^000000";
set .@menu$, .@menu$ + ":^0000FFStr ATK+10^000000";
set .@menu$, .@menu$ + ":^0000FFStr ATK+15^000000";
set .@menu$, .@menu$ + ":^0000FFStr PhysicalReduction+1%^000000";
set .@menu$, .@menu$ + ":^0000FFStr DaAgi+1%^000000";
set .@menu$, .@menu$ + ":^0000FFStr DaAgi+2%^000000";
set .@menu$, .@menu$ + ":^0000FFStr DEF+1^000000";
set .@menu$, .@menu$ + ":^0000FFStr DEF+2^000000";
set .@selected_bonus, select(.@menu$) + 24999;
next;
}
else if (.@menu2 == 2) {
set .@menu$, "^0000FFAgi INT+1^000000";
set .@menu$, .@menu$ + ":^0000FFAgi INT+2^000000";
set .@menu$, .@menu$ + ":^0000FFAgi INT+3^000000";
set .@menu$, .@menu$ + ":^0000FFAgi DEX+1^000000";
set .@menu$, .@menu$ + ":^0000FFAgi DEX+2^000000";
set .@menu$, .@menu$ + ":^0000FFAgi INT+1/DEX+1^000000";
set .@menu$, .@menu$ + ":^0000FFAgi INT+1/DEX+2^000000";
set .@menu$, .@menu$ + ":^0000FFAgi INT+2/DEX+1^000000";
set .@menu$, .@menu$ + ":^0000FFAgi MSp+1%^000000";
set .@menu$, .@menu$ + ":^0000FFAgi MSp+2%^000000";
set .@menu$, .@menu$ + ":^0000FFAgi MSp+3%^000000";
set .@menu$, .@menu$ + ":^0000FFAgi Matk+1%^000000";
set .@menu$, .@menu$ + ":^0000FFAgi Matk+2%^000000";
set .@menu$, .@menu$ + ":^0000FFAgi Cast-2%^000000";
set .@menu$, .@menu$ + ":^0000FFAgi Cast-4%^000000";
set .@menu$, .@menu$ + ":^0000FFAgi MdefIgnore+1%^000000";
set .@menu$, .@menu$ + ":^0000FFAgi MdefIgnore+2%^000000";
set .@menu$, .@menu$ + ":^0000FFAgi MDEF+1^000000";
set .@menu$, .@menu$ + ":^0000FFAgi MDEF+2^000000";
set .@menu$, .@menu$ + ":^0000FFAgi MDEF+3^000000";
set .@selected_bonus, select(.@menu$) + 25017;
next;
}
else if (.@menu2 == 3) {
set .@menu$, "^0000FFVit AGI+1^000000";
set .@menu$, .@menu$ + ":^0000FFVit AGI+2^000000";
set .@menu$, .@menu$ + ":^0000FFVit AGI+3^000000";
set .@menu$, .@menu$ + ":^0000FFVit LUK+1^000000";
set .@menu$, .@menu$ + ":^0000FFVit LUK+2^000000";
set .@menu$, .@menu$ + ":^0000FFVit AGI+1/LUK+1^000000";
set .@menu$, .@menu$ + ":^0000FFVit AGI+1/LUK+2^000000";
set .@menu$, .@menu$ + ":^0000FFVit AGI+2/LUK+1^000000";
set .@menu$, .@menu$ + ":^0000FFVit CRIT+2^000000";
set .@menu$, .@menu$ + ":^0000FFVit CRIT+4^000000";
set .@menu$, .@menu$ + ":^0000FFVit CRIT+6^000000";
set .@menu$, .@menu$ + ":^0000FFVit FLEE+3^000000";
set .@menu$, .@menu$ + ":^0000FFVit FLEE+6^000000";
set .@menu$, .@menu$ + ":^0000FFVit FLEE+9^000000";
set .@menu$, .@menu$ + ":^0000FFVit DaAgi+2%/MHp-1%^000000";
set .@menu$, .@menu$ + ":^0000FFVit DaAgi+4%/MHp-2%^000000";
set .@menu$, .@menu$ + ":^0000FFVit P.Dodge+1^000000";
set .@menu$, .@menu$ + ":^0000FFVit P.Dodge+2^000000";
set .@menu$, .@menu$ + ":^0000FFVit ASPD+1%^000000";
set .@menu$, .@menu$ + ":^0000FFVit ASPD+2%^000000";
set .@menu$, .@menu$ + ":^0000FFVit ASPD+3%^000000";
set .@selected_bonus, select(.@menu$) + 25037;
next;
}
else if (.@menu2 == 4) {
set .@menu$, "^0000FFInt DEX+1^000000";
set .@menu$, .@menu$ + ":^0000FFInt DEX+2^000000";
set .@menu$, .@menu$ + ":^0000FFInt DEX+3^000000";
set .@menu$, .@menu$ + ":^0000FFInt AGI+1^000000";
set .@menu$, .@menu$ + ":^0000FFInt AGI+2^000000";
set .@menu$, .@menu$ + ":^0000FFInt AGI+3^000000";
set .@menu$, .@menu$ + ":^0000FFInt AGI+1/DEX+1^000000";
set .@menu$, .@menu$ + ":^0000FFInt AGI+1/DEX+2^000000";
set .@menu$, .@menu$ + ":^0000FFInt AGI+2/DEX+1^000000";
set .@menu$, .@menu$ + ":^0000FFInt CRIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFInt CRIT+2^000000";
set .@menu$, .@menu$ + ":^0000FFInt CRIT+3^000000";
set .@menu$, .@menu$ + ":^0000FFInt FLEE+3^000000";
set .@menu$, .@menu$ + ":^0000FFInt FLEE+6^000000";
set .@menu$, .@menu$ + ":^0000FFInt FLEE+9^000000";
set .@menu$, .@menu$ + ":^0000FFInt BowDaAgi+2%^000000";
set .@menu$, .@menu$ + ":^0000FFInt BowDaAgi+3%^000000";
set .@menu$, .@menu$ + ":^0000FFInt Hit+2^000000";
set .@menu$, .@menu$ + ":^0000FFInt Hit+4^000000";
set .@menu$, .@menu$ + ":^0000FFInt Hit+6^000000";
set .@menu$, .@menu$ + ":^0000FFInt ASPD+1%^000000";
set .@menu$, .@menu$ + ":^0000FFInt ASPD+2%^000000";
set .@selected_bonus, select(.@menu$) + 25058;
next;
}
else if (.@menu2 == 5) {
set .@menu$, "^0000FFDex STR+1^000000";
set .@menu$, .@menu$ + ":^0000FFDex STR+2^000000";
set .@menu$, .@menu$ + ":^0000FFDex STR+3^000000";
set .@menu$, .@menu$ + ":^0000FFDex VIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFDex AGI+1^000000";
set .@menu$, .@menu$ + ":^0000FFDex AGI+2^000000";
set .@menu$, .@menu$ + ":^0000FFDex STR+1/AGI+1/VIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFDex STR+2/AGI+1/VIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFDex STR+1/AGI+2/VIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFDex MHp+1%^000000";
set .@menu$, .@menu$ + ":^0000FFDex ATK+3/STR+1^000000";
set .@menu$, .@menu$ + ":^0000FFDex ATK+6/STR+1^000000";
set .@menu$, .@menu$ + ":^0000FFDex ATK+9/STR+2^000000";
set .@menu$, .@menu$ + ":^0000FFDex Greed1^000000";
set .@menu$, .@menu$ + ":^0000FFDex Greed2^000000";
set .@menu$, .@menu$ + ":^0000FFDex Greed3^000000";
set .@menu$, .@menu$ + ":^0000FFDex FireResist+3%^000000";
set .@menu$, .@menu$ + ":^0000FFDex FireResist+6%^000000";
set .@menu$, .@menu$ + ":^0000FFDex EarthResist+2%^000000";
set .@menu$, .@menu$ + ":^0000FFDex EarthResist+4%^000000";
set .@menu$, .@menu$ + ":^0000FFDex ASPD+1%^000000";
set .@menu$, .@menu$ + ":^0000FFDex ASPD+2%^000000";
set .@selected_bonus, select(.@menu$) + 25080;
next;
}
else if (.@menu2 == 6) {
set .@menu$, "^0000FFLuk INT+1^000000";
set .@menu$, .@menu$ + ":^0000FFLuk INT+2^000000";
set .@menu$, .@menu$ + ":^0000FFLuk VIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFLuk VIT+2^000000";
set .@menu$, .@menu$ + ":^0000FFLuk DEX+1^000000";
set .@menu$, .@menu$ + ":^0000FFLuk INT+1/DEX+1/VIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFLuk INT+1/DEX+1/VIT+2^000000";
set .@menu$, .@menu$ + ":^0000FFLuk INT+2/DEX+1/VIT+1^000000";
set .@menu$, .@menu$ + ":^0000FFLuk MHp+1%^000000";
set .@menu$, .@menu$ + ":^0000FFLuk MSp+1%^000000";
set .@menu$, .@menu$ + ":^0000FFLuk MSp+2%^000000";
set .@menu$, .@menu$ + ":^0000FFLuk Matk+1%^000000";
set .@menu$, .@menu$ + ":^0000FFLuk Heal+2%^000000";
set .@menu$, .@menu$ + ":^0000FFLuk Heal+3%^000000";
set .@menu$, .@menu$ + ":^0000FFLuk Heal+4%^000000";
set .@menu$, .@menu$ + ":^0000FFLuk DEF+1/MDEF+1^000000";
set .@menu$, .@menu$ + ":^0000FFLuk DEF+1/MDEF+2^000000";
set .@menu$, .@menu$ + ":^0000FFLuk DEF+1/MDEF+3^000000";
set .@menu$, .@menu$ + ":^0000FFLuk SPRegen1/INT+1^000000";
set .@menu$, .@menu$ + ":^0000FFLuk SPRegen2/INT+1^000000";
set .@menu$, .@menu$ + ":^0000FFLuk SPRegen3/INT+1^000000";
set .@menu$, .@menu$ + ":^0000FFLuk PhysicalReduction+1%^000000";
set .@menu$, .@menu$ + ":^0000FFLuk RangedReduction+1%^000000";
set .@menu$, .@menu$ + ":^0000FFLuk RangedReduction+2%^000000";
set .@selected_bonus, select(.@menu$) + 25102;
next;
}
set .@selected_enchant, .@menu;
set .@menu, 0;
}

// Giving Zeny Cost, and Chance
set .@equip_cardid, getequipcardid(.@part,(4 - .@slot_num));
set .@itemid, getequipid(.@part);
if (countitem(.@itemid) > 1) {
mes "["+strnpcinfo(1)+"]";
mes "Ah, looks like you have more than one of the same item in your inventory, I'm sorry but you must store them first before proceeding.";
close;
}
mes "["+strnpcinfo(1)+"]";
if (.@equip_cardid <= 0)
mes "So far so good, please confirm your enchantment.";
else
mes "Please confirm your enchantment. ^FF0000Overplaced old effects will be lost^000000";

// First Enchantment Type ------------------------------------------------------------------------------------------------
if (.@enchant_type == 0) {

// Confirmation
// The random bonus is given before the actual success... But it's hidden, obviously.
if (.@class_type == 1) { set .@class_type$, "Str"; set .@rand_bonus, rand(4700,4709); }
else if (.@class_type == 2) { set .@class_type$, "Agi"; set .@rand_bonus, rand(4730,4739); }
else if (.@class_type == 3) { set .@class_type$, "Vit"; set .@rand_bonus, rand(4740,4749); }
else if (.@class_type == 4) { set .@class_type$, "Int"; set .@rand_bonus, rand(4710,4719); }
else if (.@class_type == 5) { set .@class_type$, "Dex"; set .@rand_bonus, rand(4720,4729); }
else if (.@class_type == 6) { set .@class_type$, "Luk"; set .@rand_bonus, rand(4750,4759); }
if (.@slot_num == 1) set .@zeny_cost, 500000;
else if (.@slot_num == 2) set .@zeny_cost, 1000000;
else if (.@slot_num == 3) set .@zeny_cost, 2000000;
mes "^0000FFEquip^000000 = "+getitemname(.@itemid);
mes "^0000FFChance^000000 = "+(90 - (10*.@slot_num))+"%";
mes "^0000FFSlot Number^000000 = "+( (.@slot_num == 1) ? "1st Slot" : (.@slotnum == 2 ? "2nd Slot" : "3rd Slot") );
mes "^0000FFZeny Cost^000000 = "+.@zeny_cost+"z";
mes "^0000FFClass Type^000000 = "+.@class_type$;
if (.@equip_cardid > 0)
mes "^FF0000Overplace^000000 = "+getitemname(.@equip_cardid);
next;
if (Select("Confirm:Cancel") == 2) close;

// Check Zeny
if (Zeny < .@zeny_cost) {
mes "["+strnpcinfo(1)+"]";
mes "Sorry, but you are broke.";
close;
}

// Refine Attempt
progressbar "ffff00",3;

// Double Check after progress bar
if (Zeny < .@zeny_cost) {
mes "["+strnpcinfo(1)+"]";
mes "Are you trying to fool me?! You don't have zeny anymore!";
close;
}

if (getequipid(.@part) != .@itemid) {
mes "["+strnpcinfo(1)+"]";
mes "What do you think you are doing, your punk?! You switched your equipment! Get lost before I sue you.";
close;
}

// Fail
if (rand(0,100) > (90 - (10*.@slot_num))) {
specialeffect2 306;
mes "["+strnpcinfo(1)+"]";
mes "Wooops! I'm sorry, but it broke. There's nothing I can do about it anymore.";
set Zeny, Zeny - .@zeny_cost;
delitem .@itemid,1;
close;
}
else {
// Success
mes "["+strnpcinfo(1)+"]";
mes "Ha! There you go, your brand new enchanted equipment!";
set .@refine, getequiprefinerycnt(.@part);
for (set .@i, 0; .@i < 4; set .@i, .@i + 1)
set .@cardid[.@i], getequipcardid(.@part,.@i);
delitem .@itemid,1;
set Zeny, Zeny - .@zeny_cost;
specialeffect2 305;
if (.@slot_num == 1)
getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@cardid[1], .@cardid[2], .@rand_bonus;
else if (.@slot_num == 2)
getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@cardid[1], .@rand_bonus, .@cardid[3];
else if (.@slot_num == 3)
getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@rand_bonus, .@cardid[2], .@cardid[3];
equip(.@itemid);
close;
}

}

// Second Enchantment Type ------------------------------------------------------------------------------------------------
if (.@enchant_type == 1) {

// Confirmation
if (.@gmlevel)
set .@zeny_cost, 1;
else
set .@zeny_cost, 5000000;
if (.@gmlevel)
set .@chance, 100;
else
set .@chance, (80 - (10*.@slot_num));
mes "^0000FFEquip^000000 = "+getitemname(.@itemid);
mes "^0000FFChance^000000 = "+.@chance+"%";
mes "^0000FFSlot Number^000000 = "+( (.@slot_num == 1) ? "1st Slot" : (.@slotnum == 2 ? "2nd Slot" : "3rd Slot") );
mes "^0000FFZeny Cost^000000 = "+.@zeny_cost+"z";
if (!.@gmlevel)
mes "^0000FFUnique Power Stones^000000 = 1 Consumed";
mes "^0000FFSelected Enchantment^000000 = "+getitemname(.@selected_bonus);
if (.@equip_cardid > 0)
mes "^FF0000Overplace^000000 = "+getitemname(.@equip_cardid);
next;
if (Select("Confirm:Cancel") == 2) close;

// Check Zeny
if (Zeny < .@zeny_cost) {
mes "["+strnpcinfo(1)+"]";
mes "Sorry, but you are broke.";
close;
}
if ((countitem(30000) < 1) && (!.@gmlevel)) {
mes "["+strnpcinfo(1)+"]";
mes "Hey! You can't Power Refine without Power Stones!";
close;
}

// Refine Attempt
progressbar "ffff00",3;

// Double Check after progress bar
if (Zeny < .@zeny_cost) {
mes "["+strnpcinfo(1)+"]";
mes "Are you trying to fool me?! You don't have zeny anymore!";
close;
}

if ( (countitem(30000) < 1) && (!.@gmlevel) ) {
mes "["+strnpcinfo(1)+"]";
mes "Hey! You can't Power Refine without Power Stones!";
close;
}

if (getequipid(.@part) != .@itemid) {
mes "["+strnpcinfo(1)+"]";
mes "What do you think you are doing, your punk?! You switched your equipment! Get lost before I sue you.";
close;
}

// Fail
if (rand(0,100) > .@chance) {
specialeffect2 306;
mes "["+strnpcinfo(1)+"]";
mes "Wooops! I'm sorry, but it broke. There's nothing I can do about it anymore.";
set Zeny, Zeny - .@zeny_cost;
if (!.@gmlevel)
delitem 30000,1;
delitem .@itemid,1;
close;
}
else {
// Success
set .@rand_bonus, .@selected_bonus;
mes "["+strnpcinfo(1)+"]";
mes "Ha! There you go, your brand new enchanted equipment!";
set .@refine, getequiprefinerycnt(.@part);
for (set .@i, 0; .@i < 4; set .@i, .@i + 1)
set .@cardid[.@i], getequipcardid(.@part,.@i);
delitem .@itemid,1;
if (!.@gmlevel)
delitem 30000,1;
set Zeny, Zeny - .@zeny_cost;
specialeffect2 305;
if (.@slot_num == 1)
getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@cardid[1], .@cardid[2], .@rand_bonus;
else if (.@slot_num == 2)
getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@cardid[1], .@rand_bonus, .@cardid[3];
else if (.@slot_num == 3)
getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@rand_bonus, .@cardid[2], .@cardid[3];
equip(.@itemid);
close;
}

}

// Third Enchantment Type ------------------------------------------------------------------------------------------------
if (.@enchant_type == 2) {

// Confirmation
set .@zeny_cost, 10000000;
set .@chance, (60 - (10*.@slot_num));
mes "^0000FFEquip^000000 = "+getitemname(.@itemid);
mes "^0000FFChance^000000 = "+.@chance+"%";
mes "^0000FFSlot Number^000000 = "+( (.@slot_num == 1) ? "1st Slot" : (.@slotnum == 2 ? "2nd Slot" : "3rd Slot") );
mes "^0000FFZeny Cost^000000 = "+.@zeny_cost+"z";
mes "^0000FFUnique Power Stones^000000 = 3 Consumed";
mes "^009900Unique MvP Random Enchantment^000000";
if (.@equip_cardid > 0)
mes "^FF0000Overplace^000000 = "+getitemname(.@equip_cardid);
next;
if (Select("Confirm:Cancel") == 2) close;

// Check Zeny
if (Zeny < .@zeny_cost) {
mes "["+strnpcinfo(1)+"]";
mes "Sorry, but you are broke.";
close;
}

if (countitem(30000) < 3) {
mes "["+strnpcinfo(1)+"]";
mes "Hey! You can't Power Refine without Power Stones!";
close;
}

// Refine Attempt
progressbar "ffff00",8;

// Double Check after progress bar
if (Zeny < .@zeny_cost) {
mes "["+strnpcinfo(1)+"]";
mes "Are you trying to fool me?! You don't have zeny anymore!";
close;
}

if (countitem(30000) < 3) {
mes "["+strnpcinfo(1)+"]";
mes "Hey! You can't Power Refine without Power Stones!";
close;
}

if (getequipid(.@part) != .@itemid) {
mes "["+strnpcinfo(1)+"]";
mes "What do you think you are doing, your punk?! You switched your equipment! Get lost before I sue you.";
close;
}

// Fail
if (rand(0,100) > .@chance) {
specialeffect2 306;
specialeffect2 183;
mes "["+strnpcinfo(1)+"]";
mes "Oh my god! The power was so intense the equipment broke into pieces! I'm sorry, but there's nothing I can do.";
set Zeny, Zeny - .@zeny_cost;
delitem 30000,3;
delitem .@itemid,1;
close;
}
else {
// Success
mes "["+strnpcinfo(1)+"]";
mes "Wow! I can't even believe I did this myself, haha! I must be better than I thought. Oh- Yeah sorry, here's your equipment.";
set .@refine, getequiprefinerycnt(.@part);
for (set .@i, 0; .@i < 4; set .@i, .@i + 1)
set .@cardid[.@i], getequipcardid(.@part,.@i);
set .@rand_bonus, rand(25127,25147);
delitem .@itemid,1;
delitem 30000,3;
set Zeny, Zeny - .@zeny_cost;
specialeffect2 305;
specialeffect2 113;
if (.@slot_num == 1)
getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@cardid[1], .@cardid[2], .@rand_bonus;
else if (.@slot_num == 2)
getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@cardid[1], .@rand_bonus, .@cardid[3];
else if (.@slot_num == 3)
getitem2 .@itemid, 1, 1, .@refine, 0, .@cardid[0], .@rand_bonus, .@cardid[2], .@cardid[3];
equip(.@itemid);
close;
}

}
}
}

function script c_enchant_mvplist {


// Table Parameters :
// mvp_itemid : ID of the Misc Item
// mvp_itemcount : Number of these Items required
// to exchange for only one power stone.

// = MvP Power Stone Conversion Table =====================================================================================================================================================================================================
//						 , Baphomet, Amon Ra, Beelzebub, Detale, Eddga, ESL, Garm, Gloom, Scaraba Q, Kiel, Ktullanux, LoD, Maya, Mistress, Nidhoggr, Orc Hero/Orc Lord, Osiris, Pharaoh, Tao Gunka, Thanatos, Valk, Tendrillion, Hardrock
setarray .@mvp_itemid[0]   , 750	 , 7211   ,7754	  ,7451   ,1029  ,7169,7036 ,7566  ,6326	  ,7513 ,7562	  ,7108,7020 ,7018	 ,6091	 ,968			   ,751	,7114	,7300	  ,7450	 ,7024 ,6033		,6022  ;
setarray .@mvp_itemcount[0], 5	   , 5	  ,   2	  ,3	  ,   7  ,   6,   7 ,   3  , 4		,  4  , 3		, 4  , 2   ,2		,2		,7				 ,7	  ,7	   ,7		 ,3		,2 ,6	 ,4;
// ========================================================================================================================================================================================================================================

if (getarg(0) == 1)
for (set .@i, 0; .@i < getarraysize(.@mvp_itemid); set .@i, .@i + 1)
mes .@mvp_itemcount[.@i]+" ^0000FF"+getitemname(.@mvp_itemid[.@i])+"^000000 = 1 ^009900U.P.S^000000";
else if (getarg(0) == 0) {
for (set .@i, 0; .@i < getarraysize(.@mvp_itemid); set .@i, .@i + 1) {
set .@j, 0;
if (countitem(.@mvp_itemid[.@i]) >= .@mvp_itemcount[.@i]) {
getitem 30000,1;
delitem .@mvp_itemid[.@i], .@mvp_itemcount[.@i];
set .@i, .@i - 1;
set .@j, .@j + 1;
if (.@j % 15) sleep2 300; // Infinity loop prevention
}
}
}

return;

}

morocc_in,69,31,5 duplicate(Special Enchanter#r1) Special Enchanter#r2 64
payon,148,169,5 duplicate(Special Enchanter#r1) Special Enchanter#r3 64
alberta_in,16,63,5 duplicate(Special Enchanter#r1) Special Enchanter#r4 64
yuno_in01,168,29,5 duplicate(Special Enchanter#r1) Special Enchanter#r5 64
ein_in01,19,86,5 duplicate(Special Enchanter#r1) Special Enchanter#r6 64
lhz_in02,280,16,5 duplicate(Special Enchanter#r1) Special Enchanter#r7 64

[color=#282828][font=helvetica, arial, sans-serif]
Edited by Potatoe
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...