Jump to content

Change Current settings!


binban

Recommended Posts

Hello guys!
i try to find info about this but couldnt find!
i am levling dks, and to make my life easier i would like to set in my quest profile the currrent settings for ;

#disable blockages in last 10 mins
#turn on "try to detect evading mobs
#mount Distance to 5

 

Also Failed to autoload my plugins!


public class LoadPlugins
    {
        public static void Allplugins()
        {
            wManager.Plugin.PluginsManager.DisposeAllPlugins();
            foreach (var p in wManager.wManagerSetting.CurrentSetting.PluginsSettings)
            {
                if (p.FileName == "BetterTalents.dll")
                p.Actif = true;
                if (p.FileName == "Death knight Item Manager.dll")
                p.Actif = true;
            }
            wManager.Plugin.PluginsManager.LoadAllPlugins();
        }
    }

Link to comment
Share on other sites

Hello,

On 4/7/2020 at 7:07 PM, binban said:

#disable blockages in last 10 mins
#turn on "try to detect evading mobs
#mount Distance to 5

Run code:

wManager.wManagerSetting.CurrentSetting.DetectEvadingMob = true;
wManager.wManagerSetting.CurrentSetting.CloseAfterXBlockagesActive = false;
wManager.wManagerSetting.CurrentSetting.MountDistance = 5;

 

On 4/7/2020 at 7:07 PM, binban said:

Also Failed to autoload my plugins!


public class LoadPlugins
    {
        public static void Allplugins()
        {
            wManager.Plugin.PluginsManager.DisposeAllPlugins();
            foreach (var p in wManager.wManagerSetting.CurrentSetting.PluginsSettings)
            {
                if (p.FileName == "BetterTalents.dll")
                p.Actif = true;
                if (p.FileName == "Death knight Item Manager.dll")
                p.Actif = true;
            }
            wManager.Plugin.PluginsManager.LoadAllPlugins();
        }
    }

Try to run it in separed thread:

public class LoadPlugins
{
    public static void Allplugins()
    {
        new System.Threading.Thread(o =>
        {
            foreach (var p in wManager.wManagerSetting.CurrentSetting.PluginsSettings)
            {
                if (p.FileName == "BetterTalents.dll")
                    p.Actif = true;
                if (p.FileName == "Death knight Item Manager.dll")
                    p.Actif = true;
            }
            wManager.Plugin.PluginsManager.DisposeAllPlugins();
            wManager.Plugin.PluginsManager.LoadAllPlugins();
        }).Start();
    }
}

 

Link to comment
Share on other sites

@Droidz Thanks alot for your Reply! was very helpful!

now i am facing another problem! i am new to c# ?

#why bot ignores it ? --->  if (!(Quest.HasQuest(12706))   i have quest  

# also what does means " ! "  tried with or without it and goes to next step

 

if (!(Quest.HasQuest(12706)) && !(ObjectManager.Me.Position.DistanceTo2D(new Vector3(2414.296f, -5624.672f, 376.9641f)) < 60))
{
Logging.Write("[Settings]: I AM FAR");
Logging.Write("[Settings]: I AM FAR");
Logging.Write("[Settings]: I AM FAR");
MessageBox.Show("I AM FAR");
wManager.Wow.Helpers.Lua.RunMacroText("/equip Plated Saronite Bracers");
wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(2402.86f, -5727.03f, 156.007f));
wManager.Wow.Bot.Tasks.MountTask.DismountMount();
wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(new Vector3(2402.86f, -5727.03f, 156.007f), 29501, 1, false);
System.Threading.Thread.Sleep(17000);
}

if (!(Quest.HasQuest(12706)) && (ObjectManager.Me.Position.DistanceTo2D(new Vector3(2414.296f, -5624.672f, 376.9641f)) < 60))
{
Logging.Write("[Settings]: IN SPOT");
Logging.Write("[Settings]: IN SPOT");
Logging.Write("[Settings]: IN SPOT");
MessageBox.Show("IN SPOT");
}
return true;

This script belong to smokie! and what i am trying to do here to check if my death knight  is at plat form in air and in land!

Link to comment
Share on other sites

@binban 
I don't mean to be rude, but you can't expect other people to do all the work for you. Mindlessly copypasting won't really get you anywhere.
! is a negation of a boolean and if evaluates a boolean.

There are so many unecessary brackets in that statement, it becomes pretty much unreadable. Try reading up on the very BASE principles on programming and you'll be able to understand any modify scripts at will. 

I highly recommend https://java-programming.mooc.fi/
If you spend 1-2 days on it, you should be set.

Link to comment
Share on other sites

6 minutes ago, Matenia said:

@binban 
I don't mean to be rude, but you can't expect other people to do all the work for you. Mindlessly copypasting won't really get you anywhere.
! is a negation of a boolean and if evaluates a boolean.

There are so many unecessary brackets in that statement, it becomes pretty much unreadable. Try reading up on the very BASE principles on programming and you'll be able to understand any modify scripts at will. 

I highly recommend https://java-programming.mooc.fi/
If you spend 1-2 days on it, you should be set.

You are Right!
I will try Harder From now on!
Sorry to give you Alot of work! ?
Thanks alot for the advise!
Have a good day ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...