Pārlūkot izejas kodu

Added Upgrade Weapon Enchants

unknown 11 gadi atpakaļ
vecāks
revīzija
5debd8c5c8
2 mainītis faili ar 260 papildinājumiem un 0 dzēšanām
  1. 259 0
      npc/re/merchants/enchan_upg.txt
  2. 1 0
      npc/re/scripts_athena.conf

+ 259 - 0
npc/re/merchants/enchan_upg.txt

@@ -0,0 +1,259 @@
+//===== rAthena Script =======================================
+//= Upgrade Weapon Enchants
+//===== By: ==================================================
+//= Skorm
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena SVN
+//===== Description: =========================================
+//= [Official Conversion]
+//= Adds enchantments to Upgrade weapons.
+//===== Additional Comments: =================================
+//= 1.0 First version.
+//============================================================
+prt_in,28,73,3	script	Devil Enchant Master#prq	63,{
+	set .@eq_loc, EQI_HAND_R;
+	set .@eq_id, getequipid(.@eq_loc);
+	set .@eq_refine, getequiprefinerycnt(.@eq_loc);
+	set .@enc_book, 6484;
+	set .@item$, "1292, 1394, 1491, 1585, 2015, 13071, 13115, 16019, 18112, 21000";
+
+	if (!checkweight(1201,1)) callsub (S_Dialogue,1); //Checking the weight of knife?
+	if (MaxWeight - Weight < 10000) callsub (S_Dialogue,2); //Weight Check.
+	disable_items; //Do we really need this?
+
+	callsub (S_Dialogue,3);
+	switch (select("This is the first time to see you!:I heard that you are the best!:Please initialize the enchant.")) {
+		case 1:
+			callsub (S_Dialogue,4);
+			callsub (S_Dialogue,5);
+			callsub (S_Dialogue,6);
+			callsub (S_Dialogue,7,.@enc_book);
+			callsub (S_Dialogue,8);
+
+		case 2:
+			if (!countitem(.@enc_book)) callsub (S_Dialogue,9,.@enc_book);
+			set (.@select,@menu);
+			break;
+
+		case 3:
+			if (Zeny < 100000) callsub (S_Dialogue,10);
+			callsub (S_Dialogue,11); set (.@select,@menu);
+			if (select("Let me think about it.:Initialize it now!")==1)
+					callsub (S_Dialogue,12);
+	}
+
+
+//-
+	if (!getequipisequiped(.@eq_loc)) callsub (S_Dialogue,13);  //Checking if the item was removed.
+	setarray .@eq_card, getequipcardid(.@eq_loc,0), getequipcardid(.@eq_loc,1), getequipcardid(.@eq_loc,2), getequipcardid(.@eq_loc,3);
+
+
+//---
+	if (!getequipisequiped(.@eq_loc)) callsub (S_Dialogue,14);  //Checking if the item was removed.
+
+
+//----
+	if (!compare(.@item$,""+.@eq_id)) callsub (S_Dialogue,15);
+
+
+//-----------
+	if (.@select==2) {
+		if (!countitem(.@enc_book)) callsub (S_Dialogue,16,.@enc_book);
+
+
+//--------------
+		callsub(S_Dialogue,17);
+		if (select("Let me think about it.:Physical Series:Magical Series")==1)
+				callsub (S_Dialogue,18);
+		set(.@select,@menu);
+
+
+// -------------
+		if (!.@eq_card[3]) {
+			callsub (S_Dialogue,19);
+			if (select("Next Time!:Start now!")==1)
+				callsub (S_Dialogue,20);
+		} else callsub (S_Dialogue,21);
+
+
+//------------------------
+		if (.@select==2) {
+			if (.@eq_card[3]) callsub(S_Dialogue,22);
+			set .@rand, rand(1,1300);
+			     if (.@rand < 51)    set .@enc_id, 4734; //Agility5
+			else if (.@rand < 76)    set .@enc_id, 4735; //Agility6
+			else if (.@rand < 88)    set .@enc_id, 4736; //Agility7
+			else if (.@rand < 93)    set .@enc_id, 4737; //Agility8
+			else if (.@rand < 95)    set .@enc_id, 4738; //Agility9
+			else if (.@rand < 96)    set .@enc_id, 4739; //Agility10
+			else if (.@rand < 146)   set .@enc_id, 4724; //Dexterity5
+			else if (.@rand < 171)   set .@enc_id, 4725; //Dexterity6
+			else if (.@rand < 183)   set .@enc_id, 4726; //Dexterity7
+			else if (.@rand < 188)   set .@enc_id, 4727; //Dexterity8
+			else if (.@rand < 190)   set .@enc_id, 4728; //Dexterity9
+			else if (.@rand < 191)   set .@enc_id, 4729; //Dexterity10
+			else if (.@rand < 291)   set .@enc_id, 4704; //Strength5
+			else if (.@rand < 341)   set .@enc_id, 4705; //Strength6
+			else if (.@rand < 366)   set .@enc_id, 4706; //Strength7
+			else if (.@rand < 378)   set .@enc_id, 4707; //Strength8
+			else if (.@rand < 383)   set .@enc_id, 4708; //Strength9
+			else if (.@rand < 384)   set .@enc_id, 4709; //Strength10
+			else if (.@rand < 434)   set .@enc_id, 4754; //Luck5
+			else if (.@rand < 459)   set .@enc_id, 4755; //Luck6
+			else if (.@rand < 471)   set .@enc_id, 4756; //Luck7
+			else if (.@rand < 476)   set .@enc_id, 4757; //Luck8
+			else if (.@rand < 478)   set .@enc_id, 4758; //Luck9
+			else if (.@rand < 479)   set .@enc_id, 4759; //Luck10
+			else if (.@rand < 679)   set .@enc_id, 4744; //Vitality5
+			else if (.@rand < 779)   set .@enc_id, 4745; //Vitality6
+			else if (.@rand < 829)   set .@enc_id, 4746; //Vitality7
+			else if (.@rand < 854)   set .@enc_id, 4747; //Vitality8
+			else if (.@rand < 866)   set .@enc_id, 4748; //Vitality9
+			else if (.@rand < 867)   set .@enc_id, 4749; //Vitality10
+			else if (.@rand < 967)   set .@enc_id, 4808; //Fighting_Spirit4
+			else if (.@rand < 992)   set .@enc_id, 4820; //Fighting_Spirit5
+			else if (.@rand < 1092)  set .@enc_id, 4835; //Expert_Archer4
+			else if (.@rand < 1117)  set .@enc_id, 4836; //Expert_Archer5
+			else if (.@rand < 1217)  set .@enc_id, 4835; //Expert_Archer4
+			else if (.@rand < 1242)  set .@enc_id, 4836; //Expert_Archer5
+			else set .@enc_id, 0;    //Failure Rate
+
+
+//----------------------------
+		} else if (.@select==3) {
+			if (.@eq_card[3]) callsub (S_Dialogue,23);
+			set .@rand, rand(1,1200);
+				 if (.@rand < 51)    set .@enc_id, 4714; //Inteligence5
+			else if (.@rand < 76)    set .@enc_id, 4715; //Inteligence6
+			else if (.@rand < 88)    set .@enc_id, 4716; //Inteligence7
+			else if (.@rand < 93)    set .@enc_id, 4717; //Inteligence8
+			else if (.@rand < 95)    set .@enc_id, 4718; //Inteligence9
+			else if (.@rand < 96)    set .@enc_id, 4719; //Inteligence10
+			else if (.@rand < 146)   set .@enc_id, 4724; //Dexterity5
+			else if (.@rand < 171)   set .@enc_id, 4725; //Dexterity6
+			else if (.@rand < 183)   set .@enc_id, 4726; //Dexterity7
+			else if (.@rand < 188)   set .@enc_id, 4727; //Dexterity8
+			else if (.@rand < 190)   set .@enc_id, 4728; //Dexterity9
+			else if (.@rand < 191)   set .@enc_id, 4729; //Dexterity10
+			else if (.@rand < 291)   set .@enc_id, 4734; //Agility5
+			else if (.@rand < 341)   set .@enc_id, 4735; //Agility6
+			else if (.@rand < 366)   set .@enc_id, 4736; //Agility7
+			else if (.@rand < 378)   set .@enc_id, 4737; //Agility8
+			else if (.@rand < 383)   set .@enc_id, 4738; //Agility9
+			else if (.@rand < 384)   set .@enc_id, 4739; //Agility10
+			else if (.@rand < 484)   set .@enc_id, 4754; //Luck5
+			else if (.@rand < 534)   set .@enc_id, 4755; //Luck6
+			else if (.@rand < 559)   set .@enc_id, 4756; //Luck7
+			else if (.@rand < 571)   set .@enc_id, 4757; //Luck8
+			else if (.@rand < 576)   set .@enc_id, 4758; //Luck9
+			else if (.@rand < 577)   set .@enc_id, 4759; //Luck10
+			else if (.@rand < 777)   set .@enc_id, 4744; //Vitality5
+			else if (.@rand < 877)   set .@enc_id, 4745; //Vitality6
+			else if (.@rand < 927)   set .@enc_id, 4746; //Vitality7
+			else if (.@rand < 952)   set .@enc_id, 4747; //Vitality8
+			else if (.@rand < 964)   set .@enc_id, 4748; //Vitality9
+			else if (.@rand < 969)   set .@enc_id, 4749; //Vitality10
+			else if (.@rand < 1069)  set .@enc_id, 4812; //Spell4
+			else if (.@rand < 1094)  set .@enc_id, 4826; //Spell5
+			else if (.@rand < 1119)  set .@enc_id, 4761; //Matk2
+			else if (.@rand < 1124)  set .@enc_id, 4806; //Matk3
+			else set .@enc_id, 0;    //Failure Rate
+		}
+
+
+//-------------
+		else callsub (S_Dialogue,24);
+
+
+//-------------
+		if (.@eq_card[3]) callsub (S_Dialogue,25);
+		set .@eq_card[3], .@enc_id;
+
+
+//----------------
+		if (countitem(.@enc_book)) {
+			if (!.@enc_id) {
+				if (.@eq_refine) set .@neq_refine,.@eq_refine-rand(2);
+				misceffect EF_SHIELDCHARGE;
+				callsub (S_Dialogue,26);
+				delitem (.@enc_book,1);
+				delequip (.@eq_loc);
+				getitem2 (.@eq_id,1,1,.@neq_refine,0,.@eq_card[0],.@eq_card[1],.@eq_card[2],.@eq_card[3]);
+				if (.@neq_refine<.@eq_refine) { next; callsub (S_Dialogue,27,.@neq_refine); }
+				close;
+			} else {
+				misceffect EF_REPAIRWEAPON;
+				callsub (S_Dialogue,28,4);
+				delitem (.@enc_book,1);
+				delequip (.@eq_loc);
+				getitem2 (.@eq_id,1,1,.@eq_refine,0,.@eq_card[0],.@eq_card[1],.@eq_card[2],.@eq_card[3]);
+				close;
+			}
+		} else callsub(S_Dialogue,29,.@enc_book);
+
+
+//--------	
+	} else if (.@select==3) {
+		if (!.@eq_card[3]) callsub (S_Dialogue,30); //Checking if the item is enchanted. 
+		if (!getequipisequiped(.@eq_loc)) callsub (S_Dialogue,31); //Checking if the item was removed. 
+		set .@eq_card[3], 0; //Remove card.
+		misceffect EF_REPAIRWEAPON;
+		callsub (S_Dialogue,32);
+		if (Zeny < 100000) callsub (S_Dialogue,33); //Money check.
+		set Zeny, Zeny - 100000;
+		delequip (.@eq_loc);
+		getitem2 (.@eq_id,1,1,.@eq_refine,0,.@eq_card[0],.@eq_card[1],.@eq_card[2],.@eq_card[3]);
+		close;
+	} else callsub (S_Dialogue,34);
+
+
+//--------	
+S_Dialogue:
+	mes "[Devil Enchant Master]";
+	switch( getarg(0) ) {
+		case 1:  /*mes "You are carrying too many item, please reduce it and come back again!";*/ //Small Change. ::Changed
+		         mes "You are carrying too many items, please reduce it and come back again!"; close;
+		case 2:  mes "You are over the weight limit, please reduce it and come back again!"; close;
+		case 3:  mes "Yes?";
+		         /*mes "You are looking me for?";*/ //Small Change ::Changed
+		         mes "You are looking for me?"; next; return; 
+		case 4:  mes "Ha ha ha~ Of course, I would not the kind of person that simply deal with people."; next; return;
+		case 5:  mes "Including you! Even to tame plenty money to ask me, I will not simply enchant for you!!"; next; return;
+		case 6:  /*mes "Have you seen my title? Only a little person can get this title!";*/ //Do I even have to say it? ::Changed
+		         mes "Have you seen my title? Very few people have this title for a reason!"; next; return;
+		case 7:  mes "I will only enchant if you bring the ^0000ff"+getitemname(getarg(1))+"^000000 along!"; next; return;
+		case 8:  mes "Else, I will not enchant for you...."; close;
+		case 9:  mes "Are you listen to me? I will only do for you if you bring the "+getitemname(getarg(1))+"!"; close;
+		case 10: mes "Initialize will need 100,000 zeny, it seem you do not have enough zeny.."; close;
+		case 11: mes "Initialize will need 100,000 zeny and confirm whether the weapon is enchanted!"; next; return;
+		case 12: mes "Come back after you have confirmed!"; close;
+		case 13: /*mes "Are you try to remove the enchant equipment?"; close;*/ //Checks for removed equipment... Doesn't make much sense given the context. ::Changed
+		         mes "Please equip a UPG Weapon!"; close;
+		case 14: mes "It is dangerous to remove equipment during enchant process!"; close; //...
+		case 15: /*mes "I don't want to touch your equipment now!";*/ //Doesn't really work. ::Changed
+		         mes "I cannot work on that equipment!"; close;
+		case 16: mes "Are you listen to me? I will only do for you if you bring the "+getitemname(getarg(1))+"!"; close;
+		case 17: mes "Which type of effect you want to enchant?"; next; return;
+		case 18: mes "Come back again after you change the mind!"; close;
+		case 19: mes "The enchant process might fail, and ^ff0000it will reduce partial refine level^000000, but the slotted card and weapon will not broken! Are you sure to continue?"; next; return;
+		case 20: mes "Come back again after you have decide!"; close;
+		case 21: mes "This equipment has been enchanted! You need to initialize first before you want to enchant it again."; close;
+		case 22: mes "It seem having problem, let me take a look."; close;
+		case 23: mes "It seem having problem, let me take a look."; close;
+		case 24: mes "Hmm! This item seem having problem, please check it again!"; close;
+		case 25: mes "This item has been enchanted!"; close;
+		case 26: mes "Oh! Unbelievable!! It's failed!! Please come again!"; return;
+		case 27: /*mes "The failure has reduce refine " + getarg(1) + " level! Don't depress!";*/ //Wait what? ::Changed
+		         mes "Your refine level has reduced to "+ getarg(1) +"! Please don't despair!"; return;
+		case 28: mes "The slot ^990000" + getarg(1) + " has been ^000000enchanted!"; return;
+		case 29: mes "Are you listen to me? I will only do for you if you bring the "+getitemname(getarg(1))+"!"; close;
+		case 30: mes "This item is not enchanted!"; close;
+		case 31: mes "Are you unequipping now?"; close;
+		case 32: /*mes "You need to initialize the enchant effect!";*/ //What I thought we just did that? ::Changed
+		         mes "Item enchantment effect initialized!"; return;
+		case 33: mes "You need to bring some money to initialize!!"; close;
+		case 34: mes "It seem you have chosen the wrong job??"; close;
+	}
+}

+ 1 - 0
npc/re/scripts_athena.conf

@@ -83,6 +83,7 @@ npc: npc/re/merchants/renters.txt
 npc: npc/re/merchants/shops.txt
 npc: npc/re/merchants/stone_change.txt
 //npc: npc/re/merchants/ticket_refiner.txt
+//npc: npc/re/merchants/enchan_upg.txt
 
 // --------------------------- Others ---------------------------
 npc: npc/re/other/bulletin_boards.txt