Stripped ProjectAlchemy Source Code

01/07/2011 23:34 [GM]#526
Quote:
Originally Posted by gorgone View Post
did u have mysql correctly installed ? and Navicat too ?


public static string AuthIp = "208.96.34.46";
public static string ProxyTitle = "[ProjectAlchemy]";
public static string Version = "v1.1";
public static string Username = "root";
public static string Password = "IF UR SQL SERVER HAVE PASSWORD PUT HERE";
public static string Host = "alchemy";
public static DMapServer DmapHandler = new DMapServer();
public static Dictionary<ushort, Ending> PortBindings = new Dictionary<ushort, Ending>();
public static ushort AuthPort = 9959;
public static string ProxyIp = "HERE YR IP HAMACY OR ROUTER ";
public static string GameKey = "DR654dt34trg4UI6";
public static string GameIp = "";
public static ushort GamePort = 5816;

in the LoaderConquer.ini (of loaderConquer) u need to copy exactly YR IP HAMACY OR ROUTER and same port ...

then... in AlchemyProxy\AlchemyProxy\bin there is a txt recopy all skill info there

and i think u ll be logs normaly i started with very huge Speed handicap 1000 ms
ty gorgone

this is what i have in AlchemyProxy\AlchemyProxy\bin


i got navicat, mysql connector and shit but still not working, i don't know what is fucking wrong with this proxy
01/07/2011 23:37 pro4never#527
Quote:
Originally Posted by [GM] View Post
ty gorgone

this is what i have in AlchemyProxy\AlchemyProxy\bin


i got navicat, mysql connector and shit but still not working, i don't know what is fucking wrong with this proxy
There is nothing wrong with the proxy... there is something wrong with YOU.


I downloaded exactly what I had here onto my laptop, inserted my mysql settings and it logged in first try so yah. It works just fine.


As I've said to you before though... if you can't even seem to get it setup how do you expect to be able to program any of the bot functionality? (There's nothing in there.. you have to do it all yourself). All this does is let you log in with the proxy and nothing more.
01/08/2011 01:47 denominator#528
I agree p4n but then again I am no coder and have had to help a few of the coders to set it up also yet they are the ones adding code and getting the bot to work but couldn`t set it up lol.

But to be fair it really is a simple setup :)
01/08/2011 02:42 argon69#529
Quote:
Originally Posted by gorgone View Post
u can find in this section if u looking for "Conquerloader 2.0" take 4.0 version is in middle i used that



like i said in past if u need use, this is my Filter_grouditems Selection

public static Dictionary<uint, Items.GroundItem> ItemFilter(Client C, Dictionary<uint, Items.GroundItem> oggettiInteri)
{
Dictionary<uint, string> Filtr = new Dictionary<uint, string>();
Dictionary<uint, Items.GroundItem> Rientro = new Dictionary<uint, Items.GroundItem>();

if (C.Looting)
Filtr = Program.RareItem;
else if (C.LootMoney)
{
Filtr.Add(1090020, "Money");
Filtr.Add(1091000, "Money");
Filtr.Add(1091010, "Money");
Filtr.Add(1091020, "Money");
}
else if (C.LootAll)
Filtr = null;

if (Filtr != null)
foreach (Items.GroundItem Item in oggettiInteri.Values)
{
if (!(Program.DontLoot.ContainsKey(Item.ID)))
if (Filtr.ContainsKey(Item.ID))
Rientro.Add(Item.ID, Item);

}
else Rientro = oggettiInteri;

return Rientro;

}
Nice looking filtering. However, here is my problem. I am looking at UID rather than item id. So when I drop the item, I don't want to pick it up again. So, I added UID in the dontpickup list. But the server gives different UID when item is dropped. When you pick it up, it is same old UID. That is why my bot keeps dropping and picking up same item over and over again. I will see if I can rewrite handler piece to overcome this problem.
01/08/2011 02:46 hippie#530
shouldnt the ports in the proxy match the ones in the loader ?
01/08/2011 02:59 pro4never#531
Quote:
Originally Posted by argon69 View Post
Nice looking filtering. However, here is my problem. I am looking at UID rather than item id. So when I drop the item, I don't want to pick it up again. So, I added UID in the dontpickup list. But the server gives different UID when item is dropped. When you pick it up, it is same old UID. That is why my bot keeps dropping and picking up same item over and over again. I will see if I can rewrite handler piece to overcome this problem.
Ground item uids are different from inventory uids. The way I got around that was basically this...


When I drop an item I set a variable suck as "LastDroppedID" and set last dropped item to datetime now... then in packet handler I have when items are being added to the ground a check for if last dropped item was less than say... 500 ms ago and if the dropped item has the same static id (same item type) as the last item which was dropped... if so I add that to a temporary ignore list (my ignores expire after 2 minutes iirc). If you never un-ignore that uid you will have problems as the same ground uid's get used fairly often actually.
01/08/2011 08:04 demon17#532
Quote:
Originally Posted by [GM] View Post
thx gorgone for your help but its still stuck at logging into account server
ok here are my settings take alot at them:
Code:
        public static string AuthIp = "5.164.251.234";
        public static string ProxyTitle = "[ProjectAlchemy]";
        public static string Version = "v1.1";
        public static string Username = "root";
        public static string Password = "";
        public static string Host = "alchemy";
        public static DMapServer DmapHandler = new DMapServer();
        public static Dictionary<ushort, Ending> PortBindings = new Dictionary<ushort, Ending>();
        public static ushort AuthPort = 9959;
        public static string ProxyIp = "5.164.251.234";
        public static string GameKey = "DR654dt34trg4UI6";
        public static string GameIp = "";
        public static ushort GamePort = 5816;
and in LoaderSet.ini

5.164.251.234 is my hamachi ip
now whats wrong?!
thx in advance

public static string AuthIp = "5.164.251.234"; <-- lol thats need to be the original ...
not your

This is what anyone who use this source has :
public static string AuthIp = "208.96.34.46"
01/08/2011 08:24 pro4never#533
as I've said so many times... all the relevant config settings are in the settings.txt file... Aka why I even bothered making a settings file.
01/08/2011 13:44 [GM]#534
iam using this code to hunt credits to OELABOELA
Code:
       public static Mob GetClosestMonster(Client C)
        {
            Mob ToReturn = null;
            int Dist = 18;
            if (C.InFatalStrike)
            {
                Dist = 18;
            }
            else
            {
                Dist = 1;
            }
            foreach (Mob M in C.LocalMobs.Values)
            {
                if (Calculations.Distance(C.X, C.Y, M.X, M.Y) < Dist)
                {
                    ToReturn = M;
                    Dist = Calculations.Distance(C.X, C.Y, M.X, M.Y);
                    if (Dist < 2)
                        break;
                }
            }
            return ToReturn;
        }
iam using this command to make it work
Code:
case "/bot":
                            {
                                if (!C.Attacking)
                                     C.Attacking = true;
                                Handler.GetClosestMonster = true;
                                UpdateStats(C);
                                C.Attacking = !C.Attacking;
                                Chat(C, "Attacking = " + C.Attacking, 2011);
                                break;
                            }
but it says : Cannot assign to 'GetClosestMonster' because it is a 'method group'
01/08/2011 13:45 elmalke#535
Hello dear friends, Sorry but I have problem I can not understand this speech is very difficult for me pleas give me a program that hit the monsters just the exe file soree
Sorry for my weak language
01/08/2011 14:03 gorgone#536
Quote:
Originally Posted by argon69 View Post
Nice looking filtering. However, here is my problem. I am looking at UID rather than item id. So when I drop the item, I don't want to pick it up again. So, I added UID in the dontpickup list. But the server gives different UID when item is dropped. When you pick it up, it is same old UID. That is why my bot keeps dropping and picking up same item over and over again. I will see if I can rewrite handler piece to overcome this problem.
when u drop item u must add it in don t take item again (for to do this u must use method remove from itemground about droped UID ITEM)

so just use C.GroundItems.remove(UID) and work is done
01/08/2011 14:08 gorgone#537
Quote:
Originally Posted by [GM] View Post
iam using this code to hunt credits to OELABOELA
Code:
       public static Mob GetClosestMonster(Client C)
        {
            Mob ToReturn = null;
            int Dist = 18;
            if (C.InFatalStrike)
            {
                Dist = 18;
            }
            else
            {
                Dist = 1;
            }
            foreach (Mob M in C.LocalMobs.Values)
            {
                if (Calculations.Distance(C.X, C.Y, M.X, M.Y) < Dist)
                {
                    ToReturn = M;
                    Dist = Calculations.Distance(C.X, C.Y, M.X, M.Y);
                    if (Dist < 2)
                        break;
                }
            }
            return ToReturn;
        }
iam using this command to make it work
Code:
case "/bot":
                            {
                                if (!C.Attacking)
                                     C.Attacking = true;
                                Handler.GetClosestMonster = true;
                                UpdateStats(C);
                                C.Attacking = !C.Attacking;
                                Chat(C, "Attacking = " + C.Attacking, 2011);
                                break;
                            }
but it says : Cannot assign to 'GetClosestMonster' because it is a 'method group'

u cant use that in Case switch .... u must call a newBot methods in Bot.c class

u need to write a cycle inside u put find enemy, cure , take item from ground, move to enemy and select type of attack (magic o melee)

in this way u can do a right bot methods and not

C.Attacking = !C.Attacking;
Chat(C, "Attacking = " + C.Attacking, 2011);

for attack a monster
1. u must move ur char near the monster
2. u must select the type of attack
3. u must hit

all this 3 commands u need to create in bot methods


:) much steps for 1 hit lol but is the right way !!
01/08/2011 14:17 [GM]#538
Quote:
Originally Posted by gorgone View Post
u cant use that in Case switch .... u must call a newBot methods in Bot.c class

u need to write a cycle inside u put find enemy, cure , take item from ground, move to enemy and select type of attack (magic o melee)

in this way u can do a right bot methods and not

C.Attacking = !C.Attacking;
Chat(C, "Attacking = " + C.Attacking, 2011);

for attack a monster
1. u must move ur char near the monster
2. u must select the type of attack
3. u must hit

all this 3 commands u need to create in bot methods


:) much steps for 1 hit lol but is the right way !!
ty for ur explanation, but since iam weak in C#
can you give me an example?
01/08/2011 14:21 argon69#539
Quote:
Originally Posted by gorgone View Post
when u drop item u must add it in don t take item again (for to do this u must use method remove from itemground about droped UID ITEM)

so just use C.GroundItems.remove(UID) and work is done
As PxN said, NEW ground id is generated by server when item is dropped even with same item. You can't see real UID until the item is in your inventory. I tried to avoid using current method that uses time. I optimized handler routine to check around char to make reasonable guess that the item dropped is yours.

BTW, thanks P4N to confirming this :)

Also, I found something strange about ID and I don't know how it is happening. In my inventory, ID was 136003 and when it was dropped it became 136005. So, LastDroppedID == I.ID checking logic was failing. So, it went into picking up/dropping loop again..... Any explaination? I might change the code to check that item is being dropped by char and that item is around char.
01/08/2011 14:50 gorgone#540
Quote:
Originally Posted by argon69 View Post
As PxN said, NEW ground id is generated by server when item is dropped even with same item. You can't see real UID until the item is in your inventory. I tried to avoid using current method that uses time. I optimized handler routine to check around char to make reasonable guess that the item dropped is yours.

BTW, thanks P4N to confirming this :)

Also, I found something strange about ID and I don't know how it is happening. In my inventory, ID was 136003 and when it was dropped it became 136005. So, LastDroppedID == I.ID checking logic was failing. So, it went into picking up/dropping loop again..... Any explaination? I might change the code to check that item is being dropped by char and that item is around char.
sorry now is clear wht u mean .. :))

sometimes i don t understood clearly wht mates ur write ^.^ i used a dictionary of items dorped by mine and items that i can t take from ground becouse are items locked (other player kills them and drop it) all this dictionary are don t loot item and i cleaning from my item grounds ( if u loook my Filter ground items function)