Postado Novembro 2, 2011 13 anos Boa tarde pessoal do TibiaKing Andei observando os tópicos aqi de Programação do Forum e notei que a parte de Linguagem C falta muitos tutorias, projetos e tópicos a respeito de codigos pra crianção de bots. Tentei aprender mais sobre as outras linguagens, porém é realmente dificil. Como eu "aprendi" a programar em Linguagem C++ na faculdade (conhecimentos qase nulos qando pois não aprendemos a utilizar processos etc..), resolvi criar um bot (SEM TIBIA.API) em linguagem c++ com a ajuda de voces. - Bot mais simples possivel e de facil utilização. - Bot atualizado pra versão atual (Tibia 9.31) e futuras atualizações. - Bot baseado (qase copiado 100%) no Mini-Bot feito por Kimoszin [Criando um Mini-Bot no Delphi (Sem API)], porém é mais simples.. - Trate-se de um trainer bot. Imagem: Mostrar conteúdo oculto Form1.h: Mostrar conteúdo oculto #pragma once namespace SzerBot { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Summary for Form1 /// /// WARNING: If you change the name of this class, you will need to change the /// 'Resource File Name' property for the managed resource compiler tool /// associated with all .resx files this class depends on. Otherwise, /// the designers will not be able to interact properly with localized /// resources associated with this form. /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: Add the constructor code here // } protected: /// <summary> /// Clean up any resources being used. /// </summary> ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::CheckBox^ Box1; private: System::Windows::Forms::CheckBox^ Box2; private: System::Windows::Forms::TextBox^ SpellText; private: System::Windows::Forms::GroupBox^ groupBox1; private: System::Windows::Forms::Timer^ ContFood; private: System::Windows::Forms::Timer^ ContMana; private: System::Windows::Forms::Label^ label1; private: System::Windows::Forms::Label^ label2; private: System::Windows::Forms::TextBox^ ManaText; private: System::Windows::Forms::Label^ XMana; private: System::Windows::Forms::Label^ label3; private: System::Windows::Forms::Label^ label5; private: System::Windows::Forms::Timer^ ContTime; private: System::Windows::Forms::RadioButton^ Button2; private: System::Windows::Forms::RadioButton^ Button1; private: System::ComponentModel::IContainer^ components; protected: protected: private: /// <summary> /// Required designer variable. /// </summary> #pragma region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> void InitializeComponent(void) { this->components = (gcnew System::ComponentModel::Container()); this->Box1 = (gcnew System::Windows::Forms::CheckBox()); this->Box2 = (gcnew System::Windows::Forms::CheckBox()); this->SpellText = (gcnew System::Windows::Forms::TextBox()); this->groupBox1 = (gcnew System::Windows::Forms::GroupBox()); this->ContFood = (gcnew System::Windows::Forms::Timer(this->components)); this->ContMana = (gcnew System::Windows::Forms::Timer(this->components)); this->label1 = (gcnew System::Windows::Forms::Label()); this->label2 = (gcnew System::Windows::Forms::Label()); this->ManaText = (gcnew System::Windows::Forms::TextBox()); this->label3 = (gcnew System::Windows::Forms::Label()); this->XMana = (gcnew System::Windows::Forms::Label()); this->label5 = (gcnew System::Windows::Forms::Label()); this->ContTime = (gcnew System::Windows::Forms::Timer(this->components)); this->Button1 = (gcnew System::Windows::Forms::RadioButton()); this->Button2 = (gcnew System::Windows::Forms::RadioButton()); this->groupBox1->SuspendLayout(); this->SuspendLayout(); // // Box1 // this->Box1->AutoSize = true; this->Box1->Location = System::Drawing::Point(6, 80); this->Box1->Name = L"Box1"; this->Box1->Size = System::Drawing::Size(68, 17); this->Box1->TabIndex = 1; this->Box1->Text = L"Anti-Kick"; this->Box1->UseVisualStyleBackColor = true; this->Box1->CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox1_CheckedChanged); // // Box2 // this->Box2->AutoSize = true; this->Box2->Location = System::Drawing::Point(6, 103); this->Box2->Name = L"Box2"; this->Box2->Size = System::Drawing::Size(69, 17); this->Box2->TabIndex = 2; this->Box2->Text = L"Eat Food"; this->Box2->UseVisualStyleBackColor = true; // // SpellText // this->SpellText->Location = System::Drawing::Point(49, 13); this->SpellText->Name = L"SpellText"; this->SpellText->Size = System::Drawing::Size(100, 20); this->SpellText->TabIndex = 3; this->SpellText->TextChanged += gcnew System::EventHandler(this, &Form1::textBox1_TextChanged); // // groupBox1 // this->groupBox1->Controls->Add(this->Button2); this->groupBox1->Controls->Add(this->Button1); this->groupBox1->Controls->Add(this->label5); this->groupBox1->Controls->Add(this->XMana); this->groupBox1->Controls->Add(this->label3); this->groupBox1->Controls->Add(this->ManaText); this->groupBox1->Controls->Add(this->label2); this->groupBox1->Controls->Add(this->label1); this->groupBox1->Controls->Add(this->SpellText); this->groupBox1->Controls->Add(this->Box2); this->groupBox1->Controls->Add(this->Box1); this->groupBox1->Location = System::Drawing::Point(12, 12); this->groupBox1->Name = L"groupBox1"; this->groupBox1->Size = System::Drawing::Size(186, 202); this->groupBox1->TabIndex = 4; this->groupBox1->TabStop = false; // // label1 // this->label1->AutoSize = true; this->label1->Location = System::Drawing::Point(6, 16); this->label1->Name = L"label1"; this->label1->Size = System::Drawing::Size(39, 13); this->label1->TabIndex = 4; this->label1->Text = L"Magia:"; this->label1->Click += gcnew System::EventHandler(this, &Form1::label1_Click); // // label2 // this->label2->AutoSize = true; this->label2->Location = System::Drawing::Point(6, 42); this->label2->Name = L"label2"; this->label2->Size = System::Drawing::Size(37, 13); this->label2->TabIndex = 5; this->label2->Text = L"Mana:"; this->label2->Click += gcnew System::EventHandler(this, &Form1::label2_Click); // // ManaText // this->ManaText->Location = System::Drawing::Point(49, 39); this->ManaText->Name = L"ManaText"; this->ManaText->Size = System::Drawing::Size(47, 20); this->ManaText->TabIndex = 6; // // label3 // this->label3->AutoSize = true; this->label3->Location = System::Drawing::Point(81, 135); this->label3->Name = L"label3"; this->label3->Size = System::Drawing::Size(37, 13); this->label3->TabIndex = 7; this->label3->Text = L"Mana:"; // // XMana // this->XMana->AutoSize = true; this->XMana->Location = System::Drawing::Point(124, 135); this->XMana->Name = L"XMana"; this->XMana->Size = System::Drawing::Size(41, 13); this->XMana->TabIndex = 8; this->XMana->Text = L"XMana"; // // label5 // this->label5->AutoSize = true; this->label5->ForeColor = System::Drawing::SystemColors::ControlDark; this->label5->Location = System::Drawing::Point(81, 104); this->label5->Name = L"label5"; this->label5->Size = System::Drawing::Size(104, 13); this->label5->TabIndex = 9; this->label5->Text = L"Food na Hotkey F10"; // // Button1 // this->Button1->AutoSize = true; this->Button1->Location = System::Drawing::Point(18, 155); this->Button1->Name = L"Button1"; this->Button1->Size = System::Drawing::Size(57, 17); this->Button1->TabIndex = 10; this->Button1->TabStop = true; this->Button1->Text = L"Ligado"; this->Button1->UseVisualStyleBackColor = true; // // Button2 // this->Button2->AutoSize = true; this->Button2->Location = System::Drawing::Point(18, 178); this->Button2->Name = L"Button2"; this->Button2->Size = System::Drawing::Size(72, 17); this->Button2->TabIndex = 11; this->Button2->TabStop = true; this->Button2->Text = L"Desligado"; this->Button2->UseVisualStyleBackColor = true; // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(210, 226); this->Controls->Add(this->groupBox1); this->Name = L"Form1"; this->Text = L"TrainerBOT"; this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load); this->groupBox1->ResumeLayout(false); this->groupBox1->PerformLayout(); this->ResumeLayout(false); } #pragma endregion private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { } private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void label1_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void label2_Click(System::Object^ sender, System::EventArgs^ e) { } }; } SzerBot.cpp Mostrar conteúdo oculto // SzerBot.cpp : main project file. #include "stdafx.h" #include "Form1.h" using namespace SzerBot; [STAThreadAttribute] int main(array<System::String ^> ^args) { // Enabling Windows XP visual effects before any controls are created Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false);[/size][/size] // Create the main window and run it Application::Run(gcnew Form1()); return 0; } TextBox1 = SpellText (magia a ser usada) TextBox2 = ManaText ( x de mana para usar a magia) CheckBox1 = Box1 (ativar anti-kick) CheckBox2 = Box2 (ativar eat food) Label4 = XMana (mostrar mana atual do player) Timer1 = ContFood (determinar o intervalo de tempo pra comer food) Timer2 = ContMana (contar a mana atual do player) Timer3 = ContTime (determinar o intervalo de tempo para girar o player) RadioButton1 = Button1 (ligar o Bot) RadioButton2 = Button2 (desligar o Bot) Especificaçoes: - O Anti-Kick vai girar o player de 5 em 5 minutos. - O EatFood vai acionar a Hotkey F10 (onde vai estar selecionado pelo proprio player o food qe levou pra treinar) de 7 em 7 minutos. - A opção do RadioButton2 (Desligado), ao abrir o bot, ja deve estar marcado. - Quando clicado na opção Ligado (RadioButton1), a opção do RadioButton2 (Desligado) deve ser desmarcada. - O Bot vai ler o numero de mana indicado para usar a magia, e quando o ContMana for igual ou superior, o Bot usará a magia. Enfim, peço a ajuda de voces porqe meus conhecimentos são basicamentes nulos pois não sei fazer interação da linguagem com os processos. Coloquei espesificaçoes bem óbvias.. mas é isso ai. O Bot não é pra ser comercializado.. é para uso pessoal (principalmente pra mim qe deixo meus char treinando enquanto eu estudo ao lado).
Postado Novembro 2, 2011 13 anos Cara, pelo o que você me mostrou esse bot é muito bom, e sim, concordo com você plenamente a razão de falta de tutorias de C++. Mas afinal, você disponibilizará para nós ? Eu mesmo não consigo instalar o programas, mas ótimo conteúdo ! Parabéns !! Atenciosamente,Gustavo Luiz .
Postado Novembro 2, 2011 13 anos #Google Eu acho que ele passou as source do bot, Nao conseguir ler o codigo todo, pois esta mt bugado
Postado Novembro 3, 2011 13 anos Autor @Kimoszin Ja arrumei os spoilers.. eu tinha tentado arrumar pra ficar colorido, mas não consegui.. tudo preto vai ficar dificil de ler e intender.. @Google O TrainerBot é pra comunidade TibiaKing.. Não intendi oqe voce quiz dizer com instatar o programa.. disponibilizei o Form1.h e o SzerBot.cpp pra voces copiar e colar no Programador de voces. Eu to usando o Microsoft Visual C++ 2008. O objetivo do tópico é para qe aqeles qe intendem programação em c++ e interação com processos, dispinibilizarem um pouco de sesus conhecimentos.. o conhecimento que possuo (if, else, while, for, string, do while...) são inuteis sem a interação com processos. Então se cada um ajudar um pouqinho, talves podemos criar algo no qal muitos usaram e serão beneficiados. Agradeço a ajuda. ~~~ / / ~~~ Mas ninguem tem algo pra ajudar no projeto? Editado Novembro 7, 2011 13 anos por Jszer (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.