Jump to content
  • 0

R> command that hides headgear


tokenacc001

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.01
  • Content Count:  35
  • Reputation:   0
  • Joined:  06/30/20
  • Last Seen:  

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

11 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

 

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

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.01
  • Content Count:  68
  • Reputation:   7
  • Joined:  02/21/19
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.01
  • Content Count:  35
  • Reputation:   0
  • Joined:  06/30/20
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

Try this

 

//Simple HG Hiding by crazyarashi

-	script	Invisible	-1,{
OnAtCommand:
	.@npc$ = "["+ strnpcinfo(1) +"]";
	mes .@npc$;
	mes "Hello, "+strcharinfo(0);
	mes "Which headgear do you want to hide?";	
	next;
	setarray .@hgmenu$, "Top Headgear", "Middle Headgear", "Lower Headgear";
	.@menu$ = implode(.@hgmenu$, ":");
		.@i = select( .@menu$ ) - 1;
				.@equip = getequipid(.location$[.@i]);
				if( .@equip != getequipid(.location$[.@i])) {
				mes .@npc$;
				mes "You're not wearing any headgear";
				close;
		} else {
				atcommand "@"+ .looks$[.@i];
				dispbottom .@hgmenu$[.@i] +" 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

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.01
  • Content Count:  35
  • Reputation:   0
  • Joined:  06/30/20
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.01
  • Content Count:  35
  • Reputation:   0
  • Joined:  06/30/20
  • Last Seen:  

4 minutes ago, Patskie said:

Did you recompile your server?

yes i did ? 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/26/16
  • Last Seen:  

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

Try this

 


//Simple HG Hiding by crazyarashi

-	script	Invisible	-1,{
OnAtCommand:
	.@npc$ = "["+ strnpcinfo(1) +"]";
	mes .@npc$;
	mes "Hello, "+strcharinfo(0);
	mes "Which headgear do you want to hide?";	
	next;
	setarray .@hgmenu$, "Top Headgear", "Middle Headgear", "Lower Headgear";
	.@menu$ = implode(.@hgmenu$, ":");
		.@i = select( .@menu$ ) - 1;
				.@equip = getequipid(.location$[.@i]);
				if( .@equip != getequipid(.location$[.@i])) {
				mes .@npc$;
				mes "You're not wearing any headgear";
				close;
		} else {
				atcommand "@"+ .looks$[.@i];
				dispbottom .@hgmenu$[.@i] +" 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

  • 0

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.02
  • Content Count:  43
  • Reputation:   0
  • Joined:  04/06/22
  • Last Seen:  

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

Try this

 

//Simple HG Hiding by crazyarashi

-	script	Invisible	-1,{
OnAtCommand:
	.@npc$ = "["+ strnpcinfo(1) +"]";
	mes .@npc$;
	mes "Hello, "+strcharinfo(0);
	mes "Which headgear do you want to hide?";	
	next;
	setarray .@hgmenu$, "Top Headgear", "Middle Headgear", "Lower Headgear";
	.@menu$ = implode(.@hgmenu$, ":");
		.@i = select( .@menu$ ) - 1;
				.@equip = getequipid(.location$[.@i]);
				if( .@equip != getequipid(.location$[.@i])) {
				mes .@npc$;
				mes "You're not wearing any headgear";
				close;
		} else {
				atcommand "@"+ .looks$[.@i];
				dispbottom .@hgmenu$[.@i] +" 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";

}

 

it uses the command but still show the hg ? Any help on this 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.05
  • Content Count:  478
  • Reputation:   14
  • Joined:  11/30/17
  • Last Seen:  

if you unequipped any item that you already hide it will show up again upon re-equipping it

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  12/14/16
  • Last Seen:  

who can help me...

off

Costume ROBE

        changelook LOOK_ROBE,getlook(LOOK_ROBE);
        changelook LOOK_ROBE,0;

i load show again this costume

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