Jump to content
  • 0

Mute and Ban ip


Phantom Of Rogue-Gon

Question


  • Group:  Members
  • Topic Count:  65
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   0
  • Joined:  08/07/13
  • Last Seen:  

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

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


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

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;

}
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:  

Can you remove the $ postfix on .@BanTime? and try again.. Weird, there were no syntax errors for me.

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:  

use set for all variable declarations..

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