I have played with this but still do not have the skills to pull it off. First of all here are the exceptions:
2017.06.24 13:51:49.420 error while initializing plugins
2017.06.24 13:51:49.426 c:\Users\Mark\Desktop\Mouse 174 90 beta\plugins\MH\AttackSpeedPlugin.cs(21,5) : error CS1520: Method must have a return type
2017.06.24 13:51:49.434 c:\Users\Mark\Desktop\Mouse 174 90 beta\plugins\MH\AttackSpeedPlugin.cs(21,26) : error CS1001: Identifier expected
2017.06.24 13:51:49.441 c:\Users\Mark\Desktop\Mouse 174 90 beta\plugins\MH\AttackSpeedPlugin.cs(31,22) : error CS1519: Invalid token ',' in class, struct, or interface member declaration
2017.06.24 13:51:49.447 c:\Users\Mark\Desktop\Mouse 174 90 beta\plugins\MH\AttackSpeedPlugin.cs(33,30) : error CS1519: Invalid token '(' in class, struct, or interface member declaration
2017.06.24 13:51:49.453 c:\Users\Mark\Desktop\Mouse 174 90 beta\plugins\MH\AttackSpeedPlugin.cs(33,35) : error CS1520: Method must have a return type
2017.06.24 13:51:49.462 c:\Users\Mark\Desktop\Mouse 174 90 beta\plugins\MH\AttackSpeedPlugin.cs(33,56) : error CS1001: Identifier expected
2017.06.24 13:51:49.468 c:\Users\Mark\Desktop\Mouse 174 90 beta\plugins\MH\AttackSpeedPlugin.cs(41,14) : error CS1519: Invalid token ')' in class, struct, or interface member declaration
and here is the code I was trying to use:
Code:
using Turbo.Plugins.Default;
namespace Turbo.Plugins.MH
{
public class AttackSpeedPlugin : BasePlugin , IInGameWorldPainter
{
public WorldDecoratorCollection AttackSpeedDecorator { get; set; }
public AttackSpeedPlugin()
{
Enabled = true;
DisableInTown = false;
}
public override void Load(IController hud)
{
base.Load(hud);
AttackSpeedDecorator = new WorldDecoratorCollection();
}
new TopLabelDecorator(Hud)
{
TextFont = Hud.Render.CreateFont("tahoma", 7, 180, 255, 255, 255, false, false, true),
ExpandedHintFont = expandedHintFont,
ExpandedHintWidthMultiplier = expandedHintWidthMultiplier,
BackgroundTexture1 = Hud.Texture.ButtonTextureOrange,
BackgroundTexture2 = Hud.Texture.BackgroundTextureYellow,
BackgroundTextureOpacity2 = 0.75f,
TextFunc = () => Hud.Game.Me.Offense.AttackSpeed.ToString("F2", CultureInfo.InvariantCulture) + "/s",
HintFunc = () => "attack speed",
},
LabelList.LabelDecorators.Add(new TopLabelDecorator(Hud)
{
TextFont = Hud.Render.CreateFont("tahoma", 36, 120, 255, 223, 0, false, false, true),
BackgroundTexture1 = Hud.Texture.ButtonTextureOrange,
BackgroundTexture2 = Hud.Texture.BackgroundTextureGreen,
BackgroundTextureOpacity2 = 0.3f,
TextFunc = () => Hud.Game.Me.Offense.AttackSpeed.ToString("F2", CultureInfo.InvariantCulture) + "/s",
HintFunc = () => "attack speed",
});
}
}
Now I realize all of that is probably not necessary to get the results that I want, but I am not a coder I tried to take the simplest plugin I could find and replace the things that I did not want with the things I do. I am sure there are problems with syntax and such that I am not able to identify. I just tried to follow the same structure that the other plugin had. Please simplify it for me, thanks for the help all. I was happy there were only 8 exceptions, hehe