Jump to content
  • 0

Restricting commands for GM staff


Eross

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

Good day! I would like to ask for a script that will restrict my gm staffs to @warp in mvp maps (block this command if they use it to warp on maps with mvp monsters) and also to block @recall when they load on map that has MVP (just to be sure.) .. The recall script will bind when they are on a certain map and unbind when they warp on a map that is not on the list ... Thankyou so much

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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

On 5/17/2021 at 12:19 PM, Origami said:

Thankyou for you effort sir @Skorm .. I tried this but I think the .maps_to$[0] is not working ? only the .maps_from$[0] maps are working where it restricts me to use warp when im on the listed maps ..but the one that restricts me to go to the listed map is not working ...


	if(inarray(.maps_from$[0], strcharinfo(3))>-1) {
		message strcharinfo(0), "You can't open use warp here!";
		end;
	} else if (inarray(.maps_to$[0], strcharinfo(3))>-1) {
		message strcharinfo(0), "You can't warp to that map!";
		end;
	}

I think they have same equation sir ?

Sorry about that yeah you're right they were doing the same thing here is an updated version.

 

-	script	warp_block	-1,{
OnInit:
	bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",20,99;
	setarray .maps_from$[0], "guild_01", "guild_02"; // Maps they cannot warp from.
	setarray .maps_to$[0], "guild_01", "guild_02"; // Maps they cannot warp to.
	end;

OnAtcommand:
	if(inarray(.maps_from$[0], strcharinfo(3))>-1) {
		message strcharinfo(0), "You can't open use warp here!";
		end;
	}

	if(.@atcmd_numparameters) {
		if (inarray(.maps_to$[0], strtolower(.@atcmd_parameters$[0]))>-1) {
			message strcharinfo(0), "You can't warp to that map!";
			end;
		}
		atcommand "@warp "+ implode(.@atcmd_parameters$, " ");
	}
	else
		atcommand "@warp";
	end;
}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

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

@Origami

-	script	warp_block	-1,{
OnInit:
	bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",20,99;
	setarray .maps_from$[0], "guild_01", "guild_02"; // Maps they cannot warp from.
	setarray .maps_to$[0], "guild_01", "guild_02"; // Maps they cannot warp to.
	end;

OnAtcommand:
	if(inarray(.maps_from$[0], strcharinfo(3))>-1) {
		message strcharinfo(0), "You can't open use warp here!";
		end;
	} else if (inarray(.maps_to$[0], strcharinfo(3))>-1) {
		message strcharinfo(0), "You can't warp to that map!";
		end;
	}

	if(.@atcmd_numparameters)
		atcommand "@warp "+ implode(.@atcmd_parameters$, " ");
	else
		atcommand "@warp";
	end;
}

I'm just assuming your gms are group level 20 or above. Script is untested.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

13 hours ago, Skorm said:

@Origami


-	script	warp_block	-1,{
OnInit:
	bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",20,99;
	setarray .maps_from$[0], "guild_01", "guild_02"; // Maps they cannot warp from.
	setarray .maps_to$[0], "guild_01", "guild_02"; // Maps they cannot warp to.
	end;

OnAtcommand:
	if(inarray(.maps_from$[0], strcharinfo(3))>-1) {
		message strcharinfo(0), "You can't open use warp here!";
		end;
	} else if (inarray(.maps_to$[0], strcharinfo(3))>-1) {
		message strcharinfo(0), "You can't warp to that map!";
		end;
	}

	if(.@atcmd_numparameters)
		atcommand "@warp "+ implode(.@atcmd_parameters$, " ");
	else
		atcommand "@warp";
	end;
}

I'm just assuming your gms are group level 20 or above. Script is untested.

Thankyou for you effort sir @Skorm .. I tried this but I think the .maps_to$[0] is not working ? only the .maps_from$[0] maps are working where it restricts me to use warp when im on the listed maps ..but the one that restricts me to go to the listed map is not working ...

	if(inarray(.maps_from$[0], strcharinfo(3))>-1) {
		message strcharinfo(0), "You can't open use warp here!";
		end;
	} else if (inarray(.maps_to$[0], strcharinfo(3))>-1) {
		message strcharinfo(0), "You can't warp to that map!";
		end;
	}

I think they have same equation sir ?

Edited by Origami
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

21 hours ago, Skorm said:

Sorry about that yeah you're right they were doing the same thing here is an updated version.

 


-	script	warp_block	-1,{
OnInit:
	bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",20,99;
	setarray .maps_from$[0], "guild_01", "guild_02"; // Maps they cannot warp from.
	setarray .maps_to$[0], "guild_01", "guild_02"; // Maps they cannot warp to.
	end;

OnAtcommand:
	if(inarray(.maps_from$[0], strcharinfo(3))>-1) {
		message strcharinfo(0), "You can't open use warp here!";
		end;
	}

	if(.@atcmd_numparameters) {
		if (inarray(.maps_to$[0], strtolower(.@atcmd_parameters$[0]))>-1) {
			message strcharinfo(0), "You can't warp to that map!";
			end;
		}
		atcommand "@warp "+ implode(.@atcmd_parameters$, " ");
	}
	else
		atcommand "@warp";
	end;
}

 

Its working !! THAKYOU SIR !!!!! ^_^

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