Register for your free account! | Forgot your password?

You last visited: Today at 16:08

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release]My source...

Discussion on [Release]My source... within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 05/13/2010, 21:03   #76
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Did you rebuild the NpcDialog project? Right click on the project in C# -> Solution explorer and hit Rebuild project. It should work fine.
-impulse- is offline  
Old 05/13/2010, 21:15   #77
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Ah thanks.
MonstersAbroad is offline  
Old 05/13/2010, 21:17   #78
 
gerble93's Avatar
 
elite*gold: 40
Join Date: Sep 2006
Posts: 1,890
Received Thanks: 805
Quote:
Originally Posted by MonstersAbroad View Post
What is wrong with this NPC ?
Code:
#region Leave market
                case 11181:
                    {
                        switch (npcRequest.OptionID)
                        {
                            case 0:
                                {
                                    dialog.Text("Would you like to leave the Market ? It's free!");
                                    dialog.Option("Yes.", 1);
                                    dialog.Option("No.", 255);
                                    dialog.Send();
                                    break;
                                }

                            case 1:
                                {
                                    if (client.Entity.PreviousMapID == 1002) //Twincity
                                    {
                                        client.Entity.Teleport(1002, 400, 400);
                                    }
                                    if (client.Entity.PreviousMapID == 1020) // Ape mountian
                                    {
                                        client.Entity.Teleport(1020, 567, 576);
                                    }
                                    if (client.Entity.PreviousMapID == 1000) // Desert City
                                    {
                                        client.Entity.Teleport(1000, 500, 650);
                                    }
                                    if (client.Entity.PreviousMapID == 1001) //Mystic castle
                                    {
                                        client.Entity.Teleport(1001, 316, 642);
                                    }
                                    if (client.Entity.PreviousMapID == 1015) //Bird Island
                                    {
                                        client.Entity.Teleport(1015, 723, 573);
                                    }
                                    if (client.Entity.PreviousMapID == 1011) //Phoenix Castle
                                    {
                                        client.Entity.Teleport(1011, 190, 271);
                                    }
                                    else
                                    {
                                        client.Entity.Teleport(1002, 400, 400);
                                    }
                                }
                                break;
                        }
                        break;
                    }


                #endregion
EDIT:

Every npc I add does not work.

This could work better....

Code:
case 1: // NPC ID -- Yours may be different

                                ushort Map, X, Y; // Define 3 Variables as UInt16

                                switch (client.Entity.PreviousMapID) // Search through Previous Map
                                {

                                    default: // UnDefined Map
                                    case 1002: // Twin City
                                        Map = 1020; X = 567; Y = 576;
                                        break;

                                    case 1020: // Ape Mountain
                                        Map = 1002; X = 400; Y = 400;
                                        break;

                                    case 1000: // Desert City
                                        Map = 1000; X = 500; Y = 650;
                                        break;

                                    case 1001: // Mystic Castle
                                        Map = 1001; X = 316; Y = 642;
                                        break;

                                    case 1015: // Bird Island
                                        Map = 1015; X = 723; Y = 573;
                                        break;

                                    case 1011: // Phoenix Castle
                                        Map = 1011; X = 190; Y = 271;
                                        break;
                                }

                                client.Entity.Teleport(Map, X, Y); // Teleport the Entity to the defined position
                                break;
Remember to Build Project (right click..Rebuild)
gerble93 is offline  
Old 05/13/2010, 21:26   #79
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Ok thanks another question

Say I had this packet and I needed to add it where would I add it and how would the packet format be ?
Code:
        public static COPacket Weather(Features.WeatherType Type, uint Intensity, uint Appearence, uint Direction)
        {
            byte[] Packet = new byte[8 + 20];
            COPacket P = new COPacket(Packet);
            P.WriteInt16((ushort)(Packet.Length - 8));
            P.WriteInt16((ushort)0x3f8);
            P.WriteInt32((byte)Type);
            P.WriteInt32(Intensity);
            P.WriteInt32(Direction);
            P.WriteInt32(Appearence);
            return P;
        }
Not Packets.cs :S
MonstersAbroad is offline  
Old 05/13/2010, 22:05   #80
 
BlueFlame11's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 116
Received Thanks: 12
Quote:
Originally Posted by MonstersAbroad View Post
Ok thanks another question

Say I had this packet and I needed to add it where would I add it and how would the packet format be ?
Code:
        public static COPacket Weather(Features.WeatherType Type, uint Intensity, uint Appearence, uint Direction)
        {
            byte[] Packet = new byte[8 + 20];
            COPacket P = new COPacket(Packet);
            P.WriteInt16((ushort)(Packet.Length - 8));
            P.WriteInt16((ushort)0x3f8);
            P.WriteInt32((byte)Type);
            P.WriteInt32(Intensity);
            P.WriteInt32(Direction);
            P.WriteInt32(Appearence);
            return P;
        }
Not Packets.cs :S
I think it goes in EntityTable.cs Or PacketHandler.cs
BlueFlame11 is offline  
Old 05/13/2010, 22:31   #81
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
ok so I got this errors marked in red:
Code:
#region WeatherPacket (1016)
                    case 0x3f8:
                        {
                            if (client.Action != 2)
                                return;
                            [COLOR="Red"][B]P[/B][/COLOR].WriteInt16((ushort)([B][COLOR="Red"]Packet[/COLOR][/B].Length - 8));
                            [COLOR="Red"][B]P[/B][/COLOR].WriteInt16((ushort)0x3f8);
                            [COLOR="Red"][B]P[/B][/COLOR].WriteInt32((byte)[COLOR="Red"][B]Type[/B][/COLOR]);
                            [COLOR="Red"][B]P[/B][/COLOR].WriteInt32([COLOR="Red"][B]Intensity[/B][/COLOR]);
                            [COLOR="Red"][B]P[/B][/COLOR].WriteInt32([COLOR="Red"][B]Direction[/B][/COLOR]);
                            [COLOR="Red"][B]P[/B][/COLOR].WriteInt32([COLOR="Red"][B]Appearence[/B][/COLOR]);
                            break;
                        }
                    #endregion
Sorry if it is nooby I am a NOOB at packets but am trying hard!
MonstersAbroad is offline  
Old 05/13/2010, 22:47   #82
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550

Command:
case "weather":
{
Weather weather = new Weather(true);
weather.WeatherType = Weather.Rain;
weather.Direction = 255;
weather.Send(client);
break;
}
-impulse- is offline  
Thanks
5 Users
Old 05/13/2010, 22:54   #83
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
THANKS!
MonstersAbroad is offline  
Old 05/13/2010, 23:00   #84
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Yep
-impulse- is offline  
Old 05/13/2010, 23:05   #85

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
I more or less had the same packet (didn't had the "type = 0x?" part) and I used this command:
Code:
case "weather":
                                        {
                                            Weather weather = new Weather(true);
                                            weather.WeatherType = uint.Parse(Data[1]);
                                            weather.Intensity = uint.Parse(Data[2]);
                                            weather.Appearance = uint.Parse(Data[3]);
                                            weather.Direction = uint.Parse(Data[4]);
                                            weather.Send(client);
                                            break;
                                        }
Kiyono is offline  
Thanks
2 Users
Old 05/13/2010, 23:14   #86
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Nice work!

P.S: I managed to make DMaps load fully.
MonstersAbroad is offline  
Old 05/13/2010, 23:20   #87
 
BlueFlame11's Avatar
 
elite*gold: 0
Join Date: Apr 2010
Posts: 116
Received Thanks: 12
Quote:
Originally Posted by -impulse- View Post

Command:
case "weather":
{
Weather weather = new Weather(true);
weather.WeatherType = Weather.Rain;
weather.Direction = 255;
weather.Send(client);
break;
}
Awesome thanks
BlueFlame11 is offline  
Old 05/14/2010, 15:53   #88


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Your source is very bulky, it could be streamlined a hell of alot.

I would imagine the memory usage is pretty high aswell, the entire packethandler is surrounded by a try catch, not something you want to be doing.

Its fairly unique, ill give you that.
Korvacs is offline  
Old 05/14/2010, 18:07   #89
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Jack,

Still bugless and very very stable.
MonstersAbroad is offline  
Old 05/14/2010, 19:42   #90


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Quote:
Originally Posted by MonstersAbroad View Post
Jack,

Still bugless and very very stable.
I never said it wasnt, theres just plenty of room for improvement.
Korvacs is offline  
Reply


Similar Threads Similar Threads
[RELEASE] [OPEN SOURCE] CE 5.5 Pointer to AutoIt Source-Code
02/13/2011 - AutoIt - 6 Replies
Habe heute erst gemerkt, dass es hier eine AutoIt Sektion gibt xD also poste ich mal mein Programm mit rein. Funktionsweise: 1. in CE Rechtsklick auf den Pointer und auf "Copy" klicken 2. in meinem Programm auf "Code generieren" klicken 3. In euer Scite gehen und einfügen Hier ist der Source Code vom Programm:
[Release]How To Make Tq Source Work + Working Source + Server ByBass + Commands
12/08/2008 - CO2 PServer Guides & Releases - 15 Replies
1: How To Make The Server Work In fact, before other people did not just let ACC now with hi EACC Columbia landing on the settlement of the issue, and the rest is our own how to improve the content of those interested can improve the next. MY MY set and the same. INI MAP INI files and MAP with the client-to-date coverage of the account. server.dat ! And then as long as the client will be able to modify server.dat! 127.0.0.1 192.168.0.1 192.168.1.1 IP。 Please do generally use...



All times are GMT +2. The time now is 16:08.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.