Guest User

Drop It Like It's Hot

a guest
May 23rd, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.44 KB | None | 0 0
  1. using System;
  2. using System.Drawing;
  3. using System.Windows.Forms;
  4. using System.Threading;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using ArcheBuddy.Bot.Classes;
  8.  
  9. namespace DefaultNameSpace{
  10.    public partial class Form1 : Form
  11.     {
  12.        
  13.     }
  14.     public class DefaultClass : Core
  15.    {
  16.        public static string GetPluginAuthor()
  17.        {
  18.            return "Derp Programmer";
  19.        }
  20.  
  21.        public static string GetPluginVersion()
  22.        {
  23.            return "1.0.0.0";
  24.        }
  25.  
  26.        public static string GetPluginDescription()
  27.        {
  28.            return "Place trade packs anywhere!";
  29.        }
  30.        private System.Windows.Forms.Form Form1;
  31.        private System.Windows.Forms.Button DropItButton;
  32.        private System.Windows.Forms.LinkLabel AboutMelinkLabel;
  33.        
  34.        //Call on plugin start
  35.        public void PluginRun()
  36.        {
  37.            ClearLogs();
  38.            DropTradePack();
  39.        }
  40.        private void DropTradePack()
  41.        {
  42.            try
  43.            {
  44.                 this.DropItButton = new System.Windows.Forms.Button();
  45.                 this.AboutMelinkLabel = new System.Windows.Forms.LinkLabel();
  46.                 //
  47.                 // AboutMelinkLabel
  48.                 //
  49.                 this.AboutMelinkLabel.AutoSize    = true;
  50.                 this.AboutMelinkLabel.Font        = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  51.                 this.AboutMelinkLabel.Location    = new System.Drawing.Point(5, 85);
  52.                 this.AboutMelinkLabel.Name        = "AboutMelinkLabel";
  53.                 this.AboutMelinkLabel.Size        = new System.Drawing.Size(225, 30);
  54.                 this.AboutMelinkLabel.MaximumSize = new Size(225, 30);
  55.                 this.AboutMelinkLabel.AutoSize    = true;
  56.                 this.AboutMelinkLabel.TabIndex    = 9;
  57.                 this.AboutMelinkLabel.TabStop     = true;
  58.                 this.AboutMelinkLabel.Text        = "https://www.thebuddyforum.com/members/335286-derpprogrammer.html";
  59.                 //
  60.                 // DropItButton
  61.                 //
  62.                 this.DropItButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  63.                 this.DropItButton.Location = new System.Drawing.Point(52, 12);
  64.                 this.DropItButton.Name = "DropItButton";
  65.                 this.DropItButton.Size = new System.Drawing.Size(124, 73);
  66.                 this.DropItButton.TabIndex = 0;
  67.                 this.DropItButton.Text = "Drop Trade Pack";
  68.                 this.DropItButton.UseVisualStyleBackColor = true;
  69.                 this.DropItButton.Click += new System.EventHandler(this.DropItButton_Click);
  70.                 //
  71.                 // Form1
  72.                 //
  73.                 Form1                     = new Form{};
  74.                 Form1.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
  75.                 Form1.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
  76.                 Form1.BackColor           = System.Drawing.SystemColors.ActiveCaption;
  77.                 Form1.AutoSize            = true;
  78.                 Form1.ClientSize          = new System.Drawing.Size(231, 111);
  79.                 Form1.Controls.Add(this.DropItButton);
  80.                 Form1.Controls.Add(this.AboutMelinkLabel);
  81.                 Form1.Name    = "Form1";
  82.                 Form1.Text    = "Drop it like it's hot!";
  83.                 Form1.TopMost = true;
  84.                 Form1.ShowDialog();  
  85.            }
  86.            catch (Exception e)
  87.            {
  88.                Log("Something went wrong!!!:  "+e.Message);  
  89.            }
  90.            
  91.        }// End of method
  92.        
  93.         public bool HasTradePack()
  94.         {
  95.            List<Buff> BuffList = me.getBuffs();
  96.             foreach (Buff debuff in BuffList){
  97.                 if (debuff.id==(1454)){
  98.                     return true;
  99.                 }
  100.             }
  101.             Log("You don't have a Trade Pack equipped!");
  102.             return false;  
  103.         }
  104.    
  105.         private void DropItButton_Click(object sender, EventArgs e)
  106.         {
  107.            if (HasTradePack())
  108.            {
  109.                Log("Dropping Trade Pack...");
  110.                UseSkill("Drop Trade Pack");
  111.            }
  112.         }
  113.        //Call on plugin stop
  114.        public void PluginStop()
  115.        {
  116.        }
  117.    }
  118. }
Advertisement
Add Comment
Please, Sign In to add comment