Stripped ProjectAlchemy Source Code

02/13/2011 07:04 warning3#946
Wow, everyone left AlchemyProxy for COoperative
02/13/2011 07:36 hippie#947
wth u talking about the same ppl r posting in here
02/13/2011 08:43 denominator#948
I don`t have COoperative lol
02/13/2011 11:34 caio bola#949
Anyone wanna debate some coding stuff thru MSN?

I made my hunting full , with very less DC ratio

send me PM with msn whoever wanna share code knowledge and improvements.
02/13/2011 18:48 warning3#950
Ok... some of people left.
02/13/2011 22:58 hippie#951
well ur always goin 2 have some go n come bac not sure if he goin 2 keep that updated when the next patch comes out knocking it off he does that from time to time
02/14/2011 00:30 denominator#952
Those that did leave this thread are those that have no interest in coding themselves and would rather everybody else do everything for them. Those that are still here can either code or are learning to code.
02/14/2011 00:35 hippie#953
exactly
02/14/2011 15:37 denominator#954
Ok well I`ll ask again but shouldn`t this work? It mines fine when just writing /mining but I type /hunt and it does nothing? I have tried changing a few things but still nothing? And yes I have a hunting code lol.

Code:
public static bool NewBot(Client C)
        {
            while (C.RunBot)
            {
                if (!C.Mining)
                    return true;

                if (C.LastDropped.AddSeconds(15) < DateTime.Now)
                {
                    foreach (Items.ItemInfo I in C.Inventory.Values)
                    {
                        if (Handler.IsOre(I.ID))
                        {
                            C.LastDropped = DateTime.Now;
                            Packets.DropItem(C, I.UID);
                            break;
                        }
                    }
                }
                        if (!C.Hunting)
                            return true;
02/14/2011 16:43 Warlax#955
Quote:
Originally Posted by denominator View Post
Ok well I`ll ask again but shouldn`t this work? It mines fine when just writing /mining but I type /hunt and it does nothing? I have tried changing a few things but still nothing? And yes I have a hunting code lol.

Code:
public static bool NewBot(Client C)
        {
            while (C.RunBot)
            {
                if (!C.Mining)
                    return true;

                if (C.LastDropped.AddSeconds(15) < DateTime.Now)
                {
                    foreach (Items.ItemInfo I in C.Inventory.Values)
                    {
                        if (Handler.IsOre(I.ID))
                        {
                            C.LastDropped = DateTime.Now;
                            Packets.DropItem(C, I.UID);
                            break;
                        }
                    }
                }
                        if (!C.Hunting)
                            return true;
because ur saying if not mining to just return. try setting an enum to ur current activity
02/14/2011 17:51 denominator#956
So I have looked at an example of enums and not sure which I should choose from, I`m guessing it is giving three examples. Am I wise to look at this?

Code:
public class EnumTest {
    enum Days { Saturday, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday };
    enum BoilingPoints { Celcius = 100, Fahrenheit = 212 };
    [FlagsAttribute]
    enum Colors { Red = 1, Green = 2, Blue = 4, Yellow = 8 };

    public static void Main() {

        Type weekdays = typeof(Days);
        Type boiling = typeof(BoilingPoints);

        Console.WriteLine("The days of the week, and their corresponding values in the Days Enum are:");

        foreach ( string s in Enum.GetNames(weekdays) )
            Console.WriteLine( "{0,-11}= {1}", s, Enum.Format( weekdays, Enum.Parse(weekdays, s), "d"));

        Console.WriteLine();
        Console.WriteLine("Enums can also be created which have values that represent some meaningful amount.");
        Console.WriteLine("The BoilingPoints Enum defines the following items, and corresponding values:");

        foreach ( string s in Enum.GetNames(boiling) )
            Console.WriteLine( "{0,-11}= {1}", s, Enum.Format(boiling, Enum.Parse(boiling, s), "d"));

        Colors myColors = Colors.Red | Colors.Blue | Colors.Yellow;
        Console.WriteLine();
        Console.WriteLine("myColors holds a combination of colors. Namely: {0}", myColors);
    }
}
02/14/2011 18:09 pro4never#957
What you have looks fine actually seeing as it's run quite often.

What you could do with enums is something like this though...


enum BotTypes{ Inactive, Hunting, Looting, HuntingAndLooting, Mining, SpellLeveling}

then inside your character have a BotType setup with default value Inactive.

Then inside your bot code do something simple such as

switch(C.BotType)
{
case Mining:

//drop ore/update variables
return true;

case Hunting:
//attack mobs based on hunting mode
return true;

default://unknown/un-handled botting type)
return true;
}
02/14/2011 19:26 denominator#958
Does it matter where the enum goes? Like can it be put in say client.cs or program.cs, I have placed it in Client.cs though. I mean the "enum BotTypes"

Also this part I am a little confused at "then inside your character" but this part I understand "have a BotType setup with default value Inactive"
02/14/2011 21:45 pro4never#959
The character class should have a bottype added to it which you can modify via cmd...

The enum itself can go anywhere just keep in mind you will then have to follow how your proxy is setup (IE: if it's under the handler class then you would be doing something like C.BotType = Handler.Enum.Inactive)

You could always have it independent from any class but again... it's all personal preference.
02/15/2011 01:00 caio bola#960
Can anyone helpme on developing a HasToLoot code? like a looting over attacking priority code
anyone pls?