Code source auto agresseaire de shady bot

    Publicités

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

narufull44

Membre Banni
Feb 25, 2011
76
0
426
33
Bonjours Code source auto agresseaire de shady bot
je vous passe parque vous pas confiance en moi donc
voila
...........................................................................................
MyControl.cs
using System;
using System.Windows.Forms;

namespace AutoAggress
{
public partial class MyControl : UserControl
{
private Plugin _plugin;

public MyControl(Plugin plugin)
{
_plugin = plugin;
InitializeComponent();
}

private void CheckBontaCheckedChanged(object sender, EventArgs e)
{
_plugin.AttackBonta = checkBonta.Checked;
}

private void CheckNeutreCheckedChanged(object sender, EventArgs e)
{
_plugin.AttackNeutre = checkNeutre.Checked;
}

private void CheckBrakCheckedChanged(object sender, EventArgs e)
{
_plugin.AttackBrak = checkBrak.Checked;
}

private void NumericMinLevelValueChanged(object sender, EventArgs e)
{
_plugin.LevelMin = Convert.ToInt32(numericMinLevel.Value);
}

private void NumericMaxLevelValueChanged(object sender, EventArgs e)
{
_plugin.LevelMax = Convert.ToInt32(numericMaxLevel.Value);
}

private void TextNameTextChanged(object sender, EventArgs e)
{
string name = textName.Text.Trim().ToLower();
_plugin.AttackName = name.Length > 1 ? name : null;
}
}
}
.........................................................................................
Plungin.cs
using System;
using System.Windows.Forms;
using DofusAPI.Network.Messages.Game.Context.Roleplay.Fight;
using DofusAPI.Network.Types.Game.Context.Roleplay;
using ShadyAPI;
using ShadyAPI.Account;
using ShadyAPI.Events;
using ShadyAPI.Game.Character;
using ShadyAPI.Game.Entity;
using ShadyAPI.Game.Entity.Infos;
using ShadyAPI.Plugins;

namespace AutoAggress
{
public class Plugin : IPluginAccount
{
// Public properties //

public IShady Shady { get; set; }
public IAccount Account { get; set; }

// Internal informations //

internal bool AttackBonta { get; set; }
internal bool AttackNeutre { get; set; }
internal bool AttackBrak { get; set; }

internal int LevelMin { get; set; }
internal int LevelMax { get; set; }

internal string AttackName { get; set; }

// Menu

internal ToolStripMenuItem Menu { get; set; }
internal ToolStripMenuItem StartBotMenu { get; set; }
internal ToolStripMenuItem StopBotMenu { get; set; }

// Private variables //

private MyControl _control;

// Plugin informations //

public string Name
{
get { return "AutoAggress"; }
}

public string Author
{
get { return "Obscur3"; }
}

public string Version
{
get { return "1.1"; }
}

// Main functions //

public void OnLoad(IShady shady, IAccount account)
{
Shady = shady;
Account = account;

_control = new MyControl(this);
Account.CreatePage("Agression", _control);

Account.Bot.RegisterTask(OnTick, 800);
CreateMenu();

AttackBonta = false;
AttackNeutre = false;
AttackBrak = false;

LevelMin = 1;
LevelMax = 200;

AttackName = null;
}

public void OnUnload()
{

}

// Private functions //

private void OnTick(object sender, IBotTick e)
{
if (!Account.Game.Character.State.IsInactive) return;
if (Account.Game.Character.State.Context != ContextEnum.ROLEPLAY) return;

IEntity[] entities = Account.Game.Map.Entities;
foreach (IEntity entity in entities)
{
if (entity is GameRolePlayCharacterInformations)
{
GameRolePlayCharacterInformations character = (GameRolePlayCharacterInformations) entity;
if (character.GetLevel() >= LevelMin && character.GetLevel() <= LevelMax)
{
if (AttackName == null || AttackName.Equals(character.Name.ToLower()))
{
if (character.AlignmentInfos.AlignmentSide == AlignmentSide.ANGEL && AttackBonta)
{
Aggress(character, "bontarien");
return;
}
if (character.AlignmentInfos.AlignmentSide == AlignmentSide.EVIL && AttackBrak)
{
Aggress(character, "brâkmarien");
return;
}
if (character.AlignmentInfos.AlignmentSide == AlignmentSide.NEUTRAL && AttackNeutre)
{
Aggress(character, "neutre");
return;
}
}
}
}
}
}

private void Aggress(GameRolePlayCharacterInformations character, string alignment)
{
Account.Wait(200, 400);
Account.Log("[AutoAggress] Agression du " + alignment + " " + character.Name + " de niveau " + character.GetLevel() + " !");
GameRolePlayPlayerFightRequestMessage message = new GameRolePlayPlayerFightRequestMessage();
message.InitGameRolePlayPlayerFightRequestMessage((uint)character.ContextualId, character.CellId, false);
Account.Network.ServerSocket.Send(message);
Account.Wait(1000, 2000);
}

// Gestion du menu

private void CreateMenu()
{
Menu = new ToolStripMenuItem("Bot (Agression)");
StartBotMenu = new ToolStripMenuItem("Démarrer");
StopBotMenu = new ToolStripMenuItem("Arrêter");

Menu.ForeColor = System.Drawing.Color.FromArgb(30, 57, 91);
Menu.DropDownItems.Add(StartBotMenu);
Menu.DropDownItems.Add(StopBotMenu);

Menu.DropDownOpening += MenuOpening;
StartBotMenu.Click += MenuStartBot;
StopBotMenu.Click += MenuStopBot;

Account.AddMenu(Menu);
}

private void MenuOpening(Object sender, EventArgs e)
{
StartBotMenu.Enabled = !Account.Bot.IsEnabled;
StopBotMenu.Enabled = Account.Bot.IsEnabled;
}

private void MenuStartBot(Object sender, EventArgs e)
{
Account.Log("[Bot] Démarré.");
Account.Bot.Start();
}

private void MenuStopBot(Object sender, EventArgs e)
{
Account.Log("[Bot] Arrêté.");
Account.Bot.Stop();
}
}
}
........................................................................................
MyControl.Designer.cs
namespace AutoAggress
{
partial class MyControl
{
/// <summary>
/// Variable nécessaire au concepteur.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Nettoyage des ressources utilisées.
/// </summary>
/// <param name="disposing">true si les ressources managées doivent être supprimées*; sinon, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Code généré par le Concepteur de composants

/// <summary>
/// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
/// le contenu de cette méthode avec l'éditeur de code.
/// </summary>
private void InitializeComponent()
{
this.checkNeutre = new System.Windows.Forms.CheckBox();
this.checkBonta = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.checkBrak = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.numericMinLevel = new System.Windows.Forms.NumericUpDown();
this.numericMaxLevel = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
this.textName = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.numericMinLevel)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericMaxLevel)).BeginInit();
this.SuspendLayout();
//
// checkNeutre
//
this.checkNeutre.AutoSize = true;
this.checkNeutre.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.checkNeutre.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91)))));
this.checkNeutre.Location = new System.Drawing.Point(81, 35);
this.checkNeutre.Name = "checkNeutre";
this.checkNeutre.Size = new System.Drawing.Size(69, 19);
this.checkNeutre.TabIndex = 3;
this.checkNeutre.Text = "Neutres";
this.checkNeutre.UseVisualStyleBackColor = true;
this.checkNeutre.CheckedChanged += new System.EventHandler(this.CheckNeutreCheckedChanged);
//
// checkBonta
//
this.checkBonta.AutoSize = true;
this.checkBonta.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.checkBonta.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91)))));
this.checkBonta.Location = new System.Drawing.Point(81, 10);
this.checkBonta.Name = "checkBonta";
this.checkBonta.Size = new System.Drawing.Size(85, 19);
this.checkBonta.TabIndex = 2;
this.checkBonta.Text = "Bontariens";
this.checkBonta.UseVisualStyleBackColor = true;
this.checkBonta.CheckedChanged += new System.EventHandler(this.CheckBontaCheckedChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91)))));
this.label1.Location = new System.Drawing.Point(14, 11);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(61, 15);
this.label1.TabIndex = 4;
this.label1.Text = "Agresser :";
//
// checkBrak
//
this.checkBrak.AutoSize = true;
this.checkBrak.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.checkBrak.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91)))));
this.checkBrak.Location = new System.Drawing.Point(81, 60);
this.checkBrak.Name = "checkBrak";
this.checkBrak.Size = new System.Drawing.Size(96, 19);
this.checkBrak.TabIndex = 5;
this.checkBrak.Text = "Brakmariens";
this.checkBrak.UseVisualStyleBackColor = true;
this.checkBrak.CheckedChanged += new System.EventHandler(this.CheckBrakCheckedChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91)))));
this.label2.Location = new System.Drawing.Point(14, 93);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(107, 15);
this.label2.TabIndex = 6;
this.label2.Text = "Niveau minimum :";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91)))));
this.label3.Location = new System.Drawing.Point(14, 127);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(110, 15);
this.label3.TabIndex = 7;
this.label3.Text = "Niveau maximum :";
//
// numericMinLevel
//
this.numericMinLevel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91)))));
this.numericMinLevel.Location = new System.Drawing.Point(130, 93);
this.numericMinLevel.Maximum = new decimal(new int[] {
200,
0,
0,
0});
this.numericMinLevel.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericMinLevel.Name = "numericMinLevel";
this.numericMinLevel.Size = new System.Drawing.Size(52, 20);
this.numericMinLevel.TabIndex = 8;
this.numericMinLevel.Value = new decimal(new int[] {
1,
0,
0,
0});
this.numericMinLevel.ValueChanged += new System.EventHandler(this.NumericMinLevelValueChanged);
//
// numericMaxLevel
//
this.numericMaxLevel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91)))));
this.numericMaxLevel.Location = new System.Drawing.Point(130, 127);
this.numericMaxLevel.Maximum = new decimal(new int[] {
200,
0,
0,
0});
this.numericMaxLevel.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericMaxLevel.Name = "numericMaxLevel";
this.numericMaxLevel.Size = new System.Drawing.Size(52, 20);
this.numericMaxLevel.TabIndex = 9;
this.numericMaxLevel.Value = new decimal(new int[] {
200,
0,
0,
0});
this.numericMaxLevel.ValueChanged += new System.EventHandler(this.NumericMaxLevelValueChanged);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(57)))), ((int)(((byte)(91)))));
this.label4.Location = new System.Drawing.Point(14, 159);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(126, 30);
this.label4.TabIndex = 10;
this.label4.Text = "Nom du personnage :\r\n(Optionnel)";
//
// textName
//
this.textName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textName.Location = new System.Drawing.Point(146, 158);
this.textName.Name = "textName";
this.textName.Size = new System.Drawing.Size(80, 20);
this.textName.TabIndex = 11;
this.textName.TextChanged += new System.EventHandler(this.TextNameTextChanged);
//
// MyControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.textName);
this.Controls.Add(this.label4);
this.Controls.Add(this.numericMaxLevel);
this.Controls.Add(this.numericMinLevel);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.checkBrak);
this.Controls.Add(this.label1);
this.Controls.Add(this.checkNeutre);
this.Controls.Add(this.checkBonta);
this.Name = "MyControl";
this.Size = new System.Drawing.Size(239, 202);
((System.ComponentModel.ISupportInitialize)(this.numericMinLevel)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericMaxLevel)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.CheckBox checkNeutre;
private System.Windows.Forms.CheckBox checkBonta;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox checkBrak;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown numericMinLevel;
private System.Windows.Forms.NumericUpDown numericMaxLevel;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textName;
}
}
........................................................................................
AssemblyInfo.cs
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Les informations générales relatives à un assembly dépendent de
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
// associées à un assembly.
[assembly: AssemblyTitle("AutoAggress")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Obscur3")]
[assembly: AssemblyProduct("AutoAggress")]
[assembly: AssemblyCopyright("Copyright © Shady 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
[assembly: ComVisible(false)]

// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
[assembly: Guid("459dca5a-2f93-40b8-afa0-52e97de4b2af")]

// Les informations de version pour un assembly se composent des quatre valeurs suivantes*:
//
// Version principale
// Version secondaire
// Numéro de build
// Révision
//
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
// en utilisant '*', comme indiqué ci-dessous*:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
 
Apr 25, 2012
1,245
0
942
27
Nope
Merci de ce partage (tu aurais pus Spoil) mais as tu eu l'autorisation de Obscur3?
(si il en faut une :lol: