Stripped ProjectAlchemy Source Code

12/10/2010 20:08 pro4never#166
Quote:
Originally Posted by OELABOELA View Post
Yeah, i was INSTANTLY at the botjail xd
Auto detect system relies on invalid packets/actions and therefor there is no delay between sending it and being in jail. No need to have a gm check it out like normal bot jail actions or wait for a program scan like certain bots receive.
12/10/2010 20:12 OELABOELA#167
I'm now going to rage some birdmans at lvl 42, let's look how this is going to packout.

<EDIT>
Killed 3, then got raped by an pker. Rofl, steady speeds at 50ms.
12/10/2010 20:29 pro4never#168
Quote:
Originally Posted by OELABOELA View Post
I'm now going to rage some birdmans at lvl 42, let's look how this is going to packout.

<EDIT>
Killed 3, then got raped by an pker. Rofl, steady speeds at 50ms.
Did you ever finish auto potter? It's something I always intended to write but I forgot about.

If you want I could write a simple method to pull next potion uid from inventory. It's quite simple.


<edit>

Pseudo code.


public static uint PullPotion(Client C)
{
foreach(ItemInfo I in C.Inventory.Values)
{
if(Program.PotionIDs.Contains(I.ID)
{
return I.UID
break;
}
}
}

Then just make a static list of potion static id's to check vs.

You could do a more advanced version to chose the potion that best relates to your current hp needing to be gained but it's not super important.

You could also add into the loot section how many potions you wanna keep in inventory and have it auto loot potions up till that point. That way noob characters won't ever really die when in fatal cause they will loot just enough potions to stay alive without overloading inventory.
12/10/2010 20:35 denominator#169
Well me I`ve given up on this already and trying to work on my pserver again rofl
12/10/2010 20:38 OELABOELA#170
Quote:
Originally Posted by pro4never View Post
Did you ever finish auto potter? It's something I always intended to write but I forgot about.

If you want I could write a simple method to pull next potion uid from inventory. It's quite simple.


<edit>

Pseudo code.


public static uint PullPotion(Client C)
{
foreach(ItemInfo I in C.Inventory.Values)
{
if(Program.PotionIDs.Contains(I.ID)
{
return I.UID
break;
}
}
}

Then just make a static list of potion static id's to check vs.

You could do a more advanced version to chose the potion that best relates to your current hp needing to be gained but it's not super important.

You could also add into the loot section how many potions you wanna keep in inventory and have it auto loot potions up till that point. That way noob characters won't ever really die when in fatal cause they will loot just enough potions to stay alive without overloading inventory.
I got botjailed for using this:
Code:
case "/pot":
                        {
                            foreach (Items.ItemInfo rofl in C.Inventory.Values)
                            {
                                if (rofl.ID == 1000020 && C.LastJump2 < DateTime.Now)
                                {
                                    Packets.UseItem(C, rofl.UID, uint.Parse(Cmd[2]));
                                    C.LastJump2 = DateTime.Now;//Didn't add this before botjail
                                }
                                
                            }
                            break;
                        }
12/10/2010 20:42 pro4never#171
#1: Make sure you are only using 1 potion. Spamming them fast could == bot jail

#2: Make sure you are structuring the packet correctly (test it on a noob char first in controlled conditions) and find the correct subtypes before you try to apply it to actual use)

The method I just wrote up there will return a potion of any type from your inventory (just add the ids for all potions you want it to use for hp to the list you create) so when you actually apply it just do something in your update code where you take dmg (type 0 I feel...) that if it's under pot hp pull a potion and use it (with a pot cooldown timer obviously).

When you use a potion it will send you the updated hp so you don't need to worry about using more cause if the potion doesn't heal past the 'usepot' level it will just use another.

<edit>

taking a 2 sec glance at my source...

subtype is 4 so you have that correct (That's use item/equip)

Position MUST = 0 (inventory)

ID should be the DYNAMIC id, not the static one (so you should be pulling the item via 1000020 or w/e but using uid... which you appear to be ^^)

Just make sure you're using the correct packet structure and types and you should be good to go.

<edit again>

Your datetime there has no delay between potions... for that you'd do like...

if (C.Jump2.AddMilliseconds(DelayTime) < DateTime.Now)

Think about it... when using you are setting datetime = now... and then checking if the last used time is less then... now... It will always pass that check.
12/10/2010 21:11 OELABOELA#172
Quote:
Originally Posted by pro4never View Post
#1: Make sure you are only using 1 potion. Spamming them fast could == bot jail

#2: Make sure you are structuring the packet correctly (test it on a noob char first in controlled conditions) and find the correct subtypes before you try to apply it to actual use)

The method I just wrote up there will return a potion of any type from your inventory (just add the ids for all potions you want it to use for hp to the list you create) so when you actually apply it just do something in your update code where you take dmg (type 0 I feel...) that if it's under pot hp pull a potion and use it (with a pot cooldown timer obviously).

When you use a potion it will send you the updated hp so you don't need to worry about using more cause if the potion doesn't heal past the 'usepot' level it will just use another.

<edit>

taking a 2 sec glance at my source...

subtype is 4 so you have that correct (That's use item/equip)

Position MUST = 0 (inventory)

ID should be the DYNAMIC id, not the static one (so you should be pulling the item via 1000020 or w/e but using uid... which you appear to be ^^)

Just make sure you're using the correct packet structure and types and you should be good to go.

<edit again>

Your datetime there has no delay between potions... for that you'd do like...

if (C.Jump2.AddMilliseconds(DelayTime) < DateTime.Now)

Think about it... when using you are setting datetime = now... and then checking if the last used time is less then... now... It will always pass that check.
Yes, i just used it on another char, and it says cannot use item. So im getting in the good way.

<EDIT>
Got potting working, woohoo :)
12/10/2010 21:12 demon17#173
Hy Someone Finishd the Jump part?

I mean to jump to random coordinates
I was made 2k kill at birdmens but i was needed to jump .( 1 jump /time cuz dc me when i jump 2 ;))

Speed works nicely. All speeds can be setted with a ninja to 50 .

When someone finishd the path or random jump tell me pls

-P4n Can you tell us or make an exemplo how to make working the /record part?

Ty OELABOELA For helps
12/10/2010 21:57 OELABOELA#174
Quote:
Originally Posted by demon17 View Post
Hy Someone Finishd the Jump part?

I mean to jump to random coordinates
I was made 2k kill at birdmens but i was needed to jump .( 1 jump /time cuz dc me when i jump 2 ;))

Speed works nicely. All speeds can be setted with a ninja to 50 .

When someone finishd the path or random jump tell me pls

-P4n Can you tell us or make an exemplo how to make working the /record part?

Ty OELABOELA For helps
No problem.

<EDIT>
Made a /pothp [Under...] and works perfectly, thank you P4N. :)
12/10/2010 22:16 demon17#175
Quote:
Originally Posted by OELABOELA View Post
No problem.

<EDIT>
Made a /pothp [Under...] and works perfectly, thank you P4N. :)
I guessing when you can make the record function works .. With the ninjas i havent got problem but with wars i got ,
Ninjas :
-Speeds : i ususally use 50(2k ko bird island -Hawks 6-7 minits) , my bro was able to use 10 .(600k -Hawks in 2 minits )
- I like cuz its shifting and going fast from mob to mob

Wariors:
-Speeds 100+
(Attack =50)
-2k kills in 10 minits Hawks with superman (Wand)
12/10/2010 22:57 pro4never#176
Quote:
Originally Posted by demon17 View Post
-P4n Can you tell us or make an exemplo how to make working the /record part?

Ty OELABOELA For helps
Record is already implemented. Check out the general data type 137 (jump) Client>server. I add it to a list of points. You simply need to control how and when to move between those points.


Hint... I set active point = null every time I attack a monster and if no mobs are in range chose the closest point to myself.

Then I also use a bool tro control which direction you are moving along the path. If you reach the last element in the list I change the direction bool and start going backwards through the path entries and vice versa.

IE: Active point = 0 (first element) and up is true... no mob in range, point 0 out range... find a coord that is on screen nearest to point 0 to jump to... repeat till point 0 (or a mob) is in range... then jump to point 0 and select point 1... point 1 is the last point in the path so I turn the up bool to false. I'm now at point 1 and no mobs are in range and up = false so I select the previous point in the path which is 0...

Continue along that type of logic and boom, you have a path system!

The paths themselves are already fully coded, you just need to implement them.
12/10/2010 23:09 OELABOELA#177
Quote:
Originally Posted by pro4never View Post
Record is already implemented. Check out the general data type 137 (jump) Client>server. I add it to a list of points. You simply need to control how and when to move between those points.


Hint... I set active point = null every time I attack a monster and if no mobs are in range chose the closest point to myself.

Then I also use a bool tro control which direction you are moving along the path. If you reach the last element in the list I change the direction bool and start going backwards through the path entries and vice versa.

IE: Active point = 0 (first element) and up is true... no mob in range, point 0 out range... find a coord that is on screen nearest to point 0 to jump to... repeat till point 0 (or a mob) is in range... then jump to point 0 and select point 1... point 1 is the last point in the path so I turn the up bool to false. I'm now at point 1 and no mobs are in range and up = false so I select the previous point in the path which is 0...

Continue along that type of logic and boom, you have a path system!

The paths themselves are already fully coded, you just need to implement them.
This is my next thing on my list, autopotter is done now.

<Edit>Making a path system, is like doing liftweight right, but with the weight you just jump to forward, and not backward again.
12/10/2010 23:18 pro4never#178
Quote:
Originally Posted by OELABOELA View Post
This is my next thing on my list, autopotter is done now.

<Edit>Making a path system, is like doing liftweight right, but with the weight you just jump to forward, and not backward again.
The weights pull the closest to a specified point which is in range. You have to then update which point you are moving to once you reach the point you want to go to.

Personally I do that through checking if the point is on screen and update active point (including up/down if you've reached the end/start of the list of pts) and jump to it. if not pull a weight close to it.
12/10/2010 23:37 OELABOELA#179
Quote:
Originally Posted by pro4never View Post
The weights pull the closest to a specified point which is in range. You have to then update which point you are moving to once you reach the point you want to go to.

Personally I do that through checking if the point is on screen and update active point (including up/down if you've reached the end/start of the list of pts) and jump to it. if not pull a weight close to it.
Is it okay, that when im done, and tested it, but when it doesnt work you take a look at it? Because, im not that good at arrays..
12/11/2010 09:28 demon17#180
I wana ask something .
Could you tell me how i set the bot to dont jump exactly in mosnter ?
I mean i need Distance 2 cuz i use wand for exemple .
Distance 1 to Katanas