Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1.  
  2. public class Main : wManager.Plugin.IPlugin
  3. {
  4. private static bool isLaunched;
  5.  
  6. public void Initialize()
  7. {
  8. isLaunched = true;
  9. GMPVanillaSettings.Load();
  10. robotManager.Helpful.Logging.Write("Gold Making Plugin v1.0.0 by Bambo is being loaded...");
  11.  
  12.  
  13. while(isLaunched & Products.IsStarted)
  14. {
  15. Thread.Sleep(500);
  16. Dispose();
  17. }
  18.  
  19. }
  20.  
  21. public void Dispose()
  22. {
  23. GMPVanillaSettings.CurrentSetting.Save();
  24. isLaunched = false;
  25. }
  26.  
  27. public void Settings()
  28. {
  29. GMPVanillaSettings.Load();
  30. GMPVanillaSettings.CurrentSetting.ToForm();
  31. GMPVanillaSettings.CurrentSetting.Save();
  32. }
  33. }
  34.  
  35. public class GMPVanillaSettings : Settings
  36. {
  37. public GMPVanillaSettings()
  38. {
  39. settingOne = false;
  40. settingTwo = false;
  41. settingThree = false;
  42. farmCopperOre = 0;
  43. farmTinOre = 0;
  44. farmSilverOre = 0;
  45. farmIronOre = 0;
  46. farmGoldOre = 0;
  47. farmMithrilOre = 0;
  48. farmTruesilverOre = 0;
  49. farmThoriumOre = 0;
  50. farmPeacebloom = 0;
  51. farmSilverleaf = 0;
  52. farmEarthroot = 0;
  53. farmMageroyal = 0;
  54. farmSwiftthistle = 0;
  55. farmBriarthorn = 0;
  56. farmStranglekelp = 0;
  57. farmBruiseweed = 0;
  58. farmWildSteelbloom = 0;
  59. farmGraveMoss = 0;
  60. farmKingsblood = 0;
  61. farmLiferoot = 0;
  62. farmFadeleaf = 0;
  63. farmGoldthorn = 0;
  64. farmKhadgarsWhisker = 0;
  65. farmWintersbite = 0;
  66. farmFirebloom = 0;
  67. farmPurpleLotus = 0;
  68. farmWildvine = 0;
  69. farmArthasTears = 0;
  70. farmSungrass = 0;
  71. farmBlindweed = 0;
  72. farmGhostMushroom = 0;
  73. farmGromsblood = 0;
  74. farmGoldenSansam = 0;
  75. farmDreamfoil = 0;
  76. farmMountainSilversage = 0;
  77. farmPlaguebloom = 0;
  78. farmIcecap = 0;
  79. farmBlackLotus = 0;
  80. farmRuinedLeatherScraps = 0;
  81. farmLightLeather = 0;
  82. farmMediumLeather = 0;
  83. farmHeavyLeather = 0;
  84. farmThickLeather = 0;
  85. farmRuggedLeather = 0;
  86. farmRawGold30 = 0;
  87. farmRawGold40 = 0;
  88. farmRawGold50 = 0;
  89. farmRawGold60 = 0;
  90. farmBOEExample = false;
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104. }
  105.  
  106. }
  107.  
  108. public static GMPVanillaSettings CurrentSetting { get; set; }
  109.  
  110. public bool Save()
  111. {
  112. try
  113. {
  114. return Save(AdviserFilePathAndName("GMPVanilla", ObjectManager.Me.Name + "." + Usefuls.RealmName));
  115. }
  116. catch (Exception e)
  117. {
  118. Logging.WriteDebug("GMPVanillaSettings => Save(): " + e);
  119. return false;
  120. }
  121. }
  122.  
  123. public static bool Load()
  124. {
  125. try
  126. {
  127. if (File.Exists(AdviserFilePathAndName("GMPVanilla", ObjectManager.Me.Name + "." + Usefuls.RealmName)))
  128. {
  129. CurrentSetting =
  130. Load<GMPVanillaSettings>(AdviserFilePathAndName("GMPVanilla",
  131. ObjectManager.Me.Name + "." + Usefuls.RealmName));
  132. return true;
  133. }
  134. CurrentSetting = new GMPVanillaSettings();
  135. }
  136. catch (Exception e)
  137. {
  138. Logging.WriteDebug("GMPVanilla => Load(): " + e);
  139. }
  140. return false;
  141. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement