Jump to content
  • 0

Script that cancels @hide


TiMz

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  192
  • Reputation:   9
  • Joined:  05/08/13
  • Last Seen:  

I have a special room which @hide a player if they enter as a watcher. Except I'm not sure how to "unhide" them using an exit NPC.

 

I tried sc_end all but it doesn't seem to work. I also tried @hide to reverse the command which works, but now player who enters as non-watchers will be hidden as they exit the room.

 

Any ideas?

Edited by Isaiah
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

prontera,157,183,4	script	kjsdhfkjsdf	100,{
	if ( select( "Enter as Spectator", "Enter as candidates" ) == 1 )
		setoption Option_Invisible | Option_Xmas, 1;
	warp "guild_vs2", 0,0;
	end;
OnPCLogoutEvent:
	if ( strcharinfo(3) == "guild_vs2" )
		setoption Option_Invisible | Option_Xmas, 0;
	end;
}

guild_vs2	mapflag	pvp
guild_vs2	mapflag	pvp_noguild
guild_vs2	mapflag	nowarpto
guild_vs2	mapflag	nowarp
guild_vs2	mapflag	noteleport
guild_vs2	mapflag	nomemo
guild_vs2	mapflag	nosave	SavePoint
force the user quit the map by logging out

then when they log out, execute OnPCLogoutEvent to remove the hide

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Try to un-hide them first before warping them out, you can also delay the warping process if they still get hidden when warping out.

 

atcommand "@hide";
sleep2 1000;
warp "prontera",123,456;
end;

 

If you can post your script here so I could take a look at it

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Couldn't you just setoption Option_Invisible | Option_Xmas to 0 upon warping them out, since it just nullifies those 2 particular effects. And if they were 0 already ( Candidates ) it wouldn't change anything, this would eliminate the need to "force" them to logout, but you could also add the logout as a fail-safe, since scripts like these are easily abused. But, to fully prevent it from being abused, you'd need a bit more complicated If(then)statement, because you can just summon the person with GuildRecall, and then they are invisible forever provided they don't re-enter and logout.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

I think option 6 (Petrifying) is better for these things... It disables the use of NPCs etc. Even if they did abuse it their character is rather useless. I do agree with the post above you should add a check that they remain on the designated map...

prontera,157,183,4	script	kjsdhfkjsdf	100,{
	if ( select( "Enter as Spectator", "Enter as candidates" ) == 1 ) {
		setoption 0x40 | Option_Xmas, 1;
		addtimer 1000,"kjsdhfkjsdf::OnCheckEvent";
	}
	warp "guild_vs2", 0,0;
	end;

OnCheckEvent:
	if( strcharinfo(3) != "guild_vs2" && checkoption(0x40 | Option_Xmas) )
		setoption 0x40 | Option_Xmas, 0;
	addtimer 1000,"kjsdhfkjsdf::OnCheckEvent";
	end;
	
OnPCLogoutEvent:
	if ( strcharinfo(3) == "guild_vs2" )
		setoption 0x40 | Option_Xmas, 0;
	end;
}

guild_vs2	mapflag	pvp
guild_vs2	mapflag	pvp_noguild
guild_vs2	mapflag	nowarpto
guild_vs2	mapflag	nowarp
guild_vs2	mapflag	noteleport
guild_vs2	mapflag	nomemo
guild_vs2	mapflag	nosave	SavePoint

Option_Invisible didn't seem to work for me either I'm sure it probably has something to do with my revision.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

Option_Invisible didn't seem to work for me either I'm sure it probably has something to do with my revision.

spotted !

you are not using rAthena :D

rathena has Option_Invisible

https://github.com/rathena/rathena/blob/master/db/const.txt#L311

hercules doesn't has

https://github.com/HerculesWS/Hercules/blob/master/db/const.txt#L301

actually just copy these constants into your const.txt file and it should work

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

 

Option_Invisible didn't seem to work for me either I'm sure it probably has something to do with my revision.

spotted !

you are not using rAthena :D

rathena has Option_Invisible

https://github.com/rathena/rathena/blob/master/db/const.txt#L311

hercules doesn't has

https://github.com/HerculesWS/Hercules/blob/master/db/const.txt#L301

actually just copy these constants into your const.txt file and it should work

 

 

Lol I actually have 7 different test servers consisting of the mainly used RO Emulators. I prefer to use an older version of rAthena because it has the older instance system and most of my test projects. Thank you, I'll try to add this it seems useful. ^_^

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