Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.86 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using wManager;
  7. using robotManager.Products;
  8. using Auction;
  9. using wManager.Wow.Enums;
  10. using wManager.Wow.Helpers;
  11. using robotManager.FiniteStateMachine;
  12. using wManager.Wow.Bot.States;
  13. using Timer = robotManager.Helpful.Timer;
  14. using robotManager.Helpful;
  15. using wManager.Wow;
  16. using System.Threading;
  17.  
  18. namespace Main2
  19. {
  20.     public class Class1 : Custom_Profile.ICustomProfile
  21.     {
  22.         public void Initialize()
  23.         {
  24.             //EventsLuaWithArgs.OnEventsLuaWithArgs += MyLuaHandler;
  25.             Logging.Write("AH Plugin has Started");
  26.             //wManager.Wow.Helpers.AuctionHelpers.SetAuctionSellItem("Glyph of Bloodrage");
  27.            
  28.  
  29.  
  30.         }
  31.         public void Dispose()
  32.         {
  33.             //EventsLuaWithArgs.OnEventsLuaWithArgs -= MyLuaHandler;
  34.         }
  35.         public void Settings()
  36.         {
  37.             // no settings
  38.         }
  39.  
  40.         public void Pulse()
  41.         {
  42.             robotManager.Helpful.Logging.Write("Initialized");
  43.  
  44.             //...things you want to initialize
  45.  
  46.  
  47.             var timer = new robotManager.Helpful.Timer(1000);
  48.             timer.ForceReady();
  49.             while (true)
  50.             {
  51.                 try
  52.                 {
  53.                     if (Conditions.ProductIsStartedNotInPause  && Conditions.InGameAndConnected  && timer.IsReady)
  54.                     {
  55.                         robotManager.Helpful.Logging.Write("Pulse");
  56.  
  57.                         //...on pulse
  58.  
  59.                         timer.Reset();
  60.                     }
  61.                 }
  62.                 catch (Exception e)
  63.                 {
  64.                     robotManager.Helpful.Logging.WriteError(e.ToString());
  65.                 }
  66.                 Thread.Sleep(30);
  67.             }
  68.         }
  69.     }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement