PlayerCircleMakerPlugin menu

User Tag List

Results 1 to 10 of 10
  1. #1
    jaeheung09's Avatar Active Member
    Reputation
    23
    Join Date
    Nov 2017
    Posts
    109
    Thanks G/R
    8/21
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PlayerCircleMakerPlugin

    Fy
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    Attached Thumbnails Attached Thumbnails PlayerCircleMakerPlugin-cm1-png   PlayerCircleMakerPlugin-cm2-min-png   PlayerCircleMakerPlugin-cm1-png  
    Last edited by jaeheung09; 03-06-2020 at 06:44 AM.

    PlayerCircleMakerPlugin
  2. Thanks astisbc (1 members gave Thanks to jaeheung09 for this useful post)
  3. #2
    jaeheung09's Avatar Active Member
    Reputation
    23
    Join Date
    Nov 2017
    Posts
    109
    Thanks G/R
    8/21
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Updated
    1. Click.exe <- click simulation in a plugin
    2. Added an option for Circle dash style
    Last edited by jaeheung09; 03-31-2019 at 08:17 AM.

  4. #3
    Saico's Avatar Active Member
    Reputation
    21
    Join Date
    Apr 2019
    Posts
    379
    Thanks G/R
    35/20
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hey, thx f plugin, but I opened click.exe hotkey and nothin happened, and I tried to open the box ingame pushin * but it hides Thud overlay ( but TH stills workin on windows tasks)

  5. #4
    jaeheung09's Avatar Active Member
    Reputation
    23
    Join Date
    Nov 2017
    Posts
    109
    Thanks G/R
    8/21
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Updated the plugin for the better activation of the inputbox.

    However, you can use alt+tab to bring the inputbox window back to front which hid behind the game/Hud. (This is the basic how to use windows OS)

    If it is not the case, you need to explain your problem in detail.

    Lastly, "click.exe" is not the thing you need to open yourself. It is what is used automatically inside the plugin.
    Last edited by jaeheung09; 04-24-2019 at 02:07 AM.

  6. #5
    Saico's Avatar Active Member
    Reputation
    21
    Join Date
    Apr 2019
    Posts
    379
    Thanks G/R
    35/20
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the update bro, now the box opens and I can insert the values, somehow it didnt work b4, I tried yesterday changin the key to open on numpad but could not solve. Ty so much f update

  7. #6
    xratedownz's Avatar Member
    Reputation
    1
    Join Date
    Feb 2009
    Posts
    226
    Thanks G/R
    23/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    2019.05.22 21:24:06.320 19.5.20.1 suspicious plugins behavior in plugin file: 'C:\TurboHUD\Plugins\James\PlayerCircleMakerPlugin.cs': possibly trying to use System.Diagnostics.

    How can i fix this?
    Last edited by xratedownz; 05-22-2019 at 01:48 PM.

  8. #7
    LordCerberus's Avatar Member
    Reputation
    1
    Join Date
    Aug 2019
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just installed it but when i press * in the numpad nothing happens at all (tried alt tabbing and checked everything but no difference). Any suggestions on what could it be?

    im getting the same error as the guy above

    EDIT: changed the code thingy and it works now (seriously it was a lucky thing i have no idea of what im doing lol). In case it can help someone here is the changed code:

    // User defined Circle drawing
    // Call inputbox : Numpad *(multiply)
    // User input contents: Circle_radius, rgb_r, rgb_g, rgb_b, StrokeWidth <-- Should be seperated by space(" ") or comma(",")
    // Error-proof user input
    using System;
    using Turbo.Plugins.Default;
    using System.Windows.Forms;
    using SharpDX.DirectInput;
    using System.Drawing;

    namespace Turbo.Plugins.James
    {
    public class PlayerCircleMakerPlugin : BasePlugin, IKeyEventHandler, IInGameWorldPainter
    {
    public WorldDecoratorCollection UserRadiusDashDecorator { get; set; }
    public WorldDecoratorCollection UserRadiusSolidDecorator { get; set; }
    public IKeyEvent PressKeyEvent { get; set; } // Numpad *
    public int UserRadius { get; set; }
    public int UserRGB_R { get; set; }
    public int UserRGB_G { get; set; }
    public int UserRGB_B { get; set; }
    public bool UserDashStyle { get; set; }
    public float UserStrokeWidth { get; set; }
    private bool Circle { get; set; }
    private static System.Timers.Timer ClickTimer;

    public PlayerCircleMakerPlugin()
    {
    Enabled = true;
    Circle = false;
    UserRadius = 30;
    UserRGB_R = 255;
    UserRGB_G = 0;
    UserRGB_B = 0;
    UserStrokeWidth = 2.0f;
    UserDashStyle = false;
    }

    public override void Load(IController hud)
    {
    base.Load(hud);

    PressKeyEvent = Hud.Input.CreateKeyEvent(true, Key.Multiply, false, false, false);

    UserRadiusDashDecorator = new WorldDecoratorCollection(new GroundCircleDecorator(Hud)
    {
    Brush = Hud.Render.CreateBrush(155, UserRGB_R, UserRGB_G, UserRGB_B, UserStrokeWidth, SharpDX.Direct2D1.DashStyle.Dash),
    Radius = UserRadius,
    Enabled = true
    });
    UserRadiusSolidDecorator = new WorldDecoratorCollection(new GroundCircleDecorator(Hud)
    {
    Brush = Hud.Render.CreateBrush(155, UserRGB_R, UserRGB_G, UserRGB_B, UserStrokeWidth),
    Radius = UserRadius,
    Enabled = true
    });
    }

    public void PaintWorld(WorldLayer layer)
    {
    var player = Hud.Game.Me;

    if (Circle)
    {
    if (UserDashStyle)
    UserRadiusDashDecorator.Paint(layer, player, player.FloorCoordinate, string.Empty);
    else
    UserRadiusSolidDecorator.Paint(layer, player, player.FloorCoordinate, string.Empty);
    }
    }

    public void DoClick(Object source, System.Timers.ElapsedEventArgs e)
    {
    Cursor.Position = new Point(Hud.Window.Size.Width / 2, Hud.Window.Size.Height / 2 - 30);
    }

    public void OnKeyEvent(IKeyEvent keyEvent)
    {
    if (keyEvent.IsPressed && PressKeyEvent.Matches(keyEvent))
    {
    ClickTimer = new System.Timers.Timer();
    ClickTimer.Interval = 50;
    ClickTimer.Elapsed += DoClick;
    ClickTimer.AutoReset = false;
    ClickTimer.Enabled = true;

    string value = "0 to clear circle";
    if(InputBox("Drawing Circle", "Yard,R,G,B,SW,Dash(d)", ref value) == DialogResult.OK)
    {
    string sep = ", ";
    value = value.Trim();
    string[] CircleInfoList = value.Split(sep.ToCharArray());
    var cnt = 0;
    bool Success;
    int number;
    UserDashStyle = false;

    foreach (string CircleInfo in CircleInfoList)
    {
    cnt++;
    string tmp = CircleInfo;
    switch(cnt)
    {
    case 1:
    Success = Int32.TryParse(tmp, out number);
    if ((Success && number == 0) || !Success)
    Circle = false;
    else
    Circle = true;
    if (Success && number >= 1 && number <= 60)
    UserRadius = number;
    else
    UserRadius = 20;
    break;
    case 2:
    Success = Int32.TryParse(tmp, out number);
    if (Success)
    UserRGB_R = number;
    else
    UserRGB_R = 255;
    break;
    case 3:
    Success = Int32.TryParse(tmp, out number);
    if (Success)
    UserRGB_G = number;
    else
    UserRGB_G = 0;
    break;
    case 4:
    Success = Int32.TryParse(tmp, out number);
    if (Success)
    UserRGB_B = number;
    else
    UserRGB_B = 0;
    break;
    case 5:
    float fnum;
    Success = float.TryParse(tmp, out fnum);
    if (Success && (fnum >= 1.0f && fnum <= 20.0f))
    UserStrokeWidth = fnum;
    else
    UserStrokeWidth = 2.0f;
    break;
    case 6:
    var style = tmp.ToLower();
    if (style == "d")
    UserDashStyle = true;
    break;
    }
    }

    if (UserRGB_R < 0 || UserRGB_R > 255 || UserRGB_G < 0 || UserRGB_G > 255 || UserRGB_B < 0 || UserRGB_B > 255)
    {
    UserRGB_R = 255;
    UserRGB_G = 0;
    UserRGB_B = 0;
    }

    Load(Hud);
    }
    }
    }

    public static DialogResult InputBox(string title, string content, ref string value)
    {
    Form form = new Form();
    Label label = new Label();
    TextBox textBox = new TextBox();
    Button buttonOk = new Button();
    Button buttonCancel = new Button();

    form.ClientSize = new Size(180, 100);
    form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel });
    form.FormBorderStyle = FormBorderStyle.FixedDialog;
    form.StartPosition = FormStartPosition.CenterScreen;
    form.MaximizeBox = false;
    form.MinimizeBox = false;
    form.TopMost = true;
    form.AcceptButton = buttonOk;
    form.CancelButton = buttonCancel;

    form.Text = title;
    label.Text = content;
    textBox.Text = value;
    buttonOk.Text = "OK";
    buttonCancel.Text = "Cancel";

    buttonOk.DialogResult = DialogResult.OK;
    buttonCancel.DialogResult = DialogResult.Cancel;

    label.SetBounds(20, 17, 140, 20); //(int x, int y, int width, int height);
    textBox.SetBounds(20, 40, 140, 20);
    buttonOk.SetBounds(20, 70, 65, 20);
    buttonCancel.SetBounds(90, 70, 70, 20);

    DialogResult dialogResult = form.ShowDialog();

    value = textBox.Text;
    return dialogResult;
    }
    }
    }
    Last edited by LordCerberus; 08-07-2019 at 03:18 PM.

  9. #8
    astisbc's Avatar Member
    Reputation
    1
    Join Date
    Sep 2017
    Posts
    23
    Thanks G/R
    7/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello and thank you for your work. I dont understand what or how to create this "click.exe" file? how do i create it and why? --- when i try without i get Exception :

    ... Plugins\James\PlayerCircleMakerPlugin.cs': possibly trying to use System.Diagnostics.
    Last edited by astisbc; 09-19-2019 at 03:05 AM.

  10. #9
    iThinkiWin's Avatar Active Member
    Reputation
    28
    Join Date
    Oct 2018
    Posts
    104
    Thanks G/R
    25/25
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    system diagnostics is most commonly used to execute external programs like in this example.
    KJ tries his best to not aid in player automation.

    thus execution and sockets are blocked by this program.

  11. #10
    astisbc's Avatar Member
    Reputation
    1
    Join Date
    Sep 2017
    Posts
    23
    Thanks G/R
    7/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so this PlugIn doesnt work anymore?

All times are GMT -5. The time now is 08:29 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search