Jump to content
  • 0
tokenacc001

R> command that hides headgear

Question

hello!
Anyone can help me make a command that will hide all player's headgear (only on the side of player who use the command), but still equipped?

 

Thanks a lot!!

Edit: not sure if this is allowed but: willing to pay for it... really need this feature

Edited by tokenacc001
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

This would be a lot of work and unless it's already been done I doubt someone is gonna do it for free. I've looked around a lot for something like this in the past and never found it.

This would require client-side modification on top of the c++ coding to install the AT command, which is the easier part.

I know this isn't really helpful. But there is a costume item called Invisible Hat, Invisible Sunglasses, and Invisible Mask(dont remember the real name).
https://www.divine-pride.net/database/item/31292/unknown-item-31292

So at the very least you could make an NPC or command that hands these out so a single player has the freedom to hide their own headgears. But it's hardly a solution.

Link to comment
Share on other sites

  • 0
10 hours ago, TheKingDino said:

This would be a lot of work and unless it's already been done I doubt someone is gonna do it for free. I've looked around a lot for something like this in the past and never found it.

This would require client-side modification on top of the c++ coding to install the AT command, which is the easier part.

I know this isn't really helpful. But there is a costume item called Invisible Hat, Invisible Sunglasses, and Invisible Mask(dont remember the real name).
https://www.divine-pride.net/database/item/31292/unknown-item-31292

So at the very least you could make an NPC or command that hands these out so a single player has the freedom to hide their own headgears. But it's hardly a solution.

do you have idea on how to do that? willing to pay... really need this feature.

Link to comment
Share on other sites

  • 0

Try this

 

//Simple HG Hiding by crazyarashi

-	script	Invisible	-1,{
OnAtCommand:
	[email protected]$ = "["+ strnpcinfo(1) +"]";
	mes [email protected]$;
	mes "Hello, "+strcharinfo(0);
	mes "Which headgear do you want to hide?";	
	next;
	setarray [email protected]$, "Top Headgear", "Middle Headgear", "Lower Headgear";
	[email protected]$ = implode([email protected]$, ":");
		[email protected] = select( [email protected]$ ) - 1;
				[email protected] = getequipid(.location$[[email protected]]);
				if( [email protected] != getequipid(.location$[[email protected]])) {
				mes [email protected]$;
				mes "You're not wearing any headgear";
				close;
		} else {
				atcommand "@"+ .looks$[[email protected]];
				dispbottom [email protected]$[[email protected]] +" is now hidden";
				end;
				}
OnInit:
	setarray .location$, "EQI_HEAD_TOP", "EQI_HEAD_MID", "EQI_HEAD_LOW";
	setarray .looks$, "changelook 1 0", "changelook 2 0", "changelook 3 0";
	bindatcmd "hidehg",strnpcinfo(0)+"::OnAtCommand";

}

 

Link to comment
Share on other sites

  • 0

 

20 hours ago, TheKingDino said:

This would be a lot of work and unless it's already been done I doubt someone is gonna do it for free. I've looked around a lot for something like this in the past and never found it.

This would require client-side modification on top of the c++ coding to install the AT command, which is the easier part.

I know this isn't really helpful. But there is a costume item called Invisible Hat, Invisible Sunglasses, and Invisible Mask(dont remember the real name).
https://www.divine-pride.net/database/item/31292/unknown-item-31292

So at the very least you could make an NPC or command that hands these out so a single player has the freedom to hide their own headgears. But it's hardly a solution.

I don't think it will be hard as per your claim 😛

@tokenacc001

Go to src/map/clif.cpp and change below from

// prevent leaking the presence of GM-hidden objects
if( sc && sc->option&OPTION_INVISIBLE )
	target = SELF;

to

// prevent leaking the presence of GM-hidden objects
if( (sc && sc->option&OPTION_INVISIBLE) || !val )
	target = SELF;

Recompile and re-test the script given by @Poring King . above change will work globally so use at your own risk.

Photo1.PNG

Photo2.PNG

Link to comment
Share on other sites

  • 0
9 hours ago, Patskie said:

 

I don't think it will be hard as per your claim 😛

@tokenacc001

Go to src/map/clif.cpp and change below from

// prevent leaking the presence of GM-hidden objects
if( sc && sc->option&OPTION_INVISIBLE )
	target = SELF;

to

// prevent leaking the presence of GM-hidden objects
if( (sc && sc->option&OPTION_INVISIBLE) || !val )
	target = SELF;

Recompile and re-test the script given by @Poring King . above change will work globally so use at your own risk.

Photo1.PNG

Photo2.PNG

didn't work 😞
it just work like a regular changelook, other players can't see the command user's headgear, and the command user can still see other player's headgear

 

image.png.029b4077961799fc478b672fd6484dca.png
image.png.c86a93514662018c89f4ea12fbdf7332.pngimage.png.7d8f1108a679cc4e131bd1468d8c2ea5.png
 

Link to comment
Share on other sites

  • 0
18 minutes ago, tokenacc001 said:

didn't work 😞
it just work like a regular changelook, other players can't see the command user's headgear, and the command user can still see other player's headgear

 

image.png.029b4077961799fc478b672fd6484dca.png
image.png.c86a93514662018c89f4ea12fbdf7332.pngimage.png.7d8f1108a679cc4e131bd1468d8c2ea5.png
 

Did you recompile your server?

Link to comment
Share on other sites

  • 0
On 8/11/2020 at 11:36 PM, Poring King said:

Try this

 

//Simple HG Hiding by crazyarashi

-	script	Invisible	-1,{
OnAtCommand:
	[email protected]$ = "["+ strnpcinfo(1) +"]";
	mes [email protected]$;
	mes "Hello, "+strcharinfo(0);
	mes "Which headgear do you want to hide?";	
	next;
	setarray [email protected]$, "Top Headgear", "Middle Headgear", "Lower Headgear";
	[email protected]$ = implode([email protected]$, ":");
		[email protected] = select( [email protected]$ ) - 1;
				[email protected] = getequipid(.location$[[email protected]]);
				if( [email protected] != getequipid(.location$[[email protected]])) {
				mes [email protected]$;
				mes "You're not wearing any headgear";
				close;
		} else {
				atcommand "@"+ .looks$[[email protected]];
				dispbottom [email protected]$[[email protected]] +" is now hidden";
				end;
				}
OnInit:
	setarray .location$, "EQI_HEAD_TOP", "EQI_HEAD_MID", "EQI_HEAD_LOW";
	setarray .looks$, "changelook 1 0", "changelook 2 0", "changelook 3 0";
	bindatcmd "hidehg",strnpcinfo(0)+"::OnAtCommand";

}

 

Hi Sir @Poring King,I tried your script and it works perfectly however Im just wondering if its possible that instead of choosing which headgear to disable, once @hidehg is called all of the headgear views will be 0?

Thank you sir and more power!

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...

Important Information

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