Новости:

Уважаемые пользователи , если у вас возникли технические проблемы , с эксплуатацией Warpack,  указывайте в вашем сообщении , какие меры принимались вами , для их решения.
Это поможет вам и разработчикам , ускорить решение проблемы.

Главное меню

Profiles

Автор dreamangle, 17.02.2014 17:25:16

« назад - далее »

dreamangle

Good afternoon all is there a program to make our own profiles as i downloaded aTanks folder from apost and its still making TD's fly into all the action instead of hanging back


dreamangle

that does not tell me how to make my own profiles ::)

frbyles

well there isnt a way to make profiles other than with the bot running drive around and Ctrl+P alot lol :(
Not that i know of anyway. I was trying to figure out how to plot my courses on a .dds map file my self a week or so ago. but had no luck in finding a click logger etc . even if i would have found one im not a coder so i dont know how i would manage to convert that into useful profiles.

dreamangle

i looking to finds out assome TD's need to stay back and these profiles dont

frbyles

#5
im not sure who the creator is but it wasnt me of course I think this is prob what dniwebot has bult into it but this will give you some insight

using Scylla.Common;
using Scylla.Common.Math;
using Scylla.Common.Plugins;
using Scylla.Wot;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Scylla.CommonBot.Plugins
{
    public class HotspotLogger : IPlugin
    {
        private readonly HashSet<Vector3> _Positions = new HashSet<Vector3>();

        public string Author
        {
            get { return "superreeen"; }
        }

        public Version Version
        {
            get { return new Version(1, 0, 0, 0); }
        }

        public string Name
        {
            get { return "Hotspot Logger"; }
        }

        public string Description
        {
            get { return "Press F11 to add a hotspot to the collection. Press F12 to write the current collection in hotspot format to the log. Press F10 to log the map name. Press F9 to reset the hotspot collection."; }
        }

        public System.Windows.Window DisplayWindow
        {
            get { return null; }
        }

        public void OnPulse()
        {

        }

        public void OnInitialize()
        {

        }

        public void OnShutdown()
        {

        }

        public void OnEnabled()
        {
            Hotkeys.RegisterHotkey("Output HotSpots", OutputHotspots, Keys.F12);
            Hotkeys.RegisterHotkey("Generate HotSpot", GenerateHotspot, Keys.F11);
            Hotkeys.RegisterHotkey("Show Map name", GenerateMapName, Keys.F10);
            Hotkeys.RegisterHotkey("Reset HotSpots", ResetHotspots, Keys.F9);
            Logging.Write("{0} {1} plugin enabled.", Name, Version);
        }

        public void OnDisabled()
        {
            Hotkeys.RemoveHotkey("Output HotSpots");
            Hotkeys.RemoveHotkey("Generate HotSpot");
            Hotkeys.RemoveHotkey("Show Map name");
            Hotkeys.RemoveHotkey("Reset HotSpots");
            Logging.Write("{0} {1} plugin disabled.", Name, Version);
        }

        public void ResetHotspots()
        {
            _Positions.Clear();
            Logging.Write("Logged hotspots reset.");
        }

        public void GenerateHotspot()
        {
            var pos = ScyllaWot.Me.Vehicle.Position;
            if (!_Positions.Any(p => p.Distance2DSqr(pos) < 20f * 20f))
            {
                _Positions.Add(pos);
                Logging.Write("Logged a hotspot.");
            }
        }

        public void OutputHotspots()
        {
            var positions = _Positions.ToArray();
            for (int i = 0; i < positions.Length; i++)
            {
                var pos = positions;
                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);
            }

        }

        public void GenerateMapName()
        {
            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;
        }
    }
}

SMF spam blocked by CleanTalk