Avelyev Дата: Среда, 13 Ноя 2013, 13:27 | Сообщение # 7
Сэнпай
Гильдия: Гильдия Хакеров
Заклинаний: 520
загрузка наград ...
Ранг:
0
Присутствие: Меня нет
Код
//--------------------------------------------------------------------------- #include <vcl.h> #include <vcl\iniFiles.hpp> #include <vcl\Clipbrd.hpp> #pragma hdrstop #include <stdio.h> #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "CSPIN" #pragma resource "*.dfm" TForm1 *Form1; AnsiString iNick,iHost,iPing,iUser,iChanal,iBot,S,r_x3,r_add,r_blbl; int p,iPort,vvo,vonv,vbvo,xxx,flud=0,level=7,onk=1; bool botmode=0,start=1,ent=0,uc=0,an=0; AnsiString n,o; float zhdat; // //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- AnsiString Bot2(AnsiString s); AnsiString Bot3(AnsiString s); AnsiString Bot4(AnsiString s); void mes(AnsiString s,unsigned int raz=1) { S="privmsg "+iChanal+" "+s+'\r'+'\n'; for(unsigned int i=0;i<raz;i++) Form1->Socke->Socket->SendText(S); Form1->Memo1->Lines->Add("<"+iNick+"> "+s); } AnsiString Hintt(AnsiString o,int t) { Form1->Edit24->Text=o; AnsiString p=""; if(t==1) for(int i=o.Length();i>0;i--) { p=p+o.SubString(i,1); } if(t==2) for(int i=1;i<=o.Length();i++) { if(i%2==0) p=p+o.SubString(i,1); else p=p+"*"; } if(t==3) { for(int i=o.Length();i>0;i--) { p=p+o.SubString(i,1); } o=p; p=""; for(int i=1;i<=o.Length();i++) { if(i%2==0) p=p+o.SubString(i,1); else p=p+"*"; } } return p; } void kar(short im) { if(Form1->CheckBox12->Checked) Beep(im*100,10); if(Form1->CheckBox13->Checked) Beep(); } void say(int s) { ShowMessage(IntToStr(s)); } void say(AnsiString s) { ShowMessage(s); } AnsiString GetLin(AnsiString text) { AnsiString ret="",rett=""; int tp=0; // do { tp=0; ret=""; //say(text.Pos("\n")) ; //say(text.Length()) ; text=text.SubString(2,text.Length()-1); if(text.Pos(" ")) tp=text.Pos(" "); //say(tp); if(text.Pos("!")) tp=(tp<text.Pos("!"))?tp:text.Pos("!"); //say(tp); ret=text.SubString(1,tp-1); text=text.SubString(tp+1,text.Length()-tp); tp=text.Pos(":"); text=text.SubString(tp+1,text.Length()-tp); ret="<"+ret+"> "+text.SubString(1,text.Pos("\n")); // if(text.SubString(1,text.Pos("\n"))=="Unknown command") // uc=1; rett=rett+ret; text=text.SubString(text.Pos("\n")+1,text.Length()-text.Pos("\0")); flud=0; if(ret!=iNick) flud++; if(ret!=iBot) flud++; if(flud==0) Form1->CheckBox18->Checked=0; }while(text.Pos("\n")+1<text.Length()); return rett.SubString(1,rett.Length()-1); } void __fastcall TForm1::SockeConnect(TObject *Sender, TCustomWinSocket *Socket) { Socke->Socket->SendText("PASS " + iNick +':'+Edit21->Text +'\r'+'\n' +"NICK " + iNick + '\r'+'\n'+"USER " + iUser + " "+Socke->Socket->LocalHost + " " + Socke->Socket->LocalAddress+ " " + ": " +iUser+ '\r'+'\n'); } //--------------------------------------------------------------------------- void add(AnsiString N,AnsiString O) { TIniFile *ini=new TIniFile(ChangeFileExt(Application->ExeName,".INI")); ini->WriteString("123",N.UpperCase(),O.UpperCase()); delete ini; } void anag(AnsiString N,AnsiString O) { char na; for(int i=1;i<=N.Length();i++) {for(int i2=i+1;i2<=N.Length();i2++){ if(N[i]>N[i2]){ na=N[i]; N[i]=N[i2]; N[i2]=na;}}} TIniFile *ini=new TIniFile(ChangeFileExt(Application->ExeName,"_an.INI")); ini->WriteString("321",N.UpperCase(),O.UpperCase()); delete ini; } bool est(AnsiString n,bool addd) { Application->ProcessMessages(); AnsiString otvet; TIniFile *ini=new TIniFile(ChangeFileExt(Application->ExeName,".INI")); if(n[1]=='[')n[1]='?'; otvet=ini->ReadString("123",n,"").LowerCase(); delete ini; if(otvet!="") { if(Form1->RadioButton11->Checked) otvet=Hintt(otvet,1); if(Form1->RadioButton12->Checked) otvet=Hintt(otvet,2); if(Form1->RadioButton13->Checked) otvet=Hintt(otvet,3); otvet=Form1->Edit20->Text+otvet+Form1->Edit4->Text; Form1->Timer2->Enabled=0; if(Form1->CheckBox11->Checked) kar(6); Form1->Label6->Caption="нашел!"; Form1->Memo1->Lines->Add("<"+iNick+"> "+otvet); Form1->Edit11->Text=otvet; // ///////////****** if(Form1->CheckBox5->Checked) { onk--; if(onk<1) { Form1->Label40->Font->Color=clPurple; Form1->Label40->Visible=0; onk=Form1->CSpinEdit4->Value; if(Form1->CheckBox23->Checked) zhdat=random((Form1->CSpinEdit5->Value+1)-Form1->CSpinEdit2->Value)+1; if(Form1->CheckBox24->Checked) zhdat+=otvet.Length()/(Form1->CSpinEdit3->Value/60.0); if(zhdat>0) { Form1->Label40->Caption="типа вводим "+FloatToStr((int)zhdat)+" сек)"; Form1->Label40->Visible=1; for(int i=0;i<50;i++) { Sleep(zhdat*20); Application->ProcessMessages(); }} Form1->Label40->Visible=0; zhdat=0; S="privmsg "+iChanal+" "+otvet+'\r'+'\n'; Form1->Socke->Socket->SendText(S); if(Form1->CheckBox7->Checked) Form1->Socke->Socket->SendText(S); Form1->Label11->Caption=++vonv; } else { Form1->Label40->Font->Color=clWhite; Form1->Label40->Caption="типа незнаю ("+IntToStr(onk)+")"; Form1->Label40->Visible=1; } } return 1; } else { if(addd) { onk--; Form1->Label40->Font->Color=clWhite; Form1->Label40->Visible=0; Form1->Label6->Caption="добавляю!"; if(Form1->CheckBox18->Checked) mes(Form1->Edit12->Text,1); if(Form1->CheckBox10->Checked) kar(2); botmode=1; if(Form1->CheckBox4->Checked) { Sleep(random(Form1->CSpinEdit2->Value)); r_x3=Form1->Edit9->Items->Strings[random(Form1->Edit9->Items->Count)]; S="privmsg "+iChanal+" "+r_x3+'\r'+'\n'; Form1->Socke->Socket->SendText(S); Form1->Memo1->Lines->Add("<"+iNick+"> "+r_x3); } } } return 0; } AnsiString ct(AnsiString ss,AnsiString CHAR,char Zam) { for(int i=ss.Pos(CHAR);i>0;i=ss.Pos(CHAR)) { ss[i]=Zam; } return ss; } AnsiString t(AnsiString s) { s=ct(s,"a",'а'); s=ct(s,"A",'а'); s=ct(s,"B",'в'); s=ct(s,"b",'ь'); s=ct(s,"C",'с'); s=ct(s,"c",'с'); s=ct(s,"O",'о'); s=ct(s,"o",'о'); s=ct(s,"u",'и'); s=ct(s,"U",'и'); s=ct(s,"K",'к'); s=ct(s,"k",'к'); s=ct(s,"T",'т'); s=ct(s,"t",'т'); s=ct(s,"P",'р'); s=ct(s,"p",'р'); s=ct(s,"X",'х'); s=ct(s,"x",'х'); s=ct(s,"n",'п'); s=ct(s,"Y",'у'); s=ct(s,"y",'у'); s=ct(s,"E",'е'); s=ct(s,"e",'е'); s=ct(s,"m",'т'); s=ct(s,"M",'м'); s=ct(s,"H",'н'); return s.UpperCase(); } void bazz(void) { if(!est(n.UpperCase(),0)) { n=t(n); if(!est(n,(level==1))) if(level>1) if(!est(n.SubString(1,n.Length()-1),(level==2))) if(level>2) if(!est(n.SubString(1,n.Length()-2),(level==3))) if(level>3) if(!est(n.SubString(1,n.Length()-1)+"?",(level==4))) if(level>4) if(!est(n.SubString(1,n.Length()-1)+".",(level==5))) if(level>5) if(!est(n+"?",(level==6))) if(level>6) est(n+".",(level==7)); } } AnsiString Bot(AnsiString s) { if(Form1->CheckBox9->Checked) Form1->Timer2->Enabled=1; if(start) { if((Form1->CheckBox2->Checked)&&((s.Pos("Игра остановлена в связи с отсутствием интереса к ней"))||(s.Pos("!стоп"))) ) { S="privmsg "+iChanal+" "+Form1->Edit15->Text+'\r'+'\n'; Form1->Socke->Socket->SendText(S); //if(Form1->CheckBox7->Checked) Form1->Socke->Socket->SendText(S); Form1->Memo1->Lines->Add("<"+iNick+"> "+Form1->Edit15->Text); Form1->Label6->Caption="остановлено"; botmode=0; o=""; n=""; } //"Bоnpoс #"+NNNN+":" if(s.Pos("Bоnpoс #")) { Form1->Timer2->Enabled=0; n=s.SubString(s.Pos("")+1,s.Length()-(s.Pos("")+1)); n=n.SubString(n.Pos("")+1,n.Length()-(n.Pos("")+1)); n=n.SubString(n.Pos(" ")+1,n.Pos("")-5); bazz(); } if(s.Pos("Экстра Bоnpoс:")) { Form1->Timer2->Enabled=0; n=s.SubString(s.Pos("")+1,s.Length()-(s.Pos("")+1)); n=n.SubString(n.Pos("")+1,n.Length()-(n.Pos("")+1)); n=n.SubString(n.Pos(" ")+1,n.Pos("")-5); bazz(); } if(botmode) { if(!s.Pos("Игра остановлена в связи с отсутствием интереса к ней")) { int potv=0; potv=s.Pos(", правильный ответ был "); if(!potv) { potv=s.Pos("Правильный ответ -> "); o=s.SubString(potv+23,s.Pos(" <-")-(potv+26)); } else o=s.SubString(potv+26,s.Pos(".")-(potv+29)); if(potv) { if(n[1]=='[')n[1]='?'; add(n,o); botmode=0; o=""; n=""; Form1->Label7->Caption=++vvo; if(Form1->CheckBox14->Checked) kar(8); Form1->Label6->Caption="добавлено"; Form1->Label13->Caption=vbvo+vvo; if(Form1->CheckBox3->Checked) { Sleep(random(Form1->CSpinEdit2->Value)); r_add=Form1->Edit10->Items->Strings[random(Form1->Edit10->Items->Count)]; S="privmsg "+iChanal+" "+r_add+'\r'+'\n'; Form1->Socke->Socket->SendText(S); Form1->Memo1->Lines->Add("<"+iNick+"> "+r_add); } } } } if(s.Pos("vbvo")) { mes(IntToStr(vbvo),1); } if(Form1->CheckBox25->Checked) if(s.Pos(Form1->Edit16->Text)) { Form1->Button4->Click(); mes("Нееет)",1); } if(s.Pos("vvo")) { mes(IntToStr(vvo),1); } if(s.Pos("vonv")) { mes(IntToStr(vonv),1); } if(s.Pos("developer")) { mes("Vladimir_AvelyevVladimir",1); } if(s.Pos("AvelyevVladimir")) { mes("It_is_my_God",1); } if(s.Pos("language")) { mes("C++_Forever",1); } } else { Form1->Label6->Caption="!бот отключен!"; } if(s.Pos("bot_to_hell")) { if(!Form1->CheckBox16->Checked) { mes("I_GO!!!",3); Form1->Memo1->Clear(); for(int i=0;i<5;i++) Form1->Memo1->Lines->Add("bot to hell"); Form1->CheckBox9->Checked=1; Form1->Timer2->Interval=1000; Form1->Timer2->Enabled=1; } else { mes("Авельев_БОГ)))",3); } } return s; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender) { if(CheckBox27->Checked) mes(Hintt(ComboBox1->Text,1),CheckBox17->Checked+1); else mes(ComboBox1->Text,CheckBox17->Checked+1); ComboBox1->Items->Add(ComboBox1->Text); ComboBox1->ItemIndex=ComboBox1->Items->Count-1; ComboBox1->Text=""; ent=1; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button2Click(TObject *Sender) { iPort = StrToInt(Edit3->Text); iNick = Edit1->Text; iHost = Edit5->Text; iUser = Edit2->Text; iChanal = Edit6->Text; Socke->Host=iHost; Socke->Port=iPort; Socke->Active=true; Memo1->Lines->Add("*** Connecting to "+iHost+"("+Edit3->Text+")"); Memo1->Lines->Add("*** Local Host: "+Socke->Socket->LocalHost+"("+Socke->Socket->LocalAddress+")"); Memo1->SetFocus(); } //--------------------------------------------------------------------------- void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action) { Socke->Socket->SendText("QUIT : "+'\r'+'\n'); Socke->Socket->Close(); if(CheckBox6->Checked) { TIniFile *ini=new TIniFile(ChangeFileExt(Application->ExeName,"_settings.INI")); ini->WriteString("x3","all",IntToStr(Edit9->Items->Count)); ini->WriteString("blbl","all",IntToStr(Edit8->Items->Count)); ini->WriteString("add","all",IntToStr(Edit10->Items->Count)); ini->WriteString("other","host",iHost); ini->WriteString("other","user",iUser); ini->WriteInteger("other","port",iPort); ini->WriteString("other","nick",iNick); ini->WriteString("other","chanal",iChanal); ini->WriteBool("other","1",CheckBox1->Checked); ini->WriteBool("other","2",CheckBox2->Checked); ini->WriteBool("other","3",CheckBox3->Checked); ini->WriteBool("other","4",CheckBox4->Checked); ini->WriteBool("other","5",CheckBox5->Checked); ini->WriteBool("other","6",CheckBox6->Checked); ini->WriteBool("other","7",CheckBox7->Checked); ini->WriteBool("other","8",CheckBox8->Checked); ini->WriteBool("other","9",CheckBox9->Checked); ini->WriteBool("other","10",CheckBox10->Checked); ini->WriteBool("other","11",CheckBox11->Checked); ini->WriteBool("other","12",CheckBox12->Checked); ini->WriteBool("other","13",CheckBox13->Checked); ini->WriteBool("other","14",CheckBox14->Checked); ini->WriteBool("other","15",CheckBox15->Checked); ini->WriteBool("other","16",CheckBox16->Checked); ini->WriteBool("other","17",CheckBox17->Checked); for(int i=0;i<Edit8->Items->Count;i++) ini->WriteString("blbl",IntToStr(i),Edit8->Items->Strings[i]); for(int i=0;i<Edit9->Items->Count;i++) ini->WriteString("x3",IntToStr(i),Edit9->Items->Strings[i]); for(int i=0;i<Edit10->Items->Count;i++) ini->WriteString("add",IntToStr(i),Edit10->Items->Strings[i]); delete ini; } CopyFileA(ChangeFileExt(Application->ExeName,".INI").c_str(),ChangeFileExt(Application->ExeName,"_backup.INI").c_str(),0); } //--------------------------------------------------------------------------- void __fastcall TForm1::SockeRead(TObject *Sender, TCustomWinSocket *Socket) { iPing = Socke->Socket->ReceiveText(); RichEdit1->Lines->Add(iPing); p=iPing.Pos("PING"); if(p!=0) { iPing[p+1]='O'; iPing=GetLin(iPing); Memo1->Lines->Add(iPing); if(RadioButton14->Checked) Bot(iPing); if(RadioButton15->Checked) Bot2(iPing); if(RadioButton16->Checked) Bot3(iPing); if(RadioButton17->Checked) Bot4(iPing); Socke->Socket->SendText(" PONG "); } else { iPing=GetLin(iPing); Memo1->Lines->Add(iPing); if(RadioButton14->Checked) Bot(iPing); if(RadioButton15->Checked) Bot2(iPing); if(RadioButton16->Checked) Bot3(iPing); if(RadioButton17->Checked) Bot4(iPing); } Application->ProcessMessages(); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button3Click(TObject *Sender) { Socke->Active=0; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button4Click(TObject *Sender) { iChanal=Edit6->Text; S="JOIN "+iChanal+'\r'+'\n'; Socke->Socket->SendText(S); if(CheckBox7->Checked) Socke->Socket->SendText(S); if(CheckBox2->Checked) { S="PRIVMSG "+iChanal+" "+Form1->Edit15->Text+'\r'+'\n'; Form1->Socke->Socket->SendText(S); if(CheckBox7->Checked) Form1->Socke->Socket->SendText(S); Form1->Memo1->Lines->Add("<"+iNick+"> "+Form1->Edit15->Text); } Memo1->SetFocus(); } //--------------------------------------------------------------------------- void __fastcall TForm1::Edit4KeyPress(TObject *Sender, char &Key) { if(Key==VK_RETURN) Button1->Click(); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button5Click(TObject *Sender) { iNick = Edit1->Text; S="nick "+iNick+'\r'+'\n'; Socke->Socket->SendText(S); Socke->Socket->SendText(S); Memo1->SetFocus(); } //--------------------------------------------------------------------------- void __fastcall TForm1::CheckBox1Click(TObject *Sender) { start=CheckBox1->Checked; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button6Click(TObject *Sender) { //Bot(Edit7->Text); S=Edit7->Text+'\r'+'\n'; Socke->Socket->SendText(S); Memo1->SetFocus(); } //--------------------------------------------------------------------------- void __fastcall TForm1::Edit7Click(TObject *Sender) { Edit7->Clear(); } //--------------------------------------------------------------------------- void __fastcall TForm1::FormCreate(TObject *Sender) { TStringList *d=new TStringList; d->LoadFromFile(ChangeFileExt(Application->ExeName,".INI")); vbvo=d->Count-1; Label13->Caption=vbvo; delete d; TIniFile *ini=new TIniFile(ChangeFileExt(Application->ExeName,"_settings.INI")); if(ini->ReadBool("other","6",0)) { for(int i=0;i<ini->ReadInteger("x3","all",0);i++) { if(i==1) Edit9->Clear(); Edit9->Items->Add(ini->ReadString("x3",IntToStr(i),"!х")); } for(int i=0;i<ini->ReadInteger("blbl","all",0);i++) { if(i==1) Edit8->Clear(); Edit8->Items->Add(ini->ReadString("blbl",IntToStr(i),"ыы")); } for(int i=0;i<ini->ReadInteger("add","all",0);i++) { if(i==1) Edit10->Clear(); Edit10->Items->Add(ini->ReadString("add",IntToStr(i),"ыы")); } iHost=ini->ReadString("other","host","irc.by"); iUser=ini->ReadString("other","user","AvelyevVladimir"); iPort=ini->ReadInteger("other","port",6667); iNick=ini->ReadString("other","nick","trup"); iChanal=ini->ReadString("other","chanal","#buktopuha"); CheckBox1->Checked=ini->ReadBool("other","1",1); CheckBox2->Checked=ini->ReadBool("other","2",1); CheckBox3->Checked=ini->ReadBool("other","3",0); CheckBox4->Checked=ini->ReadBool("other","4",0); CheckBox5->Checked=ini->ReadBool("other","5",1); CheckBox6->Checked=ini->ReadBool("other","6",1); CheckBox7->Checked=ini->ReadBool("other","7",0); CheckBox8->Checked=ini->ReadBool("other","8",0); CheckBox9->Checked=ini->ReadBool("other","9",0); CheckBox10->Checked=ini->ReadBool("other","10",0); CheckBox11->Checked=ini->ReadBool("other","11",0); CheckBox12->Checked=ini->ReadBool("other","12",1); CheckBox13->Checked=ini->ReadBool("other","13",0); CheckBox14->Checked=ini->ReadBool("other","14",1); CheckBox15->Checked=ini->ReadBool("other","15",1); CheckBox16->Checked=ini->ReadBool("other","16",1); CheckBox17->Checked=ini->ReadBool("other","17",1); Edit2->Text=iUser; Edit5->Text=iHost; Edit1->Text=iNick; Edit3->Text=StrToInt(iPort); Edit6->Text=iChanal; } delete ini; } //--------------------------------------------------------------------------- void __fastcall TForm1::CheckBox8Click(TObject *Sender) { Timer1->Enabled=CheckBox8->Checked; } //--------------------------------------------------------------------------- void __fastcall TForm1::Timer1Timer(TObject *Sender) { r_blbl=Form1->Edit8->Items->Strings[random(Form1->Edit8->Items->Count)]; S="PRIVMSG "+iChanal+" "+r_blbl+'\r'+'\n'; Memo1->Lines->Add("<"+iNick+"> "+r_blbl); Socke->Socket->SendText(S); } //--------------------------------------------------------------------------- void __fastcall TForm1::CSpinEdit1Change(TObject *Sender) { Timer1->Interval=CSpinEdit1->Value*1000; } //--------------------------------------------------------------------------- void __fastcall TForm1::Edit9KeyPress(TObject *Sender, char &Key) { if(Key==VK_RETURN) { Edit9->Items->Add(Edit9->Text); } } //--------------------------------------------------------------------------- void __fastcall TForm1::Edit9KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(Key==VK_DELETE) { Edit9->Items->Delete(Edit9->ItemIndex); } } //--------------------------------------------------------------------------- void __fastcall TForm1::Edit8KeyPress(TObject *Sender, char &Key) { if(Key==VK_RETURN) { Edit8->Items->Add(Edit8->Text); } } //--------------------------------------------------------------------------- void __fastcall TForm1::Edit8KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(Key==VK_DELETE) { Edit8->Items->Delete(Edit8->ItemIndex); } } //--------------------------------------------------------------------------- void __fastcall TForm1::Edit10KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(Key==VK_DELETE) { Edit10->Items->Delete(Edit10->ItemIndex); } } //--------------------------------------------------------------------------- void __fastcall TForm1::Edit10KeyPress(TObject *Sender, char &Key) { if(Key==VK_RETURN) { Edit10->Items->Add(Edit10->Text); } } //--------------------------------------------------------------------------- /* для подгрузки базы(глючит))) редко) for(int i=0;i<Memo2->Lines->Count;i++) { Bot(Memo2->Lines->Strings[i]); } */ void __fastcall TForm1::Timer2Timer(TObject *Sender) { if(CheckBox9->Checked) { HANDLE hToken; TOKEN_PRIVILEGES* NewState; OpenProcessToken (GetCurrentProcess (), TOKEN_ADJUST_PRIVILEGES, &hToken); NewState = (TOKEN_PRIVILEGES*) malloc (sizeof (TOKEN_PRIVILEGES) + sizeof (LUID_AND_ATTRIBUTES)); NewState->PrivilegeCount = 1; LookupPrivilegeValue (NULL, SE_SHUTDOWN_NAME, &NewState->Privileges[0].Luid); NewState->Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; AdjustTokenPrivileges (hToken, FALSE, NewState, NULL, NULL, NULL); free(NewState); CloseHandle (hToken); ExitWindowsEx(EWX_POWEROFF,0); } if(CheckBox15->Checked) { Beep(500,200); Beep(1000,200); Beep(2000,200); Beep(3000,200); Beep(4000,200); Beep(5000,500); Beep(4000,200); Beep(3000,200); Beep(2000,200); Beep(1000,200); Beep(500,200); } } //--------------------------------------------------------------------------- void __fastcall TForm1::CheckBox9Click(TObject *Sender) { Timer2->Enabled=1; } //--------------------------------------------------------------------------- void __fastcall TForm1::CheckBox16Click(TObject *Sender) { if(CheckBox16->Checked) ShowMessage("Да это точно ОН БОГ ну просто царь железок и программок!!!! а ты ..."); if(CheckBox16->Checked) ShowMessage("Ээээ ты чего сума сошел что ли?"); } //--------------------------------------------------------------------------- void __fastcall TForm1::ComboBox1KeyPress(TObject *Sender, char &Key) { if(Key==VK_RETURN) { Button1->Click(); } } //--------------------------------------------------------------------------- void __fastcall TForm1::ComboBox1KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(Key==VK_F2) { ComboBox1->Text=Edit11->Text; } if(Key==VK_F3) { ComboBox1->Text=Edit11->Text; Button1->Click(); } if(Key==VK_F12) { CheckBox18->Checked=!CheckBox18->Checked; } if(Key==VK_UP) if(ent) { ComboBox1->Text=ComboBox1->Items->Strings[ComboBox1->Items->Count-1]; Key=0; ent=0; } } //--------------------------------------------------------------------------- void __fastcall TForm1::Button7Click(TObject *Sender) { Panel2->Visible=!Panel2->Visible; } //--------------------------------------------------------------------------- void __fastcall TForm1::Edit13Click(TObject *Sender) { Edit13->Clear(); } //--------------------------------------------------------------------------- void __fastcall TForm1::Edit14Click(TObject *Sender) { Edit14->SelectAll(); } //--------------------------------------------------------------------------- void __fastcall TForm1::CheckBox19Click(TObject *Sender) { RichEdit1->Visible=CheckBox19->Checked; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button11Click(TObject *Sender) { Label21->Caption="Отфильтровано:"; Label25->Caption="Копий:"; Label22->Caption=""; Label23->Caption=""; Label24->Caption=""; Label26->Caption=""; Label27->Visible=0; TStringList *d1=new TStringList; TStringList *d2=new TStringList; int con3=0,cop=0; d1->LoadFromFile(Edit13->Text); //база //если надо стыковать сюды ставить наименьшую (для скорости!) Label22->Caption=d1->Count+1; bool eesstt; if(RadioButton1->Checked) { d2->LoadFromFile(Edit14->Text); //это если стыковать две базы (здесь должна быть самая большая для speeda) Label23->Caption=d2->Count+1; for(int i=0,ii=0;i<d1->Count;i++) { eesstt=0; for(ii=0;(ii<d2->Count)&&(!eesstt);ii++) { if(d1->Strings[i]==d2->Strings[ii]) {eesstt=1;cop++;} } if(!eesstt) { d2->Add(d1->Strings[i]); con3++; //это счетчик } Application->ProcessMessages(); Label24->Caption=con3+1; //это счетчик Label26->Caption=cop; //это счетчик if(i%1000==0) { d2->SaveToFile(Edit19->Text); } } d2->SaveToFile(Edit19->Text); say("OK! Все отфильтровано)))"); Label27->Visible=1; } else { for(int i=0;i<d1->Count;i++) { eesstt=0; for(int ii=0;(ii<d2->Count)&&(!eesstt);ii++) { if(d1->Strings[i]==d2->Strings[ii]) {eesstt=1;cop++;} } if(!eesstt) { d2->Add(d1->Strings[i]); con3++; //это счетчик } Application->ProcessMessages(); Label24->Caption=con3+1; //это счетчик Label26->Caption=cop; //это счетчик if(i%1000==0) { d2->SaveToFile(Edit19->Text); } } d2->SaveToFile(Edit19->Text); say("OK! Все отфильтровано)))"); Label27->Visible=1; } delete d1,d2; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button8Click(TObject *Sender) { ; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button9Click(TObject *Sender) { Label29->Visible=0; if(CheckBox21->Checked) { add(Edit17->Text,Edit18->Text); Label29->Visible=1; Label7->Caption=++vvo; Label13->Caption=vbvo+vvo; } } //--------------------------------------------------------------------------- void __fastcall TForm1::Button9Exit(TObject *Sender) { Label29->Visible=0; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button10Click(TObject *Sender) { say("При вводе вопроса и ответа регистр не важен"); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button12Click(TObject *Sender) { Label29->Visible=0; TIniFile *ini=new TIniFile(ChangeFileExt(Application->ExeName,".INI")); Edit18->Text=ini->ReadString("123",Edit17->Text.UpperCase(),"").LowerCase(); delete ini; Label29->Visible=1; } //---------------------------------------------------------------------------
В каждом из нас спит гений, но с каждым днем все крепче и крепче. ^_^
Avelyev Дата: Среда, 13 Ноя 2013, 13:29 | Сообщение # 8
Сэнпай
Гильдия: Гильдия Хакеров
Заклинаний: 520
загрузка наград ...
Ранг:
0
Присутствие: Меня нет
продолжение /*class vEmulator*/int kk[key_count]={49,50,51,52,53,54,55,56,57,48,87,81,69,82,84,89,85,73,79,80,65,83,68,70,71,72,74,75,76,90,88,67,86,66,78,77,192,-192,-49,-50,-51,-52,-53,- 54,-55,-56,-57,-48,-189,-187,-220,187,220,189,219,221,222,186,191,190,188,-219,-221,-186,-222,-188,-190,-191,32,-51,-220,81,87,69,82,84,89,8 5,73,79,80,219,221,65,83,68,70,71,72,74,75,76,186,222,90,88,67,86,66,78,77,188,190,13}; /*class vEmulator*/char cc[key_count]={'1','2','3','4','5','6','7','8','9','0','w','q','e','r','t','y','u','i','o','p','a','s','d','f','g','h','j','k','l','z','x','c','v','b','n ','m','`','~','!','@','#','$','%','^','&','*','(',')','_','+','|','=','\\','-','[',']','\'',';','/','.',',','{','}',':','"','<','>','?',' ','№','/','й','ц','у','к','е','н','г','ш','щ','з','х','ъ','ф','ы','в','а','п','р','о','л','д','ж','э','я','ч','с','м','и','т','ь','б','ю','\n'}; /*class vEmulator*/bool ll[key_count]={1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}; //жмакает клавишу доун или ап void KeyVvod(AnsiString Text){if(!stop){AnsiString t;int lan=1,ix;for(int i=1;i<=Text.Length();i++){ t=Text; for(int y=0;yProcessMessages(); if((ll[y]!=ll[lan])||(i==1)){ if(ll[y]) { LoadKeyboardLayout("00000419",1);ix++; } else { LoadKeyboardLayout("00000409",1);ix++; } } Application->ProcessMessages(); lan=y; if((kk[y]<0)||(t.LowerCase()!=t)) { KeyKlac(16,1); if(kk[y]<0) KeyKlac(kk[y]*(-1)); /*клац кей*/ else KeyKlac(kk[y]); /*клац кей*/ KeyKlac(16,2); } else KeyKlac(kk[y]); /*клац кей*/ break; } } }}} Код
void __fastcall TForm1::Button12Exit(TObject *Sender) { Label29->Visible=0; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button13Click(TObject *Sender) { Panel2->Visible=!Panel2->Visible; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button14Click(TObject *Sender) { Label21->Caption="БАЗА1 UP:"; Label25->Caption="БАЗА2 UP:"; Label22->Caption=""; Label23->Caption=""; Label24->Caption=""; Label26->Caption=""; if(CheckBox20->Checked) { TStringList *d1=new TStringList; d1->LoadFromFile(Edit13->Text); Label22->Caption=d1->Count+1; for(int i=0;i<d1->Count;i++) { d1->Strings[i]=d1->Strings[i].UpperCase(); Label24->Caption=i+1; Application->ProcessMessages(); } d1->SaveToFile(Edit13->Text); } if(CheckBox22->Checked) { TStringList *d1=new TStringList; d1->LoadFromFile(Edit14->Text); Label23->Caption=d1->Count+1; for(int i=0;i<d1->Count;i++) { d1->Strings[i]=d1->Strings[i].UpperCase(); Label26->Caption=i+1; Application->ProcessMessages(); } d1->SaveToFile(Edit14->Text); } if((CheckBox20->Checked)||(CheckBox22->Checked)) { Label27->Visible=1; say("OK! Все отфильтрованно)))"); } else say("Чо фильтровать выбери"); } //--------------------------------------------------------------------------- void __fastcall TForm1::RadioButton3Click(TObject *Sender) { level=1; } //--------------------------------------------------------------------------- void __fastcall TForm1::RadioButton4Click(TObject *Sender) { level=2; } //--------------------------------------------------------------------------- void __fastcall TForm1::RadioButton5Click(TObject *Sender) { level=3; } //--------------------------------------------------------------------------- void __fastcall TForm1::RadioButton6Click(TObject *Sender) { level=4; } //--------------------------------------------------------------------------- void __fastcall TForm1::RadioButton7Click(TObject *Sender) { level=5; } //--------------------------------------------------------------------------- void __fastcall TForm1::RadioButton8Click(TObject *Sender) { level=6; } //--------------------------------------------------------------------------- void __fastcall TForm1::RadioButton9Click(TObject *Sender) { level=7; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button15Click(TObject *Sender) { Panel3->Visible=!Panel3->Visible; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button16Click(TObject *Sender) { Panel3->Visible=!Panel3->Visible; } //--------------------------------------------------------------------------- AnsiString Bot2(AnsiString s) { if(Form1->CheckBox9->Checked) Form1->Timer2->Enabled=1; if(start) { if((Form1->CheckBox2->Checked)&&((s.Pos("Игра остановлена в связи с отсутствием интереса к ней"))||(s.Pos("!стоп"))) ) { S="privmsg "+iChanal+" "+Form1->Edit15->Text+'\r'+'\n'; Form1->Socke->Socket->SendText(S); //if(Form1->CheckBox7->Checked) Form1->Socke->Socket->SendText(S); Form1->Memo1->Lines->Add("<"+iNick+"> "+Form1->Edit15->Text); Form1->Label6->Caption="остановлено"; botmode=0; o=""; n=""; } //"Bоnpoс #"+NNNN+":" if(s.Pos("Вопрос")) { Form1->Timer2->Enabled=0; n=s.SubString(s.Pos("")+1,s.Length()-(s.Pos("")+1)); n=n.SubString(n.Pos(" ")+1,n.Length()-n.Pos(" ")); n=n.SubString(1,n.Pos("")-1); bazz(); } if(s.Pos("Блиц-вопрос")) { Form1->Timer2->Enabled=0; n=s.SubString(s.Pos("")+1,s.Length()-(s.Pos("")+1)); n=n.SubString(n.Pos(" ")+1,n.Length()-n.Pos(" ")); n=n.SubString(1,n.Pos("")-1); bazz(); } if(s.Pos("Банк")) { Form1->Timer2->Enabled=0; n=s.SubString(s.Pos("")+1,s.Length()-(s.Pos("")+1)); n=n.SubString(n.Pos(" ")+1,n.Length()-n.Pos(" ")); n=n.SubString(1,n.Pos("")-1); bazz(); } if(s.Pos("Анаграмма")) { Form1->Timer2->Enabled=0; n=s.SubString(s.Pos("")+1,s.Length()-(s.Pos("")+1)); n=n.SubString(n.Pos(" ")+1,n.Length()-(n.Pos(" ")+1)); an=1; TIniFile *ini=new TIniFile(ChangeFileExt(Application->ExeName,"_an.INI")); char na; AnsiString N=n.UpperCase(); for(int i=1;i<=N.Length();i++) {for(int i2=i+1;i2<=N.Length();i2++){ if(N[i]>N[i2]){ na=N[i]; N[i]=N[i2]; N[i2]=na;}}} botmode=1; if(ini->ReadString("321",N,"")!="") { botmode=0; AnsiString otvet=ini->ReadString("321",N,"").LowerCase(); Form1->Edit11->Text=otvet; if(Form1->RadioButton11->Checked) otvet=Hintt(otvet,1); if(Form1->RadioButton12->Checked) otvet=Hintt(otvet,2); if(Form1->RadioButton13->Checked) otvet=Hintt(otvet,3); otvet=Form1->Edit20->Text+otvet+Form1->Edit4->Text; Form1->Timer2->Enabled=0; if(Form1->CheckBox11->Checked) kar(6); Form1->Label6->Caption="нашел!"; Form1->Memo1->Lines->Add("<"+iNick+"> "+otvet); Form1->Edit11->Text=otvet; if(Form1->CheckBox5->Checked) { onk--; if(onk<1) { Form1->Label40->Font->Color=clPurple; Form1->Label40->Visible=0; onk=Form1->CSpinEdit4->Value; if(Form1->CheckBox23->Checked) zhdat=random((Form1->CSpinEdit5->Value+1)-Form1->CSpinEdit2->Value)+1; if(Form1->CheckBox24->Checked) zhdat+=otvet.Length()/(Form1->CSpinEdit3->Value/60.0); if(zhdat>0) { Form1->Label40->Caption="типа вводим "+FloatToStr((int)zhdat)+" сек)"; Form1->Label40->Visible=1; for(int i=0;i<50;i++) { Sleep(zhdat*20); Application->ProcessMessages(); }} Form1->Label40->Visible=0; zhdat=0; S="privmsg "+iChanal+" "+otvet+'\r'+'\n'; Form1->Socke->Socket->SendText(S); if(Form1->CheckBox7->Checked) Form1->Socke->Socket->SendText(S); Form1->Label11->Caption=++vonv; } else { Form1->Label40->Font->Color=clWhite; Form1->Label40->Caption="типа незнаю ("+IntToStr(onk)+")"; Form1->Label40->Visible=1; } } } delete ini; } if(s.Pos("Кот в мешке")) { Form1->Timer2->Enabled=0; n=s.SubString(s.Pos("")+1,s.Length()-(s.Pos("")+1)); n=n.SubString(n.Pos(" ")+1,n.Length()-n.Pos(" ")); n=n.SubString(n.Pos(" ")+1,n.Length()-n.Pos(" ")); n=n.SubString(n.Pos(" ")+1,n.Length()-n.Pos(" ")); n=n.SubString(1,n.Pos("")-1); bazz(); } if(botmode) { if(!s.Pos("Игра остановлена в связи с отсутствием интереса к ней")) { int potv=0; potv=s.Pos("Правильный ответ был:")+25; if(potv==25) { potv=s.Pos("Правильный ответ:")+21; if(potv==21) potv=s.Pos("ый кошачий ответ:")+21; if(potv==21) potv=s.Pos("ромурлыкал ответ:")+21; else { o=s.SubString(potv,s.Length()-potv); o=o.SubString(1,o.Pos("")-1);} } else { o=s.SubString(potv,s.Length()-(potv)); o=o.SubString(1,o.Pos("")-1);} if((potv>21)&&(potv!=25)) { if(n[1]=='[')n[1]='?'; if(!an) add(n,o); else anag(o,o); botmode=0; o=""; n=""; Form1->Label7->Caption=++vvo; if(Form1->CheckBox14->Checked) kar(8); Form1->Label6->Caption="добавлено"; Form1->Label13->Caption=vbvo+vvo; if(Form1->CheckBox3->Checked) { Sleep(random(Form1->CSpinEdit2->Value)); r_add=Form1->Edit10->Items->Strings[random(Form1->Edit10->Items->Count)]; S="privmsg "+iChanal+" "+r_add+'\r'+'\n'; Form1->Socke->Socket->SendText(S); Form1->Memo1->Lines->Add("<"+iNick+"> "+r_add); } } } } if(s.Pos("vbvo")) { mes(IntToStr(vbvo),1); } if(Form1->CheckBox25->Checked) if(s.Pos(Form1->Edit16->Text)) { Form1->Button4->Click(); mes("Нееет)",1); } if(s.Pos("vvo")) { mes(IntToStr(vvo),1); } if(s.Pos("vonv")) { mes(IntToStr(vonv),1); } if(s.Pos("developer")) { mes("Vladimir_AvelyevVladimir",1); } if(s.Pos("AvelyevVladimir")) { mes("It_is_my_God",1); } if(s.Pos("language")) { mes("C++_Forever",1); } } else { Form1->Label6->Caption="!бот отключен!"; } if(s.Pos("bot_to_hell")) { if(!Form1->CheckBox16->Checked) { mes("I_GO!!!",3); Form1->Memo1->Clear(); for(int i=0;i<5;i++) Form1->Memo1->Lines->Add("bot to hell"); Form1->CheckBox9->Checked=1; Form1->Timer2->Interval=1000; Form1->Timer2->Enabled=1; } else { mes("Авельев_БОГ)))",3); } } return s; } void __fastcall TForm1::Edit7KeyPress(TObject *Sender, char &Key) { if(Key==VK_RETURN) { Button6->Click(); } } //--------------------------------------------------------------------------- void __fastcall TForm1::CheckBox28Click(TObject *Sender) { Memo1->WordWrap=CheckBox28->Checked; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button18Click(TObject *Sender) { Label39->Visible=0; anag(Edit23->Text,Edit23->Text); Label39->Visible=1; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button17Click(TObject *Sender) { Label39->Visible=0; TIniFile *ini=new TIniFile(ChangeFileExt(Application->ExeName,"_an.INI")); char na; AnsiString N=Edit22->Text.UpperCase(); for(int i=1;i<=N.Length();i++) {for(int i2=i+1;i2<=N.Length();i2++){ if(N[i]>N[i2]){ na=N[i]; N[i]=N[i2]; N[i2]=na;}}} Edit23->Text=ini->ReadString("321",N,"").LowerCase(); delete ini; Label39->Visible=1; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button17Exit(TObject *Sender) { Label39->Visible=0; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button18Exit(TObject *Sender) { Label39->Visible=0; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button19Click(TObject *Sender) { say("В список вводить только определения, одно определение на строчке, все в столбик)"); say("Например\nПримерно\nКак\nтут\nнаписаНо\nРеГиСтр\nНеВАЖЕН"); Panel4->Visible=!Panel4->Visible; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button20Click(TObject *Sender) { Panel4->Visible=!Panel4->Visible; } //--------------------------------------------------------------------------- void __fastcall TForm1::Button21Click(TObject *Sender) { TIniFile *ini=new TIniFile(ChangeFileExt(Application->ExeName,"_an.INI")); for(int i=0;i<Memo2->Lines->Count;i++) { char na; AnsiString N=Memo2->Lines->Strings[i].UpperCase(); for(int i=1;i<=N.Length();i++) {for(int i2=i+1;i2<=N.Length();i2++){ if(N[i]>N[i2]){ na=N[i]; N[i]=N[i2]; N[i2]=na;}}} if(ini->ReadString("321",N,"")!="") { if(CheckBox29->Checked) anag(Memo2->Lines->Strings[i],Memo2->Lines->Strings[i]); } else anag(Memo2->Lines->Strings[i],Memo2->Lines->Strings[i]); } delete ini; say("OK"); } //--------------------------------------------------------------------------- AnsiString Bot3(AnsiString s) { if(Form1->CheckBox9->Checked) Form1->Timer2->Enabled=1; if(start) { if((Form1->CheckBox2->Checked)&&((s.Pos("Игра остановлена в связи с отсутствием интереса к ней"))||(s.Pos("!стоп"))) ) { S="privmsg "+iChanal+" "+Form1->Edit15->Text+'\r'+'\n'; Form1->Socke->Socket->SendText(S); //if(Form1->CheckBox7->Checked) Form1->Socke->Socket->SendText(S); Form1->Memo1->Lines->Add("<"+iNick+"> "+Form1->Edit15->Text); Form1->Label6->Caption="остановлено"; botmode=0; o=""; n=""; } //"Bоnpoс #"+NNNN+":" if((s.Pos("07 ("))&&(s.Pos("02"))) { Form1->Timer2->Enabled=0; n=s.SubString(s.Pos("02")+3,s.Length()-(s.Pos("02")+2)); n=n.SubString(1,n.Pos("")-1); bazz(); } if(s.Pos("vbvo")) { mes(IntToStr(vbvo),1); } if(Form1->CheckBox25->Checked) if(s.Pos(Form1->Edit16->Text)) { Form1->Button4->Click(); mes("Нееет)",1); } if(s.Pos("vvo")) { mes(IntToStr(vvo),1); } if(s.Pos("vonv")) { mes(IntToStr(vonv),1); } if(s.Pos("developer")) { mes("Vladimir_AvelyevVladimir",1); } if(s.Pos("AvelyevVladimir")) { mes("It_is_my_God",1); } if(s.Pos("language")) { mes("C++_Forever",1); } } else { Form1->Label6->Caption="!бот отключен!"; } if(s.Pos("bot_to_hell")) { if(!Form1->CheckBox16->Checked) { mes("I_GO!!!",3); Form1->Memo1->Clear(); for(int i=0;i<5;i++) Form1->Memo1->Lines->Add("bot to hell"); Form1->CheckBox9->Checked=1; Form1->Timer2->Interval=1000; Form1->Timer2->Enabled=1; } else { mes("Авельев_БОГ)))",3); } } return s; } AnsiString Bot4(AnsiString s) { if(Form1->CheckBox9->Checked) Form1->Timer2->Enabled=1; if(start) { if((Form1->CheckBox2->Checked)&&((s.Pos("Игра остановлена в связи с отсутствием интереса к ней"))||(s.Pos("!стоп"))) ) { S="privmsg "+iChanal+" "+Form1->Edit15->Text+'\r'+'\n'; Form1->Socke->Socket->SendText(S); //if(Form1->CheckBox7->Checked) Form1->Socke->Socket->SendText(S); Form1->Memo1->Lines->Add("<"+iNick+"> "+Form1->Edit15->Text); Form1->Label6->Caption="остановлено"; botmode=0; o=""; n=""; } //"Bоnpoс #"+NNNN+":" if((s.Pos("02"))&&(s.Pos(":12 "))&&(s.Pos("07"))) { Form1->Timer2->Enabled=0; n=s.SubString(s.Pos(":12")+5,s.Length()-(s.Pos(":12")+4)); n=n.SubString(1,n.Pos("")-1); bazz(); } if(botmode) { if(!s.Pos("Игра остановлена в связи с отсутствием интереса к ней")) { int potv=0; potv=s.Pos(", правильный ответ был "); if(!potv) potv=s.Pos("! Правильный ответ"); o=s.SubString(potv+26,s.Length()-(potv+25)); o=o.SubString(1,o.Pos("")-1); if(potv) { if(n[1]=='[')n[1]='?'; add(n,o); botmode=0; o=""; n=""; Form1->Label7->Caption=++vvo; if(Form1->CheckBox14->Checked) kar(8); Form1->Label6->Caption="добавлено"; Form1->Label13->Caption=vbvo+vvo; if(Form1->CheckBox3->Checked) { Sleep(random(Form1->CSpinEdit2->Value)); r_add=Form1->Edit10->Items->Strings[random(Form1->Edit10->Items->Count)]; S="privmsg "+iChanal+" "+r_add+'\r'+'\n'; Form1->Socke->Socket->SendText(S); Form1->Memo1->Lines->Add("<"+iNick+"> "+r_add); } } } } if(s.Pos("vbvo")) { mes(IntToStr(vbvo),1); } if(Form1->CheckBox25->Checked) if(s.Pos(Form1->Edit16->Text)) { Form1->Button4->Click(); mes("Нееет)",1); } if(s.Pos("vvo")) { mes(IntToStr(vvo),1); } if(s.Pos("vonv")) { mes(IntToStr(vonv),1); } if(s.Pos("developer")) { mes("Vladimir_Avelyev",1); } if(s.Pos("AvelyevVladimir")) { mes("It_is_my_God",1); } if(s.Pos("language")) { mes("C++_Forever",1); } } else { Form1->Label6->Caption="!бот отключен!"; } if(s.Pos("bot_to_hell")) { if(!Form1->CheckBox16->Checked) { mes("I_GO!!!",3); Form1->Memo1->Clear(); for(int i=0;i<5;i++) Form1->Memo1->Lines->Add("bot to hell"); Form1->CheckBox9->Checked=1; Form1->Timer2->Interval=1000; Form1->Timer2->Enabled=1; } else { mes("Авельев_БОГ)))",3); } } return s; } void __fastcall TForm1::CSpinEdit2Change(TObject *Sender) { if(CSpinEdit5->Value<=CSpinEdit2->Value) CSpinEdit5->Value=CSpinEdit2->Value; } //--------------------------------------------------------------------------- void __fastcall TForm1::CSpinEdit5Change(TObject *Sender) { if(CSpinEdit5->Value<=CSpinEdit2->Value) CSpinEdit2->Value=CSpinEdit5->Value; } //--------------------------------------------------------------------------- void __fastcall TForm1::CSpinEdit4Change(TObject *Sender) { onk=CSpinEdit4->Value; } //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- /*class vEmulator*/const int key_count=105; class vEmulator { private: bool stop; public: vEmulator(){stop=0;} //конструктор void KeyKlac(int key,int mode=0){/*нажал отпустил 0 //нажал 1 //отпустил 2 */if(mode!=2) keybd_event(key,0,0,0);if(mode!=1) keybd_event(key,0,2,0);} //вводит текст void MouseMove(int x,int y){SetCursorPos(x,y);Sleep(3); /*тормоз для винды*/} //подвинуть мышу void MouseKlacDown(int button,int x,int y){button++;MouseMove(x,y);int z=2;for(int i=1;i<((button*2)-1);i++)z=z*2;mouse_event(z,0,0,0,0);} //задавить мышу void MouseKlacUp(int button,int x,int y){button++;MouseMove(x,y);int z=2;for(int i=1;i<(button*2);i++)z=z*2;mouse_event(z,0,0,0,0);} //отпустить мышу void Clicks(int button,int x,int y,unsigned int count_clicks=1){ for(;count_clicks>0;count_clicks--) { MouseKlacDown(button,x,y); MouseKlacUp(button,x,y); }} //нажать и отпустить мышь Х-раз }; vEmulator vvv; void __fastcall TForm1::Edit11Change(TObject *Sender) { if(Form1->CheckBox30->Checked) Clipboard()->AsText=Edit11->Text.c_str(); if(Form1->CheckBox31->Checked) vvv.KeyVvod(Edit11->Text); }
В каждом из нас спит гений, но с каждым днем все крепче и крепче. ^_^