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

{noob-first} what am i doing frong?

brainAbuddy

Active Member
Joined
Aug 12, 2010
Messages
2,180
Reaction score
11
hey
i want to make an plugin that use the spell (ghostwolf) for shaman when he is in an instance made for extra speed but i have no idea why it want work
this is the error
Code:
File: Mr.PluginTemplate.cs Line: 64 Error: Definition of type or namespace or the end of the file is expected
yes i have used the guide from CnG :3


PHP:
//Mr.PuginTemplate - Created by CodenameGamma - 4-12-11 - For WoW Version 4.0.3+
//www.honorbuddy.de
//this is a free plugin, and should not be sold, or repackaged.
//Donations Accepted. 
//Version 1.0


using System.Drawing;
using System.Linq;
using System.Windows.Forms;

namespace MrPluginTemplate
{
    using Styx.Logic;
    using System;
    using Styx.Helpers;
    using Styx.Logic.Pathing;
    using System.Threading;
    using System.Diagnostics;
    using Styx.WoWInternals;
    using Styx.WoWInternals.WoWObjects;
    using System.Collections.Generic;
    using System.Linq;
    using System.Linq.Expressions;
    using System.IO;
    using System.Runtime.InteropServices;
    using System.Xml.Linq;
    using System.Net;
    using Styx.Plugins.PluginClass;
    using Styx;

    public class MrPluginTemplate : HBPlugin
    {
        //Normal Stuff.
        public override string Name { get { return "Mr.PluginTemplate"; } }
        public override string Author { get { return "CnG"; } }
        public override Version Version { get { return new Version(1, 0); } }
        public override bool WantButton { get { return true; } }
        public override string ButtonText { get { return "Mr.PluginTemplate"; } }

        //Logging Class for your conviance
        public static void slog(string format, params object[] args)
        { Logging.Write(Color.Red, "[Mr.PluginTemplate]:" + format, args); }
        private static readonly LocalPlayer Me = ObjectManager.Me;


        //Uncomment if adding a UI for the plugin
        /*public override void OnButtonPress()
        {

        }*/

        public override void Pulse()
        {
         if (Instance.IsInsideInstance && Me.IsOutdoors && !Me.Combat && !Me.Dead && Me.Casting && Me.IsSwimming && !Me.HasAura(Ghost Wolf)){SpellManager.Cast("Ghost Wolf");}
        }
        




    }
	}
}
 
PHP:
//Mr.PuginTemplate - Created by CodenameGamma - 4-12-11 - For WoW Version 4.0.3+ 
//www.honorbuddy.de 
//this is a free plugin, and should not be sold, or repackaged. 
//Donations Accepted.  
//Version 1.0 

using System.Drawing; 
using Styx.Logic;
using Styx.Logic.Combat; 
using System; 
using Styx.Helpers; 
using Styx.WoWInternals; 
using Styx.WoWInternals.WoWObjects;
using Styx.Plugins.PluginClass; 
using Styx;  

namespace MrPluginTemplate
{


    public class MrPluginTemplate : HBPlugin
    {
        //Normal Stuff. 
        public override string Name { get { return "Mr.PluginTemplate"; } }
        public override string Author { get { return "CnG"; } }
        public override Version Version { get { return new Version(1, 0); } }
        public override bool WantButton { get { return true; } }
        public override string ButtonText { get { return "Mr.PluginTemplate"; } }

        //Logging Class for your conviance 
        public static void slog(string format, params object[] args)
        { Logging.Write(Color.Red, "[Mr.PluginTemplate]:" + format, args); }
        private static readonly LocalPlayer Me = ObjectManager.Me;


        public override void Pulse() 
        { 
         if (!Me.IsInInstance 
             && Me.IsOutdoors 
             && !Me.Combat 
             && !Me.Dead 
             && !Me.IsCasting 
             && !Me.IsSwimming 
             && !Me.HasAura("Ghost Wolf"))
            {
                SpellManager.Cast("Ghost Wolf");
            } 
        }
    }
 }

Some of your parentheses were not quite lining up, you were missing some references and had a lot you didn't need. I would recommend putting this in the CC you use instead of making a plugin for it.
 
I have realy no idea how to do that now
But why do you recommend that ?? Does it make anny diferent?
 
which CC are you using? I would assume ShamWow would have a setting to use ghost wolf already. If not and the plugin is working for you, I would say go enjoy yourself.
 
yes i use shamWow and i like it verry much but it doesn't use Ghost wolf so thats why i want to use this
 
Something isn't working exactly as you'd like it, so you throw yourself into programming a plugin to tweak it to your liking. Respect for that! +rep :D
 
i have added some fuction for battleground and in "normal"world but then he gives again an another error
i have no idea wherre i need to put the "}"

the error:
File: AutoGhostWolf.cs Line: 75 Error:} expected

the plugin code:
PHP:
using System.Drawing;  
using Styx.Logic; 
using Styx.Logic.Combat;  
using System;  
using Styx.Helpers;  
using Styx.WoWInternals;  
using Styx.WoWInternals.WoWObjects; 
using Styx.Plugins.PluginClass;  
using Styx;   

namespace AutoGhostWolf 
{ 


    public class AutoGhostWolf : HBPlugin 
    { 
        //Normal Stuff.  
        public override string Name { get { return "AutoGhostWolf"; } } 
        public override string Author { get { return "m4dc0w344"; } } 
        public override Version Version { get { return new Version(1, 0); } } 
        public override bool WantButton { get { return true; } } 
        public override string ButtonText { get { return "None config"; } } 

        //Logging Class for your conviance  
        public static void slog(string format, params object[] args) 
        { Logging.Write(Color.Red, "[AutoGhostWolf]:" + format, args); } 
        private static readonly LocalPlayer Me = ObjectManager.Me; 


        public override void Pulse()  
        {  
         if (Me.IsInInstance   
             && !Me.Combat  
             && !Me.Dead  
             && !Me.IsCasting  
             && !Me.IsSwimming
			 && !Me.Mounted
			 && !Me.HasAura("Drink")
			 && !Me.HasAura("Eat")
             && !Me.HasAura("Ghost Wolf")) 
            { 
                SpellManager.Cast("Ghost Wolf"); 
            }  
       {
	   If(!Me.IsInInstance
	   && !Me.IsInBattleGround
	   && !Me.Dead
	   && !Me.IsCasting
	   && !Me.IsSwimming
	   && !Me.IsOutSide
	   && !Me.HasAura("Drink")
	   && !Me.HasAura("Eat")
       && !Me.HasAura("Ghost Wolf"))
	   { 
                SpellManager.Cast("Ghost Wolf"); 
           }  
	   {  
         if (Me.IsInBattleGround  
             && !Me.Combat  
             && !Me.Dead  
             && !Me.IsCasting  
             && !Me.IsSwimming
			 && !Me.Mounted
			 && !Me.IsOutSide
			 && !Me.HasAura("Drink")
			 && !Me.HasAura("Eat")
             && !Me.HasAura("Ghost Wolf")) 
            { 
                SpellManager.Cast("Ghost Wolf"); 
           }  
	   } 
	   
    } 
}
 
You should get Notepad++ - it can help you show where you're missing brackets or paranthesis.
 
You should get Notepad++ - it can help you show where you're missing brackets or paranthesis.
ty for the tip but... i am already use notepad++
but its working now Me.IsInsideBattleGround isnot working :3 and i forgot some } ty all !! every ppl thats heloing me get an +rep
 
Looks like you want it when you are in an instance, not in an instance, or in a battle bg. To me, this covers every place you can be. So i would just take those out.

Notice how your code gets redundant? Lets pretend that you wanted this when you were in BGs and Instances. If that were the case, you could say..

PHP:
if ((Me.IsInInstance || Me.IsInBattleGround)   
             && !Me.Combat   
             && !Me.Dead   
             && !Me.IsCasting   
             && !Me.IsSwimming 
             && !Me.Mounted 
             && !Me.HasAura("Drink") 
             && !Me.HasAura("Eat") 
             && !Me.HasAura("Ghost Wolf"))  
            {  
                SpellManager.Cast("Ghost Wolf");  
            }

The "||" means "or". But it looks like you want this pretty much anytime you are out roaming, so you don't need to specify for each location.
 
ok i am not sure about it but this is C shark right(the code)
 
or if you setup your project correctly, visual studio will deal with 99% of the issues your having. thats why MOST of that guide is about setting up your project.
 
Back
Top