Jump to content
  • 0

Question

Posted (edited)

-	script	Antibot	-1,{
OnPCLoginEvent:

if(strcharinfo(3) = gl_prison ||  strcharinfo(3) = gl_prison1  ){
atcommand "@option 2";
sc_start SC_BERSERK,10000000,1;
mes "Please Red Colour Key in the Code...";
set .Code,rand(1000,99999);
mes "^0000FF"+rand(1,9999)+"^FF0000"+.Code+"^0000FF"+rand(1,9999)+"^000000";
input @Code;
if( @Code != .Code ){
	atcommand "@kick "+strcharinfo(0);
} else {
	atcommand "@option 0";
	sc_end SC_BERSERK;
}
close;
}
end;
}

will this work? i just want the antibot to work in certain maps to prevent zeny/gold farming, besides i am running a pk map.

and what do i need to add to run this antibot every 1hr or 2hrs only on those maps. thanks in advance to those who will help.

Edited by mnjfx

10 answers to this question

Recommended Posts

Posted (edited)

You can switch "OnPCLoginEvent" for:

OnNPCKillEvent:

This special label triggers when a player kills a monster.

And use a temporary char variable to keep track of monsters killed, ex:

// Increase the mobs killed by 1
set @mobskilled, @mobskilled+1;
// If the user has killed less then 80 mobs, don't run the script
if(@mobskilled < 80) end;
// Then reset the variable so we can start counting again
set @mobskilled, 0;

Edited by plankt
Posted

I have modified something here but my new problem is i'm getting event queue problem in map server. How can I optimize it?

-	script	Checker	-1,{
OnNPCLoginEvent:
OnNPCKillEvent:
set @name$,strcharinfo(0);
set @mobskilled, @mobskilled + 1;

if((@mobskilled >= 100) || (#check == 1)){
	set #check,1;
	atcommand "@option 2";
	sc_start SC_BERSERK,10000000,1;
	mes "[Checker]";
	mes "Please Input the ^FF0000RED NUMBERS ^0000FFinside the Input Box...";
	set .Code,rand(1000,99999);
	mes "^0000FF"+rand(1,9999)+"^FF0000"+.Code+"^0000FF"+rand(1,9999)+"^000000";
	input @Code;
	if( @Code != .Code ){
		mes "I'm sorry but you have to relog again ";
		next;
		atcommand "@kick "+strcharinfo(0);
	} else {
		atcommand "@option 0";
		sc_end SC_BERSERK;
		set @mobskilled, 0;
		set #check,0;
		percentheal 100,100;
	}
	close;
}
end;
}

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