Jump to content
  • 0
Sign in to follow this  
Petey Pablo

Disable costume equip

Question

5 answers to this question

Recommended Posts

  • 0

Requesting script to disable equip costume if the player have donate headgears. Thank you!

 

Please do elaborate and supply more information about your request, thanks.

Share this post


Link to post
Share on other sites
  • 0

 

Requesting script to disable equip costume if the player have donate headgears. Thank you!

 

Please do elaborate and supply more information about your request, thanks.

 

If you equipped donate items like item id 2280 you cannot equip any item id of costume items. Because I want to view the original sprite.

Share this post


Link to post
Share on other sites
  • 0

 

 

Requesting script to disable equip costume if the player have donate headgears. Thank you!

 

Please do elaborate and supply more information about your request, thanks.

 

If you equipped donate items like item id 2280 you cannot equip any item id of costume items. Because I want to view the original sprite.

 

 

 

How about this?

Full Script Linkhttp://upaste.me/9ba637711820fb425

 

Instructions:

1)  Load this script:

// =============================
/* Disable costume equip: http://herc.ws/board/topic/13925-disable-costume-equip/
	----------------------------
	by: Legend
	compatible w/: Hercules
	----------------------------
	Description:
	* Allows you to disable wearing of costume items
	  while donate items were equipped.
	----------------------------
	comments:
	* Please report to me if bugs were found:
	  Contact: http://herc.ws/board/user/5387-legend/
*/
// =============================
-	script	Request#7	FAKE_NPC,{
OnInit:
	// Add all your donate item id here
	setarray .c[0],2220,2280; // 2220 = hat || 2201 = sunglass || 2280 = sakkat
	end;
	
OnCheckItem:
	for (.@i = 0; .@i < getarraysize(.c); ++.@i){
		if (isequipped(.c[.@i])){
			++.@citem;
		}
	}
	if (.@citem){
		if (getequipisequiped(EQI_COSTUME_HEAD_TOP)) unequip EQI_COSTUME_HEAD_TOP;
		if (getequipisequiped(EQI_COSTUME_HEAD_MID)) unequip EQI_COSTUME_HEAD_MID;
		if (getequipisequiped(EQI_COSTUME_HEAD_LOW)) unequip EQI_COSTUME_HEAD_LOW;
		if (getequipisequiped(EQI_COSTUME_GARMENT)) unequip EQI_COSTUME_GARMENT;
		message strcharinfo(0), "You are not allowed to wear costume item while wearing donate equipment.";
	}
	end;
}

2) Insert this script to ALL of your costume items on itemdb.

 IF you miss this one, it won't work.

	Script: <"
		doevent "Request#7::OnCheckItem";
	">

 

It seems I can't found any way to simplify things, so i wrote this way.

Please report if bugs were found.

And please don't forget to modify ".c[0]" array, add all your donate items in there.

Share this post


Link to post
Share on other sites
  • 0

 

 

 

Requesting script to disable equip costume if the player have donate headgears. Thank you!

 

Please do elaborate and supply more information about your request, thanks.

 

If you equipped donate items like item id 2280 you cannot equip any item id of costume items. Because I want to view the original sprite.

 

 

 

How about this?

Full Script Linkhttp://upaste.me/9ba637711820fb425

 

Instructions:

1)  Load this script:

// =============================
/* Disable costume equip: http://herc.ws/board/topic/13925-disable-costume-equip/
	----------------------------
	by: Legend
	compatible w/: Hercules
	----------------------------
	Description:
	* Allows you to disable wearing of costume items
	  while donate items were equipped.
	----------------------------
	comments:
	* Please report to me if bugs were found:
	  Contact: http://herc.ws/board/user/5387-legend/
*/
// =============================
-	script	Request#7	FAKE_NPC,{
OnInit:
	// Add all your donate item id here
	setarray .c[0],2220,2280; // 2220 = hat || 2201 = sunglass || 2280 = sakkat
	end;
	
OnCheckItem:
	for (.@i = 0; .@i < getarraysize(.c); ++.@i){
		if (isequipped(.c[.@i])){
			++.@citem;
		}
	}
	if (.@citem){
		if (getequipisequiped(EQI_COSTUME_HEAD_TOP)) unequip EQI_COSTUME_HEAD_TOP;
		if (getequipisequiped(EQI_COSTUME_HEAD_MID)) unequip EQI_COSTUME_HEAD_MID;
		if (getequipisequiped(EQI_COSTUME_HEAD_LOW)) unequip EQI_COSTUME_HEAD_LOW;
		if (getequipisequiped(EQI_COSTUME_GARMENT)) unequip EQI_COSTUME_GARMENT;
		message strcharinfo(0), "You are not allowed to wear costume item while wearing donate equipment.";
	}
	end;
}

2) Insert this script to ALL of your costume items on itemdb.

 IF you miss this one, it won't work.

	Script: <"
		doevent "Request#7::OnCheckItem";
	">

 

It seems I can't found any way to simplify things, so i wrote this way.

Please report if bugs were found.

And please don't forget to modify ".c[0]" array, add all your donate items in there.

 

Thank you very much!

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
Answer this question...

×   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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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