Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // - SampleBOT System -
- // r0.1a
- // by Keoy - 2008
- - script Initialize_syst -1,{
- OnInit:
- setarray
- $line_1[0],"0^FF8000****^000000","00^FF80009^00000000","0^FF800011111^000000","0^FF80002222^000000","0^FF800033^000000003","0^FF80004444^000000","0^FF8000555
- 5^000000","0^FF8000666^0000000","0^FF80007777^000000","0^FF80008888^000000";
- setarray
- $line_2[0],"0^FF8000*^00000000^FF8000*^000000","00^FF80009^00000000","00000^FF80001^000000","0000^FF80002^000000","0^FF800033^000000003","0^FF80004^000000000
- ","0^FF80005^000000000","000^FF80006^0000000","0^FF80007^00000000^FF80007^000000","0^FF80008^000000000^FF80008^000000";
- setarray
- $line_3[0],"0^FF8000*^00000000^FF8000*^000000","00^FF80009^00000000","0^FF800011111^000000","0^FF80002222^000000","0^FF800033333^000000","0^FF80004444^000000
- ","0^FF80005555^000000","000^FF80006^0000000","0^FF80007777^000000","0^FF80008888^000000";
- setarray
- $line_4[0],"0^FF8000*^00000000^FF8000*^000000","00^FF80009^00000000","0^FF80001^0000000000","0000^FF80002^000000","0000^FF800033^000000","0000^FF80004^000000
- ","0^FF8000500^FF80005^000000","000^FF80006^0000000","0^FF80007^00000000^FF80007^000000","0000^FF80008^000000";
- setarray
- $line_5[0],"0^FF8000****^000000","00^FF80009^00000000","0^FF800011111^000000","0^FF80002222^000000","0000^FF800033^000000","0^FF80004444^000000","0^FF8000555
- 5^000000","000^FF80006^0000000","0^FF80007777^000000","0^FF80008888^000000";
- end;
- }
- - script SampleBot -1,{
- OnCheckBOT:
- if(checking_person == 1)
- {
- detachrid;
- attachrid(getarg(0));
- }
- callfunc "Check_bot";
- close;
- end;
- OnWhisperGlobal:
- if(@whispervar0$ == "andar" || @whispervar0$ == "Andar" || @whispervar0$ == "ANDAR")
- {
- OnWlkFunc:
- dispbottom "Por favor digite agora a coordenada X";
- dispbottom "Para onde você deseja que o Monstro ande.";
- input @digitX;
- dispbottom "Agora por favor digite a Coordenada Y";
- input @digitY;
- dispbottom "Carregando...";
- npcwalkto @digitX,@digitY;
- dispbottom "Carregamento Completo!";
- dispbottom "Monstro em movimento...";
- end;
- } else if(@whispervar0$ == "falar" || @whispervar0$ == "Falar" || @whispervar0$ == "FALAR")
- {
- OnTlkFunc:
- dispbottom "Por favor digite o que deseja que o monstro fale:";
- input @digitTLK$;
- dispbottom "Carregando...";
- npctalk @digitTLK$;
- dispbottom "Carregamento Completo!";
- dispbottom "Monstro falou...";
- end;
- } else if(@whispervar0$ == "checar" || @whispervar0$ == "Checar" || @whispervar0$ == "CHECAR")
- {
- OnChkFunc:
- dispbottom "Por favor digite o nome da pessoa que deseja que o anti-bot cheque:";
- input @checkperson$;
- dispbottom "Carregando...";
- dispbottom "Pessoa sendo interrogada!";
- set @checking,getcharid(3,@checkperson$);
- set checking_person,1;
- callsub OnCheckBOT,@checking;
- end;
- } else if(@whispervar0$ == "mover" || @whispervar0$ == "Mover" || @whispervar0$ == "MOVER")
- {
- OnMovFunc:
- dispbottom "Por favor digite o nome do BOT que você deseja que seja movido";
- dispbottom "(Obs: Exatamente igual!)";
- input @moving_$;
- dispbottom "Agora digite a coordenada X";
- input @X;
- dispbottom "Agora a coordenada Y";
- input @Y;
- dispbottom "Carregando...";
- moveNPC @moving_$,@X,@Y;
- dispbottom "Pronto!";
- end;
- } else
- dispbottom "-----------------------------------------";
- dispbottom "---------SampleBot System [BETA]---------";
- dispbottom "-----------------------------------------";
- dispbottom "Bem vindo! O que deseja? ----------------";
- dispbottom "1 - Fazer o bot andar -------------------";
- dispbottom "2 - Fazer o bot falar -------------------";
- dispbottom "3 - Fazer o bot checar alguém -----------";
- dispbottom "4 - Mover o Bot de local (X/Y) ----------";
- dispbottom "0 - Nada --------------------------------";
- dispbottom "-----------------------------------------";
- dispbottom "-----------------------------------------";
- dispbottom "-----------------------------------------";
- input @int;
- if(@int == 1) callsub OnWlkFunc;
- if(@int == 2) callsub OnTlkFunc;
- if(@int == 3) callsub OnChkFunc;
- if(@int == 4) callsub OnMovFunc;
- if(@int == 0) callsub OnAfterTimer;
- end;
- OnInit:
- initnpctimer;
- npcspeed 150;
- end;
- OnTimer30000:
- OnAfterTimer:
- setnpctimer 0;
- if (getmapxy ($@map$,$@mapx,$@mapy,1)!=0) end;
- if (rand(0,1)>0) //+
- {
- if(rand(6)>3)//++
- {
- npcwalkto $@mapx+rand(0,15),$@mapy+rand(0,15);
- end;
- }
- npcwalkto $@mapx+rand(0,15),$@mapy-rand(0,15);
- callsub OnInit;
- end;
- }else if(rand(12)>5) //-+
- {
- npcwalkto $@mapx-rand(0,15),$@mapy-rand(0,15);
- end;
- } else
- set $@x,$@x+rand(1,200);
- for(set $@y,500; $@y < $@x ; set $@y,$@y-10) //+++
- {
- npcwalkto $@x,$@y;
- end;
- }
- end;
- } //END SCRIPT
- function script Check_bot {
- //Pega o IP do jogador, use esta função com cuidado!
- set char_ip,query_sql SELECT `last_ip` FROM `login` WHERE `account_id` = " +getcharid(3)+ "";
- if(char_ip == -1){ set $global_opt$,"TXT"; }
- if(char_ip != -1){ set $global_opt$,"SQL"; }
- mes "[SampleBot]";
- if(USED != 1)
- {
- set @can_error,5;
- set USED,1;
- break;
- }
- mes "Olá, "+strcharinfo(0)+"!";
- mes "Espero que não se importe";
- mes "Em fazer alguns testes.";
- next;
- mes "[SampleBot]";
- mes "Por favor digite a soma dos números a seguir:";
- mes "+$line_1[@i]+""+$line_1[@i_]+""+$line_1[@i3]+";
- mes "+$line_2[@i]+""+$line_2[@i_]+""+$line_2[@i3]+";
- mes "+$line_3[@i]+""+$line_3[@i_]+""+$line_3[@i3]+";
- mes "+$line_4[@i]+""+$line_4[@i_]+""+$line_4[@i3]+";
- mes "+$line_5[@i]+""+$line_5[@i_]+""+$line_5[@i3]+";
- mes "+$line_1[@i]$+""+$line_1[@i_]+""+$line_1[@i3]+";
- mes "+$line_2[@i]$+""+$line_2[@i_]+""+$line_2[@i3]+";
- mes "+$line_3[@i]$+""+$line_3[@i_]+""+$line_3[@i3]+";
- mes "+$line_4[@i]$+""+$line_4[@i_]+""+$line_4[@i3]+";
- mes "+$line_5[@i]$+""+$line_5[@i_]+""+$line_5[@i3]+";
- input @str;
- if(@str != @i+@i_+@i3) callsub OnError_,1;
- next;
- mes "[SampleBot]";
- mes "Agora por favor digite seu nick:";
- mes "(Exatamente Igual!)";
- input @str$;
- if(@str$ != strcharinfo(0)) callsub OnError_,2;
- next;
- mes "[SampleBot]";
- mes "Checagem concluida, desculpe qualquer transtorno!";
- set USED,0;
- return;
- OnError_:
- next;
- mes "[SampleBot]";
- if(@can_error == 0)
- {
- mes "Me desculpe "+strcharinfo(0)+", mas você";
- mes "Errou sucessivamente nas etapas de teste.";
- mes "Você será banido por uso de BOTS!";
- logmes "H-Defense: O jogador "+strcharinfo(0)+"(ACC ID:"+getcharid(3)+") foi banido do servidor por uso de BOT";
- if($global_opt$ == "SQL")query_sql "INSERT INTO ipbanlist (list,btime,rtime,reason) VALUES
- ('"+char_ip+"','"+gettime(7)+"-"+gettime(6)+"-"+gettime(5)+" "+gettime(3)+":"+gettime(2)+":"+gettime(1)+"','2099-01-01 00:00:00','"Utilizou Bot"')";
- if($global_opt$ == "TXT") atcommand "@ban 1yr "+strcharinfo(0);
- atcommand "@kick "+strcharinfo(0);
- return;
- }
- set @can_error,@can_error - 1;
- mes "Me desculpe "+strcharinfo(0)+", mas você";
- mes "Errou na etapa "+getarg(0)+" de nosso teste.";
- mes "Peço que repita-a. Você só pode errar mais "+@can_error+"";
- if(@can_error > 1)
- {
- mes "Vezes!";
- break;
- }
- if(@can_error == 1)
- {
- mes "Vez!";
- break;
- }
- next;
- mes "[SampleBot]";
- mes "Agora iremos repetir todas as etapas!";
- callsub OnError_,getarg(0);
- end;
- }
- // === Duplicatas ===
- // Algumas que achei no eAthena
- prt_fild02.gat,143,191,8 duplicate(SampleBot) Mandragora#1 1020
- prt_fild02.gat,265,310,8 duplicate(SampleBot) Mandragora#2 1020
- prt_fild02.gat,143,139,8 duplicate(SampleBot) Mandragora#3 1020
- prt_fild02.gat,109,319,8 duplicate(SampleBot) Mandragora#4 1020
- prt_fild02.gat,307,191,8 duplicate(SampleBot) Mandragora#5 1020
- beach_dun3.gat,189,195,8 duplicate(SampleBot) Sapo de Thara#1 1034
- beach_dun3.gat,187,150,8 duplicate(SampleBot) Sapo de Thara#2 1034
- beach_dun3.gat,147,234,8 duplicate(SampleBot) Sapo de Thara#3 1034
- beach_dun3.gat,100,140,8 duplicate(SampleBot) Sapo de Thara#4 1034
- beach_dun3.gat,180,216,8 duplicate(SampleBot) Sapo de Thara#5 1034
- ein_fild07.gat,264,142,8 duplicate(SampleBot) Geographer#1 1368
- ein_fild07.gat,203,169,8 duplicate(SampleBot) Geographer#2 1368
- ein_fild07.gat,218,297,8 duplicate(SampleBot) Geographer#3 1368
- ein_fild07.gat,319,184,8 duplicate(SampleBot) Geographer#4 1368
- ein_fild07.gat,201,100,8 duplicate(SampleBot) Geographer#5 1368
Add Comment
Please, Sign In to add comment