[Release] DisCity NPCs (CoEmu v2)

08/25/2009 22:40 12tails#1
here are the npcs to dis city... you will have to make the other 2 NPCs because in CoEmu databse come only with the first SolarSaint...

if have some bug post please i'm developing it yet!

Code:
            case 3215:
                    {
                        if (LinkBack == 0)
                        {
                            Text("Our ancestor exerted their utmost efforts and defeated the demons. Since", CSocket);
                            Text("then the world has been kept in peace forhundreds of years. Now the", CSocket);
                            Text("demons have come back and the world is getting into turbulence again.", CSocket);
                            Link("Could you tell me more?", 3, CSocket);
                            Link("I am here to drive away the evils", 1, CSocket);
                            Link("I'd better leave", 255, CSocket);
                            Face(30, CSocket);
                            End(CSocket); ;
                        }
                        else if (LinkBack == 1)
                        {
                            if (CSocket.Client.DisCityOn == 0)
                            {
                                Text("I'm glad to see that you are such a knightly person. Please come next time.", CSocket);
                                Link("Ok.", 2, CSocket);
                                Face(30, CSocket);
                                End(CSocket);
                            }
                            else if (CSocket.Client.DisCityOn == 1)
                            {
                                if (CSocket.Client.Level >= 110)
                                {
                                    Teleport(2021, 291, 475, 0, CSocket);
                                }
                                else
                                {
                                    Text("Sorry, you are to week to fight thoose monsters, go get level 110 and talk to me latter", CSocket);
                                    Link("Okay, I will!", 255, CSocket);
                                    Face(30, CSocket);
                                    End(CSocket);
                                }
                            }
                        }
                        else if (LinkBack == 2)
                        {
                            CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Find SolarSaint to take the quest from 20:00 to 20:05 every Mon and Wed, from 12:00 to 12:05 every Tues and Thur", Struct.ChatType.Top));
                            CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "You may get Exp. of half of ExpBall as reward as log as you enter the Dis City", Struct.ChatType.Top));
                        }
                        else if (LinkBack == 3)
                        {
                            {
                                Text("The decisive battle between human and demon broke out here. The", CSocket);
                                Text("ferocious battle lasted for seven days andnights. Countless heroes lost their", CSocket);
                                Text("lives. And the justise won. Afterwards we can live in peace for hundreds of", CSocket);
                                Text("years.", CSocket);
                                Link("And then?", 4, CSocket);
                                Face(30, CSocket);
                                End(CSocket); ;
                            }
                        }
                        else if (LinkBack == 4)
                        {
                            {
                                Text("UltimatePluto, leader of the demons sworn to take revenge in one thousand", CSocket);
                                Text("years before he managed to run away. Toprevent the demons coming back, I", CSocket);
                                Text("have been scouting their land cautiously. Yesterday I found something", CSocket);
                                Text("unwanted.It seems that Ultimate Pluto has come round to endanger humas", CSocket);
                                Text("again.", CSocket);
                                Link("What should we do?", 5, CSocket);
                                Face(30, CSocket);
                                End(CSocket); ;
                            }
                        }
                        else if (LinkBack == 5)
                        {
                            {
                                Text("Fortunately UltimatePluto is still unfledged. He must resort to a Battle", CSocket);
                                Text("Formation for the moment. So I am about to organize an army too infiltrate his", CSocket);
                                Text("land and destroy his formation before he becomes stronger.", CSocket);
                                Link("I'll join in you.", 1, CSocket);
                                Link("I'd like to know more.", 6, CSocket);
                                Link("Sigh, I'm helpless.", 255, CSocket);
                                Face(30, CSocket);
                                End(CSocket); ;
                            }
                        }
                        else if (LinkBack == 6)
                        {
                            {
                                Text("You must kill UltimatePluto rapidly to get DarkHorn so that I can use it to", CSocket);
                                Text("disable the formation. Before you can do that, you must break into HellGate,", CSocket);
                                Text("enter the HellHall, and fight through the HellCloster. Countless ferocious", CSocket);
                                Text("demonsare watching those strongholds. I'll give you some strategies on", CSocket);
                                Text("breaking through those fortresses if you like.", CSocket);
                                Link("I want to know HellGate.", 7, CSocket);
                                Link("I want to know HellHall", 8, CSocket);
                                Link("I want to know HellCloister", 9, CSocket);
                                Link("I want to know BattleFormation", 10, CSocket);
                                Link("Thanks. I know how to do", 255, CSocket);
                                Face(30, CSocket);
                                End(CSocket); ;
                            }
                        }
                        else if (LinkBack == 7)
                        {
                            Text("HellGate is shielded from poisonous fog, so you can't approach it. But", CSocket);
                            Text("demons do not fear the gas. They may turninto SoulStones after they die. If", CSocket);
                            Text("you get five stones for me, I'll help you break through the gate. To protect", CSocket);
                            Text("the unrelated persons, I'll send the others back as soon as the first 60", CSocket);
                            Text("persons pass through the gate", CSocket);
                            Link("Thank you.", 255, CSocket);
                            Link("I'd like to know more.", 6, CSocket);
                            Face(30, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 8)
                        {
                            Text("HellHall is the very spot where the demons swear their oaths of allegiance to", CSocket);
                            Text("UltimatePluto. Everybody must do his best to make a way out. Due to limited", CSocket);
                            Text("time, I can lead only 30 persons to HellCloister", CSocket);
                            Link("Thank you.", 255, CSocket);
                            Link("I'd like to know more.", 6, CSocket);
                            Face(30, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 9)
                        {
                            Text("You will be divided into two groups to attack from the left and the right flank of", CSocket);
                            Text("HellCloister. Kill the Wraithas many as you can, because you can't reach", CSocket);
                            Text("BattleFormation until the amount of Wraith is decreased to a certain level.", CSocket);
                            Link("Thank you.", 255, CSocket);
                            Link("I'd like to know more.", 6, CSocket);
                            Face(30, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 10)
                        {
                            Text("BattleFormation is protected by Syrens. After they are killed out,", CSocket);
                            Text("UltimatePluto will appear. Make the besteffort to kill him, get his DarkHorn", CSocket);
                            Text("and give it to me. I can disable the BattleFormation with it. Then I'll sendyou", CSocket);
                            Text("back. But if you fails to do it, we have to retreat and wait for another opportunity", CSocket);
                            Link("Thank you.", 255, CSocket);
                            Link("I'd like to know more.", 6, CSocket);
                            Face(30, CSocket);
                            End(CSocket);
                        }
                        break;
                    }
                case 3298:
                    {
                        int NPlayer = 0;
                        if (LinkBack == 0)
                        {
                            Text("With these SoulStones I can help you enter the HellGate shielded from poisonous fogs. Are you ready?", CSocket);
                            Link("I'm Ready.", 1, CSocket);
                            Link("Wait a moment.", 255, CSocket);
                            Face(30, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            if (HasItem(723085, 5, CSocket))
                            {
                                if (NPlayer == 0)
                                {
                                    Teleport(2022, 220, 340, 0, CSocket);
                                    DeleteItem(723085, 5, CSocket);
                                    NPlayer += 1;
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "The Knighter " + CSocket.Client.Name + " has through the HellGate and have entered in the HellHall!", Struct.ChatType.Center), 0);
                                }
                                else if (NPlayer >= 1)
                                {
                                    Teleport(2022, 220, 340, 0, CSocket);
                                    DeleteItem(723085, 5, CSocket);
                                    NPlayer += 1;
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "Nš " + NPlayer + " Knight " + CSocket.Client.Name + " has through the HellGate and have entered in the HellHall!", Struct.ChatType.Top), 0);
                                }
                            }
                            else
                            {
                                Text("Sorry you don't have 5 SoulStones", CSocket);
                                Link("Oh sorrry, will got them!", 255, CSocket);
                                Face(100, CSocket);
                                End(CSocket);
                            }
                        }
                        break;
                    }
                case 3299:
                    {
                        int NPlayer2 = 0;
                        if (LinkBack == 0)
                        {
                            if (CSocket.Client.DisCityMobs < 1301)
                            {
                                Text("You'll pass if you kill 1300 monsters in HellHall. Hurry up! Only 30 persons can geet to HellCloister with me.", CSocket);
                                Link("I see.", 255, CSocket);
                                Face(100, CSocket);
                                End(CSocket);
                            }
                            if (CSocket.Client.DisCityMobs == 1300)
                            {
                                Text("You've killed the 1300 monsters, and you can pass to the HellCloister. Hurry up!", CSocket);
                                Link("Yay!", 1, CSocket);
                                Face(100, CSocket);
                                End(CSocket);
                            }
                        }
                        else if (LinkBack == 1)
                        {
                            if (NPlayer2 == 0)
                            {
                                Teleport(2023, 297, 649, 0, CSocket);
                                NPlayer2 += 1;
                                ConquerPacket.ToServer(ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "The Knighter " + CSocket.Client.Name + " has through the HellHall and have entered in the HellCloister!", Struct.ChatType.Center), 0);
                            }
                            else if (NPlayer2 > 1)
                            {
                                Teleport(2023, 297, 649, 0, CSocket);
                                NPlayer2 += 1;
                                ConquerPacket.ToServer(ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "Nš " + NPlayer2 + " Knight " + CSocket.Client.Name + " has through the HellHall and have entered in the HellCloister!", Struct.ChatType.Center), 0);
                                CSocket.Send(ConquerPacket.Chat(0, "SYSTEM", CSocket.Client.Name, "Wait unitill get 10 players here and back again to get to UltimatePluto's Hall!", Struct.ChatType.Top));
                            }
                        }
                        break;
                    }
                case 3300:
                    {
                        int NPlayer2 = 0;
                        if (LinkBack == 0)
                        {
                            Text("Hello! if have more than 10 players in the HellCloister i can send all of them to the UltimatePluto's place!", CSocket);
                            Link("We are here!", 1, CSocket);
                            Face(30, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            if (NPlayer2 >= 10)
                            {
                                Teleport(2024, 151, 284, 0, CSocket);
                                ConquerPacket.ToServer(ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "The Knighter " + CSocket.Client.Name + " has through the HellCloister and passed to the last stage, and are going kill UltimatePluto! Hurry up all!", Struct.ChatType.Center), 0);
                            }
                            else
                            {
                                Text("Sorry do not have 10 players yet!", CSocket);
                                Link("Oh, i will wait!", 255, CSocket);
                                Face(100, CSocket);
                                End(CSocket);
                            }
                        }
                        break;
                    }
Edit:

forgot code to start solarsaint

Code:
case "dison":
                            {
                                if (CSocket.Client.isGM || CSocket.Client.isPM)
                                {
                                    foreach (KeyValuePair<int, ClientSocket> Clients in Nano.ClientPool)
                                    {
                                        CSocket.Client.DisCityOn = 1;
                                        ConquerPacket.ToServer(ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "The Dis City quest has been started! Run to ApeMountain and find SolarSaint(530,482)!", Struct.ChatType.Top), 0);
                                    }
                                }
                                break;
                            }
                        case "disoff":
                            {
                                if (CSocket.Client.isGM || CSocket.Client.isPM)
                                {
                                    foreach (KeyValuePair<int, ClientSocket> Clients in Nano.ClientPool)
                                    {
                                        CSocket.Client.DisCityOn = 0;
                                        ConquerPacket.ToServer(ConquerPacket.Chat(0, "SYSTEM", "ALLUSERS", "The entrance of Dis City quest now is blocked! Who don't get in try your luck next time!", Struct.ChatType.Top), 0);
                                    }
                                }
                                break;
                            }
08/25/2009 23:03 samehvan#2
ty , may i use ur script ?? coz i bit looser on it , getting bored very fast
08/25/2009 23:10 12tails#3
haha...

of course.... its boring stay coding all the time xD

but i code when i can and i'm learning .... i.ve coded many npcs... but i wanna ask you ...

where i need to code the guild war?

i know i need to code the gates and the pole etc etc...

and i wanna to know how to make the players in the dis map 3 get to dis map 4 (Pluto's hall) when have 10 or more players... if u can tell me ... tkx ^^
08/25/2009 23:46 samehvan#4
Eh , i had them scripted already ,forgot i do :p

Code:
#region Solar Saint
                case 3215://Enter Stage1
                    {
                        if (LinkBack == 0)
                        {
                            Text("Our ancestors exerted their utmost efforts and defeated the demons.", CSocket);
                            Text("\n Since then the world has been kept in peace for", CSocket);
                            Text("\n hundreds of years. Now the demons have come back and the world is getting into turbulence again.", CSocket);
                            Link("Would you tell me more?", 1, CSocket);
                            Link("I am here to drive away the evils!", 2, CSocket);
                            Link("I`d better leave.", 255, CSocket);
                            Face(89, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            Text("The decisive battle between human and demon broke out here.", CSocket);
                            Text("\n The ferocious battle lasted for seven days and.", CSocket);
                            Text("\n nights. Countless heroes lost their lives. And the justise won.",CSocket);
                            Text("\n Afterwards we can live in peace for hundreds of years.", CSocket);
                            Link("And then?", 3,CSocket);
                            Link("Long story bye", 255, CSocket);
                            Face(89, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 2)
                        {
                            if (Nano.DisCityTime)
                            {
                                Teleport(2021, 190, 340, 0, CSocket);
                                GiveExpBall(33, CSocket);
                            }
                            else
                            {
                                Text("I`m glad to see that you are such a knightly person.", CSocket);
                                Text("\n but it's not the right time, please come here at the r8 time.", CSocket);
                                Link("Ok,i'll come back at then", 255, CSocket);
                                Face(89, CSocket);
                                End(CSocket);
                            }
                        }
                        else if (LinkBack == 3)
                        {
                            Text("UltimatePluto, leader of the demons sworn to take revenge in one thousand years before he managed to run away. To",CSocket);
                            Text("\n prevent the demons coming back, I have been scouting their land cautiously. Yesterday I found something unwanted.",CSocket);
                            Text("\n It seems that UltimatePluto has come round to endanger humans again.",CSocket);
                            Link("What should we do?", 4,CSocket);
                            Link("I`d better leave.", 255, CSocket);
                            Face(89, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 4)
                        {
                            Text("Fortunately UltimatePluto is still unfledged. He must resort to a Battle Formation for the moment. So I am about",CSocket);
                            Text("to organize an army to infiltrate his land and destroy his formation before he becomes stronger.",CSocket);
                            Link("I`ll join you.", 2,CSocket);
                            Link("Sigh, I`m helpless.", 255,CSocket);
                            Face(89, CSocket);
                            End(CSocket);
                        }
                        break;
                    }
                case 3213://To stage2
                    {
                        if (LinkBack == 0)
                        {
                            Text("Hello hero so did u collect the rquired souls?", CSocket);
                            Link("Yes,here you are", 1, CSocket);
                            Link("No,i'll be back", 255, CSocket);
                            Face(89, CSocket);
                            End(CSocket);
                        }
                        else if (LinkBack == 1)
                        {
                            if (HasItem(723085, 5, CSocket))
                            {
                                DeleteItem(723085, 5, CSocket);
                                Teleport(2022, 240, 340, 0, CSocket);
                                GiveExpBall(66, CSocket);
                            }
                            else
                            {
                                Text("Sweety you have to collect at least 5 Soul Stones,try harder", CSocket);
                                Link("Ok,i'll try my best", 255, CSocket);
                                Face(89, CSocket);
                                End(CSocket);
                            }
                        }

                        break;
                    }
                case 3214://ToStage3
                    {
                        if (LinkBack == 0)
                        {
                            short Required = 600; byte Class = (byte)CSocket.Client.Class;
                            if (Class < 16) Required = 800;
                            else if (Class > 19 && Class < 26) Required = 900;
                            else if (Class > 39 && Class < 46) Required = 1300;
                            else if (Class > 49 && Class < 56) Required = 800;
                            else if (Class > 139 && Class < 146) Required = 1000;
                            if (CSocket.Client.DisCityMobs >= Required)
                            {
                                Text("Great my hero u did a great fight there,choose your formation map", CSocket);
                                Link("Right", 1, CSocket);
                                Link("Left", 2, CSocket);
                                Face(89, CSocket);
                                End(CSocket);
                            }
                            else
                            {
                                Text("Ooh , tierd so fast ?!,get your ass back to the battle ", CSocket);
                                Text("\n you still need to kill " + (Required - CSocket.Client.DisCityMobs) + " more monsters", CSocket);
                                Link("kk, i'll go now master", 255, CSocket);
                                Face(89, CSocket);
                                End(CSocket);
                            }
                        }
                        else if (LinkBack == 1)
                        {
                            if (Nano.PlayersOnDisCity3 > 8)
                                TeleportAll(2021, 1020, 565, 565);
                            else if (Nano.PlayersOnDisCity3 > 15)
                                TeleportAll(2023, 2024, 150, 290);
                            Teleport(2023, 300, 660, 0, CSocket); Nano.PlayersOnDisCity3++;
                            GiveExpBall(100, CSocket);
                            
                        }
                        break;
                    }
                #endregion
and u will need this void also to give exp to players per stage

Code:
public static void GiveExpBall(short PerCent,ClientSocket CSocket)
        {
            int ExpGain = (int)Math.Floor(600000 * (1 + ((CSocket.Client.Level - 1) * 0.4)));
            ExpGain =(ExpGain* PerCent) / 100;
            Calculation.ExpAdd(CSocket, (ulong)ExpGain, false);
        }
now to get this work there are somethings to do

1- add a new variable at Character.cs called

Code:
public short DisCityMobs = 0;
2- add a new bool variable at Nano.cs called
Code:
public short DisCityMobs = 0;
3-i guess u already have the globaltimer ,r8??
if not then u will need to figure a way to calac the DisCity time
if you do have it then add at the end of it's delegate the next code

Code:
#region Check Events
                //Saturday 20:30 to 21:10 Weekly PK war http://co.91.com/guide/quests/pkwar.shtml
                //Class PK war http://co.91.com/guide/quests/propkwar.shtml
                DateTime TimeNow = DateTime.Now; string Hours = TimeNow.TimeOfDay.ToString();
                switch (TimeNow.DayOfWeek.ToString())
                {
                    case "Saturday":
                        {
                            if (Hours.Remove(5) == "20:30") WeeklyPkWar = true;
                            else if (Hours.Remove(5) == "21:10")
                            {
                                WeeklyPkWar = false;
                            }
                            break;
                        }
                    case "Sunday":
                        {
                            if (Hours.Remove(5) == "20:00") PKTournament = true;
                            else if (Hours.Remove(5) == "20:59") PKTournament = false;
                            break;
                        }
                    case "Monday":
                        {
                            if (Hours.Remove(5) == "14:00" || Hours.Remove(5) == "22:00") ClassPkWar = 10;
                            else if (Hours.Remove(5) == "14:30" || Hours.Remove(5) == "22:30") ClassPkWar = 0;
                            break;
                        }
                    case "Tuesday":
                        {
                            if (Hours.Remove(5) == "14:00" || Hours.Remove(5) == "22:00") ClassPkWar = 20;
                            else if (Hours.Remove(5) == "14:30" || Hours.Remove(5) == "22:30") ClassPkWar = 0;
                            if (!DisCityTime)
                            {
                                if (Hours.Remove(4) == "8:55" || Hours.Remove(5) == "20:55")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "5 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
                                    
                                }
                                else if (Hours.Remove(4) == "8:56" || Hours.Remove(5) == "20:56")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "4 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);

                                }
                                else if (Hours.Remove(4) == "8:57" || Hours.Remove(5) == "20:57")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "3 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);

                                }
                                else if (Hours.Remove(4) == "8:58" || Hours.Remove(5) == "20:58")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "Only 2 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);

                                }
                                else if (Hours.Remove(4) == "8:59" || Hours.Remove(5) == "20:59")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "Only 1 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);

                                }
                                else if (Hours.Remove(4) == "9:00" || Hours.Remove(5) == "21:00")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "DisCity quest starts now ,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
                                    DisCityTime = true;
                                }
                                else if (Hours.Remove(4) == "9:59" || Hours.Remove(5) == "21:59")
                                {
                                    DisCityTime = false;
                                }
                            }
                            break;
                        }
                    case "Wednesday":
                        {
                            if (Hours.Remove(5) == "14:00" || Hours.Remove(5) == "22:00") ClassPkWar = 40;
                            else if (Hours.Remove(5) == "14:30" || Hours.Remove(5) == "22:30") ClassPkWar = 0;
                            break;
                        }
                    case "Thursday":
                        {
                            if (Hours.Remove(5) == "14:00" || Hours.Remove(5) == "22:00") ClassPkWar = 130;
                            else if (Hours.Remove(5) == "14:30" || Hours.Remove(5) == "22:30") ClassPkWar = 0;
                            if (!DisCityTime)
                            {
                                if (Hours.Remove(4) == "8:55" || Hours.Remove(5) == "20:55")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "5 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);

                                }
                                else if (Hours.Remove(4) == "8:56" || Hours.Remove(5) == "20:56")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "4 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);

                                }
                                else if (Hours.Remove(4) == "8:57" || Hours.Remove(5) == "20:57")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "3 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);

                                }
                                else if (Hours.Remove(4) == "8:58" || Hours.Remove(5) == "20:58")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "Only 2 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);

                                }
                                else if (Hours.Remove(4) == "8:59" || Hours.Remove(5) == "20:59")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "Only 1 minuts left for DisCity,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);

                                }
                                else if (Hours.Remove(4) == "9:00" || Hours.Remove(5) == "21:00")
                                {
                                    ConquerPacket.ToServer(ConquerPacket.Chat(0, "System", "ALLUSERS", "DisCity quest starts now ,Find Solar Saint at Ape City to join the quest", Struct.ChatType.Top), 0);
                                    DisCityTime = true;
                                }
                                else if (Hours.Remove(4) == "9:59" || Hours.Remove(5) == "21:59")
                                {
                                    DisCityTime = false;
                                }
                            }
                            break;
                        }
                    case "Friday":
                        {
                            if (Hours.Remove(5) == "14:00" || Hours.Remove(5) == "22:00") ClassPkWar = 50;
                            else if (Hours.Remove(5) == "14:30" || Hours.Remove(5) == "22:30") ClassPkWar = 0;
                            break;
                        }
                }
                #endregion
of course u may need to change times as u want

4- find
Code:
AttackedMob.Die(CSocket.Client.ID);
r8 after it add

Code:
if ((int)CSocket.Client.Map == 2022)
                {
                    if (AttackedMob.Info.Name == "HellTroll") CSocket.Client.DisCityMobs += 3;
                    else CSocket.Client.DisCityMobs++;
                }
i guess done for now

we still need to teleport all players on stage 3 to stage 4 (working on it)
08/26/2009 00:01 12tails#5
i tryed to make whith the foreach player in the map but i got 1 error : /
i was trying to make pluto born... but need to make teleport to 4 stage firs... pluto comes latter! xD

if u make something working for teleport... and if u wan't to post.... i will be here trying for now ^^

but... don't need to doo the :

Code:
                if ((int)CSocket.Client.Map == 2022)
                {
                    if (AttackedMob.Info.Name == "HellTroll") CSocket.Client.DisCityMobs += 3;
                    else CSocket.Client.DisCityMobs++;
                }
for naga and the other 2 monster in the 2 nd stage??
08/26/2009 00:31 samehvan#6
here u are

add another variable at nano.cs called

Code:
public static byte PlayersOnDisCity3 = 0;
then replace the link back 1 for the 3rd SolarSaint case 2314 (MyID dunno urs) with the following
Code:
else if (LinkBack == 1)
                        {
                            if (Nano.PlayersOnDisCity3 > 8)
                                TeleportAll(2021, 1020, 565, 565);
                            else if (Nano.PlayersOnDisCity3 > 15)
                                TeleportAll(2023, 2024, 150, 290);
                            Teleport(2023, 300, 660, 0, CSocket); Nano.PlayersOnDisCity3++;
                            GiveExpBall(100, CSocket);
                            
                        }
then add this void at the end of NPcTalk.cs

Code:
public static void TeleportAll(short From, short To, short X, short Y)
        {
            foreach (KeyValuePair<int, ClientSocket> Clients in Nano.ClientPool)
            {
                ClientSocket CSocket = Clients.Value;
                if ((short)CSocket.Client.Map == From) Teleport(To, X, Y, 0, CSocket);
            }
        }
08/26/2009 00:36 12tails#7
i maked only 1 thing worng haha

thanks anyway samehvan ^^

This:

Code:
if ((short)CSocket.Client.Map == From) Teleport(To, X, Y, 0, CSocket);
i don't try to add using this xD... i was trying to send direct from strucs ( don't ask why because i dunno uahueahueahueahuea )
01/14/2010 23:34 ktamer#8
How would you define the DisCityOn so that errors don't come up? I normally can do it for other codes but I'm hopeless when it comes to commands.:p
01/15/2010 00:44 pro4never#9
DisCityOn sounds like a bool for me

public static bool DisCityOn = false;

Then again I didn't read through most of the coding here... but that should work.


As for spawning pluto, I can probably help you there. I made a npc spawnable by command earlier for CoEmu but I haven't converted it to a void yet (so it's really messy and not nicely coded)

Basically just take the spawn code already existing, either hard code or create a void using the variables you want to modify (mob type, map, x, y, number, etc) and link that in to the level 4 lab code so either

A: When players are teleported to lab 4 it spawns pluto
B: after a time has elapsed with players on lvl 4 it spawns
C: after x number of mobs on lvl 4 have been killed (counting ALL players, not per player) the mob is spawned.

If you have any confusion with how to spawn a monster, lemme know and I'll try to convert what I have done into a somewhat decent void so it can be put to use anywhere in the source (as spawning a monster based on conditions is not something you will need to do only this once lol)

As for the release: Looks like stuff should work fairly well so always nice to see someone helping and releasing stuff although there has been some work and releases for Dis before, this does look a bit better.

Good job!
01/15/2010 01:11 12tails#10
hehe .... this pot is old... now i know what i've made wrong to pluto doesn't work....

like this

Monster Pluto = new Monster();

i was thinking i need only do this to pluto work... but i was wrong... i've to make his life... pos... id too and them makle it spawn.... : D thanks anyway for this bro : P
01/15/2010 01:15 Fleaman#11
Good job 12tails.
This is very good job.
Thank you.
01/15/2010 01:52 ktamer#12
Quote:
Originally Posted by pro4never View Post
DisCityOn sounds like a bool for me

public static bool DisCityOn = false;

Then again I didn't read through most of the coding here... but that should work.
i was able to do it as

public short DisCityOn = 0;

thx for the direction, P4N
01/15/2010 01:55 pro4never#13
Yah that will work but there is really no reason to use a int of any length to store a true/false value (seeing as you are using 1/0)

Not a big deal at all.. it would just make alot more sense for the code to be using a bool for that sort of data


Quote:
Originally Posted by 12tails View Post
hehe .... this pot is old... now i know what i've made wrong to pluto doesn't work....

like this

Monster Pluto = new Monster();

i was thinking i need only do this to pluto work... but i was wrong... i've to make his life... pos... id too and them makle it spawn.... : D thanks anyway for this bro : P


Ahaha no, there's a bit more to that to spawning a new monster

You need to set all the info for the monster, add it to the monster thread, display the spawn command to the player and possibly add it to another thread to handle attacking/moving.

I'll probably write a void for monster spawning later but right now I'm kinda stuck on random portals via a database... god I hate dictionaries.

I'll release the monster void if/when I finish it.
01/15/2010 02:45 .Ryu#14
Thanks 12tails =P
05/04/2010 19:41 Antonionm#15
Who can help me about NPc for discity please add me on [Only registered and activated users can see links. Click Here To Register...]