Jump to content
  • 0

request: gm account blocker


cadz

Question


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  243
  • Reputation:   1
  • Joined:  08/29/12
  • Last Seen:  

hi i would like to request a blocker script like example you have 3 gm accounts only registered and when someone make a gm account it will auto block and only the 3 gm accounts registered can only log in to the game. thanks in advance.

Link to comment
Share on other sites

17 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

-    script    papery    -1,{
OnInit:
   setarray .@tmp$, 2000000, 2000001, 2000003;// account id GM team
   .account_gm$ = implode( .@tmp$, "|" );
   end;
OnPCLoginEvent:
   if( getgmlevel() && !compare( .account_gm$, getcharid(3) +"" ) )
       atcommand "@block "+ strcharinfo(0);
   end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

@ Capuche can i used this like this?

-	script	papery	-1,{
OnInit:
setarray .@tmp$, 2000000, 2000001, 2000003;// account id GM team
.account_gm$ = implode( .@tmp$, "|" );
end;
OnPCLoginEvent:
if( getgmlevel() && !compare( .account_gm$, getcharid(3) +"" ) )
	atcommand "@block "+ strcharinfo(0);
end;
}

- script papery -1,{
OnInit:
setarray .@tmp$,GM Test1, GM Test2, Gm Test3;// Name of GM team
.account_gm$ = implode( .@tmp$, "|" );
end;
OnPCLoginEvent:
if( getgmlevel() && !compare( .account_gm$, getcharid(3) +"" ) )
 atcommand "@block "+ strcharinfo(0);
end;
}

i want to script work like if gm making new character npc will block the new char og gm ... i want to implement all gm account 1 char only..

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

If you use name

-    script    papery    -1,{
OnInit:
   setarray .account_gm$, "red", "blue", "green lantern";// GM names
   .size = getarraysize( .account_gm$ );
   end;
OnPCLoginEvent:
   if( getgmlevel() ) {
       for( .@i = 0; .@i < .size; .@i++ )
      	 if( .account_gm$[ .@i ] == strcharinfo(0) ) end;
       atcommand "@block "+ strcharinfo(0);
   }
   end;
}

Ugly but safe

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  243
  • Reputation:   1
  • Joined:  08/29/12
  • Last Seen:  

btw this script when automatic log in auto block?

and sir how can i add block ip also @block then block ip. is this possible?

error

aaaaaa.bmp

Edited by cadz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

@ cadz

sorry if i used your request to post mine here.

@ Capuche

this script will work if i have new gm and edit the script and use @unloadnpc then @loadnpc bla/bla/bla?

If you use name

-	script	papery	-1,{
OnInit:
setarray .account_gm$, "red", "blue", "green lantern";// GM names
.size = getarraysize( .account_gm$ );
end;
OnPCLoginEvent:
if( getgmlevel() ) {
	for( .@i = 0; .@i < .size; .@i++ )
   	 if( .account_gm$[ .@i ] == strcharinfo(0) ) end;
	atcommand "@block "+ strcharinfo(0);
}
end;
}

Ugly but safe

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  243
  • Reputation:   1
  • Joined:  08/29/12
  • Last Seen:  

im ussing your script but give me error.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

what kind of error? post the map server said so capuche can fix it ^_^

Edited by Cisqua
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  243
  • Reputation:   1
  • Joined:  08/29/12
  • Last Seen:  

here

still there sir? anyone can help me T_T

aaaaaa.bmp

Edited by cadz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Are you using rAthena?

Edited by nanakiwurtz
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

still there sir? anyone can help me T_T

It's 'coz you use eathena ! bad boy

With ban ip (work on ea)

-	script	papery	-1,{
OnInit:
setarray .@tmp$, 2000000, 2000001, 2000003;// account id GM team
set .account_gm$, implode( .@tmp$, "|" );
end;
OnPCLoginEvent:
if( getgmlevel() && !compare( .account_gm$, getcharid(3) +"" ) ) {
	query_sql( "SELECT `last_ip`, `lastlogin` FROM `login` WHERE `account_id`= '"+ getcharid(3) +"' LIMIT 1", .@last_ip$, .@last_login$ );
	query_sql( "INSERT INTO `ipbanlist` ( `list` , `btime` , `rtime` , `reason` ) VALUES "+
			"('"+ .@last_ip$ +"', '"+ .@last_login$ +"', '2021-02-10 00:00:00', 'Block "+ escape_sql( strcharinfo(0) ) +"' )");
	atcommand "@block "+ strcharinfo(0);
}
end;
}

@Cisqua

this script will work if i have new gm and edit the script and use @unloadnpc then @loadnpc bla/bla/bla?

No but this one yes

-    script    papery    -1,{
OnPCLoginEvent:
   if( getgmlevel() ) {
       setarray .@account_gm$, "red", "blue", "green lantern";// GM names
       .@size = getarraysize( .@account_gm$ );
       for( .@i = 0; .@i < .@size; .@i++ )
           if( .@account_gm$[ .@i ] == strcharinfo(0) ) end;
       atcommand "@block "+ strcharinfo(0);
   }
   end;
}

Edit: LOL post at same time nanakiwurtz

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


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

thank you Capuche. my probs solve.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  243
  • Reputation:   1
  • Joined:  08/29/12
  • Last Seen:  

eathena im using

Are you using rAthena?

eathena =)

still there sir? anyone can help me T_T

It's 'coz you use eathena ! bad boy

With ban ip (work on ea)

-	script	papery	-1,{
OnInit:
setarray .@tmp$, 2000000, 2000001, 2000003;// account id GM team
set .account_gm$, implode( .@tmp$, "|" );
end;
OnPCLoginEvent:
if( getgmlevel() && !compare( .account_gm$, getcharid(3) +"" ) ) {
	query_sql( "SELECT `last_ip`, `lastlogin` FROM `login` WHERE `account_id`= '"+ getcharid(3) +"' LIMIT 1", .@last_ip$, .@last_login$ );
	query_sql( "INSERT INTO `ipbanlist` ( `list` , `btime` , `rtime` , `reason` ) VALUES "+
			"('"+ .@last_ip$ +"', '"+ .@last_login$ +"', '2021-02-10 00:00:00', 'Block "+ escape_sql( strcharinfo(0) ) +"' )");
	atcommand "@block "+ strcharinfo(0);
}
end;
}

@Cisqua

this script will work if i have new gm and edit the script and use @unloadnpc then @loadnpc bla/bla/bla?

No but this one yes

-	script	papery	-1,{
OnPCLoginEvent:
if( getgmlevel() ) {
	setarray .@account_gm$, "red", "blue", "green lantern";// GM names
	.@size = getarraysize( .@account_gm$ );
	for( .@i = 0; .@i < .@size; .@i++ )
		if( .@account_gm$[ .@i ] == strcharinfo(0) ) end;
	atcommand "@block "+ strcharinfo(0);
}
end;
}

Edit: LOL post at same time nanakiwurtz

im using eathena i forgot to tell sorry my bad =) checking it now if its working

same error

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  243
  • Reputation:   1
  • Joined:  08/29/12
  • Last Seen:  

master emistry can this script can block ip adress too?

b

script is working but master they blocking all gm accounts even in the set arrays. i just want not to block all in the set arrays when accounts is not in the set array will automatically block.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

missing some variable...

try this..

http://pastebin.com/raw.php?i=8yFzaFMj

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

With ban ip (work on ea)

-	script	papery	-1,{
OnInit:
setarray .@tmp$, 2000000, 2000001, 2000003;// account id GM team
set .account_gm$, implode( .@tmp$, "|" );
end;
OnPCLoginEvent:
if( getgmlevel() && !compare( .account_gm$, getcharid(3) +"" ) ) {
	query_sql( "SELECT `last_ip`, `lastlogin` FROM `login` WHERE `account_id`= '"+ getcharid(3) +"' LIMIT 1", .@last_ip$, .@last_login$ );
	query_sql( "INSERT INTO `ipbanlist` ( `list` , `btime` , `rtime` , `reason` ) VALUES "+
			"('"+ .@last_ip$ +"', '"+ .@last_login$ +"', '2021-02-10 00:00:00', 'Block "+ escape_sql( strcharinfo(0) ) +"' )");
	atcommand "@block "+ strcharinfo(0);
}
end;
}

missing some variable...

try this..

http://pastebin.com/raw.php?i=8yFzaFMj

I forgot this method.. nice

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  243
  • Reputation:   1
  • Joined:  08/29/12
  • Last Seen:  

thanks a lot already fix and 100% good thanks to you master and capuche more power! and God bless =)

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