Ver código fonte

Implemented 2012 Headgear Quests.
Credits to @cydh for helping out with the quest bonus.
Follow-up 1a9b54: added missing SQL item_db entries.

Clarified description of "delayed consumption" item type (11) in item_db documentation. (tid:91187, thanks Annie!)

Signed-off-by: Euphy <euphy.raliel@rathena.org>

Euphy 11 anos atrás
pai
commit
5d08795837

+ 4 - 1
db/const.txt

@@ -1725,7 +1725,10 @@ SC_MTF_CRIDAMAGE 585
 SC_OKTOBERFEST	586
 SC_STRANGELIGHTS	587
 SC_DECORATION_OF_MUSIC	588
-SC_EXTREMITYFIST2	589
+SC_QUEST_BUFF1	589
+SC_QUEST_BUFF2	590
+SC_QUEST_BUFF3	591
+SC_EXTREMITYFIST2	592
 
 //Status Icon
 SI_BLANK	-1

+ 8 - 8
db/quest_db.txt

@@ -743,14 +743,14 @@
 5172,0,1784,100,0,0,0,0,"Mid-Level collection request"
 5173,0,1316,100,0,0,0,0,"Mid-Level collection request"
 5174,86400,0,0,0,0,0,0,"High level collectiong request[Stand by]"
-5175,0,1106,100,0,0,0,0,"High level collectiong request"
-5176,0,1148,100,0,0,0,0,"High level collectiong request"
-5177,0,1995,100,0,0,0,0,"High level collectiong request"
-5178,0,1310,100,0,0,0,0,"High level collectiong request"
-5179,0,1163,100,0,0,0,0,"High level collectiong request"
-5180,0,1993,100,0,0,0,0,"High level collectiong request"
-5181,0,1297,100,0,0,0,0,"High level collectiong request"
-5182,0,1699,100,0,0,0,0,"High level collectiong request"
+5175,0,1106,100,0,0,0,0,"High level collection request"
+5176,0,1148,100,0,0,0,0,"High level collection request"
+5177,0,1995,100,0,0,0,0,"High level collection request"
+5178,0,1310,100,0,0,0,0,"High level collection request"
+5179,0,1163,100,0,0,0,0,"Highest level collection request"
+5180,0,1993,100,0,0,0,0,"Highest level collection request"
+5181,0,1297,100,0,0,0,0,"Highest level collection request"
+5182,0,1699,100,0,0,0,0,"Highest level collection request"
 5222,0,0,0,0,0,0,0,"Saving the energy crystals"
 5223,0,0,0,0,0,0,0,"Saving the energy crystals"
 5224,0,0,0,0,0,0,0,"Saving the energy crystals"

+ 3 - 2
doc/item_db.txt

@@ -33,8 +33,9 @@ Type:
 	7	Pet egg
 	8	Pet equipment
 	10	Ammo (Arrows/Bullets/etc)
-	11	Usable with delayed consumption (item is lost from inventory
-		after selecting a target, for use with skills and pet lures)
+	11	Usable with delayed consumption (intended for 'itemskill')
+		Items using the 'itemskill' script command are consumed after
+		selecting a target. Any other command will NOT consume the item.
 	12	Shadow Equipment
 	18	Another delayed consume that requires user confirmation before
 		using item.

+ 1 - 1
doc/script_commands.txt

@@ -4973,7 +4973,7 @@ Examples:
 
 ---------------------------------------
 
-*getstatus <effect type>{,<type>};
+*getstatus(<effect type>{,<type>})
 
 Retrieve information about a specific status effect when called. Depending on <type>
 specified the function will return different information.

+ 1 - 1
npc/quests/newgears/2006_headgears.txt

@@ -1,5 +1,5 @@
 //===== rAthena Script =======================================
-//= 2006 Headgear
+//= 2006 Headgear Quests
 //===== By: ==================================================
 //= DiviniaRO members, cleaned by reddozen
 //===== Current Version: =====================================

+ 1 - 1
npc/quests/newgears/2008_headgears.txt

@@ -1,5 +1,5 @@
 //===== rAthena Script =======================================
-//= 2008 Headgear
+//= 2008 Headgear Quests
 //===== By: ==================================================
 //= Masao
 //= Credits: Muad_Dib

+ 603 - 0
npc/re/quests/newgears/2012_headgears.txt

@@ -0,0 +1,603 @@
+//===== rAthena Script =======================================
+//= 2012 Headgear Quests
+//===== By: ==================================================
+//= Euphy, -SkittleNugget-
+//===== Current Version: =====================================
+//= 1.0
+//===== Compatible With: =====================================
+//= rAthena Project
+//===== Description: =========================================
+//= [Official Conversion]
+//= Enhance gears by synthesizing them with Energy Crystals.
+//===== Additional Comments: =================================
+//= 1.0 First version. [Euphy]
+//=     Script is a little messy, could use some cleaning.
+//============================================================
+
+moc_para01,41,169,3	script	Reno#2012hat	64,{
+
+	// iRO has (very) minor differences in dialogue from the original script.
+	// To use iRO's version, uncomment the line below.
+	//set .@features_iRO,1;
+
+	//custom translation -  all checks below
+	if (checkweight(1301,1) == 0 || MaxWeight - Weight < 800) {
+		mes "- Carrying too many items, cannot proceed. -";
+		close;
+	}
+
+	setarray .@type$[0],"lower","intermediate","advanced","highest";
+	setarray .@crystal$[0],"Rough","Purified","High";
+
+	// playtime checks
+	setarray .@quests_playtime[0],5161,5169,5174,5225,5226,5227;
+	for (set .@i,0; .@i<6; set .@i,.@i+1) {
+		if (checkquest(.@quests_playtime[.@i],PLAYTIME) == 2) {
+			erasequest .@quests_playtime[.@i];
+			mes "[Reno]";
+			if (.@i < 3)	// hunting quest wait time
+				mes "The waiting time for a "+.@type$[.@i]+" collection quest has expired. You can now take another request.";
+			else        	// buff wait time
+				mes "The waiting time for storing "+.@crystal$[.@i]+" Energy Crystals has expired. You can now store them again.";
+			close;
+		}
+	}
+
+	// hunting quest checks
+	callsub L_CheckHunting,5161,5162,7,.@type$[0],6623,10; //Rough_Energy_Crystal
+	callsub L_CheckHunting,5169,5170,4,.@type$[1],6624,10; //Purified_Energy_Crystal
+	callsub L_CheckHunting,5174,5175,4,.@type$[2],6625,5;  //High_Purity_Energy_Xtal
+	callsub L_CheckHunting,5174,5179,4,.@type$[3],6625,10; //High_Purity_Energy_Xtal
+
+	// buff checks
+	set .@energy_buf00, getstatus(SC_QUEST_BUFF1) + getstatus(SC_QUEST_BUFF2) + getstatus(SC_QUEST_BUFF3);
+	if (!.@energy_buf00) {
+		for (set .@i,0; .@i<3; set .@i,.@i+1) {
+			if (isbegin_quest(.@i + 5222)) {
+				set .@item, 6623 + .@i;
+				set .@amount, 2 + rand(3);
+				mes "[Reno]";
+				mes getitemname(.@item)+" storage is now complete.";
+				next;
+				setquest 5225 + .@i;
+				erasequest 5222 + .@i;
+				getitem .@item,.@amount;
+				mes "[Reno]";
+				mes "^0000FF"+.@amount+" "+getitemname(.@item)+"s^000000 were extracted.";
+				close;
+			}
+		}
+	}
+
+	mes "[Reno]";
+	mes "Hi? I am Reno from the Energy Crystal Research Association, or ECRA.";
+	next;
+	switch(select("ECRA?:Quest to get Energy Crystals:Energy Crystal Buffs:Compress Energy Crystals:Exchange Crystals for Headgear:Random Gear for Crystals" + ((.@features_iRO)?":See Equipment List":""))) {
+	case 1:
+		mes "[Reno]";
+		mes "ECRA is the institute that researches '^0000FFEnergy Crystals^000000' that shall be used as an alternative energy source in the Rune Midgart Kingdom, which suffers from a shortage of energy.";
+		next;
+		select("The reason for doing this?");
+		mes "[Reno]";
+		mes "I would like to explain that we are not trying to make an excuse to get away from facing problem before I explain the reason. Never! So please let me finish.";
+		next;
+		mes "[Reno]";
+		mes "The Research Team has sent me the results they found.";
+		next;
+		mes "[Reno]";
+		mes "Energy Crystals turned out to be ^0000FFgenerated inside the bodies of some monsters^000000, and according to the research, stronger monsters generate higher-class energy crystals in their bodies.";
+		next;
+		mes "[Reno]";
+		mes "The Research Team decided to collect Energy Crystals by giving requests to adventurers, with appropriate rewards. That enables us to collect better and be more ^FF0000efficient^000000.";
+		next;
+		mes "[Reno]";
+		mes "Energy Crystals, accumulated through hunting monsters by my request, shall be used for my research. ^0000FFSome of them are planned to be returned to adventurers.^000000";
+		next;
+		mes "[Reno]";
+		mes "Adventurers can use collected Energy Crystals for ^FF0000upgrading equipments^000000 through me.";
+		next;
+		mes "[Reno]";
+		mes "If it works well, it seems to be good for both ECRA and adventurers.";
+		close;
+	case 2:
+		mes "[Reno]";
+		mes "The hunting quests are ranked by monster level and difficulty. The ranges are lower, intermediate, high quests and can only be taken once per day.";
+		next;
+
+		setarray .@quest_status[0],
+			isbegin_quest(5162) + isbegin_quest(5163) + isbegin_quest(5164) + isbegin_quest(5165) + isbegin_quest(5166) + isbegin_quest(5167) + isbegin_quest(5168),
+			isbegin_quest(5170) + isbegin_quest(5171) + isbegin_quest(5172) + isbegin_quest(5173),
+			isbegin_quest(5175) + isbegin_quest(5176) + isbegin_quest(5177) + isbegin_quest(5178) + isbegin_quest(5179) + isbegin_quest(5180) + isbegin_quest(5181) + isbegin_quest(5182);
+		setarray .@quest_index[0],5161,5169,5174;
+
+		set .@select, select("Lower level hunting [61-80]:Intermediate level hunting [80-99]:High level hunting [90 and up]:Cancel my current quest.") - 1;
+		if (.@select < 3) {
+			setarray .@min_level[0],60,80,90,100;
+			if (BaseLevel < .@min_level[.@select]) {
+				mes "[Reno]";
+				mes "I am sorry but the request for the "+.@type$[.@select]+" collection is only available for those level "+.@min_level[.@select]+" and higher. You do not seem to be capable of carrying out this request.";
+				close;
+			}
+			if (.@quest_status[.@select]) {
+				mes "[Reno]";
+				mes "You seem to be under the other request of "+.@type$[.@select]+" collection. If the quest seems to be too hard... how about you ^FF0000give up on the request^000000?";
+				close;
+			}
+			set .@playtime, checkquest(.@quest_index[.@select],PLAYTIME);
+			if (.@playtime == 0 || .@playtime == 1) {
+				mes "[Reno]";
+				mes "Currently waiting for the "+.@type$[.@select]+" collection commission. Tasks in each collection can only be completed once per day."; //custom translation
+				close;
+			}
+			mes "[Reno]";
+			mes "You selected to hunt a monster from the "+.@type$[.@select]+" collection. After hunting these monsters you will receive "+((.@features_iRO)?"10 ":"")+"^0000FF"+.@crystal$[.@select]+" Energy Crystals^000000 when you return to me.";
+			next;
+			mes "[Reno]";
+			mes "Please select the monster that you think you can easily hunt from the list.";
+			next;
+			switch (.@select) {
+			case 0:
+				set .@quest, select(
+					"[Lower class] Requiem",
+					"[Lower class] Bathory",
+					"[Lower class] Spring Rabbit",
+					"[Lower class] Sleeper",
+					"[Lower class] Evil Druid",
+					"[Lower class] Ground Petite",
+					"[Lower class] Clock"
+				);
+				break;
+			case 1:
+				set .@quest, select(
+					"[Intermediate class] Siroma",
+					"[Intermediate class] Dark Priest",
+					"[Intermediate class] Stapo",
+					"[Intermediate class] Solider"
+				);
+				break;
+			case 2:
+				set .@quest, select(
+					"[Advanced] Desert Wolf",
+					"[Advanced] Medusa",
+					"[Advanced] Pinguicula",
+					"[Advanced] Majoruros",
+					"[Highest] Raydric",
+					"[Highest] Naga",
+					"[Highest] Ancient Mummy",
+					"[Highest] Ancient Mimic"
+				);
+				if (.@quest > 4 && BaseLevel < .@min_level[3]) {
+					mes "[Reno]";
+					mes "I am sorry but the request for the most advanced collection is only available for those level "+.@min_level[3]+" and higher. You do not seem to be capable of carrying out this request.";
+					close;
+				}
+				break;
+			}
+			setquest .@quest_index[.@select] + .@quest;
+			mes "[Reno]";
+			mes "The request for "+.@type$[.@select]+" collection monsters has been issued. Please check the details on the issued document.";
+			close;
+		} else {
+			setarray .@quest_count[0],7,4,8;
+			for (set .@i,0; .@i<3; set .@i,.@i+1) {
+				if (.@quest_status[.@i]) {
+					mes "[Reno]";
+					mes "You are currently under the request of the "+.@type$[.@i]+" collection. If you give up now, all your history will be lost. Do you really want to give up?";
+					next;
+					set .@erase_quest, select("Yes:No");
+					switch (.@erase_quest) {
+					case 1:
+						for (set .@quest,.@quest_index[.@i]+1; .@quest<=.@quest_index[.@i]+.@quest_count[.@i]; set.@quest,.@quest+1) {
+							if (isbegin_quest(.@quest))
+								erasequest .@quest;
+						}
+						break;
+					case 2:
+						break;
+					}
+				}
+			}
+			switch (.@erase_quest) {
+			case 0:
+				mes "[Reno]";
+				mes "You are not under any request.";
+				close;
+			case 1:
+				mes "[Reno]";
+				mes "The written request for you has been withdrawn.";
+				close;
+			case 2:
+				mes "[Reno]";
+				mes "Please keep up on it.";
+				close;
+			}
+		}
+	case 3:
+		mes "[Reno]";
+		mes "Do you want to accumulate Energy Crystals inside of your body to receive a buff?";
+		next;
+		set .@select, select("Accumulating Energy Crystals?:Accumulate Rough Energy Crystal:Accumulate Purified Energy Crystal:Accumulate High Energy Crystal");
+		switch (.@select) {
+		case 1:
+			mes "[Reno]";
+			mes "Energy Crystals are accumulated in your body when you hunt the monsters we ask you to.";
+			next;
+			mes "[Reno]";
+			mes "Our research shows that some methods enable humans to accumulate the energy crystals inside of the body in the form of a buff.";
+			next;
+			mes "[Reno]";
+			mes "If you spend about 3 hours, you will be able to gain a small amount of Energy Crystals. So do you want to receive the buff?";
+			close;
+		case 2:
+			set .@playtime, checkquest(5225,PLAYTIME);
+			set .@quest,5222;
+			set .@min_level,60;
+			set .@rate,1;
+			set .@buff, SC_QUEST_BUFF1;
+			break;
+		case 3:
+			set .@playtime, checkquest(5226,PLAYTIME);
+			set .@quest,5223;
+			set .@min_level,80;
+			set .@rate,2;
+			set .@buff, SC_QUEST_BUFF2;
+			break;
+		case 4:
+			set .@playtime, checkquest(5227,PLAYTIME);
+			set .@quest,5224;
+			set .@min_level,90;
+			set .@rate,3;
+			set .@buff, SC_QUEST_BUFF3;
+			break;
+		}
+		if (.@playtime == 0 || .@playtime == 1) {
+			mes "[Reno]";
+			mes "Were you successful? While storing other Energy Crystals will not have much effect on your body, storing the same one may cause you harm."; //custom translation
+			close;
+		}
+		if (BaseLevel < .@min_level) {
+			mes "[Reno]";
+			mes "With a body like that, you can't accumulate "+.@crystal$[.@select-2]+" Energy Crystals. You must be level "+.@min_level+" or your body will be harmed in the process."; //custom translation
+			close;
+		}
+		if (.@energy_buf00) {
+			mes "[Reno]";
+			mes "Accumulating Energy Crystal has already begun. I am sorry but it is impossible to accumulate two different types of Energy Crystals at a time.";
+			close;
+		}
+		if (isbegin_quest(.@quest) > 0) {
+			erasequest .@quest;
+			mes "[Reno]";
+			mes "An error has occurred. Please forgive me for the inconvenience."; //custom translation
+			close;
+		}
+		mes "[Reno]";
+		mes "It takes 3 hours for your body to accumulate 2 to 4 "+.@crystal$[.@select-2]+" Energy Crystals. Do you want to start?";
+		next;
+		if(select("Cancel:Start") == 1) {
+			mes "[Reno]";
+			mes "I recommend that you try to ccumulate Energy Crystal when you have time.";
+			close;
+		}
+		mes "[Reno]";
+		mes "You might feel a slight tingle.";
+		next;
+		specialeffect2 EF_BASH3D;
+		percentheal .@rate * -5,0;
+		//consumeitem ??; //Keep_Connection_[.@rate]
+		sc_start .@buff,10800000,.@rate;	// Atk/Matk + 5*rate (+5, +10, +15)
+		setquest .@quest;
+		mes "[Reno]";
+		mes "- Puck -";
+		next;
+		mes "[Reno]";
+		mes "Everything seems to be in order. Let's start accumulating "+.@crystal$[.@select-2]+" Energy Crystals. Remember to come back to me after 3 hours to get the "+.@crystal$[.@select-2]+" Energy Crystals.";
+		close;
+	case 4:
+		mes "[Reno]";
+		mes "Do you want to compress the Energy Crystals?";
+		next;
+		switch(select("What does compressing do?:Compress Rough to Purified Crystal:Compress Purified to High Crystal")) {
+		case 1:
+			mes "[Reno]";
+			mes "Are you curious about Energy Crystal compression? I can compress lower level Energy Crystals into higher ones.";
+			next;
+			mes "[Reno]";
+			mes "Here is what I can make.";
+			mes "^FF000010 Rough Energy Crystals^000000 = ^FF00001 Purified Energy Crystal^000000";
+			mes "^FF00005 Purified Energy Crystals^000000 = ^FF00001 High Energy Crystal^000000";
+			next;
+			mes "[Reno]";
+			mes "If you need higher grade Energy Crystals, this is a good way to get them since the lower ones are easier to get.";
+			close;
+		case 2:
+			set .@crystal,6623;  //Rough_Energy_Crystal
+			set .@crystal_,6624; //Purified_Energy_Crystal
+			set .@rate,10;
+			break;
+		case 3:
+			set .@crystal,6624;  //Purified_Energy_Crystal
+			set .@crystal_,6625; //High_Purity_Energy_Xtal
+			set .@rate,5;
+			break;
+		}
+		set .@crystal_count, countitem(.@crystal);
+		set .@crystal_get, .@crystal_count / .@rate;
+		mes "[Reno]";
+		mes sprintf("^FF0000%d %s^000000 = ^FF00001 %s^000000",.@rate,getitemname(.@crystal),getitemname(.@crystal_));
+		next;
+		mes "[Reno]";
+		mes sprintf("%d %ss will be compressed to %d %ss.",.@crystal_count,getitemname(.@crystal),.@crystal_get,getitemname(.@crystal_));
+		mes "Do you want to compress?";
+		next;
+		if(select("Compress:Stop") == 2) {
+			mes "[Reno]";
+			mes "Okay, please contact if you need me in the future.";
+			close;
+		}
+		while(1) {
+			if (.@crystal_count >= .@rate) {  //custom translation
+				delitem .@crystal,.@rate;
+				getitem .@crystal_,1;
+				set .@crystal_count, countitem(.@crystal);
+				set .@crystal_get, .@crystal_count / .@rate;
+				mes "[Reno]";
+				mes "The compression was very successful.";
+				mes "There are "+.@crystal_count+" Energy Crystals left, which can compress into "+.@crystal_get+" Energy Crystals. Do you want to continue?";
+				next;
+				if(select("Compress:Stop") == 2)
+					break;
+			} else {
+				mes "[Reno]";
+				mes "You don't have enough "+getitemname(.@crystal)+"s.";
+				next;
+				break;
+			}
+		}
+		mes "[Reno]";
+		mes "Compression completed.";
+		close;
+	case 5:
+		disable_items;
+		mes "[Reno]";
+		mes "Do you want to exchange Energy Crystals for equipment? Please select the type of Energy Crystal that you wish to exchange.";
+		next;
+		setarray .@crystals[0], countitem(6623), countitem(6624), countitem(6625);
+		switch(select("See Equipment List:["+.@crystals[0]+"] Rough Energy Crystal:["+.@crystals[1]+"] Purified Energy Crystal:["+.@crystals[2]+"] High Energy Crystal")) {
+		case 1:
+			mes "[Reno]";
+			mes "This is the brochure regarding the equipment upgrade that our Energy Crystal research association provides. Please take a look around.";
+			close2;
+			readbook 11060,1; //Energy_Xtal_Combi_Book
+			end;
+
+		// Variable descriptions
+		// .@crystal     : Energy Crystal used
+		// .@materials[] : equipment to upgrade
+		// .@showslot[]  : display slots with equipment name (-1 to disable)
+		// .@costs[]     : amount of Energy Crystals needed
+		// .@rewards[]   : upgraded equipment
+		case 2:
+			set .@crystal,6623; //Rough_Energy_Crystal
+			setarray .@materials[0], 5027, 5045, 5069, 5003, 2214, 5167, 5168, 5043;
+			setarray .@showslot[0],    -1,   -1,   -1,   -1,   -1,    1,    1,   -1;
+			setarray .@costs[0],      100,  100,  100,  100,  100,  100,  100,  100;
+			setarray .@rewards[0],  18760,18761,18762,18763,18764,18769,18770,18771;
+			break;
+		case 3:
+			set .@crystal,6624; //Purified_Energy_Crystal
+			setarray .@materials[0], 2296, 5014, 5096, 2292,2615, 2355,2116, 2420, 2521, 5125;
+			setarray .@showslot[0],    -1,   -1,   -1,   -1,  -1,    1,   1,    1,    1,    1;
+			setarray .@costs[0],      200,  200,  200,  200, 200,  100, 100,  100,  100,  100;
+			setarray .@rewards[0],  18772,18773,18774,18775,2956,15068,2183,22015,20710,18776;
+			break;
+		case 4:
+			set .@crystal,6625; //High_Purity_Energy_Xtal
+			setarray .@materials[0], 5019, 5162, 5025, 5022, 5353, 2423,2678,2679, 2355,2116, 2420, 2521, 5125;
+			setarray .@showslot[0],    -1,    1,   -1,    0,    1,   -1,  -1,  -1,    1,   1,    1,    1,    1;
+			setarray .@costs[0],      300,  300,  300, 1000,  100,  300, 300, 300,   20,  20,   20,   20,   20;
+			setarray .@rewards[0],  18765,18768,18766,18767,18767,22014,2957,2958,15068,2183,22015,20710,18776;
+			break;
+		}
+		mes "[Reno]";
+		mes "Please select the equipment to exchange for "+getitemname(.@crystal)+"s.";
+		next;
+		set .@crystal_count, countitem(.@crystal);
+		set .@menu$,"";
+		for (set .@i,0; .@i<getarraysize(.@materials); set .@i,.@i+1) {
+			set .@item_name$, getitemname(.@materials[.@i]) + ((.@showslot[.@i] > -1)?"["+.@showslot[.@i]+"]":"");
+			set .@menu$, .@menu$ + sprintf("%s (%d/%d):",.@item_name$,.@crystal_count,.@costs[.@i]);
+		}
+		set .@index, select(.@menu$) - 1;
+		set .@material, .@materials[.@index];
+		set .@item_name$, getitemname(.@material) + ((.@showslot[.@index] > -1)?"["+.@showslot[.@index]+"]":"");
+		set .@cost, .@costs[.@index];
+		set .@reward, .@rewards[.@index];
+
+		//custom translations
+		if (.@material == 2615) {  // Special case: Safety Ring
+			if (countitem(2615) < 1 || countitem(2621) < 1 || countitem(2622) < 1 || countitem(2624) < 1 ||
+			    countitem(2625) < 1 || countitem(2623) < 1 || countitem(2626) < 1 || countitem(.@crystal) < .@cost) {
+				mes "[Reno]";
+				mes "The materials to make a Safety Ring[1] are insufficient. Please check your inventory.";
+				close;
+			}
+			mes "[Reno]";
+			mes "Before upgrading your Safety Ring, please listen to these ^FF0000precautions^000000.";
+			next;
+			mes "[Reno]";
+			mes "^FF0000In addition to the Safety Ring, all refinements and cards of the required materials will also disappear.^000000";
+			next;
+		} else {
+			if (countitem(.@material) < 1 || countitem(.@crystal) < .@cost) {
+				mes "[Reno]";
+				mes "The materials are insufficient. Please check your materials.";
+				close;
+			}
+			mes "[Reno]";
+			mes "Before upgrading your equipment, please listen to these ^FF0000precautions^000000.";
+			next;
+			mes "[Reno]";
+			mes "^FF0000When using Energy Crystals to upgrade equipment, all previous refinements, enchantments, and cards will be lost.^000000";
+			next;
+		}
+		mes "[Reno]";
+		mes "Are you familiar with the ^FF0000precautions^000000?";
+		next;
+		if(select("I am.:No.") == 2) {
+			mes "[Reno]";
+			mes "Okay. Next time, then.";
+			close;
+		}
+		mes "[Reno]";
+		mes "Then let's begin to upgrade "+.@item_name$+".";
+		next;
+		specialeffect2 EF_REPAIRWEAPON;
+		progressbar "ffff00",2;
+		delitem .@material,1;
+		if (.@material == 2615) {
+			delitem 2621,1; //Ring_
+			delitem 2622,1; //Earring_
+			delitem 2624,1; //Glove_
+			delitem 2625,1; //Brooch_
+			delitem 2623,1; //Necklace_
+			delitem 2626,1; //Rosary_
+		}
+		delitem .@crystal,.@cost;
+		getitem .@reward,1;
+		mes "[Reno]";
+		mes "The upgrade was successful. Your Energy Crystals will help our research greatly.";
+		close;
+	case 6:
+		mes "[Reno]";
+		mes "Do you want to donate Energy Crystals to get a random new headgear?";
+		next;
+		switch(select("Donate Energy Crystals?:Donate 300 Rough Energy Crystals.:Donate 600 Purified Energy Crystals.:Donate 900 High Energy Crystals.")) {
+		case 1:
+			mes "[Reno]";
+			mes "We are collecting Energy Crystals so that we can research more combinations of headgears for adventurers.";
+			next;
+			mes "[Reno]";
+			mes "Thanks to the support of adventurers we can use these Energy Crystals to further our research.";
+			next;
+			mes "[Reno]";
+			mes "So we receive a minimum of 300 Rough Energy Crystals, 600 Purified Energy Crystals, and 900 High Energy Crystals.";
+			if (!.@features_iRO) {
+				next;
+				mes "[Reno]";
+				mes "You may feel that this is a burden, but for the sake of our research, please continue."; //custom translation
+				close;
+			}
+			mes "For the donation, I'll give you a random new headgear.";
+			next;
+			mes "[Reno]";
+			mes "300 Rough Energy Crystals";
+			mes "- New Mage Hat";
+			mes "- New Magician Hat";
+			mes "- New Kitsune Mask";
+			mes "- New Joker Jester";
+			mes "- New Bunny Band";
+			mes "- New Munak Hat";
+			mes "- New Bongun Hat";
+			mes "- New Phantom Opera Mask";
+			next;
+			mes "[Reno]";
+			mes "600 Purified Energy Crystals";
+			mes "- Good Binoculars";
+			mes "- Good Fin Helm";
+			mes "- Good Assassin Mask";
+			mes "- Good Welding Mask";
+			mes "- Good Safety Ring";
+			mes "- Good Angelic Protection";
+			mes "- Good Angelic Guard";
+			mes "- Good Angelic Cardigan";
+			mes "- Good Angel's Reincarnation";
+			next;
+			mes "[Reno]";
+			mes "900 High Energy Crystals";
+			mes "- Enhanced Corsair";
+			mes "- Enhanced Bone Helm";
+			mes "- Enhanced Helm of Angel";
+			mes "- Enhanced Variant Shoes";
+			mes "- Enhanced Ring of Flame Lord";
+			mes "- Enhanced Ring of Resonance";
+			close;
+		case 2:
+			if (countitem(6623) < 300) {
+				mes "[Reno]";
+				mes "Thank for your support, but we need 300 Rough Energy Crystals.";
+				close;
+			}
+			delitem 6623,300; //Rough_Energy_Crystal
+			set .@r, rand(1,17);
+			     if (.@r <= 2)  getitem 18760,1; //Remodel_Wizardry_Hat
+			else if (.@r <= 4)  getitem 18761,1; //Remodel_Magician_Hat
+			else if (.@r <= 6)  getitem 18762,1; //Remodel_Mask_Of_Fox
+			else if (.@r <= 8)  getitem 18763,1; //Remodel_Joker_Jester
+			else if (.@r <= 10) getitem 18764,1; //Remodel_Bunny_Band
+			else if (.@r <= 13) getitem 18769,1; //Remodel_Munak_Turban
+			else if (.@r <= 16) getitem 18770,1; //Remodel_Bongun_Hat
+			else                getitem 18771,1; //Remodel_Opera_Mask
+			break;
+		case 3:
+			if (countitem(6624) < 600) {
+				mes "[Reno]";
+				mes "Thank for your support, but we need 600 Purified Energy Crystals.";
+				close;
+			}
+			delitem 6624,600; //Purified_Energy_Crystal
+			set .@r, rand(1,18);
+			     if (.@r <= 3)  getitem 18772,1; //Improved_Binoculars
+			else if (.@r <= 6)  getitem 18773,1; //Improved_Fin_Helm
+			else if (.@r <= 9)  getitem 18774,1; //Improved_Assassin_Mask
+			else if (.@r <= 12) getitem 18775,1; //Improved_Welding_Mask
+			else if (.@r <= 13) getitem 2956,1;  //Safety_Ring_
+			else if (.@r <= 14) getitem 15068,1; //Im_Angel's_Protection
+			else if (.@r <= 15) getitem 2183,1;  //Impr_Angel's_Safeguard
+			else if (.@r <= 16) getitem 22015,1; //Impr_Angel's_Arrival
+			else if (.@r <= 17) getitem 20710,1; //Impr_Angel's_Warmth
+			else                getitem 18776,1; //Improved_Kiss_Of_Angel
+			break;
+		case 4:
+			if (countitem(6625) < 900) {
+				mes "[Reno]";
+				mes "Thank for your support, but we need 900 High Energy Crystals.";
+				close;
+			}
+			delitem 6625,900; //High_Purity_Energy_Xtal
+			set .@r, rand(1,33);
+			     if (.@r <= 10) getitem 18765,1; //Enhanced_Corsair
+			else if (.@r <= 20) getitem 18768,1; //Enhanced_Bone_Helm
+			else if (.@r <= 25) getitem 18766,1; //Enhanced_Helm_Of_Angel
+			else if (.@r <= 30) getitem 22014,1; //Enhanced_Variant_Shoes
+			else if (.@r <= 31) getitem 2957,1;  //Good_Ring_Of_Flame_Lord
+			else                getitem 2958,1;  //Good_Ring_Of_Resonance
+			break;
+		}
+		mes "[Reno]";
+		mes "Thank you very much. The Energy Crystals you donated will be greatly helpful for our research. This is your reward for your donation."; //custom translation
+		close;
+	case 7:  // iRO only
+		mes "[Reno]";
+		mes "This is the brochure regarding the equipment upgrade that our Energy Crystal research association provides. Please take a look around.";
+		close2;
+		readbook 11060,1; //Energy_Xtal_Combi_Book
+		end;
+	}
+
+//callsub L_CheckHunting,<quest index>,<start quest>,<number of quests>,"<type>",<reward id>,<reward amount>;
+L_CheckHunting:
+	for (set .@quest,getarg(0)+1; .@quest<getarg(1)+getarg(2); set .@quest,.@quest+1) {
+		if (checkquest(.@quest,HUNTING) == 2) {
+			mes "[Reno]";
+			mes "Finished "+getarg(3)+" collection hunting quest.";
+			next;
+			setquest getarg(0);
+			erasequest .@quest;
+			getitem getarg(4),getarg(5);
+			mes "You receive "+getarg(5)+" "+getitemname(getarg(4))+"s as the "+getarg(3)+" collection reward.";
+			close;
+		}
+	}
+	return;
+}

+ 2 - 1
npc/re/scripts_athena.conf

@@ -111,9 +111,10 @@ npc: npc/re/quests/eden/eden_service.txt
 npc: npc/re/quests/eden/eden_tutorial.txt
 // iRO custom additions.
 //npc: npc/re/quests/eden/eden_iro.txt
-// --------------------------------------------------------------
 // - Quests-Tutorials for basic classes (1st class quests) ------
 npc: npc/re/quests/first_class/tu_archer.txt
+// - Headgear Quests --------------------------------------------
+npc: npc/re/quests/newgears/2012_headgears.txt
 // --------------------------------------------------------------
 //npc: npc/re/quests/cupet.txt
 npc: npc/re/quests/homun_s.txt

+ 34 - 5
sql-files/item_db_re.sql

@@ -1284,6 +1284,8 @@ REPLACE INTO `item_db_re` VALUES (2175,'Esprit_Shield','Esprit Shield',4,20,NULL
 REPLACE INTO `item_db_re` VALUES (2176,'Dark_Book','Dark Book',4,20,NULL,500,NULL,80,NULL,1,0xFFFFFFFF,63,2,32,NULL,'65',1,5,'bonus bMdef,5; if (getrefine()<=6) set .@rate,10; else if (getrefine()<=8) set .@rate,20; else set .@rate,30; bonus3 bAutoSpellWhenHit,"NPC_DRAGONFEAR",1,.@rate;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2177,'Shield_Of_Death','Shield Of Death',4,20,NULL,2000,NULL,150,NULL,1,0xFFFFFFFF,63,2,32,NULL,'90',1,3,'bonus2 bAddClass,Class_Boss,2; bonus2 bMagicAddClass,Class_Boss,2; bonus2 bAddClass,Class_Normal,10; bonus2 bMagicAddClass,Class_Normal,10;',NULL,NULL);
 #
+REPLACE INTO `item_db_re` VALUES (2183,'Impr_Angel\'s_Safeguard','Advanced Angelic Guard',4,10000,NULL,400,NULL,30,NULL,1,0x00000001,63,2,32,NULL,'99',1,1,'bonus2 bSubRace,RC_Demon,5; bonus2 bSubEle,Ele_All,5; bonus2 bSubEle,Ele_Neutral,-5;',NULL,NULL);
+#
 REPLACE INTO `item_db_re` VALUES (2190,'Ancient_Shield_Of_Aeon','Ancient Shield Of Aeon',4,0,NULL,200,NULL,5,NULL,1,0x000FDF80,63,2,32,NULL,'130',1,2,'bonus2 bSubEle,Ele_Neutral,10; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Dark,10; bonus2 bSubEle,Ele_Holy,10; bonus2 bSubEle,Ele_Ghost,10; bonus bMaxHP,500; bonus bMaxSP,50; if(getrefine()>=14) skill "MG_STONECURSE",5;',NULL,NULL);
 # GM Shield
 REPLACE INTO `item_db_re` VALUES (2199,'Ahura_Mazda','Ahura Mazdah',4,1,NULL,10,NULL,10000,NULL,0,0xFFFFFFFF,63,2,32,NULL,'1',1,0,'bonus bAllStats,50; bonus bMdef,99; bonus bShortWeaponDamageReturn,100; bonus2 bSubRace,RC_DemiHuman,95; bonus2 bSubRace,RC_Player,95; skill "CR_FULLPROTECTION",5; skill "WZ_ESTIMATION",1; skill "ST_FULLSTRIP",5; skill "HW_MAGICPOWER",10; skill "ECL_SNOWFLIP",1; skill "ECL_PEONYMAMY",1; skill "ECL_SADAGUI",1; skill "ECL_SEQUOIADUST",1; bonus bMaxHPrate,200; bonus bNoKnockback,0; bonus bDelayRate,-20; bonus bSpeedRate,25; bonus bIntravision,0;','sc_start4 SC_ENDURE,60000,10,0,0,1;','sc_end SC_ENDURE;');
@@ -2012,8 +2014,10 @@ REPLACE INTO `item_db_re` VALUES (2936,'Recovery_Ring','Recovery Ring',4,20,NULL
 REPLACE INTO `item_db_re` VALUES (2940,'Ninja_Manual','Ninja Manual',4,0,NULL,100,NULL,0,NULL,0,0x00000001,63,2,136,NULL,'0',0,0,'bonus bMaxSP,100; skill "NJ_UTSUSEMI",1; skill "NJ_KOUENKA",1; skill "NJ_SYURIKEN",1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2941,'Gunslinger_Manual','Gunslinger Manual',4,0,NULL,100,NULL,0,NULL,0,0x00000001,63,2,136,NULL,'0',0,0,'bonus bMaxSP,100; skill "GS_GLITTERING",1; skill "GS_ADJUSTMENT",1; skill "GS_MADNESSCANCEL",1; skill "GS_INCREASING",1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2942,'Taekwon_Manual','Taekwon Manual',4,0,NULL,100,NULL,0,NULL,0,0x00000001,63,2,136,NULL,'0',0,0,'bonus bMaxSP,100; skill "TK_SEVENWIND",4; skill "TK_JUMPKICK",5;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2957,'Enhanced_Ring_of_Flame_Lord','Enhanced Ring of Flame Lord',4,10,NULL,100,NULL,0,NULL,NULL,0x7CCFDF80,63,2,136,NULL,'85',NULL,NULL,'bonus bStr,3; bonus bVit,2; bonus bBaseAtk,20; bonus2 bSubEle,Ele_Fire,10; bonus3 bAutoSpell,"CH_SOULCOLLECT",1,30; bonus3 bAutoSpell,"MO_EXPLOSIONSPIRITS",1,10; bonus3 bAutoSpell,"PA_PRESSURE",2,30; bonus3 bAutoSpell,"MG_FIREBALL",1,150; bonus3 bAutoSpell,"KN_BOWLINGBASH",5,20;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (2958,'Enhanced_Ring_of_Resonance','Enhanced Ring of Resonance',4,10,NULL,100,NULL,2,NULL,NULL,0x7CCFDF80,63,2,136,NULL,'85',NULL,NULL,'bonus bAgi,3; bonus bVit,1; bonus bMdef,2; bonus bMatk,10; bonus4 bAutoSpellWhenHit,"WZ_QUAGMIRE",1,50,0; bonus3 bAutoSpellWhenHit,"AS_SPLASHER",10,20; bonus3 bAutoSpellWhenHit,"AL_HEAL",10,30; bonus3 bAutoSpellWhenHit,"HP_ASSUMPTIO",3,20; bonus3 bAutoSpellWhenHit,"CG_TAROTCARD",5,20;',NULL,NULL);
+#
+REPLACE INTO `item_db_re` VALUES (2956,'Safety_Ring_','Advanced Safety Ring',4,75000,NULL,100,NULL,10,NULL,1,0xFFFFFFFE,63,2,136,NULL,'50',0,0,'bonus bMdef,5; bonus bAllStats,1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2957,'Good_Ring_Of_Flame_Lord','Advanced Ring Of Flame Lord',4,20,NULL,100,NULL,0,NULL,0,0x7CCFDF80,63,2,136,NULL,'85',0,0,'bonus bStr,3; bonus bVit,2; bonus bBaseAtk,20; bonus2 bSubEle,Ele_Fire,10; bonus3 bAutoSpell,"CH_SOULCOLLECT",1,30; bonus3 bAutoSpell,"MO_EXPLOSIONSPIRITS",1,10; bonus3 bAutoSpell,"PA_PRESSURE",2,30; bonus3 bAutoSpell,"MG_FIREBALL",1,150; bonus3 bAutoSpell,"KN_BOWLINGBASH",5,20;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (2958,'Good_Ring_Of_Resonance','Advanced Ring Of Resonance',4,20,NULL,100,NULL,2,NULL,0,0x7CCFDF80,63,2,136,NULL,'85',0,0,'bonus bAgi,3; bonus bVit,1; bonus bMdef,2; bonus bMatk,10; bonus4 bAutoSpellWhenHit,"WZ_QUAGMIRE",1,50,0; bonus3 bAutoSpellWhenHit,"AS_SPLASHER",10,20; bonus3 bAutoSpellWhenHit,"AL_HEAL",10,30; bonus3 bAutoSpellWhenHit,"HP_ASSUMPTIO",3,20; bonus3 bAutoSpellWhenHit,"CG_TAROTCARD",5,20;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2959,'Fidelity_Necklace','Fidelity Necklace',4,20,NULL,300,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'50',0,0,'bonus bAgi,2; bonus2 bSubRace,RC_Brute,3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2960,'Badge_Of_Manny','Badge Of Manny',4,20,NULL,200,NULL,0,NULL,1,0xFFFFFFFF,63,2,136,NULL,'0',0,0,'bonus bAllStats,1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (2966,'RWC_2012_Ring','RWC 2012 Ring',4,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,136,NULL,'0',0,0,'bonus2 bAddClass,Class_All,1;',NULL,NULL);
@@ -4267,6 +4271,11 @@ REPLACE INTO `item_db_re` VALUES (6616,'Lmtd_Manny_Card','Lmtd Manny Card',3,20,
 REPLACE INTO `item_db_re` VALUES (6617,'Lmtd_Sid_Card','Lmtd Sid Card',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (6618,'Lmtd_Diego_Card','Lmtd Diego Card',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (6619,'Lmtd_Scrat_Card','Lmtd Scrat Card',3,20,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#
+REPLACE INTO `item_db_re` VALUES (6623,'Rough_Energy_Crystal','Rough Energy Crystal',3,0,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (6624,'Purified_Energy_Crystal','Purified Energy Crystal',3,0,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (6625,'High_Purity_Energy_Xtal','High Energy Crystal',3,0,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#
 REPLACE INTO `item_db_re` VALUES (6635,'Blacksmith_Blessing','Blacksmith Blessing',3,20,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (6646,'Poring_Badge','Poring Badge',3,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (6654,'Needle_And_Thread','Needle And Thread',3,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -5461,6 +5470,8 @@ REPLACE INTO `item_db_re` VALUES (11055,'Basic_Adventure','Basic Adventure',3,20
 REPLACE INTO `item_db_re` VALUES (11056,'Elemental_Spirit_Guide','Elemental Spirit Guide',3,1000,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (11057,'Feb_Sweets','February Sweets',3,20,NULL,50,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (11058,'Novice_Combi_Book','Novice Combi Book',3,0,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+#
+REPLACE INTO `item_db_re` VALUES (11060,'Energy_Xtal_Combi_Book','Energy Crystal Book',3,0,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 # More Usable Items
 #===================================================================
 REPLACE INTO `item_db_re` VALUES (11500,'Light_Yellow_Pot','Light Yellow Potion',0,550,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,63,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(175,235),0;',NULL,NULL);
@@ -7848,6 +7859,7 @@ REPLACE INTO `item_db_re` VALUES (15058,'Rider_Suit','Rider Suit',4,20,NULL,1000
 REPLACE INTO `item_db_re` VALUES (15059,'2011Love_Daddy','2011Love Daddy',4,20,NULL,100,'0',80,0,1,0xFFFFFFFF,63,2,16,NULL,'0',1,0,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (15060,'Sky_Blue_Smock','Sky Blue Smock',4,20,NULL,300,'0',1,0,1,0xFFFFFFFF,63,2,16,NULL,'0',1,0,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (15061,'Egir_Armor','Egir Armor',4,200000,NULL,2600,NULL,55,NULL,1,0xFFFFFFFF,63,2,16,NULL,'110',1,0,'bonus bAllStats,1; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (15068,'Im_Angel\'s_Protection','Advanced Angelic Protection',4,10000,NULL,600,NULL,40,NULL,1,0x00000001,63,2,16,NULL,'99',1,0,'bonus bMdef,30;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (15069,'Suit_Of_Sid','Suit Of Sid',4,20,NULL,1000,NULL,30,NULL,0,0xFFFFFFFF,63,2,16,NULL,'0',1,0,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (15088,'School_Uniform','School Uniform',4,20,NULL,500,NULL,25,NULL,1,0xFFFFFFFF,63,2,16,NULL,'0',1,0,'bonus bAgi,1; bonus bLuk,1; bonus bMaxHP,BaseLevel*3; bonus bMaxSP,BaseLevel/2;',NULL,NULL);
 #
@@ -8685,8 +8697,23 @@ REPLACE INTO `item_db_re` VALUES (18756,'Black_Shiba_Inu_Hat','Black Shiba Inu H
 REPLACE INTO `item_db_re` VALUES (18758,'Hat_Of_Scrat','Hat Of Scrat',4,20,NULL,200,NULL,3,NULL,1,0xFFFFFFFF,63,2,256,NULL,'0',1,896,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18759,'Stretched_Nose_M','Wood Goblin\'s Nose',4,20,NULL,200,NULL,0,NULL,0,0xFFFFFFFF,63,2,512,NULL,'50',0,737,'bonus bUnbreakableHelm,0;',NULL,NULL);
 #
-REPLACE INTO `item_db_re` VALUES (18766,'Improved_Helm_of_Angel','Improved Helm of Angel',4,10,NULL,1600,NULL,10,NULL,1,0x7CCFDF80,63,2,256,NULL,'99',1,110,'bonus bAgi,1; bonus bLuk,1; bonus bMDef,3; if (getrefine()>=7) { bonus bAgi,2; bonus bLuk,2; } if(getrefine()>=9) bonus bAspd,1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (18767,'Improved_Helm_Of_Sun','Improved Hat of the Sun God',4,10,NULL,2400,NULL,4,NULL,1,0x7CCFDF80,63,2,768,NULL,'99',1,138,'bonus bStr,3; bonus bInt,2; bonus bBaseAtk,10; bonus bMatk,10; if(getrefine()>=7){bonus bBaseAtk,15;bonus bMatk,15;} if(getrefine()>=9){bonus bBaseAtk,15;bonus bMatk,15;}',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18760,'Remodel_Wizardry_Hat','Improved Mage Hat',4,20,NULL,300,NULL,2,NULL,0,0x00810204,63,2,256,NULL,'0',1,112,'bonus bInt,2; bonus bMaxSP,150; set .@i,getrefine(); bonus bMatk,.@i; if(.@i>=7) bonus bInt,.@i-6;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18761,'Remodel_Magician_Hat','Improved Magician Hat',4,20,NULL,500,NULL,6,NULL,0,0x00818314,63,2,256,NULL,'50',1,130,'bonus bDex,1; bonus bAgi,1; bonus bMaxSP,50; set .@i,getrefine(); bonus bMaxSP,.@i*5; if(.@i>=7) bonus bDex,.@i-6;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18762,'Remodel_Mask_Of_Fox','Improved Kitsune Mask',4,20,NULL,300,NULL,2,NULL,0,0xFFFFFFFE,63,2,256,NULL,'0',1,153,'bonus bAgi,2; bonus bLuk,2; if(getrefine()>=7) bonus bFlee2,4;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18763,'Remodel_Joker_Jester','Improved Joker Jester',4,20,NULL,100,NULL,3,NULL,1,0xFFFFFFFE,63,2,256,NULL,'0',1,89,'bonus bLuk,2; bonus bMdef,5; if(getrefine()>=7) bonus bCritAtkRate,5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18764,'Remodel_Bunny_Band','Improved Bunny Band',4,20,NULL,100,NULL,3,NULL,1,0xFFFFFFFF,63,2,256,NULL,'0',1,15,'bonus bLuk,2; if(getrefine()>=7) bonus bCritical,5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18765,'Enhanced_Corsair','Enhanced Corsair',4,20,NULL,500,NULL,10,NULL,1,0xFFFFFFFE,63,2,256,NULL,'99',1,105,'bonus bVit,1; bonus bMaxHprate,5; if(getrefine()>=7){ bonus2 bSubEle,Ele_Neutral,1; if(getrefine()>=9) bonus bMaxHPrate,3; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18766,'Enhanced_Helm_Of_Angel','Enhanced Helm of Angel',4,20,NULL,1600,NULL,10,NULL,1,0x00CFDF80,63,2,256,NULL,'99',1,110,'bonus bAgi,1; bonus bLuk,1; bonus bMdef,3; if(getrefine()>=7){ bonus bAgi,2; bonus bLuk,2; if(getrefine()>=9) bonus bAspd,1; }',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18767,'Enhanced_Helm_Of_Sun','Enhanced Hat of the Sun God',4,20,NULL,2400,NULL,4,NULL,1,0x00CFDF80,63,2,768,NULL,'99',1,138,'bonus bStr,3; bonus bInt,2; if(getrefine()>=7){ set .@i,1; if(getrefine()>=9) set .@i,2; } bonus bBaseAtk,10+(15*.@i); bonus bMatk,10+(15*.@i);',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18768,'Enhanced_Bone_Helm','Enhanced Bone Helm',4,20,NULL,800,NULL,15,NULL,1,0x000444A2,63,2,256,NULL,'70',1,103,'bonus2 bSubEle,Ele_Dark,-15; if(getrefine()>=7){ set .@i,1; if(getrefine()>=9) set .@i,2; } bonus2 bSubEle,Ele_Neutral,2+(2*.@i);',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18769,'Remodel_Munak_Turban','Improved Munak Hat',4,20,NULL,300,NULL,5,NULL,1,0xFFFFFFFF,63,2,769,NULL,'0',0,51,'bonus2 bSubRace,RC_Undead,10; if(getrefine()>=7) bonus2 bAddRace,RC_Undead,10;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18770,'Remodel_Bongun_Hat','Improved Bongun Hat',4,20,NULL,300,NULL,5,NULL,1,0xFFFFFFFF,63,2,769,NULL,'0',0,139,'bonus2 bSubRace,RC_Demon,10; if(getrefine()>=7) bonus2 bAddRace,RC_Demon,10;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18771,'Remodel_Opera_Mask','Improved Opera Phantom Mask',4,20,NULL,200,NULL,2,NULL,0,0xFFFFFFFF,63,2,513,NULL,'20',0,68,'bonus bBaseAtk,5; bonus bMatk,5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18772,'Improved_Binoculars','Advanced Binoculars',4,20,NULL,100,NULL,2,NULL,0,0x00080808,63,2,512,NULL,'50',0,83,'bonus bDex,1; bonus bLongAtkRate,1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18773,'Improved_Fin_Helm','Advanced Fin Helm',4,20,NULL,300,NULL,5,NULL,0,0x00004082,63,2,512,NULL,'65',0,100,'bonus bMaxHP,300+BaseLevel; /* unconfirmed */',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18774,'Improved_Assassin_Mask','Advanced Assassin Mask',4,20,NULL,100,NULL,1,NULL,0,0x00001100,63,2,1,NULL,'70',0,180,'bonus bCritical,1; bonus bCritAtkRate,1;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18775,'Improved_Welding_Mask','Advanced Welding Mask',4,20,NULL,300,NULL,2,NULL,0,0x00040420,63,2,513,NULL,'50',0,79,'bonus2 bSubEle,Ele_Fire,10; bonus bDex,5; bonus bLuk,5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (18776,'Improved_Kiss_Of_Angel','Advanced Angel\'s Kiss',4,10000,NULL,300,NULL,6,NULL,1,0x00000001,63,2,256,NULL,'99',1,255,'bonus bSPrecovRate,30;',NULL,NULL);
 #
 REPLACE INTO `item_db_re` VALUES (18779,'RWC_Champ_Crown_First_Place','RWC Champ Crown First Place',4,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,902,'bonus2 bResEff,Eff_Stun,10000; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (18780,'RWC_Champ_Crown_Second_Place','RWC Champ Crown Second Place',4,20,NULL,500,NULL,12,NULL,NULL,0xFFFFFFFF,63,2,256,NULL,'1',NULL,903,'bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0; bonus bAllStats,7; bonus bMdef,5;',NULL,NULL);
@@ -8853,6 +8880,7 @@ REPLACE INTO `item_db_re` VALUES (20500,'T_Archangel_Wing','Archangel Wing',4,0,
 REPLACE INTO `item_db_re` VALUES (20600,'Fantastic_Aura','Fantastic Aura',4,0,NULL,0,NULL,0,NULL,0,0xFFFFFFFF,63,2,16384,NULL,'1',0,0,'bonus bUnbreakableHelm,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20700,'Egir_Manteau','Egir Manteau',4,200000,NULL,300,NULL,10,NULL,1,0xFFFFFFFF,63,2,4,NULL,'110',1,0,'bonus bUnbreakableHelm,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20707,'Kirin_Wing','Kirin Wing',4,20,NULL,0,NULL,18,NULL,0,0xFFFFFFFF,63,2,4,NULL,'0',1,6,'bonus bAllStats,1; bonus2 bSubRace,RC_DemiHuman,5; bonus2 bSubRace,RC_Player,5;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (20710,'Impr_Angel\'s_Warmth','Advanced Angelic Cardigan',4,10000,NULL,400,NULL,6,NULL,1,0x00000001,63,2,4,NULL,'99',1,0,'bonus bHPrecovRate,50;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20711,'Manteau_Of_Diego','Manteau Of Diego',4,20,NULL,600,NULL,15,NULL,1,0xFFFFFFFF,63,2,4,NULL,'0',1,0,'bonus bInt,1; bonus bDex,1; bonus bMdef,3;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20724,'Love_Dad_Wings_2012','Love Dad Wings 2012',4,0,NULL,100,NULL,15,NULL,1,0xFFFFFFFF,63,2,4,NULL,'1',1,5,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (20732,'STR_Complement','STR Complement',4,10,NULL,500,NULL,20,NULL,NULL,0x00000400,56,2,4,NULL,'100',1,NULL,'bonus bMaxHPrate,6+(getrefine()/2); if(getrefine()>=9){bonus bHPrecovRate,50;}',NULL,NULL);
@@ -8867,7 +8895,8 @@ REPLACE INTO `item_db_re` VALUES (21004,'Alca_Bringer_','Alca Bringer',5,20,NULL
 REPLACE INTO `item_db_re` VALUES (21005,'Metal_Two_Hand_Sword','Metal Two Hand Sword',5,20,NULL,0,'95',NULL,1,1,0x00004082,63,2,34,3,'1',1,3,'bonus bBaseAtk,(getrefine()*6); bonus bMatk,(getrefine()*2); set .@i,((BaseLevel/10)>12)?12:(BaseLevel/10); if(.@i>2) bonus bBaseAtk,((.@i-2)*5);',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (21011,'Gigantic_Blade','Gigantic Blade',3,10,NULL,5000,'300',NULL,NULL,NULL,0xFFFFFFFF,56,2,2,4,'130',1,3,'bonus bUnbreakableWeapon,1; bonus bAspdRate,-5; if(readparam(bStr)<=110){ bonus bBaseAtk,-250; }',NULL,NULL);
 # New Items
-REPLACE INTO `item_db_re` VALUES (22014,'Enhanced_Variant_Shoes','Enhanced Variant Shoes',3,10,NULL,500,NULL,13,NULL,1,0x7CCFDF80,63,2,64,NULL,'85',1,NULL,'bonus bMaxHPrate,12; bonus bMaxSPrate,12; bonus bDef,getrefine(); bonus bMdef,getrefine();',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (22014,'Enhanced_Variant_Shoes','Enhanced Variant Shoes',4,20,NULL,500,NULL,13,NULL,1,0x7CCFDF80,63,2,64,NULL,'85',1,0,'bonus bMaxHPrate,12; bonus bMaxSPrate,12; bonus bDef,getrefine(); bonus bMdef,getrefine();',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (22015,'Impr_Angel\'s_Arrival','Advanced Angel\'s Reincarnation',4,10000,NULL,300,NULL,8,NULL,1,0x00000001,63,2,64,NULL,'99',1,0,'bonus bMaxHP,500; bonus bMaxSP,100;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22043,'AGI_Complement','AGI Complement',4,10,NULL,350,NULL,25,NULL,NULL,0x00000400,56,2,64,NULL,'100',1,NULL,'bonus bAspdRate,5+(getrefine()/4);',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22044,'Reinforced_Parts_Booster','Reinforced Parts - Booster',4,10,NULL,1000,NULL,23,NULL,NULL,0x00000400,56,2,64,NULL,'100',1,NULL,'bonus2 bSkillUseSP,"NC_HOVERING",15; if(getrefine()>=7){bonus2 bSkillUseSP,"NC_HOVERING",-20;}',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (22045,'Beach_Sandals','Summer Sandals',4,10,NULL,200,NULL,5,NULL,0,0xFFFFFFFF,63,2,64,NULL,'0',1,0,'bonus bFlee,5; bonus3 bAutoSpellWhenHit,"AL_INCAGI",10,300;',NULL,NULL);

+ 26 - 0
src/map/status.c

@@ -957,6 +957,10 @@ void initChangeTables(void)
 	StatusIconChangeTable[SC_QD_SHOT_READY] = SI_E_QD_SHOT_READY;
 	StatusIconChangeTable[SC_HEAT_BARREL_AFTER] = SI_HEAT_BARREL_AFTER;
 
+	StatusIconChangeTable[SC_QUEST_BUFF1] = SI_QUEST_BUFF1;
+	StatusIconChangeTable[SC_QUEST_BUFF2] = SI_QUEST_BUFF2;
+	StatusIconChangeTable[SC_QUEST_BUFF3] = SI_QUEST_BUFF3;
+
 	/* Other SC which are not necessarily associated to skills */
 	StatusChangeFlagTable[SC_ASPDPOTION0] = SCB_ASPD;
 	StatusChangeFlagTable[SC_ASPDPOTION1] = SCB_ASPD;
@@ -1052,6 +1056,10 @@ void initChangeTables(void)
 	StatusChangeFlagTable[SC_MTF_MATK] = SCB_MATK;
 	StatusChangeFlagTable[SC_MTF_MLEATKED] |= SCB_ALL;
 
+	StatusChangeFlagTable[SC_QUEST_BUFF1] |= SCB_BATK|SCB_MATK;
+	StatusChangeFlagTable[SC_QUEST_BUFF2] |= SCB_BATK|SCB_MATK;
+	StatusChangeFlagTable[SC_QUEST_BUFF3] |= SCB_BATK|SCB_MATK;
+
 #ifdef RENEWAL
 	// renewal EDP increases your weapon atk
 	StatusChangeFlagTable[SC_EDP] |= SCB_WATK;
@@ -5042,6 +5050,12 @@ static unsigned short status_calc_batk(struct block_list *bl, struct status_chan
 		batk += sc->data[SC_PYROCLASTIC]->val2;
 	if (sc->data[SC_ANGRIFFS_MODUS])
 		batk += sc->data[SC_ANGRIFFS_MODUS]->val2;
+	if(sc->data[SC_QUEST_BUFF1])
+		batk += sc->data[SC_QUEST_BUFF1]->val1;
+	if(sc->data[SC_QUEST_BUFF2])
+		batk += sc->data[SC_QUEST_BUFF2]->val1;
+	if(sc->data[SC_QUEST_BUFF3])
+		batk += sc->data[SC_QUEST_BUFF3]->val1;
 
 	if(sc->data[SC_INCATKRATE])
 		batk += batk * sc->data[SC_INCATKRATE]->val1/100;
@@ -5193,6 +5207,12 @@ static unsigned short status_calc_ematk(struct block_list *bl, struct status_cha
 		matk += 40 + 30 * sc->data[SC_ODINS_POWER]->val1; // 70 lvl1, 100lvl2
 	if(sc->data[SC_IZAYOI])
 		matk += 50 * sc->data[SC_IZAYOI]->val1;
+	if(sc->data[SC_QUEST_BUFF1])
+		matk += sc->data[SC_QUEST_BUFF1]->val1;
+	if(sc->data[SC_QUEST_BUFF2])
+		matk += sc->data[SC_QUEST_BUFF2]->val1;
+	if(sc->data[SC_QUEST_BUFF3])
+		matk += sc->data[SC_QUEST_BUFF3]->val1;
 	return (unsigned short)cap_value(matk,0,USHRT_MAX);
 }
 #endif
@@ -10016,6 +10036,9 @@ int status_change_clear(struct block_list* bl, int type)
 			case SC_PUSH_CART:
 			case SC_STYLE_CHANGE:
 			case SC_HEAT_BARREL_AFTER:
+			case SC_QUEST_BUFF1:
+			case SC_QUEST_BUFF2:
+			case SC_QUEST_BUFF3:
 				continue;
 		}
 
@@ -11780,6 +11803,9 @@ void status_change_clear_buffs (struct block_list* bl, int type)
 			case SC_PUSH_CART:
 			case SC_STYLE_CHANGE:
 			case SC_HEAT_BARREL_AFTER:
+			case SC_QUEST_BUFF1:
+			case SC_QUEST_BUFF2:
+			case SC_QUEST_BUFF3:
 				continue;
 
 			// Debuffs that can be removed.

+ 4 - 0
src/map/status.h

@@ -689,6 +689,10 @@ typedef enum sc_type {
 	SC_STRANGELIGHTS,
 	SC_DECORATION_OF_MUSIC,
 
+	SC_QUEST_BUFF1,
+	SC_QUEST_BUFF2,
+	SC_QUEST_BUFF3,
+
 #ifdef RENEWAL
 	SC_EXTREMITYFIST2,
 #endif