[Release] Super-Basic Server Base

07/27/2011 16:34 BaussHacker#46
Quote:
Originally Posted by agathom View Post
Whats wrong with this i cant see the name ^^

[Only registered and activated users can see links. Click Here To Register...]

Uploaded with [Only registered and activated users can see links. Click Here To Register...]
You need to code the packets. Please note the "Super-Basic Server Base".
07/27/2011 17:21 agathom#47
Quote:
Originally Posted by BaussHacker View Post
You need to code the packets. Please note the "Super-Basic Server Base".
i see.
07/27/2011 17:53 hady#48
Quote:
Originally Posted by agathom View Post
i see.
i said it 2 or 3 times before he did
please guys read the posts
07/28/2011 18:56 t_dubble_uu#49
Here is the the ping packet and function and jump

In Packets/delegates.cs add
Code:
{ 1009, Handles.ItemPing.Handle },
in the Packets/Handles folder add a new file "ItemPing.cs"
Code:
public class ItemPing
    {
        public unsafe static void Handle(Byte* Data, KinSocket.Connection Client)
        {
            int Subtype = Data[12];
            switch (Subtype)
            {
                #region Reply to Ping / 27
                case 27://Reply to ping
                    {
                        Client.Send(Data);
                        break;
                    }
                #endregion
            }           
        }
    }
in Packets/handlers/generaldata.cs add
Code:
case Structures.DataPacket.DataTypes.Jump:
                    {
                        ushort new_X = *((ushort*)(Data + 8));
                        ushort new_Y = *((ushort*)(Data + 10));
                        int Mapid = (int)Hero.Map;
                        //check map location here
                        ushort prev_x = Hero.X;
                        ushort prev_y = Hero.Y;
                        Hero.X = new_X;
                        Hero.Y = new_Y;

                        Packet->dwParam = Hero.Map;
                        Packet->wParam1 = Hero.X;
                        Packet->wParam2 = Hero.Y;
                        Packet->DataType = Structures.DataPacket.DataTypes.Jump;
                        Packet->wParam0 = prev_x;
                        Packet->wParam1 = prev_y;
                        Client.Send(Packet);
                        foreach(Struct.NPC Npc in Constants.Npcs.Values)
                        {
                            if (Npc.Map == Hero.Map)
                            {
                                if (!Calc.CanSee(prev_x, prev_y, Npc.X, Npc.Y))
                                {
                                    if (Calc.CanSee(Hero.X, Hero.Y, Npc.X, Npc.Y))
                                    {
                                        Client.Send((Byte[])new Structures.NpcSpawnPacket(Npc));
                                    }
                                }
                            }
                        }
                        break;
                    }
07/28/2011 19:45 _DreadNought_#50
First things first
Code:
                     foreach(Struct.NPC Npc in Constants.Npcs.Values)
                        {
                            if (Npc.Map == Hero.Map)
                            {
                                if (!Calc.CanSee(prev_x, prev_y, Npc.X, Npc.Y))
                                {
                                    if (Calc.CanSee(Hero.X, Hero.Y, Npc.X, Npc.Y))
                                    {
                                        Client.Send((Byte[])new Structures.NpcSpawnPacket(Npc));
                                    }
                                }
                            }
                        }
YOU NEED A SCREEN SYSTEM KINISHI <3

That's horrible putting that everywhere "if can see npc, spawn, etc etc" needs to be one line. Client.screen.Refresh();
07/28/2011 20:15 t_dubble_uu#51
Quote:
Originally Posted by _DreadNought_ View Post
First things first
Code:
                     foreach(Struct.NPC Npc in Constants.Npcs.Values)
                        {
                            if (Npc.Map == Hero.Map)
                            {
                                if (!Calc.CanSee(prev_x, prev_y, Npc.X, Npc.Y))
                                {
                                    if (Calc.CanSee(Hero.X, Hero.Y, Npc.X, Npc.Y))
                                    {
                                        Client.Send((Byte[])new Structures.NpcSpawnPacket(Npc));
                                    }
                                }
                            }
                        }
YOU NEED A SCREEN SYSTEM KINISHI <3

That's horrible putting that everywhere "if can see npc, spawn, etc etc" needs to be one line. Client.screen.Refresh();
Ya i know i was just making sure i got the packet right and i did thats my next step after i get mobs spawned
07/29/2011 03:01 .Kinshi#52
Quote:
Originally Posted by t_dubble_uu View Post
Here is the the ping packet and function and jump

In Packets/delegates.cs add
Code:
{ 1009, Handles.ItemPing.Handle },
in the Packets/Handles folder add a new file "ItemPing.cs"
Code:
public class ItemPing
    {
        public unsafe static void Handle(Byte* Data, KinSocket.Connection Client)
        {
            int Subtype = Data[12];
            switch (Subtype)
            {
                #region Reply to Ping / 27
                case 27://Reply to ping
                    {
                        Client.Send(Data);
                        break;
                    }
                #endregion
            }           
        }
    }
in Packets/handlers/generaldata.cs add
Code:
case Structures.DataPacket.DataTypes.Jump:
                    {
                        ushort new_X = Data[8];
                        ushort new_Y = Data[10];
                        int Mapid = (int)Hero.Map;
                        //check map location here
                        ushort prev_x = Hero.X;
                        ushort prev_y = Hero.Y;
                        Hero.X = new_X;
                        Hero.Y = new_Y;

                        Packet->dwParam = Hero.Map;
                        Packet->wParam1 = Hero.X;
                        Packet->wParam2 = Hero.Y;
                        Packet->DataType = Structures.DataPacket.DataTypes.Jump;
                        Packet->wParam0 = prev_x;
                        Packet->wParam1 = prev_y;
                        Client.Send(Packet);
                        foreach(Struct.NPC Npc in Constants.Npcs.Values)
                        {
                            if (Npc.Map == Hero.Map)
                            {
                                if (!Calc.CanSee(prev_x, prev_y, Npc.X, Npc.Y))
                                {
                                    if (Calc.CanSee(Hero.X, Hero.Y, Npc.X, Npc.Y))
                                    {
                                        Client.Send((Byte[])new Structures.NpcSpawnPacket(Npc));
                                    }
                                }
                            }
                        }
                        break;
                    }
Yay glad to see people are working on it :D

Quote:
Originally Posted by _DreadNought_ View Post
First things first
Code:
                     foreach(Struct.NPC Npc in Constants.Npcs.Values)
                        {
                            if (Npc.Map == Hero.Map)
                            {
                                if (!Calc.CanSee(prev_x, prev_y, Npc.X, Npc.Y))
                                {
                                    if (Calc.CanSee(Hero.X, Hero.Y, Npc.X, Npc.Y))
                                    {
                                        Client.Send((Byte[])new Structures.NpcSpawnPacket(Npc));
                                    }
                                }
                            }
                        }
YOU NEED A SCREEN SYSTEM KINISHI <3

That's horrible putting that everywhere "if can see npc, spawn, etc etc" needs to be one line. Client.screen.Refresh();
Haha yes I know, I'm trying out various methods till I find one I like :P
07/29/2011 08:52 -Shunsui-#53
dude this source sucks, it has no features... Wack RELEASE!
07/29/2011 08:57 BaussHacker#54
Quote:
Originally Posted by -Shunsui- View Post
dude this source sucks, it has no features... Wack RELEASE!
I can smell the sarcasm. :rolleyes:
07/29/2011 15:50 t_dubble_uu#55
Quote:
Originally Posted by -Shunsui- View Post
dude this source sucks, it has no features... Wack RELEASE!
Then get ur lazy ass up and make ur own cause i dont see u contributing anything!!! Dont put down anyones work and learn to read "Server Base"!!!

And i got the jump cords wrong here are the correct cords
Code:
ushort new_X = *((ushort*)(Data + 8));
ushort new_Y = *((ushort*)(Data + 10));
Im not used to working with unsafe coding
07/29/2011 17:18 -Shunsui-#56
Quote:
Originally Posted by t_dubble_uu View Post
Then get ur lazy ass up and make ur own cause i dont see u contributing anything!!! Dont put down anyones work and learn to read "Server Base"!!!

And i got the jump cords wrong here are the correct cords
Code:
ushort new_X = *((ushort*)(Data + 8));
ushort new_Y = *((ushort*)(Data + 10));
Im not used to working with unsafe coding
Lol, i was jooking man. im Kinshi's partner,
07/29/2011 19:07 .Kinshi#57
Quote:
Originally Posted by -Shunsui- View Post
Lol, i was jooking man. im Kinshi's partner,
Life partner that is.
07/29/2011 19:11 BaussHacker#58
Quote:
Originally Posted by .Kinshi View Post
Life partner that is.
Can I be your sex partner?
07/29/2011 19:25 .Kinshi#59
Quote:
Originally Posted by BaussHacker View Post
Can I be your sex partner?
Why the fuck not? :P
07/29/2011 19:31 BaussHacker#60
Quote:
Originally Posted by .Kinshi View Post
Why the fuck not? :P
:cool: