Jump to content
  • 0

Help with this Script Please


Question

Posted (edited)

I found this antibot script on an archived post. The 30 second timer for the script is not working. Can someone help me with this please?

 

Here's the script, I edited some part of it to suit my wanting. It's just that, the timer is not working.

-	script	AntiBot2	-1,{
//OnPCLoginEvent:
//	setoption 0x40, 0; // prevent abuse
//	end;
OnCheat:
	dispbottom "too long";
	atcommand "@kick "+strcharinfo(0);
	//sc_end sc_berserk;
	//percentheal 100,100;
	//setoption 0x3, 0;
	end;
OnNPCKillEvent:
	if ( rand(500) ) end; // 1% chance to triggering
	setoption 0x3, 1;
	sc_start sc_berserk, 1000000000, 1;
	addtimer 30000, strnpcinfo(0)+"::OnCheat";
	set .@respond, gettimetick(2);
	mes "if A = "+( .@a = rand(1,50) )+", B = "+( .@b = rand(1,50) );
	setarray .@arithmetic$, "+";
	mes "How many is A "+ .@arithmetic$[ .@arithmetic = rand(1) ] +" B ?";
	switch ( .@arithmetic ) {
	default: .@answer = .@a + .@b; break;
	case 1: .@answer = .@a - .@b; break;
	case 2: .@answer = .@a * .@b; break;
	case 3: .@answer = .@a / .@b;
	}
	next;
	input .@input, -100, 100;
	deltimer strnpcinfo(0)+"::OnCheat";
	sc_end sc_berserk;
	percentheal 100,100;
	setoption 0x3, 0;
	if ( gettimetick(2) > .@respond +30 ) {
		mes "you taken too long to answer";
		atcommand "@kick "+strcharinfo(0);
		close;
	}
	else if ( .@input == .@answer ) {
		mes "Good Job";
		close;
	}
	else {
		mes "Wrong";
		atcommand "@kick "+strcharinfo(0);
		close;
	}
}

 

 

 

 

 

Edited by Yami

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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