Stripped ProjectAlchemy Source Code

02/15/2011 03:16 pro4never#961
Quote:
Originally Posted by caio bola View Post
Can anyone helpme on developing a HasToLoot code? like a looting over attacking priority code
anyone pls?
What I've always done in my looting code was simply placing loots first


IE: Following stages


if(!C.Looting)
goto Hunt;
if(PullItem(C) == null)
goto Hunt;
GroundItem Item = PullItem(C);
if(DistanceToItem(C, Item) < 1 || C.TryingItem)
{
//loot or move to item
//TryingItem = false;
goto END;
}
else if(DistanceToItem < MoveDist)
//move towards item
//TryingItem = true;
else if(C.TryingItem)
C.TryingItem = false;

Hunt:
{
if(!C.Hunting)
goto END;
Mob M = ClosestMonster(C);
if(M == null)
goto END;
if(C.InXp)
{
//Check if in fatal strike, if so attack mob and update coords
//else use xp speed settings to move towards/attack target
}
else
{
//check for distance in atk range/attack
//Check non xp speed settings for move/atk
//else move to/towards target
}
}
END:{
return true;}

Simple stuff.
02/15/2011 04:53 caio bola#962
P4N What method you think the best to move to the item?

jump packet? clijump? what type 156 , 137? im kinda confused on jump packets
02/15/2011 05:14 pro4never#963
.... Cli jump is the only way you can use 156 (it's graphics only)

server jump 137 is the only way to jump server side

The alternative would be shift packet which is the simplest way to move fast ingame. Keep in mind it's limited to 7 coords.
02/15/2011 05:29 caio bola#964
So should I send both , cli and jump ( 156 and 137 ) to move to the item location?

What if it says item is too far?
02/15/2011 06:14 pro4never#965
Client jump is only to display the movement client side. It doesn't actually 'do' anything.

The jump packet is server side but again does not show anything client side.

Mentioned this a bunch of times.
02/15/2011 06:18 caio bola#966
In order to capture the item location , wich would be the the best code
02/15/2011 06:29 pro4never#967
Quote:
Originally Posted by caio bola View Post
In order to capture the item location , wich would be the the best code
It should already be read perfectly fine.

You read the item uid/x/y from the ground item packet and add it to a localitems type dictionary in the client. Then remove items from that dictionary when you go outside their range.

Simple stuff and should already be done in the source.
02/15/2011 07:04 caio bola#968
Items.GroundItem moneyloot2 = GetClosestItemz(C);
if (moneyloot2 != null && C.Looting)
{
if (Distance(C.LastServerX, C.LastServerY, moneyloot2.X, moneyloot2.Y) == 0 && C.LastLoot.AddMilliseconds(200) < DateTime.Now)
{
Packets.PickItem(C, moneyloot2);
C.LastLoot = DateTime.Now;
C.LastJump = DateTime.Now;
C.LastAttack = DateTime.Now;
}
else
{
if (Distance(C.LastServerX, C.LastServerY, moneyloot2.X, moneyloot2.Y) < 19 && C.LastJump.AddMilliseconds(600) < DateTime.Now)
{
//Packets.CliJump(moneyloot2.X, moneyloot2.Y, 156, C);
Packets.Jump(C, moneyloot2.X, moneyloot2.Y, 136);
C.LastJump = DateTime.Now;
C.LastAttack = DateTime.Now;
}

Its picking only a very few items , any tips?
02/15/2011 09:11 pro4never#969
jump type is 137, not 136
02/15/2011 09:37 Warlax#970
p4n u help em far too much, need to watch what code on here else ull just encourage the c+p n00bs :P need to make em work for that goal :) they'll get a much greater sense of achievment :)

for example - denominator - very impressed, actually done some googling outside of this thread to find out what enums are :)
02/15/2011 10:51 caio bola#971
Whats the use of CliJumps then?

Isnt supposed to all jump actions be used with Jump ( 137 )? Why send a client side jump ?

I see a lot of videos of botting where the char doesnt updates your client position , just stay on a place , but his real position is moving around and killing mobs.

When should I use the clijumps? If its usable at all

Second question: "speed action" , what is a good stable value for it? Im tryng to run the fastest as I can , but getting a lot of 1022 error ( wich I think is something to do either with attacking or looting , definatly not jumping )

Ya ima a noob but the questions are made , anyone help , thank you.
02/15/2011 15:00 biancardi#972
Quote:
Originally Posted by Warlax View Post
p4n u help em far too much, need to watch what code on here else ull just encourage the c+p n00bs :P need to make em work for that goal :) they'll get a much greater sense of achievment :)

for example - denominator - very impressed, actually done some googling outside of this thread to find out what enums are :)
I have the First working proxy on BR version of CO (wich is way different from CO) using Alchemy Proxy (thing that nobody could make it work (btw, caio_bola is using my source code)) . . . i really thank p4n for making this thread, and encouraging us to code our own bot. . . and i can tell. . i had a great sense of achievement when i connected it. . . . when i studied packets (a lot) to adapt the proxy. . . when i added a hunt/loot code with minimal help. . . .

that's it. . i'd rather make my brain work, than copy/paste everything =D
02/15/2011 15:01 caio bola#973
p4n , I tried the shift packed on looting , didnt work
Quote:
Mob attack = GetClosestMonster(C);

Items.GroundItem moneyloot2 = GetClosestItemz(C);
if (moneyloot2 != null && C.Looting)
{
if (Distance(C.LastServerX, C.LastServerY, moneyloot2.X, moneyloot2.Y) == 0 && C.LastLoot.AddMilliseconds(200) < DateTime.Now)

{
Packets.PickItem(C, moneyloot2);
C.LastLoot = DateTime.Now;
C.LastJump = DateTime.Now;
C.LastAttack = DateTime.Now;
}
else
{
if (Distance(C.LastServerX, C.LastServerY, moneyloot2.X, moneyloot2.Y) < 8)
{
Packets.Shift(C, moneyloot2.X, moneyloot2.Y);
C.X = moneyloot2.X;
C.Y = moneyloot2.Y;
C.UpdatedX = C.X;
C.UpdatedY = C.Y;
Calculations.UpdateLocal(C);
C.LastJump = DateTime.Now;
C.LastAttack = DateTime.Now;
}
}
02/15/2011 19:21 pro4never#974
Quote:
Originally Posted by caio bola View Post
Whats the use of CliJumps then?

Isnt supposed to all jump actions be used with Jump ( 137 )? Why send a client side jump ?

I see a lot of videos of botting where the char doesnt updates your client position , just stay on a place , but his real position is moving around and killing mobs.

When should I use the clijumps? If its usable at all

Second question: "speed action" , what is a good stable value for it? Im tryng to run the fastest as I can , but getting a lot of 1022 error ( wich I think is something to do either with attacking or looting , definatly not jumping )

Ya ima a noob but the questions are made , anyone help , thank you.
Again, Clijumps are ONLY to display things client side.

They will not effect your botting at all but for example what happens when you turn off botting? If you try to jump you will obviously dc cause the client sends a jump packet saying you are jumping somewhere that's no where near your actual position.

So yes... client updates are important but don't really play any role in your actual botting.


As for shift packet... log a 2nd character and try doing a manual /shift cmd to see if it moves you. (Should show on the other character as a small ranged teleport).

If that works then tq hasn't fixed the exploit and your problem lies in your logic code related to looting.
02/15/2011 22:41 caio bola#975
p4n do you suggest clijumping at attacking,looting and randomjumping?

or in just one of them?

how can I solve the problem of skipping item and sometimes invalid jump when looting?
im currently sending jump 137 and clijump 156 if the distance is < 19 , if distance = - 0 i send pick item.