Jump to content

Question

Posted

NPC for a player who want to Mute or Ban ip

 

example :

player want to mute this player name is "Example".

 

npc:  msg

how can help you name of player Etc....

 

Mute and Ban ip  <<<<<<<< our Menu

 

mute - if choose mute the player type the reason why he want to mute the player "Example" then the player recieved the reason. why he mute.

 

and

 

ban ip - if type the player want to ban ip his name is  "Example" then the player  "Example" recieved the reason why he ban ip 

 

and the player complaint one time a day to complaint

 

    


up for this :D

5 answers to this question

Recommended Posts

Posted

Kindly test, though i'm not sure if IP ban would work properly.

prontera,100,200,4	script	Police	46,{

mes .Npc_Name$;
mes "How may I help you, "+strcharinfo(0)+"?";
mes "Do you want to report someone?";
next;
close2;
mes .Npc_Name$;
mes "Input the player you want to mute";
	input .@player$;
mes "Input the reason";
	input .@reason$;
if(!getcharid(3,.@mplayer$)) {
	mes "The player is not online";
	close;
}
switch(select("Mute:IP Ban")) {
	case 1:
		atcommand "@mute "+.Mute_Time+" "+.@player$;
		message .@player$,"You have been muted by "+strcharinfo(0)+" [Reason: "+.@reason$+"]";
		close; break;
	case 2:
		.@BanTime$ = atoi(gettimestr("%H",2))+.IPBan_Time;
		query_sql("INSERT INTO `ipbanlist` VALUES ('"+getcharip(.@mplayer$)+"','"+gettimestr("%Y-%m/%d %H:%M:%S",21)+"','"+gettimestr("%Y-%m/%d "+.@BanTime$+":%M:%S",21)+"','"+.@reason$+"')");
		message .@player$,"You have been IP Banned by "+strcharinfo(0)+" [Reason: "+.@reason$+"]";
		close2;
		sleep2 5000;
		atcommand "@kick "+.@player$;
		end; break;
}
end;


OnInit:
	.Npc_Name$ = "[^0000FF "+strnpcinfo(1)+" ^000000]";
	.Mute_Time = 5; //Mute for 5 minutes
	.IPBan_Time = 10; //IP Ban for 10 hours
	end;

}

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...