Jump to content
  • 0

request: gm account blocker


Question

Posted

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.

17 answers to this question

Recommended Posts

Posted
-    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;
}

Posted

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

Posted

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

Posted

@ 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

Posted (edited)

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
Posted

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

Posted

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

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