Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main : wManager.Plugin.IPlugin
- {
- private static bool isLaunched;
- public void Initialize()
- {
- isLaunched = true;
- GMPVanillaSettings.Load();
- robotManager.Helpful.Logging.Write("Gold Making Plugin v1.0.0 by Bambo is being loaded...");
- while(isLaunched & Products.IsStarted)
- {
- Thread.Sleep(500);
- Dispose();
- }
- }
- public void Dispose()
- {
- GMPVanillaSettings.CurrentSetting.Save();
- isLaunched = false;
- }
- public void Settings()
- {
- GMPVanillaSettings.Load();
- GMPVanillaSettings.CurrentSetting.ToForm();
- GMPVanillaSettings.CurrentSetting.Save();
- }
- }
- public class GMPVanillaSettings : Settings
- {
- public GMPVanillaSettings()
- {
- settingOne = false;
- settingTwo = false;
- settingThree = false;
- farmCopperOre = 0;
- farmTinOre = 0;
- farmSilverOre = 0;
- farmIronOre = 0;
- farmGoldOre = 0;
- farmMithrilOre = 0;
- farmTruesilverOre = 0;
- farmThoriumOre = 0;
- farmPeacebloom = 0;
- farmSilverleaf = 0;
- farmEarthroot = 0;
- farmMageroyal = 0;
- farmSwiftthistle = 0;
- farmBriarthorn = 0;
- farmStranglekelp = 0;
- farmBruiseweed = 0;
- farmWildSteelbloom = 0;
- farmGraveMoss = 0;
- farmKingsblood = 0;
- farmLiferoot = 0;
- farmFadeleaf = 0;
- farmGoldthorn = 0;
- farmKhadgarsWhisker = 0;
- farmWintersbite = 0;
- farmFirebloom = 0;
- farmPurpleLotus = 0;
- farmWildvine = 0;
- farmArthasTears = 0;
- farmSungrass = 0;
- farmBlindweed = 0;
- farmGhostMushroom = 0;
- farmGromsblood = 0;
- farmGoldenSansam = 0;
- farmDreamfoil = 0;
- farmMountainSilversage = 0;
- farmPlaguebloom = 0;
- farmIcecap = 0;
- farmBlackLotus = 0;
- farmRuinedLeatherScraps = 0;
- farmLightLeather = 0;
- farmMediumLeather = 0;
- farmHeavyLeather = 0;
- farmThickLeather = 0;
- farmRuggedLeather = 0;
- farmRawGold30 = 0;
- farmRawGold40 = 0;
- farmRawGold50 = 0;
- farmRawGold60 = 0;
- farmBOEExample = false;
- }
- }
- public static GMPVanillaSettings CurrentSetting { get; set; }
- public bool Save()
- {
- try
- {
- return Save(AdviserFilePathAndName("GMPVanilla", ObjectManager.Me.Name + "." + Usefuls.RealmName));
- }
- catch (Exception e)
- {
- Logging.WriteDebug("GMPVanillaSettings => Save(): " + e);
- return false;
- }
- }
- public static bool Load()
- {
- try
- {
- if (File.Exists(AdviserFilePathAndName("GMPVanilla", ObjectManager.Me.Name + "." + Usefuls.RealmName)))
- {
- CurrentSetting =
- Load<GMPVanillaSettings>(AdviserFilePathAndName("GMPVanilla",
- ObjectManager.Me.Name + "." + Usefuls.RealmName));
- return true;
- }
- CurrentSetting = new GMPVanillaSettings();
- }
- catch (Exception e)
- {
- Logging.WriteDebug("GMPVanilla => Load(): " + e);
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement