Jump to content
  • 0

help me, I need an anti bot script


Revoltz

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  45
  • Reputation:   1
  • Joined:  03/30/16
  • Last Seen:  

 

Hello, community, I need to help in an anti bot system, when play kill for example 100 Mob, I would like that after killing 100 mob would appear a screen for him to answer some polls, as which color appears; sum of numbers, typing a supposed number, I have this script over does not work correctly. In it has the function to say how many mobs can kill to appear, even more so, when killing a mob, the script already appears, who can help me will be very grateful.

 

-    script    ##ChefedaGuarda    -1,{
end;
//OnNPCKillEvent:
OnPCLoginEvent:

set $mobsn,3; // Quantidade de Mobs para ativar o Script.
set $mob1,$mob1+1;
if($mob1 != $mobsn) goto AtivaAntiBot; else end;
AtivaAntiBot:
cutin "3rd_mechanic",2;
atcommand "@battleignore";
atcommand "@option 3";
pcblockmove getcharid(3),1;
mes "^0000FF[ gOld-RO System ]^000000";
mes "- Olá ^0000FF"+strcharinfo(0)+"^000000.";
mes "- checagem de rotina ant-bots.";
next;
mes "^0000FF[ gOld-RO System ]^000000";
mes "- Está expressamente proibido o uso de bot no gOld-RO.";
mes "- Quem for pego utilizando qualquer tipo de hack terá o mac adress banido.";
mes "- Obrigado pela compreensão. Divirta-se";
next;
set $Sistema,rand(1,2);
if($Sistema == 1)goto cores;
if($Sistema == 2)goto numeros;
cores:
set $AntiBot,rand(1,4);
if($AntiBot == 1){
mes "^FF0000[Chefe da Guarda]^FF0000";
mes "^FF0000• O sistema é simples, basta você me dizer qual é a cor desta conversa! •^FF0000";
menu "^FF0000• Esta cor^000000",Certo,"^EEAD0E• Esta cor^000000",Errado,"^458B00• Esta cor^000000",Errado,"^00008B• Esta cor^000000",Errado;
close;
}
if($AntiBot == 2){
mes "^008B00[ gOld-RO System ]^FF0000";
mes "^008B00• O sistema é simples, basta você me dizer qual é a cor desta conversa!•^FF0000";
menu "^FF0000• Esta cor^000000",Errado,"^EEAD0E• Esta cor^000000",Errado,"^008B00• Esta cor^000000",Certo,"^00008B• Esta cor^000000",Errado;
}
if($AntiBot == 3){
mes "^00008B[ gOld-RO System ]^FF0000";
mes "^00008B• O sistema é simples, basta você me dizer qual é a cor desta conversa!•^FF0000";
menu "^FF0000• Esta cor^000000",Errado,"^00008B• Esta cor^000000",Certo,"^008B00• Esta cor^000000",Errado,"^CDAD00• Esta cor^000000",Errado;
}
if($AntiBot == 4){
mes "^CD1076[ gOld-RO System ]^FF0000";
mes "^CD1076• O sistema é simples, basta você me dizer qual é a cor desta conversa!•^FF0000";
menu "^CDAD00• Esta cor^000000",Errado,"^00008B• Esta cor^000000",Errado,"^008B00• Esta cor^000000",Errado,"^CD1076• Esta cor^000000",Certo;
}
Errado:
next;
if(#Errou == 1){
mes "^0000FF[ gOld-RO System ]^000000";
mes "Você errou novamente terei que te kickar do jogo.";
mes "Ainda restam-lhe : ^0000FF1 Tentativas.^000000";
mes "Se errar mais uma vez será encaminhado para Cadeia.";
next;
set #Errou,2;
atcommand "@kick "+strcharinfo(0);
close;
}
if(#Errou == 2){
mes "^0000FF[ gOld-RO System ]^000000";
mes "Acabaram suas chances!, você foi considerado um bot!";
atcommand "@jailfor 30m "+strcharinfo(0);
atcommand "@option 0 0 0 "+strcharinfo(0)+"";
announce "O Jogador "+strcharinfo(0)+" foi preso por Suspeita de uso de BOT.",8;
set #Errou,0;
close;
}
mes "^0000FF[ gOld-RO System ]^000000";
mes "Você errou terei que te kickar do jogo.";
mes "Ainda restam-lhe : ^0000FF2 Tentativas.^000000";
mes "Se errar 2 vezes será encaminhado para Cadeia.";
next;
set #Errou,1;
atcommand "@kick "+strcharinfo(0);
cutin "", 255;
close;
Certo:

mes "^0000FFOk^000000";
mes "Liberado...";
set #Errou,0;
pcblockmove getcharid(3),0;
atcommand "@option 0";
atcommand "@battleignore";
cutin "", 255;
if(!checkcart() && getskilllv(39))
setcart;
else
if(!checkfalcon() && getskilllv(127))
setfalcon;

close;
numeros:
set $killbot,rand(1158,9584);
mes "^0000FF[ gOld-RO System ]^000000";
mes "1- Vou te dizer um número...";
mes "2-Você deve digita-lo corretamente ";
mes "O Número é : ^0000FF"+$killbot+"^000000";
mes "3- Digite o captcha !";
input @number;
if(@number != $killbot)goto Errado;
if(@number == $killbot)goto Certo;
}

Edited by cadusantos
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

apparently most of the anti-bot out there that uses SC_BERSERK to mute the players, actually can be bypass by opencore
https://github.com/HerculesWS/Hercules/pull/937#issuecomment-165323552

I wish rathena actually has this *setpcblock script command that just merge into hercules days ago
https://github.com/HerculesWS/Hercules/pull/842

so nope, until rathena actually has its own script command to disable player from using atcommand ...

 

nvm, just write one right now for hercules ones

-	script	anti-bot	FAKE_NPC,{
OnNPCKillEvent:
	if ( getmapflag( strcharinfo(PC_MAP), mf_nosave ) )
		end; // never trigger anti-bot on event maps
	++@anti_bot_mob_killed;
	if ( @anti_bot_mob_killed < 100 ) end;
	setpcblock PCBLOCK_MOVE | PCBLOCK_ATTACK | PCBLOCK_SKILL | PCBLOCK_USEITEM | PCBLOCK_IMMUNE | PCBLOCK_COMMANDS, true;
	.@a = rand(1,9);
	.@b = rand(0, 9 - .@a);
	mes "What is the number";
	mes .@a +" + "+ .@b +" = ?";
	next;
	input .@ans, 1, 10;
	if ( .@a + .@b != .@ans ) {
		++#anti_bot_wrong_answer;
		if ( #anti_bot_wrong_answer >= 3 ) {
			atcommand "@jailfor 30m "+ strcharinfo(PC_NAME);
			end;
		}
		mes "wrong answer";
		close2;
		setpcblock PCBLOCK_COMMANDS, false; // hmm ....
		atcommand "@kick "+ strcharinfo(PC_NAME);
		end;
	}
	mes "ok you are free to go";
	#anti_bot_wrong_answer = 0;
	setpcblock PCBLOCK_MOVE | PCBLOCK_ATTACK | PCBLOCK_SKILL | PCBLOCK_USEITEM | PCBLOCK_IMMUNE | PCBLOCK_COMMANDS, false;
	close;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  77
  • Reputation:   1
  • Joined:  03/11/12
  • Last Seen:  

On 6/5/2018 at 12:36 PM, AnnieRuru said:

apparently most of the anti-bot out there that uses SC_BERSERK to mute the players, actually can be bypass by opencore
https://github.com/HerculesWS/Hercules/pull/937#issuecomment-165323552

I wish rathena actually has this *setpcblock script command that just merge into hercules days ago
https://github.com/HerculesWS/Hercules/pull/842

so nope, until rathena actually has its own script command to disable player from using atcommand ...

 

nvm, just write one right now for hercules ones


-	script	anti-bot	FAKE_NPC,{
OnNPCKillEvent:
	if ( getmapflag( strcharinfo(PC_MAP), mf_nosave ) )
		end; // never trigger anti-bot on event maps
	++@anti_bot_mob_killed;
	if ( @anti_bot_mob_killed < 100 ) end;
	setpcblock PCBLOCK_MOVE | PCBLOCK_ATTACK | PCBLOCK_SKILL | PCBLOCK_USEITEM | PCBLOCK_IMMUNE | PCBLOCK_COMMANDS, true;
	.@a = rand(1,9);
	.@b = rand(0, 9 - .@a);
	mes "What is the number";
	mes .@a +" + "+ .@b +" = ?";
	next;
	input .@ans, 1, 10;
	if ( .@a + .@b != .@ans ) {
		++#anti_bot_wrong_answer;
		if ( #anti_bot_wrong_answer >= 3 ) {
			atcommand "@jailfor 30m "+ strcharinfo(PC_NAME);
			end;
		}
		mes "wrong answer";
		close2;
		setpcblock PCBLOCK_COMMANDS, false; // hmm ....
		atcommand "@kick "+ strcharinfo(PC_NAME);
		end;
	}
	mes "ok you are free to go";
	#anti_bot_wrong_answer = 0;
	setpcblock PCBLOCK_MOVE | PCBLOCK_ATTACK | PCBLOCK_SKILL | PCBLOCK_USEITEM | PCBLOCK_IMMUNE | PCBLOCK_COMMANDS, false;
	close;
}

 

This script can be use on rathena @AnnieRuru ?

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