Help me menu

User Tag List

Thread: Help me

Results 1 to 4 of 4
  1. #1
    qwerty.56's Avatar Member
    Reputation
    3
    Join Date
    Apr 2017
    Posts
    17
    Thanks G/R
    3/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help me

    Help me please, I'm not strong at programming on C#. how can i add IPlayerSkill.DamageBonus
    Code:
    using Turbo.Plugins.Default;
    using System.Collections.Generic;
    using System.Linq;
    using System;
    
    namespace Turbo.Plugins.Lis
    {
        public class DamageInfoPlugin : BasePlugin, IInGameTopPainter
    	{
            public TopLabelDecorator DamageInfoDecorator { get; set; }		
    		public DamageInfoPlugin()
    		{
                Enabled = true;
    		}
            public override void Load(IController hud)
            {
                base.Load(hud);
    		    DamageInfoDecorator = new TopLabelDecorator(Hud)
                {
    				 TextFont = Hud.Render.CreateFont("Segoe UI Light", 8, 255, 255, 234, 137, false, false, true),  
    				 
    				 TextFunc = () => ""+(Hud.Game.Me.Offense.SheetDps*(1+Hud.Game.Me.Offense.HighestElementalDamageBonus)),// i need add IPlayerSkill.DamageBonus
    				 HintFunc = () => "+ElementalDamageBonus and SkillBonus",
                };
            }
           public void PaintTopInGame( ClipState clipState)
    		{
    			 if (clipState != ClipState.Inventory) return;  
    			   var uiRect = Hud.Render.GetUiElement("Root.NormalLayer.inventory_dialog_mainPage").Rectangle; 
    			   DamageInfoDecorator.Paint(uiRect.Left+45f, uiRect.Top + 250f, 100, 15, HorizontalAlign.Center);				
    		}
        }
    }

    Help me
  2. #2
    gjuz's Avatar Contributor
    Reputation
    121
    Join Date
    Mar 2017
    Posts
    228
    Thanks G/R
    49/118
    Trade Feedback
    0 (0%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    first you have to choose a skill - from which you want this information.
    use a variable for this. like:
    PHP Code:
    IPlayerSkill mySkill getset; } 
    in Paint, choose your skill, e.g. "Necromancer_SkeletalMage"
    PHP Code:
    mySkill player.Powers.UsedSkills.FirstOrDefault(_sk => _sk.SnoPower.Sno == Hud.Sno.SnoPowers.Necromancer_SkeletalMage.Sno); 
    make sure, mySkill is not null !!

    now you can draw your DamageInfoDecorator.

    PHP Code:
    TextFunc = () => ""+(Hud.Game.Me.Offense.SheetDps*(1+Hud.Game.Me.Offense.HighestElementalDamageBonus)*(1+mySkill.DamageBonus)) 

    greetz gjuz

  3. Thanks qwerty.56 (1 members gave Thanks to gjuz for this useful post)
  4. #3
    qwerty.56's Avatar Member
    Reputation
    3
    Join Date
    Apr 2017
    Posts
    17
    Thanks G/R
    3/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thx..................

  5. #4
    qwerty.56's Avatar Member
    Reputation
    3
    Join Date
    Apr 2017
    Posts
    17
    Thanks G/R
    3/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DamagePlugin

    that's what he did in the end

    Code:
    using Turbo.Plugins.Default;
    using System.Collections.Generic;
    using System.Linq;
    using System;
    
    namespace Turbo.Plugins.My
    {
        public class MyDamagePlugin : BasePlugin, IInGameTopPainter
    	{
    		public TopLabelDecorator DamageInfoDecorator { get; set; }	
    		public IPlayerSkill Skill { get; set; }  
    		private string elem;
    		private long HighestDPS;		
    
    		public MyDamagePlugin ()
    		{
                Enabled = true;
    		}
            public override void Load(IController hud)
            {
                base.Load(hud);
    
    			 DamageInfoDecorator = new TopLabelDecorator(Hud)
                {
    				 TextFont = Hud.Render.CreateFont("Segoe UI Light", 8, 255, 255, 234, 137, false, false, true),  
    
    				 TextFunc = () => "" + String.Format("{0:N0}",(Hud.Game.Me.Offense.SheetDps*(1+Skill.ElementalDamageBonus)*(1+Skill.DamageBonus))),
    				 HintFunc = () => "Damage ("+String.Format("{0:N0}",Hud.Game.Me.Offense.SheetDps)+")+"+ Skill.CurrentSnoPower.NameLocalized +" (" + Skill.DamageBonus*100 + "%) /" + Skill.RuneNameLocalized+" ("+Skill.ElementalDamageBonus*100+"% "+ elem 
    				 +") \n Max Damage: "+ ValueToString(HighestDPS, ValueFormat.LongNumber) +"\n("+String.Format("{0:N0}",HighestDPS)+")",
    				 
    			};
            }
           public void PaintTopInGame( ClipState clipState)
    		{
    
    //----------------------------------------------------
                      foreach (var nskill in Hud.Game.Me.Powers.UsedSkills){if (nskill.Key == ActionKey.LeftSkill){ if (Skill != nskill)HighestDPS=0;Skill = nskill;};};	
    
    				if (Hud.Game.Me.Damage.CurrentDps > HighestDPS) HighestDPS = Hud.Game.Me.Damage.CurrentDps;
    
    				if (Skill != null){	
    					switch (Skill.ElementalType)
    					{
    						case 0: elem = "Physical";break;
    						case 1:	elem = "Fire";break;
    						case 2:	elem = "Lightning";break;
    						case 3:	elem = "Cold";break;
    						case 4:	elem = "Poison";break;
    						case 5:	elem = "Arcane";break;
    						case 6:	elem = "Holy";break;
    					};
    
    //----------------------------------------------------
    
    				if (clipState != ClipState.Inventory) return;
    				else
    				{
    				var uiRect = Hud.Render.GetUiElement("Root.NormalLayer.inventory_dialog_mainPage").Rectangle; 
    				DamageInfoDecorator.Paint(uiRect.Left+45f, uiRect.Top+250f , 100, 15, HorizontalAlign.Center);
    				};
    			};	
    		}
        }
    }
    Last edited by qwerty.56; 01-02-2018 at 04:09 PM.

Similar Threads

  1. Can you help me get a guide?
    By olsalty in forum Community Chat
    Replies: 4
    Last Post: 07-18-2006, 04:01 PM
  2. Rogue Talents in 1.12. Help me Please...
    By Rombot in forum World of Warcraft General
    Replies: 0
    Last Post: 07-17-2006, 08:50 AM
  3. realy need some major help, can you help me
    By Bludypeople in forum World of Warcraft General
    Replies: 14
    Last Post: 07-15-2006, 10:54 AM
  4. Looking for a free autoit bot that can help me devlope my skills
    By Black mage2021 in forum World of Warcraft General
    Replies: 4
    Last Post: 07-10-2006, 09:36 PM
  5. Help me :((
    By gotosleep in forum World of Warcraft General
    Replies: 21
    Last Post: 07-06-2006, 12:07 PM
All times are GMT -5. The time now is 07:40 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