What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Plugin Frage

Valusha

New Member
Joined
Nov 14, 2014
Messages
12
Reaction score
0
Hallo habe von einer quest einen gegenstand bekommen den man alle 15 min aktivieren kann
könnte mir da jemand ein plugin schreiben das ständig den crystal aktiviert ?

Oralius' Whispering Crystal - Item - World of Warcraft
all stats +200 for 1 h

Danke schonmal für eure zeit
 
So etwas ähnliches gibt es schon für ein Item aus dem Haloween event.
Finde ich nur grad nicht, darum geb ich dir meine eigene Version dafür.

Einfach in einen Texteditor kopieren und z.B. in Plugins/Kristall/kristall.cs abspeichern.

Code:
using System;
using System.Linq;
using System.Windows.Media;
using Styx;
using Styx.Common;
using Styx.Plugins;
using Styx.WoWInternals.WoWObjects;

namespace Whispering_Crystal
{
    public class WoWKristallPlugin : HBPlugin
    {
        public static LocalPlayer Me = StyxWoW.Me;

        public override string Name { get { return "Kristall"; } }
        public override string Author { get { return "Corleone"; } }
        public override Version Version { get { return new Version(1, 0); }}

        public static bool IsViable(WoWObject wowObject)
        {
            return (wowObject != null) && wowObject.IsValid;
        }

        public bool KristallBuff()
        {
            return IsViable(Me) && !Me.Mounted && !Me.IsOnTransport && !Me.IsResting && !Me.IsDead && !Me.HasAura(176151);
        }

        public override void Pulse()
        {
            WoWItem kristallitem = Me.BagItems.FirstOrDefault(item => item.Entry == 118922);
            if (!KristallBuff() || kristallitem == null) 
                return;
            kristallitem.Use();
            Logging.Write(Colors.Yellow, "Oralius' Whispering Crystal gebufft!");
        }
    }
}

Viel Spaß damit. ;)
 
Back
Top