Jump to content
  • 0

help with this script


Yonko

Question


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.03
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

how to set this in all maps?

//////////////////////////////////////////


-	script	Anti Bot	-1,{
OnNPCKillEvent:
if(getgmlevel() > 0) end;
set @kill,@kill+1;
if(@kill >= rand(15,30)) goto Check;
end;
OnPCLoginEvent:
Check:
if(getgmlevel() > 0) end;
getmapxy .@map$, .@x, .@y, 0;
if (.@map$=="prontera" || .@map$=="morocc" || .@map$=="payon" || .@map$=="geffen" || .@map$=="izlude" || .@map$=="alberta" || .@map$=="aldebaran") end;
if(checkcart() == 1) set @cart,1;
if(checkfalcon() == 1) set @falcon,1;
if(checkriding() == 1) set @riding,1;
atcommand "@option 2 0 0";
atcommand "@battleignore";
setoption 0x2,1;
sc_start sc_berserk, 1000000000, 1;
mes "[Anti Bot]";
mes "Bot checking time";
mes "Please input the number you see";
next;
switch( rand(1,9) ) {
case 1:
	mes "#################^83F52C##^000000################";
	mes "###############^83F52C####^000000################";
	mes "#################^83F52C##^000000################";
	mes "#################^83F52C##^000000################";
	mes "#################^83F52C##^000000################";
	mes "#################^83F52C##^000000################";
	mes "###############^83F52C######^000000##############";
	input @num;
	if(@num == 1) break;
	atcommand "@kick "+strcharinfo(0);
	end;
case 2:
	mes "#############^83F52C#######^000000###############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "###################^83F52C##^000000##############";
	mes "#############^83F52C#######^000000###############";
	mes "############^83F52C##^000000#####################";
	mes "############^83F52C##^000000#####################";
	mes "############^83F52C#########^000000##############";
	input @num;
	if(@num == 2) break;
	atcommand "@kick "+strcharinfo(0);
	end;
case 3:
	mes "#############^83F52C#######^000000###############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "###################^83F52C##^000000##############";
	mes "#############^83F52C#######^000000###############";
	mes "###################^83F52C##^000000##############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "#############^83F52C#######^000000###############";
	input @num;
	if(@num == 3) break;
	atcommand "@kick "+strcharinfo(0);
	end;
case 4:
	mes "############^83F52C##^000000#####################";
	mes "############^83F52C##^000000####^83F52C##^000000###############";
	mes "############^83F52C##^000000####^83F52C##^000000###############";
	mes "############^83F52C##^000000####^83F52C##^000000###############";
	mes "############^83F52C#########^000000##############";
	mes "##################^83F52C##^000000###############";
	mes "##################^83F52C##^000000###############";
	input @num;
	if(@num == 4) break;
	atcommand "@kick "+strcharinfo(0);
	end;
case 5:
	mes "############^83F52C########^000000###############";
	mes "############^83F52C##^000000#####################";
	mes "############^83F52C##^000000#####################";
	mes "############^83F52C#######^000000################";
	mes "##################^83F52C##^000000###############";
	mes "############^83F52C##^000000####^83F52C##^000000###############";
	mes "#############^83F52C######^000000################";
	input @num;
	if(@num == 5) break;
	atcommand "@kick "+strcharinfo(0);
	end;
case 6:
	mes "#############^83F52C#######^000000###############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "############^83F52C##^000000#####################";
	mes "############^83F52C########^000000###############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "#############^83F52C######^000000################";
	input @num;
	if(@num == 6) break;
	atcommand "@kick "+strcharinfo(0);
	end;
case 7:
	mes "############^83F52C########^000000###############";
	mes "############^83F52C##^000000####^83F52C##^000000###############";
	mes "################^83F52C##^000000#################";
	mes "###############^83F52C##^000000##################";
	mes "###############^83F52C##^000000##################";
	mes "###############^83F52C##^000000##################";
	mes "###############^83F52C##^000000##################";
	input @num;
	if(@num == 7) break;
	atcommand "@kick "+strcharinfo(0);
	end;
case 8:
	mes "#############^83F52C#######^000000###############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "#############^83F52C#######^000000###############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "#############^83F52C#######^000000###############";
	input @num;
	if(@num == 8) break;
	atcommand "@kick "+strcharinfo(0);
	end;
case 9:
	mes "#############^83F52C#######^000000###############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "#############^83F52C########^000000##############";
	mes "###################^83F52C##^000000##############";
	mes "############^83F52C##^000000#####^83F52C##^000000##############";
	mes "#############^83F52C#######^000000###############";
	input @num;
	if(@num == 9) break;
	atcommand "@kick "+strcharinfo(0);
	end;
}
next;
mes "[Anti Bot]";
mes "Thank you for your patience, you can now move on.";
atcommand "@option 0 0 0";
atcommand "@battleignore";
setoption 0x2,0;
sc_end sc_berserk;
percentheal 100,100;
set @kill,0;
if(@cart == 1) {
	setcart;
	set @cart,0;
}
if(@falcon == 1) {
	setfalcon;
	set @falcon,0;
}
if(@riding == 1) {
	setriding;
	set @riding,0;
}
close;
}

Edited by Emistry
Please use [CODEBOX] or Attachments for long contents.
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


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

remove this..

   getmapxy .@map$, .@x, .@y, 0;
   if (.@map$=="prontera" || .@map$=="morocc" || .@map$=="payon" || .@map$=="geffen" || .@map$=="izlude" || .@map$=="alberta" || .@map$=="aldebaran") end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.03
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

sir can i ask something is there possible to change case into a cuttin image instead of

mes "#################^83F52C##^000000################";

mes "###############^83F52C####^000000################";

mes "#################^83F52C##^000000################";

mes "#################^83F52C##^000000################";

mes "#################^83F52C##^000000################";

mes "#################^83F52C##^000000################";

mes "###############^83F52C######^000000##############";

changing the 1 into a image with a number 1?

Edited by wiideliva
Link to comment
Share on other sites


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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.03
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

hmm thanks it works :)

by the way i can't understand this statement

if(@kill >= rand(15,30)) goto Check;

end;

Edited by wiideliva
Link to comment
Share on other sites


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

everytime you killed a monster....the counter will increased by 1 ...

and...then the script will check for the counter value..

rand(15,30) will randomed a value between 15 ~ 30 ...read this rand

then if the counter value is larger / equal to the randomed value..

then the script will execute the label named Check....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.03
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

mean every time the player killed around 15-30 the bot checker will pop-up ?

Link to comment
Share on other sites


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

yes randomly from 15 ~ 30..

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