Jump to content
  • 0

Q>group id permission in a certain script or command


Sallycantdance

Question


  • Group:  Members
  • Topic Count:  224
  • Topics Per Day:  0.14
  • Content Count:  796
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

hello everyone i want group 1 only to use this command can someone help me ty

 

MVPStatus.txt

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  78
  • Reputation:   19
  • Joined:  12/24/18
  • Last Seen:  

4 hours ago, GM Winter said:

hello everyone i want group 1 only to use this command can someone help me ty

 

MVPStatus.txt 3.05 kB · 2 downloads

 

bindatcmd "MVPSTATUS",strnpcinfo(0)+"::ONMVPSTATUS",1,99;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  224
  • Topics Per Day:  0.14
  • Content Count:  796
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

10 hours ago, Mice said:

 

bindatcmd "MVPSTATUS",strnpcinfo(0)+"::ONMVPSTATUS",1,99;

 

i test it and still vip cant use that command 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  78
  • Reputation:   19
  • Joined:  12/24/18
  • Last Seen:  

3 hours ago, GM Winter said:

i test it and still vip cant use that command 

What are you really need? you want to use this group 1 only? or you want to use it group 5 = VIP?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  224
  • Topics Per Day:  0.14
  • Content Count:  796
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

3 minutes ago, Mice said:

What are you really need? you want to use this group 1 only? or you want to use it group 5 = VIP?

only vip and gm 99 can access that command sir

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  78
  • Reputation:   19
  • Joined:  12/24/18
  • Last Seen:  

26 minutes ago, GM Winter said:

only vip and gm 99 can access that command sir

 

bindatcmd "MVPSTATUS",strnpcinfo(0)+"::ONMVPSTATUS",5,99;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  105
  • Reputation:   7
  • Joined:  04/11/22
  • Last Seen:  

5 minutes ago, Mice said:

 

bindatcmd "MVPSTATUS",strnpcinfo(0)+"::ONMVPSTATUS",5,99;

 

Hi there,

Can he change the permissions for atcommands at groups.yml as well? If he wants to add this command to VIP players should he be able to add here too and should work the same as this "shortcut" adding directly using bindatcmd?

image.png.0ad7a4569d930e58a0c0f9fa95decfc1.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  224
  • Topics Per Day:  0.14
  • Content Count:  796
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

3 hours ago, Mice said:

 

bindatcmd "MVPSTATUS",strnpcinfo(0)+"::ONMVPSTATUS",5,99;

 

still not working sir 

mvpstatus.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  224
  • Topics Per Day:  0.14
  • Content Count:  796
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

3 hours ago, zeusc137 said:

Hi there,

Can he change the permissions for atcommands at groups.yml as well? If he wants to add this command to VIP players should he be able to add here too and should work the same as this "shortcut" adding directly using bindatcmd?

image.png.0ad7a4569d930e58a0c0f9fa95decfc1.png

i also try this one and restart the server still its not working in vip

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  105
  • Reputation:   7
  • Joined:  04/11/22
  • Last Seen:  

On 10/5/2024 at 4:35 AM, GM Winter said:

i also try this one and restart the server still its not working in vip

The atcommand worked nice with my GM account using it like this:

bindatcmd "MVPSTATUS",strnpcinfo(0)+"::ONMVPSTATUS",1,99;

I tested your script and both for regular players and VIP players the command does not exist, as follows:

image.png.2ac289176817ab496841226aa7c1e62b.pngimage.png.a82f9ae93123fc2071a0a79669fb9111.png

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  105
  • Reputation:   7
  • Joined:  04/11/22
  • Last Seen:  

Actually, I'm still testing this as I could not get it to work with my VIP players 

Edited by zeusc137
Update
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  105
  • Reputation:   7
  • Joined:  04/11/22
  • Last Seen:  

On 10/5/2024 at 4:35 AM, GM Winter said:

i also try this one and restart the server still its not working in vip

@GM Winter I think I found an alternative solution for you, YOU DON'T CHANGE groups.yml and change your script to work like this:

-	script	MVP Status	-1,{ 
OnAtcommand:
	if(vip_status(VIP_STATUS_ACTIVE)){
		mes "^E630FF[ MVP Checker ]^000000";
		mes "^00CD10Green[ Alive ]^000000 | ^FF0000Red[ Dead ]^000000 | Map";
		for( .@i = 0; .@i < getarraysize( .mvp_name$ ); .@i++ ) {
			switch (.@i) {
				case 42:
					.@alive = ( $@thana_summon < 6 || mobcount( "thana_boss", "#Death::OnThanaDead" ) );
				break;
				default:
					.@alive = mobcount( .mvp_map$[.@i], "" );
				break;
			}
			
			if ( .display_type == 2 )
				.@menu$ = .@menu$ + ( ( .@alive ) ? "^00CD10" : "^FF0000" ) + .mvp_name$[.@i] + "^000000 (" + .mvp_map$[.@i] + "):";
			else if ( .display_type == 1 )
				mes ( ( .@alive ) ? "^FF0000" : "^00CD10" ) + .mvp_name$[.@i] + "^000000 (" + .mvp_map$[.@i] + ")";
		}
		
		if ( .display_type == 1 ) close;
		
		.@num = select( .@menu$ ) - 1;
		
		if (.warp_to_mvp == 1)
			warp .mvp_map$[.@num],0,0;
		else if(.warp_to_mvp == 2) {
			sleep2 1000;
			sc_start SC_BOSSMAPINFO,600000,0;
		}
	}else{
		message strcharinfo(0),"this command only for vip!.";
	}
end;	
	OnInit:
	
		bindatcmd "mvpstatus",strnpcinfo(3)+"::OnAtcommand",0,99;
		
		 // 0 = disabled, 1 = enabled, 2 = enabled + SC_BOSSMAPINFO
		.warp_to_mvp = 0;		
		setarray .mvp_map$, 
			"moc_pryd06","ra_fild03","ra_fild04","ve_fild01","ve_fild02",
			"lou_dun03","prt_maze03","abbey03",
			"gl_chyard","abyss_03","gef_dun02","gef_dun01","treasure02",
			"pay_fild10","gon_dun03","abbey02","xmas_fild01","ra_san05",
			"prt_sewb4","mosk_dun03","thor_v03","ama_dun03",
			"kh_dun02","ayo_dun02","niflheim","anthell02",
			"mjolnir_04","pay_dun04","gef_fild02","gef_fild14","gef_fild10",
			"moc_pryd04","in_sphinx5","moc_fild17","ein_dun02","xmas_dun02",
			"beach_dun","thana_boss","tur_dun04","odin_tem03",
			"jupe_core","lhz_dun02";

		setarray .mvp_name$, 
			"AmonRa","Atroce","Atroce","Atroce","Atroce",
			"Bacsojin","Baphomet","Beelzebub",
			"DarkLord","Detale","Doppelganger","Dracula","Drake",
			"Eddga","EvilSnakeLord","FallenBishop","Garm","GloomUnderNight",
			"GoldenThiefBug","Gopinich","Ifrit","IncantationSamurai",
			"KielD01","LadyTanee","LordofDeath","Maya",
			"Mistress","MoonlightFlower","OrcHero","OrcHero","OrcLord",
			"Osiris","Pharaoh","Phreeoni","RSX0806","Stormy Knight",
			"TaoGunka","Thanatos","TurtleGeneral","ValkyrieRandgris",
			"Vesper","Ygnizem";
		
		.display_type = 1;
		
		if( .warp_to_mvp > 0 )
			.display_type = 2;
OnTimer0050:
        showscript "MVP Checker", getnpcid(0);
        initnpctimer;
        end;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  224
  • Topics Per Day:  0.14
  • Content Count:  796
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

On 10/8/2024 at 2:06 AM, zeusc137 said:

@GM Winter I think I found an alternative solution for you, YOU DON'T CHANGE groups.yml and change your script to work like this:

-	script	MVP Status	-1,{ 
OnAtcommand:
	if(vip_status(VIP_STATUS_ACTIVE)){
		mes "^E630FF[ MVP Checker ]^000000";
		mes "^00CD10Green[ Alive ]^000000 | ^FF0000Red[ Dead ]^000000 | Map";
		for( .@i = 0; .@i < getarraysize( .mvp_name$ ); .@i++ ) {
			switch (.@i) {
				case 42:
					.@alive = ( $@thana_summon < 6 || mobcount( "thana_boss", "#Death::OnThanaDead" ) );
				break;
				default:
					.@alive = mobcount( .mvp_map$[.@i], "" );
				break;
			}
			
			if ( .display_type == 2 )
				.@menu$ = .@menu$ + ( ( .@alive ) ? "^00CD10" : "^FF0000" ) + .mvp_name$[.@i] + "^000000 (" + .mvp_map$[.@i] + "):";
			else if ( .display_type == 1 )
				mes ( ( .@alive ) ? "^FF0000" : "^00CD10" ) + .mvp_name$[.@i] + "^000000 (" + .mvp_map$[.@i] + ")";
		}
		
		if ( .display_type == 1 ) close;
		
		.@num = select( .@menu$ ) - 1;
		
		if (.warp_to_mvp == 1)
			warp .mvp_map$[.@num],0,0;
		else if(.warp_to_mvp == 2) {
			sleep2 1000;
			sc_start SC_BOSSMAPINFO,600000,0;
		}
	}else{
		message strcharinfo(0),"this command only for vip!.";
	}
end;	
	OnInit:
	
		bindatcmd "mvpstatus",strnpcinfo(3)+"::OnAtcommand",0,99;
		
		 // 0 = disabled, 1 = enabled, 2 = enabled + SC_BOSSMAPINFO
		.warp_to_mvp = 0;		
		setarray .mvp_map$, 
			"moc_pryd06","ra_fild03","ra_fild04","ve_fild01","ve_fild02",
			"lou_dun03","prt_maze03","abbey03",
			"gl_chyard","abyss_03","gef_dun02","gef_dun01","treasure02",
			"pay_fild10","gon_dun03","abbey02","xmas_fild01","ra_san05",
			"prt_sewb4","mosk_dun03","thor_v03","ama_dun03",
			"kh_dun02","ayo_dun02","niflheim","anthell02",
			"mjolnir_04","pay_dun04","gef_fild02","gef_fild14","gef_fild10",
			"moc_pryd04","in_sphinx5","moc_fild17","ein_dun02","xmas_dun02",
			"beach_dun","thana_boss","tur_dun04","odin_tem03",
			"jupe_core","lhz_dun02";

		setarray .mvp_name$, 
			"AmonRa","Atroce","Atroce","Atroce","Atroce",
			"Bacsojin","Baphomet","Beelzebub",
			"DarkLord","Detale","Doppelganger","Dracula","Drake",
			"Eddga","EvilSnakeLord","FallenBishop","Garm","GloomUnderNight",
			"GoldenThiefBug","Gopinich","Ifrit","IncantationSamurai",
			"KielD01","LadyTanee","LordofDeath","Maya",
			"Mistress","MoonlightFlower","OrcHero","OrcHero","OrcLord",
			"Osiris","Pharaoh","Phreeoni","RSX0806","Stormy Knight",
			"TaoGunka","Thanatos","TurtleGeneral","ValkyrieRandgris",
			"Vesper","Ygnizem";
		
		.display_type = 1;
		
		if( .warp_to_mvp > 0 )
			.display_type = 2;
OnTimer0050:
        showscript "MVP Checker", getnpcid(0);
        initnpctimer;
        end;
}

 

thank you so much ! sorry late reply got busy this past few days ty ty ty one more question how can i add gm to use this command

Edited by GM Winter
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  105
  • Reputation:   7
  • Joined:  04/11/22
  • Last Seen:  

5 hours ago, GM Winter said:

thank you so much ! sorry late reply got busy this past few days ty ty ty one more question how can i add gm to use this command

If you want anyone with group_id greater than VIP to use this command you just need to change the first line after OnAtcommand like this:

	// Remove or comment this one:	
	// if(vip_status(VIP_STATUS_ACTIVE)){

	// Use this one instead:
	if(getgroupid() >= VIP_STATUS_ACTIVE){

 

Edited by zeusc137
typo
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  224
  • Topics Per Day:  0.14
  • Content Count:  796
  • Reputation:   12
  • Joined:  12/04/20
  • Last Seen:  

15 hours ago, zeusc137 said:

If you want anyone with group_id greater than VIP to use this command you just need to change the first line after OnAtcommand like this:

	// Remove or comment this one:	
	// if(vip_status(VIP_STATUS_ACTIVE)){

	// Use this one instead:
	if(getgroupid() >= VIP_STATUS_ACTIVE){

 

ow i see thank you again !

  • Love 1
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...