Register for your free account! | Forgot your password?

You last visited: Today at 10:36

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

Advertisement



[RELEASE]Conquer Emulator Source 5165

Discussion on [RELEASE]Conquer Emulator Source 5165 within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 07/30/2010, 17:04   #16
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
NPCDialog.cs cleaned abit and made the NPC's run faster,
Replace all your npcdialog.cs with this (Made warehouses work, and a few other npcs, added leave jail )
Code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using COEmulator.Game;

namespace COEmulator.PacketHandling
{
    public class NPCDialog
    {
        static string ReadString(byte[] Data)
        {
            string Name = "";
            for (int i = 14; i < 14 + Data[13]; i++)
                Name += Convert.ToChar(Data[i]);
            return Name;
        }
        static void Say(string Text, Main.GameClient GC)
        {
            GC.AddSend(Packets.NPCSay(Text));
        }
        static void Link(string Text, byte DialNR, Main.GameClient GC)
        {
            GC.AddSend(Packets.NPCLink(Text, DialNR));
        }
        static void End(ushort Face, Main.GameClient GC)
        {
            GC.AddSend(Packets.NPCSetFace(Face));
            GC.AddSend(Packets.NPCFinish());
        }
        static void Teleport(ushort Map, ushort X, ushort Y, Main.GameClient GC)
        {
            GC.MyChar.Teleport(Map, X, Y);
        }
        public static void Handle(Main.GameClient GC, byte[] Data, uint NPC, byte Control)
        {
            Random Rnd = new Random();
            try
            {
                if (Game.World.H_NPCs.Contains(NPC) || (NPC >= 6700 && NPC <= 6702) || (NPC == 12))
                    if (Control != 255)
                    {
                        Game.NPC N = (Game.NPC)Game.World.H_NPCs[NPC];
                        switch (NPC)
                        {
                            #region Leave TG
                            case 453001://Leave TG
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("Do you want to leave?", GC);
                                                Link("Yes.", 1, GC);
                                                Link("Yes.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                Game.Vector2 V = (Game.Vector2)Database.DefaultCoords[GC.MyChar.Loc.PreviousMap];
                                                Teleport(GC.MyChar.Loc.PreviousMap, V.X, V.Y, GC);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region LeaveJail
                            case 42:
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("Do you want to leave here?", GC);
                                                Link("Yeah.", 1, GC);
                                                Link("Just passing by.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (GC.MyChar.PKPoints <= 100)
                                                {
                                                    Teleport(1002, 400, 400, GC);
                                                }
                                                else
                                                {
                                                    Say("You must wait untill your PKPoints are below 100. Current PKPoints: " + GC.MyChar.PKPoints + ".", GC);
                                                    Link("Okay.", 255, GC);
                                                    End(N.Avatar, GC);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region LeaveGW
                            case 453002://Leave GW
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("Do you want to go back to TwinCity?", GC);
                                                Link("Yes please.", 1, GC);
                                                Link("I'll stay.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                Teleport(1002, 355, 337, GC);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Enter Jail
                            case 43:
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("What can I do for you?", GC);
                                                Link("Visit the jail.", 1, GC);
                                                Link("Just passing by.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                Say("Give me 1000 silver, I will teleport you there. If your PK points are 100+, you will be put into the jail.", GC);
                                                Link("I will pay", 2, GC);
                                                Link("I will stay here.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (GC.MyChar.Silvers >= 1000)
                                                {
                                                    GC.MyChar.Silvers -= 1000;
                                                    Teleport(6000, 100, 100, GC);
                                                }
                                                else
                                                {
                                                    Say("You do not have 1000 silvers.", GC);
                                                    Link("Ok.", 255, GC);
                                                    End(N.Avatar, GC);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Enter Arena
                            case 10021:
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("Do you want to enter the PKArena for an amount of 50 silvers?", GC);
                                                Link("Hell Yea.", 1, GC);
                                                Link("No Thanks.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (GC.MyChar.Silvers >= 50)
                                                {
                                                    GC.MyChar.Silvers -= 50;
                                                    Teleport(1005, 51, 71, GC);
                                                }
                                                else
                                                {
                                                    Say("You do not have enough silvers.", GC);
                                                    Link("I'll be back.", 255, GC);
                                                    End(N.Avatar, GC);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Enter GW
                            case 380://Enter GW
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("Do you want to enter the GuildWar?", GC);
                                                Link("Yeah.", 1, GC);
                                                Link("Not really.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                Teleport(1038, 350, 350, GC);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Enter TwinCity Mine
                            case 453006:
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("Do you want to visit the mine?", GC);
                                                Link("Yeah.", 1, GC);
                                                Link("No.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                Random EMine = new Random();
                                                int Nr = EMine.Next(1, 4);
                                                if (Nr == 1)
                                                {
                                                    Say("Answer the correct question to enter.", GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    Link("Pick Me.", 3, GC);
                                                    End(N.Avatar, GC);
                                                }
                                                if (Nr == 2)
                                                {
                                                    Say("Answer the correct question to enter.", GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    Link("Pick me.", 3, GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    End(N.Avatar, GC);
                                                }
                                                if (Nr == 3)
                                                {
                                                    Say("Answer the correct question to enter.", GC);
                                                    Link("Pick Me.", 2, GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    Link("Don't Pick Me.", 3, GC);
                                                    End(N.Avatar, GC);
                                                }
                                                if (Nr == 4)
                                                {
                                                    Say("Answer the correct question to enter.", GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    Link("Pick Me.", 3, GC);
                                                    Link("Don't Pick Me.", 2, GC);
                                                    End(N.Avatar, GC);
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                Say("You didn't pick the right one. Wonna try again?", GC);
                                                Link("Yeah.", 1, GC);
                                                Link("Nah.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 3:
                                            {
                                                Teleport(1028, 155, 95, GC);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Clear INV
                            case 453007:
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("I can clear your inventory for free.", GC);
                                                Link("Clear it.", 1, GC);
                                                Link("No thanks.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                foreach (Game.Item I in GC.MyChar.Inventory)
                                                    GC.AddSend(Packets.ItemPacket(I.UID, 0, 3));
                                                GC.MyChar.Inventory = new ArrayList(40);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Enter DesertCity
                            case 453008:
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("Want to enter Desert Island?", GC);
                                                Link("Yes.", 1, GC);
                                                Link("Not really.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                Teleport(1000, 973, 668, GC);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region WeaponSockets
                            case 453009:
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("Do you want to make sockets in your weapon for free?", GC);
                                                Link("Yea.", 1, GC);
                                                Link("No.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                Game.Item I = GC.MyChar.Equips.RightHand;
                                                if (I.ID != 0)
                                                {
                                                    if (I.Soc1 == COEmulator.Game.Item.Gem.NoSocket)
                                                    {
                                                        GC.MyChar.EquipStats(4, false);
                                                        I.Soc1 = COEmulator.Game.Item.Gem.EmptySocket;
                                                        GC.MyChar.Equips.Replace(4, I, GC.MyChar);
                                                        GC.MyChar.EquipStats(4, true);
                                                        Say("Here you are.", GC);
                                                        Link("Thanks.", 255, GC);
                                                        End(N.Avatar, GC);
                                                    }
                                                    else if (I.Soc2 == COEmulator.Game.Item.Gem.NoSocket)
                                                    {
                                                        GC.MyChar.EquipStats(4, false);
                                                        I.Soc2 = COEmulator.Game.Item.Gem.EmptySocket;
                                                        GC.MyChar.Equips.Replace(4, I, GC.MyChar);
                                                        GC.MyChar.EquipStats(4, true);
                                                        Say("Here you are.", GC);
                                                        Link("Thanks.", 255, GC);
                                                        End(N.Avatar, GC);
                                                    }
                                                    else
                                                    {
                                                        Say("Socketing failed.", GC);
                                                        Link("I see.", 255, GC);
                                                        End(N.Avatar, GC);
                                                    }
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Enter TG
                            case 453010:
                            case 453011:
                            case 453012:
                            case 453013:
                            case 453014:
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("I can send you into TG for 1000 silvers.", GC);
                                                Link("Send me in.", 1, GC);
                                                Link("Dont need.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (GC.MyChar.Silvers >= 1000)
                                                {
                                                    GC.MyChar.Silvers -= 1000;
                                                    Teleport(1039, 300, 300, GC);
                                                    Say("Welcome to the training ground's.", GC);
                                                    Link("Thanks.", 255, GC);
                                                    End(N.Avatar, GC);
                                                }
                                                else
                                                {
                                                    Say("You do not have enough silvers.", GC);
                                                    Link("I'll be back.", 255, GC);
                                                    End(N.Avatar, GC);
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }

                            #endregion

                            #region WuxenOven
                            case 453016:
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("What do you want?", GC);
                                                Link("Compose.", 1, GC);
                                                Link("Enchant.", 2, GC);
                                                Link("Bless.", 3, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                GC.AddSend(Packets.GeneralData(GC.MyChar.EntityID, 1, N.Loc.X, N.Loc.Y, 0x7e));
                                                break;
                                            }
                                        case 2:
                                            {
                                                GC.AddSend(Packets.GeneralData(GC.MyChar.EntityID, 0x443, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 116));
                                                break;
                                            }
                                        case 3:
                                            {
                                                Say("It will cost you 10 TortoiseGem's each Bless you want to add in your equipments.", GC);
                                                Say("The machine still needs to be done with repair, before I can start doing this again.", GC);
                                                Link("Okay", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            #region Warehouses
                            case 8:
                            case 10012:
                            case 10028:
                            case 10011:
                            case 10027:
                            case 44:
                            case 4101:
                                {
                                    GC.LocalMessage(2000, "You have successfull opened your warehouse.");
                                    GC.AddSend(Packets.GeneralData(GC.MyChar.EntityID, 4, N.Loc.X, N.Loc.Y, 0x7e));
                                    break;
                                }
                            #endregion

                            #region CPAdmin
                            case 453024:
                                {
                                    switch (Control)
                                    {
                                        case 0:
                                            {
                                                Say("I can exchange DB's to CPs", GC);
                                                Link("Take my DragonBall.", 1, GC);
                                                Link("Take my DragonBall Scroll", 2, GC);
                                                Link("Just passing by.", 255, GC);
                                                End(N.Avatar, GC);
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (GC.MyChar.InventoryContains(1088000, 1))
                                                {
                                                   Game.Item DB = null;
                                                   foreach (Game.Item I in GC.MyChar.Inventory)
                                                       if (I.ID == 1088000)
                                                       {DB = I; break;}
                                                    if (DB != null)
                                                    {
                                                        GC.MyChar.CPs += 215;
                                                        GC.MyChar.RemoveItem(DB);
                                                    }
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (GC.MyChar.InventoryContains(720028, 1))
                                                {
                                                   Game.Item DB = null;
                                                   foreach (Game.Item I in GC.MyChar.Inventory)
                                                       if (I.ID == 720028)
                                                       {DB = I; break;}
                                                    if (DB != null)
                                                    {
                                                        GC.MyChar.CPs += 2150;
                                                        GC.MyChar.RemoveItem(DB);
                                                    }
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }
                            #endregion

                            default:
                                {
                                    if (GC.MyChar.MyClient.AuthInfo.Status == "[PM]" || GC.MyChar.MyClient.AuthInfo.Status == "[GM]")
                                    {
                                        GC.LocalMessage(2000, "This NPC is not used. NPCID: " + NPC.ToString());
                                    }
                                    else
                                    {
                                        Say("Hello, I have no function for now.", GC);
                                        Link("OK.", 255, GC);
                                        if (N != null)
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        else
                                            GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    break;
                                }
                        }
                    }
            }
            catch (Exception Exc) { Console.WriteLine(Exc); }
        }
    }
}
Removed CheckWarehouse Password because I will code a decent one later on.
_DreadNought_ is offline  
Old 07/30/2010, 21:19   #17
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
Quote:
Originally Posted by grillmad View Post
@smythe
Cuz I always ends up gets flamed
And last time I actually did it.
Also with the unbco source, i did release it
Perhaps you released it, but I am certain it wasn't as good as you had written, or at least it wasn't as good as people expected.
Also, you do never get flamed without deserving to get flamed, I used to get flamed a lot, but not any more, and hell yes, I changed my attitude.
Basser is offline  
Old 07/30/2010, 23:02   #18
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by Basser View Post
Perhaps you released it, but I am certain it wasn't as good as you had written, or at least it wasn't as good as people expected.
Also, you do never get flamed without deserving to get flamed, I used to get flamed a lot, but not any more, and hell yes, I changed my attitude.
Well it was better, then the rest lotf source that been released
Fish* is offline  
Old 08/01/2010, 10:58   #19
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
Well grillmad I knew it, Your know with a 5018 Project, hope that lasts 1 week at least. Never put faith in grillmad that hes gonna make a decent source. E*Pvp full of noobs/leechers.
_DreadNought_ is offline  
Old 08/01/2010, 11:00   #20
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by Eliminationn View Post
E*Pvp full of noobs/leechers.
Irony at its finest.
Arcо is offline  
Thanks
3 Users
Old 08/01/2010, 20:04   #21
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by Eliminationn View Post
Well grillmad I knew it, Your know with a 5018 Project, hope that lasts 1 week at least. Never put faith in grillmad that hes gonna make a decent source. E*Pvp full of noobs/leechers.
lol. Im still working on this.
Is it illegal to work on more then 1 project?

btw. I haven't leeched anything
Fish* is offline  
Old 08/16/2010, 11:38   #22
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
Still working on this then? I will make that 2 weeks.
_DreadNought_ is offline  
Old 08/16/2010, 11:39   #23
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
I cant i lost all things on my pc lmao.
c#, c++, sources, clients, games.
I ****** my windows FTW.
lol, I got owned.
When I get all things again, I might do
Fish* is offline  
Old 08/31/2010, 15:11   #24
 
elite*gold: 0
Join Date: Oct 2008
Posts: 342
Received Thanks: 66
This project wont die. I join in.
µ~Xero~µ is offline  
Old 09/01/2010, 08:29   #25
 
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
It is dead long time ago :P
I lost all sources etc.
for about 2 weeks ago, cuz my pc crashed.
I even lost the one from my server, but I had an old backup =]
lol

Im trying to do a new
So far removed some things to recode lol
dowhatuwant is offline  
Old 09/01/2010, 13:27   #26
 
elite*gold: 0
Join Date: Oct 2008
Posts: 342
Received Thanks: 66
ight
µ~Xero~µ is offline  
Thanks
1 User
Old 09/01/2010, 13:53   #27
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
Ive got a copy of this source, I messed it up abit lol but I fixed few things n stuff

Fixed stamina bug, Re did the threading system (Thanks impulse's source)
Attached Files
File Type: rar COEmulator5165.rar (2.67 MB, 107 views)
_DreadNought_ is offline  
Thanks
2 Users
Old 09/01/2010, 17:16   #28
 
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
Dosnt matter now, cuz Im longer with the new.
Thanks anyway
dowhatuwant is offline  
Old 09/25/2010, 20:08   #29
 
elite*gold: 0
Join Date: Sep 2009
Posts: 10
Received Thanks: 0
thx so much
bowman5 is offline  
Old 11/22/2010, 19:29   #30
 
elite*gold: 0
Join Date: Jul 2009
Posts: 31
Received Thanks: 2
Thx For /ban & /jail command
MichaelJackso is offline  
Reply


Similar Threads Similar Threads
[Release] WarRock Emulator ServerFile Source
03/19/2012 - WarRock - 41 Replies
Hey Community, da ich sehr wenig, bzw inaktiv an den WarRock ServerFiles arbeite und ich sehe das noch immer keiner es geschafft hat einen WarRock Server, oder teilweise etwas davon zu programmieren, release ich hiermit die Basis meines WarRock Emulators. Meine allererste Version war in VB.Net, meine zweite in C#. Bei der 2. Version hatte ich sogut wie alle Funktionen in der Lobby funktionstüchtig. Da ich aber ein paar leichte Mängel in der Core des Servers entdeckte(aufgrund meiner...
drop cps for 5165 conquer-sx's source
06/01/2011 - CO2 PServer Guides & Releases - 10 Replies
first: open database alert config table add a column name is "AutoEmoney" second: open conquer-sx source go to Game/Mob.cs open that and find 44 row!
How to add Dynamic Maps(5165 Houses) in conquer-sx's source?
07/06/2010 - CO2 Private Server - 0 Replies
like my title ... I'm see the Arco's shared method ... but it don't work on... when i go home .... the client display
[RELEASE] My 5165 Source
02/09/2010 - CO2 PServer Guides & Releases - 4 Replies
Hello This is my 5165 source I added a few things but some things were already added, so credits to the people who added the things i didn't, xD Features: I hope you press thanks! Download HERE
[Release]Kindless CO Server Emulator Source
05/23/2009 - CO2 PServer Guides & Releases - 29 Replies
#Removed



All times are GMT +1. The time now is 10:36.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.