Jump to content

Plugin & Drawing


Icesythe7
 Share

Recommended Posts

Hello there, new guy here I searched the forum and unless I missed it I can't figure out how to(if its even possible) run just a plugin when starting the bot ie i hit the play i want it to just load my plugin only and do nothing else or if I could load a plugin + just a grinder profile with no fightclass that would be ok as well, also is there an api to draws like DrawLine, Drawcircle etc? 

Link to comment
Share on other sites

Hello Icesythe7, I believe you can just leave the fight class combo box empty if you do not wish to use any fight class. If you want to draw circles, lines, and or text, you want to use wManager.Wow.Helpers.Radar3D. Have a look at my plugin, WRadar.

Link to comment
Share on other sites

Thanks for the reply I have since figured out the settings however if you could give me an explanation of how the drawing event works that would be super(cant check ur file as i am a trial user i just use the 15 min trial on vanilla currently)

Link to comment
Share on other sites

If you are wanting to use Radar3D for a plugin, you will need to include the Plugin interface...

using robotManager.Helpful;
using System;
using wManager.Plugin;
using wManager.Wow.Helpers;


public class Radar3DExample : IPlugin
{
    private bool _isLaunched;

    public void Initialize()
    {
        _isLaunched = true;
        Radar3D.Pulse();
        Radar3D.OnDrawEvent += Radar3DOnDrawEvent;
        Logging.Write("Started");
    }

    public void Dispose()
    {
        try
        {
            Radar3D.OnDrawEvent -= Radar3DOnDrawEvent;
        }
        catch { }

        _isLaunched = false;
        Logging.Write("Stopped");
    }

    public void Settings()
    {
        throw new NotImplementedException();
    }

    private void Radar3DOnDrawEvent()
    {
        // Will make sure player is in game and connected, alive and the product is not paused
        if (_isLaunched && Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
        {
            try
            {
                /*
                
                DrawCircle
                center => Center of the object
                radius => the size of the circle
                color => color of the circle (Using struct System.Drawing.Color ARGB - Alpha, Red, Green, Blue)
                alpha => 0 = transparent | 255 100% opaque

                Radar3D.DrawCircle(Vector3 center, float radius, Color color, bool filled = false, alpha = 255)
                
    
                DrawLine
                from => where to start the line from
                to => where to draw the line to
                color => color of the circle (Using struct System.Drawing.Color ARGB - Alpha, Red, Green, Blue)
                alpha => 0 = transparent | 255 100% opaque

                Radar3D.DrawLine(Vector3 from, Vector3 to, Color color, alpha = 255)

                */

            }
            catch (Exception e)
            {
                Logging.WriteError("Radar3DOnDrawEvent() Error: " + Environment.NewLine + e);
                return;
            }
        }
    }

}

 

Link to comment
Share on other sites

Does this get called continuously or just 1 time? What i have worked with in the past when drawing it will draw the item once per frame so you would draw in a while loop, if this does just draw and then stay forever how can i remove it?

Link to comment
Share on other sites

You will want to test if the object or unit you are drawing to is valid, alive, within a specific range, etc. It will draw it on on screen as long your requirements are met.

Sorry - I should say, that is the object, or player, NPC is alive, valid, exists - and IF your conditionals are met (ie: within close distance, is an herb, or mineral vein) it will continuously draw as long as it is within the game's max view distance.

Link to comment
Share on other sites

Correct, it's using the Radar3D. If it's drawing to multiple things without you coding it in, check the settings Other, there's an arrow to pull up another menu with many other items to draw. Maybe see if they are on?

Link to comment
Share on other sites

5 minutes ago, Apexx said:

Correct, it's using the Radar3D. If it's drawing to multiple things without you coding it in, check the settings Other, there's an arrow to pull up another menu with many other items to draw. Maybe see if they are on?

it still draws a random blue circle but its working now xd https://i.gyazo.com/e0e5b485a0e5c921e47bfae196310753.mp4

Link to comment
Share on other sites

ok so heres whats happening calling pulse turns radar3d on in maps(even tho the switch is off) and the only way to turn it off is to turn it on and back off, if i draw something myself it only will draw if radar 3d is on if i turn it on and bacj off while my plugin is running my draws disappear

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
 Share

×
×
  • Create New...