MonstersCountPlugin.cs   line add / number overlapping problem menu

These ads disappear when you log in.

User Tag List

Results 1 to 7 of 7
  1. #1
    dcac's Avatar Member
    Reputation
    1
    Join Date
    Mar 2019
    Posts
    17
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MonstersCountPlugin.cs line add / number overlapping problem

    GLQ MonstersCountPlugin.cs


    add line

    =============================================================================

    public IFont diemFont { get; set; }
    public IFont diesFont { get; set; }

    int minMonsterCount = 0;
    int sytherCount = 0;
    int LowHealth = 30;

    diemFont = Hud.Render.CreateFont("tahoma", 12, 128, 0, 255, 0, true, false, 160, 0, 0, 0, true );
    diesFont = Hud.Render.CreateFont("tahoma", 10, 200, 0, 255, 0, true, false, 160, 0, 0, 0, true );


    var health = monster.CurHealth / (monster.MaxHealth / 100.0f);
    if(health < LowHealth) {
    minMonsterCount++;
    }

    if (minMonsterCount >0) {
    var text1 = string.Format("HP 30%▼ : {0}", minMonsterCount);
    var layer1 = diemFont.GetTextLayout(text1);
    diemFont.DrawText(layer1, Hud.Window.Size.Width * 0.34f, Hud.Window.Size.Height * 0.27f);
    }


    if (health < 15)
    {
    sytherCount++;
    }
    if (sytherCount>0) {
    var text2 = string.Format("HP 15%▼ : {0}", sytherCount);
    var layer2 = diesFont.GetTextLayout(text2);
    diesFont.DrawText(layer2, Hud.Window.Size.Width * 0.34f, Hud.Window.Size.Height * 0.29f);}
    }


    ================================================================================ ===============
    HP.png







    I don't know why the numbers overlapping ( There are 2 on 1)


    How to solve this problem
    Last edited by dcac; 04-01-2020 at 05:41 AM.

    These ads disappear when you log in.

  2. #2
    s4000's Avatar Contributor
    Reputation
    157
    Join Date
    Oct 2018
    Posts
    372
    Thanks G/R
    10/150
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think its overlay with other text, not the HP 15% message

  3. #3
    dcac's Avatar Member
    Reputation
    1
    Join Date
    Mar 2019
    Posts
    17
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    15% line all delete

    and same thing happened

    using two font (separated)


    15% diesFont

    30% diemFont
    Last edited by dcac; 04-01-2020 at 02:35 AM.

  4. #4
    s4000's Avatar Contributor
    Reputation
    157
    Join Date
    Oct 2018
    Posts
    372
    Thanks G/R
    10/150
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by dcac View Post
    15% line all delete

    and same thing happened
    as I said, the 1 from other code, not the HP 15% one

  5. #5
    dcac's Avatar Member
    Reputation
    1
    Join Date
    Mar 2019
    Posts
    17
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok sorry, I misunderstood

    Where did 1 come from


    count up and increase number

    ex)
    3 on 2

    4 on 3
    Last edited by dcac; 04-01-2020 at 02:41 AM.

  6. #6
    s4000's Avatar Contributor
    Reputation
    157
    Join Date
    Oct 2018
    Posts
    372
    Thanks G/R
    10/150
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by dcac View Post
    ok sorry, I misunderstood

    Where did 1 come from


    count up and increase number

    ex)
    3 on 2

    4 on 3
    wondering you print that message again & again in the loop, so print 1, then 2, then 3, 4 ,5 ........ & so on

  7. #7
    hkjhkh's Avatar Member
    Reputation
    4
    Join Date
    Mar 2018
    Posts
    43
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you draw / paint is wrong, you need count the mobs and then draw it. In your case you draw / paint it every time when your condition if (health < 15) is true




    if (health < 15)
    {
    sytherCount++;
    }
    if (sytherCount>0) {
    var text2 = string.Format("HP 15%▼ : {0}", sytherCount);
    var layer2 = diesFont.GetTextLayout(text2);
    diesFont.DrawText(layer2, Hud.Window.Size.Width * 0.34f, Hud.Window.Size.Height * 0.29f);}
    }

Similar Threads

  1. [Database] How can I add an Online Player tracker (only number without line or anything else)
    By levcsu in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 01-13-2019, 09:07 AM
  2. [HALP!] BLP<-->Editable Image Problem (Lines of DEATH)
    By garrawr in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 11-10-2009, 08:44 PM
  3. Replies: 1
    Last Post: 09-29-2008, 04:36 PM
  4. Gothian's Mind-twisting number problem.
    By Gothian in forum Gaming Chat
    Replies: 9
    Last Post: 09-06-2008, 08:16 PM
  5. MySQL Command Line Client PROBLEM HERE!!!
    By heijheija in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 08-31-2007, 08:19 AM
All times are GMT -5. The time now is 08:47 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search