Glommy
New Member
- Joined
- Jan 21, 2013
- Messages
- 340
- Reaction score
- 2
HotspotLogger is originally created by Supperreeen, THX to him.
I added some small stuff in because HotspotLoggin is easier when results contains numbers also Routes are easy to read when numbers on map and after koordinates shows where Route goes.
View attachment HotspotLogger.cs
- spot numbering, F11 reset count
- plugin turns off correctly
- number comes in log <!--SPOT_NUMBER-->, so its not interfere profile
Small things helps.
Glommy
I added some small stuff in because HotspotLoggin is easier when results contains numbers also Routes are easy to read when numbers on map and after koordinates shows where Route goes.
View attachment HotspotLogger.cs
- spot numbering, F11 reset count
- plugin turns off correctly
- number comes in log <!--SPOT_NUMBER-->, so its not interfere profile
Small things helps.
Glommy
Code:
using Scylla.Common;
using Scylla.Common.Plugins;
using Scylla.Wot;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Scylla.CommonBot.Plugins
{
public class HotspotLogger : IPlugin // Plugin subdirectory
{
int i = 1; // integer variable for counter
public string Author
{
get { return "superreeen"; } // Who made it
}
public Version Version
{
get { return new Version(1, 0, 0, 0); }
}
public string Name
{
get { return "Hotspot Logger"; } // name shown in panel
}
public string Description
{
get
{
return "Press F12 to write the current position in hotspot format to the log and spot counter." + "\r\n" + "Press F11 for map name and reset spot counter.";
}
}
public System.Windows.Window DisplayWindow
{
get { return null; }
}
public void OnPulse() // ??? pulse from system
{
}
public void OnInitialize() // put here and its allways on
{
}
public void OnShutdown() //??
{
}
public void OnEnabled() // MenuBox present
{
Hotkeys.RegisterHotkey("Generate HotSpot", GenerateHotspot, Keys.F12);
Hotkeys.RegisterHotkey("Show Map name", GenerateMapName, Keys.F11);
Logging.Write("{0} {1} plugin enabled.", Name, Version);
}
public void OnDisabled() // turn item off
{
Hotkeys.RemoveHotkey("Generate HotSpot");
Hotkeys.RemoveHotkey("Show Map Name");
Logging.Write("{0} {1} plugin disabled.", Name, Version);
}
public void GenerateHotspot() //
{
var pos = ScyllaWot.Me.Vehicle.Position;
Logging.Write("<Hotspot Team=\"{0}\" X=\"{1}\" Y=\"{2}\" Z=\"{3}\" Type=\"Normal\" /><!--{4}-->", ScyllaWot.Me.Vehicle.Team, pos.X, pos.Y, pos.Z, i);
++i; // adds one to i when HotspotLogger() run
}
public void GenerateMapName()
{
i = 1; // reset counter to 1 when GenerateMapName() runs
var map = ScyllaWot.Me.Arena.Name;
Logging.Write("Current map is {0}.", map);
}
public bool Equals(IPlugin other)
{
return Name == other.Name && Version == other.Version;
}
}
}