Stripped ProjectAlchemy Source Code

12/15/2010 03:36 pro4never#271
Quote:
Originally Posted by zap_xlib View Post
Thanks, pro4never!... I was actually wanting to get a glimpse of how to make my char move at least an inch... Now, that i`m in jail, i don`t have to worry... In jail, i dropped some normal stuff while trying a long jump and got bot jailed again... :D

Besides, i was wondering from where you should be calling the NewBot(). I placed it as a Case under Cmd switch. But, i`m not able to make it loop, as i feel the control breaks no matter how many indefinite loops i put my code into.

Example: If i code it to hit monsters and get close to a mob of 3 monsters and type "/Bot", the char attacks all the 3 Mobs and after that, the loop breaks, even though it`s within an infinite loop. I also tried using Jump() and CliJump(). But, unable to get it to jump or teleport...
There is a thread which already calls the newbot method...


Character.cs has two different threads which are started on login to the game server.


Thread 1: Packets thread. Runs through the queue of packets to send to either server or client and sends them.


Thread 2: Calls the NewBot method assuming the bot is turned on and not disabled (I disable it during certain actions that need a pause... such as activating xp skill or w/e)

As for dropping items... EVERY action should have a delay between it and the previous/next one.

The problem with dcing I feel is actually the drop packet has changed since I released the proxy (that's why some ppl for loot were getting 0/0 x/y for items...

Try reading the packets being used by the client/server already and re-write the drop item method to reflect the new structure.
12/15/2010 05:09 tkblackbelt#272
Hey guys I just spent abit trying to get the botting working and heres a video of my progress xD

Edit: I just made a method to make my character move randomly if there are no monsters around but I end up dcing when ever I move onto something i can't is there a way to check if I can jump on something or not?

12/15/2010 08:28 pro4never#273
Quote:
Originally Posted by tkblackbelt View Post
Hey guys I just spent abit trying to get the botting working and heres a video of my progress xD

Edit: I just made a method to make my character move randomly if there are no monsters around but I end up dcing when ever I move onto something i can't is there a way to check if I can jump on something or not?

[Only registered and activated users can see links. Click Here To Register...]
Run a dmap check... it's already in the source
12/15/2010 17:34 denominator#274
Code:
public ulong Exp
        {
            get { return Exp; }
            set { Exp = value; }
        }
What exactly is that for because I have had to delete it because the proxy wouldn`t load otherwise with it still in there?
12/15/2010 18:46 OELABOELA#275
Quote:
Originally Posted by denominator View Post
Code:
public ulong Exp
        {
            get { return Exp; }
            set { Exp = value; }
        }
What exactly is that for because I have had to delete it because the proxy wouldn`t load otherwise with it still in there?

it will load, but be sure you have Compile unsafe code on. Because this may cause you this error.
12/15/2010 19:14 denominator#276
Yup already had that done and had it running before with it in there. Then new patch and then it started to give the error.

Bot loads up now BUT it is still crashing >.<
12/15/2010 22:22 pro4never#277
Quote:
Originally Posted by denominator View Post
Yup already had that done and had it running before with it in there. Then new patch and then it started to give the error.

Bot loads up now BUT it is still crashing >.<
get/set methods allow you to execute actions whenever a variable is modified...

IE you could change the set so that every time you gain exp it saves your current exp to the database (not wise... too many updates).

Also makes things read only if you wanted or write only... dunno why you'd want to for exp though.

Out of my being lazy I tend to only do half my variables with get/set lol.
12/15/2010 22:54 hippie#278
thxns pro4never 4 the base i haf a dumb ass question 4 ya will this work wif client 5291
12/15/2010 23:35 denominator#279
Well I cancelled that out from the proxy but it still crashes?
12/15/2010 23:53 pro4never#280
Quote:
Originally Posted by denominator View Post
Well I cancelled that out from the proxy but it still crashes?
get/set methods cannot cause you to crash...

what they attempt to execute could but still... VERY unlikely.


Just run in debug mode and get what the error is referring to. Go to the line that is indicated by the error and work on a fix or just try/catch that section so that it doesn't generate an unhanded exception.
12/16/2010 00:13 denominator#281
Code:
 public ulong Exp
        { 
            try
        {
        
            
            get { return Exp; }
            set { Exp = value; }
            
        }
            catch { }
        
        }
Two errors with this lol.

Code:
Error	1	A get or set accessor expected	C:\Users\AlanKnight\Desktop\AlchemyProxy\AlchemyProxy\Client\Client.cs	184	13	AlchemyProxy
Code:
Error	2	Property or indexer 'AlchemyProxy.Client.Exp' cannot be assigned to -- it is read only	C:\Users\AlanKnight\Desktop\AlchemyProxy\AlchemyProxy\Packet\Handler.cs	414	29	AlchemyProxy
12/16/2010 00:24 gabrola#282
Quote:
Originally Posted by denominator View Post
Code:
 public ulong Exp
        { 
            try
        {
        
            
            get { return Exp; }
            set { Exp = value; }
            
        }
            catch { }
        
        }
Two errors with this lol.

Code:
Error	1	A get or set accessor expected	C:\Users\AlanKnight\Desktop\AlchemyProxy\AlchemyProxy\Client\Client.cs	184	13	AlchemyProxy
Code:
Error	2	Property or indexer 'AlchemyProxy.Client.Exp' cannot be assigned to -- it is read only	C:\Users\AlanKnight\Desktop\AlchemyProxy\AlchemyProxy\Packet\Handler.cs	414	29	AlchemyProxy
You don't put the get and set accessors inside the try/catch statement it's the other way around.
12/16/2010 00:26 denominator#283
I don`t understand?
12/16/2010 02:35 pro4never#284
Quote:
Originally Posted by denominator View Post
I don`t understand?
Don't do try/catch there...

Run the program in debug mode and when it experiences an error the program will freeze and C# will go to where the error occurred and say what caused it (rather generic exception names but they sure help!)


Then go to where the actual error is happening and put a try/catch in the correct area or simply fix the problem.


IE: NO try/catch in the accessor... if you wanted it there you'd do try/catch inside the get/set brackets.

NOTE: you can catch the exception and print it to console to track down the actual cause.

IE:

get{try { return _private; } catch(exception P){Console.WriteLine("GETexp: " + P);}}
set{try{_private = value;} catch(exception P){Console.WriteLine("SET exp: " + P);}}
12/16/2010 09:32 denominator#285
Ahhh thank you yeah the line that it shows is that particular line.
Code:
set { Exp = value; }
I have to go to the dentist now but I`ll take a look a little later :)