Stripped ProjectAlchemy Source Code

12/07/2010 23:39 demon17#61
cya all im going to sleep cuz tomorow i have exam at english :P So i need to be perfectly woked up ... When someone get to work the mob hunt option ( workin' via /hunt command please tell me - upload it somewhere and send me the link in PM ) Thanx alot for what you are did for me :P
12/07/2010 23:43 vecko12#62
I know that all together can do the botting code... I ended with sql, I find a way to ppl play thru the proxy...
Btw OELABOELA it should be 156... thats for the flash...
12/07/2010 23:46 OELABOELA#63
Quote:
Originally Posted by vecko12 View Post
I know that all together can do the botting code... I ended with sql, I find a way to ppl play thru the proxy...
Btw OELABOELA it should be 156... thats for the flash...
Are you sure? Because it doesnt do anything at me..
12/07/2010 23:50 vecko12#64
Quote:
Originally Posted by OELABOELA View Post
Are you sure? Because it doesnt do anything at me..
Hm... Maybe u wrong something in the code... very odd... :confused:
12/07/2010 23:53 OELABOELA#65
Quote:
Originally Posted by vecko12 View Post
Hm... Maybe u wrong something in the code... very odd... :confused:
Okaaay, i can see the animation. But the screen doesn't move yet. It just piles.
12/07/2010 23:56 denominator#66
How do you mean "piles"?
12/08/2010 00:00 OELABOELA#67
Quote:
Originally Posted by denominator View Post
How do you mean "piles"?
Standing at 1 position, attacking mobs in around 8 distance.
12/08/2010 00:12 pro4never#68
Quote:
Originally Posted by OELABOELA View Post
Yea it was like Calculations.shift but, you need to give in coords, how can i recieve coords from a monster? Just do like
!! PSEUDO !!
Coord Mob = new coords();
Mob.X = attack.x;
Mob.Y = attack.y;
calc.shift(mob);

Right?
There's a method already coded to return a coord based on x/y. Something like Coord Z = Calculations.Shift(MakeCoord(M.X, M.Y));

if(!Jump(C, Z.X, Z.Y))
Jump(C, M.X, M.Y);

or something like that.

if first jump fails checks it will call jump to mob coords.

As for 'stacking' from flash step, you wanna use the end coords for both to/from generally, I forget which one actually is end coords but I always just used a combination.


i strongly recommend writing commands to test these things....
12/08/2010 00:22 vecko12#69
Quote:
Originally Posted by pro4never View Post
There's a method already coded to return a coord based on x/y. Something like Coord Z = Calculations.Shift(MakeCoord(M.X, M.Y));

if(!Jump(C, Z.X, Z.Y))
Jump(C, M.X, M.Y);

or something like that.

if first jump fails checks it will call jump to mob coords.

As for 'stacking' from flash step, you wanna use the end coords for both to/from generally, I forget which one actually is end coords but I always just used a combination.


i strongly recommend writing commands to test these things....
well everything working fine... just the prob is in the jumping...

f (C.LastJump.AddMilliseconds(C.JumpSpeed) < DateTime.Now && C.LastAttack.AddMilliseconds(C.AttackSpeed) < DateTime.Now)
{
Calculations.ShiftTarget(attack);
Packets.AtkServer(C, attack, 2);

C.X = attack.X;
C.Y = attack.Y;
C.UpdatedX = C.X;
C.UpdatedY = C.Y;
Calculations.UpdateLocal(C);

Handler.Chat(C, "attacked " + attack.Name, 2008);
C.LastAttack = DateTime.Now;
}

if (C.LastJump.AddMilliseconds(C.JumpSpeed) < DateTime.Now && C.LastAttack.AddMilliseconds(C.AttackSpeed) < DateTime.Now)
{
Packets.CliJump(attack.X, attack.Y,156,C);
Handler.Chat(C, "Jumped", 2008);
C.X = attack.X;
C.Y = attack.Y;
C.UpdatedX = C.X;
C.UpdatedY = C.Y;
Calculations.UpdateLocal(C);
C.LastJump = DateTime.Now;
}
me and OELABOELA can't figure out...
12/08/2010 00:34 OELABOELA#70
All have a good night, tomorrow a new day to code.
12/08/2010 00:37 vecko12#71
Quote:
Originally Posted by OELABOELA View Post
All have a good night, tomorrow a new day to code.
Yes... I am going too bro... See ya tommorow... I am free all day...I will try to fix the jumping :) Have a nice Dreams! (C# dreams =) )
12/08/2010 00:39 OELABOELA#72
Quote:
Originally Posted by vecko12 View Post
Yes... I am going too bro... See ya tommorow... I am free all day...I will try to fix the jumping :) Have a nice Dreams! (C# dreams =) )
Ofcourse i will.
12/08/2010 02:50 denominator#73
Hmm guess I need to define attack? Ok a really stupid question but could you in effect take things from a pserver and add it to this provided you changed things like GC.MyChar etc?
12/08/2010 03:38 pro4never#74
Quote:
Originally Posted by denominator View Post
Hmm guess I need to define attack?
There is already server attack packets as well as packets for almost every feature you wanna use... You'd just need to call it properly using the monster to attack and how you wish to attack (IE skill vs fatal strike vs melee)


Quote:
Originally Posted by vecko12 View Post
Yes... I am going too bro... See ya tommorow... I am free all day...I will try to fix the jumping :) Have a nice Dreams! (C# dreams =) )
How do you mean 'fix' the jumping. It works fine.


Note this cmd for an example...

Code:
 case "/jump":
                        Packets.CliJump(ushort.Parse(Cmd[1]), ushort.Parse(Cmd[2]), byte.Parse(Cmd[3]), C);
                        break;
That's x/y/type which can be entered via cmd as tests to try diff movement types or w/e.

Now all you need to do is send that packet to the client when you make a server side movement with Jump(Client, X, Y, Type).

You CANNOT send the jump animation to client. Type 137 sent to client is the response to a client jump, you can't actually trigger that animation. Instead use flash step or, if you wanna you could use update coords (Be careful to ensure you are blocking the packet that the client will send to server from that or you'll be dc'd if it's not your actual coords. Blocking it should work fine though)
12/08/2010 03:43 denominator#75
Yeah I did notice things in the source saying attack already but I attempted to put the code in that was given a page or two ago but it comes up with 9 errors "the name attack does not exist in the current context" so I thought it probably needed defining somehow.

This is probably wrong but I tried to use a bit of common sense to add it where I thought it probably should go?
Code:
public static Mob GetClosestMonster(Client C)
        {
            Mob ToReturn = null;
            int Dist = 18;
            foreach (Mob M in C.LocalMobs.Values)
             {
                 if (C.LastJump.AddMilliseconds(C.JumpSpeed) < DateTime.Now && C.LastAttack.AddMilliseconds(C.AttackSpeed) < DateTime.Now)
                 {
                     
                   Calculations.ShiftTarget(attack);
                   Packets.AtkServer(C, attack, 2);

                   C.X = attack.X;
                   C.Y = attack.Y;
                   C.UpdatedX = C.X;
                   C.UpdatedY = C.Y;
                   Calculations.UpdateLocal(C);

                   Handler.Chat(C, "attacked " + attack.Name, 2008);
                   C.LastAttack = DateTime.Now;
                 }
                 if (C.LastJump.AddMilliseconds(C.JumpSpeed) < DateTime.Now && C.LastAttack.AddMilliseconds(C.AttackSpeed) < DateTime.Now)
                 {
                   Packets.CliJump(attack.X, attack.Y,156,C);
                   Handler.Chat(C, "Jumped", 2008);
                   C.X = attack.X;
                   C.Y = attack.Y;
                   C.UpdatedX = C.X;
                   C.UpdatedY = C.Y;
                   Calculations.UpdateLocal(C);
                   C.LastJump = DateTime.Now;
                  }
                  if (Distance(C.X, C.Y, M.X, M.Y) < Dist)
                  {
                    ToReturn = M;
                    Dist = Distance(C.X, C.Y, M.X, M.Y);
                    if (Dist < 2)
                        break;
                }
             }
            return ToReturn;
        }