Jump to content

Recommended Posts

wait, I will update my source.

 

~ Updated to latest revision.

 

Kindly Rollback your modification and download the latest version 1.2 :)

Edited by sevenzz23

Share this post


Link to post
Share on other sites

I can't equipp any ammo now :/ I don't know if its my error or something else...

 

It shows my costume item (only happens if I log off with the costume item equipped) on the ammo slot when i put off it

Edited by darkxxcrow

Share this post


Link to post
Share on other sites

are you sure you rollback your changes in last modification for costume system?

 

check your pc.c and check for this line if match.

	unsigned int equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_GARMENT,EQP_AMMO, EQP_SHADOW_ARMOR, EQP_SHADOW_WEAPON, EQP_SHADOW_SHIELD, EQP_SHADOW_SHOES, EQP_SHADOW_ACC_R, EQP_SHADOW_ACC_L };

and in pc.h

//Equip indexes constants. (eg: sd->equip_index[EQI_AMMO] returns the index//where the arrows are equipped)enum equip_index {	EQI_ACC_L = 0,	EQI_ACC_R,	EQI_SHOES,	EQI_GARMENT,	EQI_HEAD_LOW,	EQI_HEAD_MID,	EQI_HEAD_TOP,	EQI_ARMOR,	EQI_HAND_L,	EQI_HAND_R,	EQI_COSTUME_TOP,	EQI_COSTUME_MID,	EQI_COSTUME_LOW,	EQI_COSTUME_GARMENT,	EQI_AMMO,	EQI_SHADOW_ARMOR,	EQI_SHADOW_WEAPON,	EQI_SHADOW_SHIELD,	EQI_SHADOW_SHOES,	EQI_SHADOW_ACC_R,	EQI_SHADOW_ACC_L,	EQI_MAX};

Share this post


Link to post
Share on other sites

In your diff, on pc.h, the patch erases EQI_MAX and replaces it with EQI_MAX_BONUS = 10. Also, it moves EQI_AMMO a few lines down, so, i don't have the same lines you posted.

 

(I rollbacked the modification by downloading a new fresh Hercules and applying manually the patch to it.

Edited by darkxxcrow

Share this post


Link to post
Share on other sites

If you download the latest patch named Costume_System v1.2

Index: src/map/atcommand.c===================================================================--- src/map/atcommand.c	(revision 13617)+++ src/map/atcommand.c	(working copy)@@ -1085,7 +1085,7 @@ ACMD(item) { 	char item_name[100];-	int number = 0, item_id, flag = 0, bound = 0;+	int number = 0, item_id, flag = 0, bound = 0, costume = 0; 	struct item item_tmp; 	struct item_data *item_data; 	int get_count, i;@@ -1139,7 +1139,27 @@ 				break; 		} 	}-+	+		if( !strcmpi(command+1,"costumeitem") )+	{+		if( !battle_config.reserved_costume_id )+		{+			clif->message(fd, "Costume conversion is disable. Set a value for reserved_cosutme_id on your battle.conf file.");+			return -1;+		}+		if( !(item_data->equip&EQP_HEAD_LOW) &&+			!(item_data->equip&EQP_HEAD_MID) &&+			!(item_data->equip&EQP_HEAD_TOP) &&+			!(item_data->equip&EQP_COSTUME_HEAD_LOW) &&+			!(item_data->equip&EQP_COSTUME_HEAD_MID) &&+			!(item_data->equip&EQP_COSTUME_HEAD_TOP) )+		{+			clif->message(fd, "You cannot costume this item. Costume only work for headgears.");+			return -1;+		}+		costume = 1;+	}+	 	item_id = item_data->nameid; 	get_count = number; 	//Check if it's stackable.@@ -1159,6 +1179,14 @@ 			item_tmp.identify = 1; 			item_tmp.bound = (unsigned char)bound; 			+			if( costume == 1 )+			{ // Costume Item+				item_tmp.card[0] = CARD0_CREATE;+				item_tmp.card[2] = GetWord(battle_config.reserved_costume_id, 0);+				item_tmp.card[3] = GetWord(battle_config.reserved_costume_id, 1);+			}+			+			 			if ((flag = pc->additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) 				clif->additem(sd, 0, 0, flag); 		}@@ -9600,6 +9628,7 @@ 		ACMD_DEF(searchstore), 		ACMD_DEF(costume), 		ACMD_DEF(skdebug),+		ACMD_DEF2("costumeitem", item) 	}; 	int i; 	Index: src/map/battle.c===================================================================--- src/map/battle.c	(revision 13617)+++ src/map/battle.c	(working copy)@@ -6543,6 +6543,7 @@ 	{ "feature.banking",                    &battle_config.feature_banking,                 1,      0,      1,              }, 	{ "feature.auction",                    &battle_config.feature_auction,                 0,      0,      2,              }, 	{ "idletime_criteria",                  &battle_config.idletime_criteria,            0x25,      1,      INT_MAX,        },+	{ "reserved_costume_id",                &battle_config.reserved_costume_id,             999998, 0,      INT_MAX,        },  	{ "mon_trans_disable_in_gvg",           &battle_config.mon_trans_disable_in_gvg,        0,      0,      1,              }, 	{ "case_sensitive_aegisnames",          &battle_config.case_sensitive_aegisnames,       1,      0,      1,              },Index: src/map/battle.h===================================================================--- src/map/battle.h	(revision 13617)+++ src/map/battle.h	(working copy)@@ -447,6 +447,9 @@ 	int min_npc_vendchat_distance; 	int atcommand_mobinfo_type; 	+	// Costume System+	int reserved_costume_id;+ 	int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95] 	 	/** Hercules **/Index: src/map/map.c===================================================================--- src/map/map.c	(revision 13617)+++ src/map/map.c	(working copy)@@ -1577,6 +1577,13 @@  	nullpo_retv(sd); +		+	if( battle_config.reserved_costume_id && battle_config.reserved_costume_id == charid )+	{+		clif->solved_charname(sd->fd, charid, "Costume");+		return;+	}+	 	tsd = map->charid2sd(charid); 	if( tsd ) { 		clif->solved_charname(sd->fd, charid, tsd->status.name);Index: src/map/pc.c===================================================================--- src/map/pc.c	(revision 13617)+++ src/map/pc.c	(working copy)@@ -664,8 +664,8 @@  int pc_equippoint(struct map_session_data *sd,int n) {-	int ep = 0;-+	int ep = 0, char_id = 0;+	 	nullpo_ret(sd);  	if(!sd->inventory_data[n])@@ -684,6 +684,14 @@ 		if( ep == EQP_SHADOW_SHIELD )/* are there conditions for those? */ 			return EQP_SHADOW_WEAPON|EQP_SHADOW_SHIELD; 	}+	if( battle_config.reserved_costume_id &&+		sd->status.inventory[n].card[0] == CARD0_CREATE &&+		(char_id = MakeDWord(sd->status.inventory[n].card[2],sd->status.inventory[n].card[3])) == battle_config.reserved_costume_id )+	{ // Costume Item - Converted+		if( ep&EQP_HEAD_TOP ) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; }+		if( ep&EQP_HEAD_LOW ) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; }+		if( ep&EQP_HEAD_MID ) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; }+	} 	return ep; } Index: src/map/script.c===================================================================--- src/map/script.c	(revision 13617)+++ src/map/script.c	(working copy)@@ -18016,6 +18019,51 @@ 	return true; } +/*==========================================+ * Costume Items Hercules/[Mhalicot]+ *------------------------------------------*/+BUILDIN(costume)+{+	int i = -1, num, ep;+	TBL_PC *sd;++	num = script_getnum(st,2); // Equip Slot+	sd = script->rid2sd(st);++	if( sd == NULL )+		return 0;+	if( num > 0 && num <= ARRAYLENGTH(script->equip) )+		i = pc->checkequip(sd, script->equip[num - 1]);+	if( i < 0 )+		return 0;+	ep = sd->status.inventory[i].equip;+	if( !(ep&EQP_HEAD_LOW) && !(ep&EQP_HEAD_MID) && !(ep&EQP_HEAD_TOP) )+		return 0;++	logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i],sd->inventory_data[i]);+	pc->unequipitem(sd,i,2);+	clif->delitem(sd,i,1,3);+	// --------------------------------------------------------------------+	sd->status.inventory[i].refine = 0;+	sd->status.inventory[i].attribute = 0;+	sd->status.inventory[i].card[0] = CARD0_CREATE;+	sd->status.inventory[i].card[1] = 0;+	sd->status.inventory[i].card[2] = GetWord(battle_config.reserved_costume_id, 0);+	sd->status.inventory[i].card[3] = GetWord(battle_config.reserved_costume_id, 1);++	if( ep&EQP_HEAD_TOP ) { ep &= ~EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; }+	if( ep&EQP_HEAD_LOW ) { ep &= ~EQP_HEAD_LOW; ep |= EQP_COSTUME_HEAD_LOW; }+	if( ep&EQP_HEAD_MID ) { ep &= ~EQP_HEAD_MID; ep |= EQP_COSTUME_HEAD_MID; }+	// --------------------------------------------------------------------+	logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i],sd->inventory_data[i]);++	clif->additem(sd,i,1,0);+	pc->equipitem(sd,i,ep);+	clif->misceffect(&sd->bl,3);++	return true;+}+ // declarations that were supposed to be exported from npc_chat.c #ifdef PCRE_SUPPORT 	BUILDIN(defpattern);@@ -18585,6 +18633,9 @@ 		BUILDIN_DEF(changequest, "ii"), 		BUILDIN_DEF(showevent, "i?"), 		+		// Costume System+		BUILDIN_DEF(costume,"i"),+		 		/** 		 * hQueue [Ind/Hercules] 		 **/

it does not have 

 

In your diff, on pc.h, the patch erases EQI_MAX and replaces it with EQI_MAX_BONUS = 10. Also, it moves EQI_AMMO a few lines down, so, i don't have the same lines you posted.

 

(I rollbacked the modification by downloading a new fresh Hercules and applying manually the patch to it.

 

 

what told you before is to 

 

wait, I will update my source.

 

~ Updated to latest revision.

 

Kindly Rollback your modification and download the latest version 1.2 :)

 

because in the later version it still have EQI_MAX_BONUS = 10. that is why I want you to rollback your modification first. before apply the patch :meow:

Share this post


Link to post
Share on other sites

bug found

1. I have 2 same hats to my inventory, i wear the 1st hat then convert it to custom, the 2nd hat is still in my inventory. now i tried to restore my 1st hat to its original form while the 2nd hat is still in my inventory. then when i convert the 1st hat to its original form it didn't go back to original form. then i tried to remove the 2nd hat from my inventory then tried to restore the 1st hat then it works. please fix this minor bug thank you

 

also can you give me a diff that the items that are being converted won't have effect, it would be just a style.

Share this post


Link to post
Share on other sites

^ will check that bugs, and all converted items doesnt have effect it is just a plain item.

thank you

 

about the effect. the converted items effect still works 

 

this ss has no equipment,buff,costumes,

 

11tvcr5.png

 

 

this one has a costume

all stats+ 2

 

2yv9ks1.png

Share this post


Link to post
Share on other sites

I'm sorry I misunderstood what you mean, yes it will use the items attributes because costume system only create a duplicate copy of your headgears. 

Share this post


Link to post
Share on other sites

I'm sorry I misunderstood what you mean, yes it will use the items attributes because costume system only create a duplicate copy of your headgears. 

oic. but can you create a diff that when converted to costume then the item won't have effect already just a pure style?

Share this post


Link to post
Share on other sites

and the name "Costume's" (headgear). can you change the "Costume's" into a player name? like if my name is ASDASD the converted costume item will be renamed as ASDASD's (headgear) thanks

Share this post


Link to post
Share on other sites

 

I'm sorry I misunderstood what you mean, yes it will use the items attributes because costume system only create a duplicate copy of your headgears. 

oic. but can you create a diff that when converted to costume then the item won't have effect already just a pure style?

since I don't own the codes, I don't think so.

 

and the name "Costume's" (headgear). can you change the "Costume's" into a player name? like if my name is ASDASD the converted costume item will be renamed as ASDASD's (headgear) thanks

yes, you can manually edit it 

	if( battle_config.reserved_costume_id && battle_config.reserved_costume_id == charid )	{		clif->solved_charname(sd->fd, charid, "Costume"); <-- replace with "strcharinfo(0)"

then recompile.

Share this post


Link to post
Share on other sites

I've been looking too long for something like this. Thanks for the script!

 

Someone asked this before but isn't there any chance that the Custome item won't have the effects of the original item?

Because at the moment it is like if you're wearing two headgears and this is quiet unbalanced.

So can the effect of the costume be nulled or something?

 

Otherwise I will have to duplicate add each headgear to the the item_db without effects on my own. I just wanted to ask again before I do this.

Maybe there is also another solution for this. Like headgear disguise which will stay after relog?

 

Greetings

Richard

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.