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

Botbase make use of a second *.cs file

spudstar999

New Member
Joined
Jan 15, 2010
Messages
174
Reaction score
1
Hello all,

i have programmed with the help of codenameG a botbase.

Now i want to use a second cs file to store my functions in it.

But can't get it to work.

Can tell me someone, how i can archive this?!

Thank you

Kind regards,

Spud
 
hey Spud, im not the best coder out there but i think you need to use namespaces, and the using command.
 
Hello all,

i have programmed with the help of codenameG a botbase.

Now i want to use a second cs file to store my functions in it.

But can't get it to work.

Can tell me someone, how i can archive this?!

Thank you

Kind regards,

Spud
i never wrote a botbase programming tutorial, unless you mean my CC Creations Guide, because they are two diffrent things.
as long as the namespace's match and you do have them in the same project they should work, if you need an example of how a methods.cs file works, you can look at amplify or zerfall.

when moving into multiple files, its better to make a folder in your honorbuddy CC Directory, for example if you installed amplify it would be sitting in Honorbuddy/CustomClasses/Amplify/Amplify.cs

instead of just tossing all the files in the root folder of customclasses because it wont work.
 
Hello All,

Thank you for the replies.

It's not a CC it's a Botbase.@ CodenameG, Sorry it wasn't you, it was highvoltz who helped me.

i tried this

Main File

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;

using Styx;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.AreaManagement;
using Styx.Logic.BehaviorTree;
using Styx.Logic.Combat;
using Styx.Logic.Inventory.Frames.Gossip;
using Styx.Logic.Inventory.Frames.LootFrame;
using Styx.Logic.Pathing;
using Styx.Logic.Profiles;
using Styx.Plugins;
using Styx.Plugins.PluginClass;
using Styx.WoWInternals;
using Styx.WoWInternals.World;
using Styx.WoWInternals.WoWObjects;
using System.Collections.Specialized;
using System.Runtime.InteropServices;
using TreeSharp;
using Action = TreeSharp.Action;


namespace KeyBindBotBase
{

    class KeyBindBotBase : BotBase
    {
        public override string Name { get { return "KeyBindBotBase"; } }

        public static KeyBindBotBase Instance { get; private set; }
        public KeyBindBotBase() { Instance = this; }
        public override PulseFlags PulseFlags { get { return Styx.PulseFlags.All; } }
        LocalPlayer Me = ObjectManager.Me;
        static PrioritySelector luaFunBt;
        static WoWUnit CT = ObjectManager.Me.CurrentTarget;
		public HelperBase HBase = null;

        public override void Initialize()
        {
            
	  luaFunBt = new PrioritySelector();
	  HBase = new HelperBase();
			
            // 1 executes this Action
            Log("Adding Actions");
	    AddAction(DKUnholysingleRotation, Keys.D1);
	    // End of example
        }


Helper File

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using TreeSharp;
using Styx.Logic.Combat;
using Styx.WoWInternals.WoWObjects;
using Styx;
using Styx.WoWInternals;

namespace KeyBindBotBase
{
    public class HelperBase
    {




Thank you for your help!

kind regards,

spud
 
if you look in amplify.
Main CC
Code:
namespace Amplify
{
    public partial class Amplify : CombatRoutine
    {
    }
}
heres what it looks like for my methods file
Code:
namespace Amplify
{
    public partial class Amplify
    {
     }
}

basically what im getting at is, also try pairing your classes as well, or else your digging through layers to get to what you want. if your still having issues zip your project file and request my information for skype and ill walk you though what needs to be done.
 
one thing i noticed
Code:
HBase = new HelperBase();
why are you calling HelperBase as a method when you also have the same thing as a class? you can also change the name of the helperbase classname, to whatever, then from your main cs file you sould be able to get what you want by going
classname.MyVoid(); to call it.

i think you kinda have a mess here.
</pre>
 
thank you,
#will try all this



FOund issue!

Thank you for the help
 
Last edited:
Back
Top