Register for your free account! | Forgot your password?

You last visited: Today at 10:45

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

Advertisement



[Release]DisCity NPCs (5165)

Discussion on [Release]DisCity NPCs (5165) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
[Release]DisCity NPCs (5165)

first lets define our variables

in Character.cs search for:
Code:
public Nobility Nobility;
then add these under it:
Code:
public bool DisCityON = false;
        public int DisCityMobs = 0;
now on to the npc's

SolarSaint:
Code:
#region SolarSaint
                            case 3233:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Our ancestor exerted their utmost efforts and defeated the demons. Since"));
                                        GC.AddSend(Packets.NPCSay("then the world has been kept in peace forhundreds of years. Now the"));
                                        GC.AddSend(Packets.NPCSay("demons have come back and the world is getting into turbulence again."));
                                        GC.AddSend(Packets.NPCLink("Could you tell me more?", 3));
                                        GC.AddSend(Packets.NPCLink("I am here to drive away the evils", 1));
                                        GC.AddSend(Packets.NPCLink("I'd better leave", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        if (GC.MyChar.DisCityON == false)
                                        {
                                            GC.AddSend(Packets.NPCSay("I'm glad to see that you are such a knightly person. Please come next time."));
                                            GC.AddSend(Packets.NPCLink("Ok.", 2));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else if (GC.MyChar.DisCityON == true)
                                        {
                                            if (GC.MyChar.Level >= 110)
                                            {
                                                GC.MyChar.Teleport(2021, 291, 475);
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("Sorry, you are to week to fight thoose monsters, go get level 110 and talk to me latter"));
                                                GC.AddSend(Packets.NPCLink("Okay, I will!", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                    }
                                    if (Control == 2)
                                    {
                                        Game.World.SendMsgToAll("SYSTEM", "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", 2011, 0);
                                        Game.World.SendMsgToAll("SYSTEM", "You may get Exp. of half of ExpBall as reward as long as you enter the Dis City", 2011, 0);
                                    }
                                    if (Control == 3)
                                    {
                                        GC.AddSend(Packets.NPCSay("The decisive battle between human and demon broke out here. The"));
                                        GC.AddSend(Packets.NPCSay("ferocious battle lasted for seven days andnights. Countless heroes lost their"));
                                        GC.AddSend(Packets.NPCSay("lives. And the justise won. Afterwards we can live in peace for hundreds of"));
                                        GC.AddSend(Packets.NPCSay("years."));
                                        GC.AddSend(Packets.NPCLink("And then?", 4));
                                        GC.AddSend(Packets.NPCLink("Sounds great", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 4)
                                    {
                                        GC.AddSend(Packets.NPCSay("UltimatePluto, leader of the demons sworn to take revenge in one thousand"));
                                        GC.AddSend(Packets.NPCSay("years before he managed to run away. Toprevent the demons coming back, I"));
                                        GC.AddSend(Packets.NPCSay("have been scouting their land cautiously. Yesterday I found something"));
                                        GC.AddSend(Packets.NPCSay("unwanted.It seems that Ultimate Pluto has come round to endanger humas"));
                                        GC.AddSend(Packets.NPCSay("again."));
                                        GC.AddSend(Packets.NPCLink("What should we do?", 5));
                                        GC.AddSend(Packets.NPCLink("Kool", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 5)
                                    {
                                        GC.AddSend(Packets.NPCSay("Fortunately UltimatePluto is still unfledged. He must resort to a Battle"));
                                        GC.AddSend(Packets.NPCSay("Formation for the moment. So I am about to organize an army too infiltrate his"));
                                        GC.AddSend(Packets.NPCSay("land and destroy his formation before he becomes stronger."));
                                        GC.AddSend(Packets.NPCLink("I'll join in you", 1));
                                        GC.AddSend(Packets.NPCLink("I'd like to know more", 6));
                                        GC.AddSend(Packets.NPCLink("Sigh, I'm helpless.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 6)
                                    {
                                        GC.AddSend(Packets.NPCSay("You must kill UltimatePluto rapidly to get DarkHorn so that I can use it to"));
                                        GC.AddSend(Packets.NPCSay("disable the formation. Before you can do that, you must break into HellGate,"));
                                        GC.AddSend(Packets.NPCSay("enter the HellHall, and fight through the HellCloster. Countless ferocious"));
                                        GC.AddSend(Packets.NPCSay("demonsare watching those strongholds. I'll give you some strategies on"));
                                        GC.AddSend(Packets.NPCSay("breaking through those fortresses if you like."));
                                        GC.AddSend(Packets.NPCLink("I want to know HellGate.", 7));
                                        GC.AddSend(Packets.NPCLink("I want to know HellHall", 8));
                                        GC.AddSend(Packets.NPCLink("I want to know HellCloister", 9));
                                        GC.AddSend(Packets.NPCLink("I want to know BattleFormation", 10));
                                        GC.AddSend(Packets.NPCLink("Thanks. I know how to do", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 7)
                                    {
                                        GC.AddSend(Packets.NPCSay("HellGate is shielded from poisonous fog, so you can't approach it. But"));
                                        GC.AddSend(Packets.NPCSay("demons do not fear the gas. They may turninto SoulStones after they die. If"));
                                        GC.AddSend(Packets.NPCSay("you get five stones for me, I'll help you break through the gate. To protect"));
                                        GC.AddSend(Packets.NPCSay("the unrelated persons, I'll send the others back as soon as the first 60"));
                                        GC.AddSend(Packets.NPCSay("persons pass through the gate"));
                                        GC.AddSend(Packets.NPCLink("I'd like to know more!", 6));
                                        GC.AddSend(Packets.NPCLink("Thank you", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 8)
                                    {
                                        GC.AddSend(Packets.NPCSay("HellHall is the very spot where the demons swear their oaths of allegiance to"));
                                        GC.AddSend(Packets.NPCSay("UltimatePluto. Everybody must do his best to make a way out. Due to limited"));
                                        GC.AddSend(Packets.NPCSay("time, I can lead only 30 persons to HellCloister"));
                                        GC.AddSend(Packets.NPCLink("I'd like to know more!", 6));
                                        GC.AddSend(Packets.NPCLink("Thank You", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 9)
                                    {
                                        GC.AddSend(Packets.NPCSay("You will be divided into two groups to attack from the left and the right flank of"));
                                        GC.AddSend(Packets.NPCSay("HellCloister. Kill the Wraithas many as you can, because you can't reach"));
                                        GC.AddSend(Packets.NPCSay("BattleFormation until the amount of Wraith is decreased to a certain level."));
                                        GC.AddSend(Packets.NPCLink("I'd like to know more!", 6));
                                        GC.AddSend(Packets.NPCLink("Thank You", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 10)
                                    {
                                        GC.AddSend(Packets.NPCSay("BattleFormation is protected by Syrens. After they are killed out"));
                                        GC.AddSend(Packets.NPCSay("UltimatePluto will appear. Make the besteffort to kill him, get his DarkHorn"));
                                        GC.AddSend(Packets.NPCSay("and give it to me. I can disable the BattleFormation with it. Then I'll sendyou"));
                                        GC.AddSend(Packets.NPCSay("back. But if you fails to do it, we have to retreat and wait for another opportunity"));
                                        GC.AddSend(Packets.NPCLink("I'd like to know more!", 6));
                                        GC.AddSend(Packets.NPCLink("Thank You", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    break;
                                }
                            #endregion
                            #region Stage 1
                            case 3298:
                                {
                                    int NPlayer = 0;
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("With these SoulStones I can help you enter the HellGate shielded from poisonous fogs. Are you ready?"));
                                        GC.AddSend(Packets.NPCLink("I'm ready", 1));
                                        GC.AddSend(Packets.NPCLink("Wait a moment", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        if (GC.MyChar.InventoryContains(723085, 5))
                                        {
                                            GC.MyChar.Teleport(2022, 220, 340);
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(723085));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(723085));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(723085));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(723085));
                                            NPlayer += 1;
                                            Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + "has through the HellGate and have entered in the HellHall!", 2011, 0);
                                        }
                                        else if (NPlayer >= 1)
                                        {
                                            GC.MyChar.Teleport(2022, 220, 340);
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(700011));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(700011));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(700011));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(700011));
                                            GC.MyChar.RemoveItem(GC.MyChar.NextItem(700011));
                                            NPlayer += 1;
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("Sorry you don't have 5 SoulStones"));
                                            GC.AddSend(Packets.NPCLink("Oh sorrry, will got them!", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
                            #region Stage 2
                            case 3299:
                                {
                                    int NPlayer2 = 0;
                                    if (Control == 0)
                                    {
                                        if (GC.MyChar.DisCityMobs <= 1301)
                                        {
                                            GC.AddSend(Packets.NPCSay("You'll pass if you kill 1300 monsters in HellHall. Hurry up! Only 30 persons can geet to HellCloister with me."));
                                            GC.AddSend(Packets.NPCLink("I see", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        if (GC.MyChar.DisCityMobs == 1300)
                                        {
                                            GC.AddSend(Packets.NPCSay("You've killed the 1300 monsters, and you can pass to the HellCloister. Hurry up!"));
                                            GC.AddSend(Packets.NPCLink("YAY", 1));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    if (Control == 1)
                                    {
                                        if (NPlayer2 <= 30)
                                        {
                                            GC.MyChar.Teleport(2023, 297, 649);
                                            NPlayer2 += 1;
                                            Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has passed through the HellHall and has entered into the HellCloister!", 2011, 0);
                                        }
                                        if (NPlayer2 > 30)
                                        {
                                            GC.AddSend(Packets.NPCSay("sorry but only 30 people may enter this stage better luck next time"));
                                            GC.AddSend(Packets.NPCLink("ok", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
                            #region Stage 3
                            case 3300:
                                {
                                    int NPlayer2 = 0;
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hello! if have more than 10 players in the HellCloister i can send all of them to the UltimatePluto's place!"));
                                        GC.AddSend(Packets.NPCLink("We are here!", 1));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        if (NPlayer2 == 30)
                                        {
                                            GC.MyChar.Teleport(2024, 151, 284);
                                            Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " has passed through the HellCloister and Advanced to the last stage, and is going kill UltimatePluto! Hurry up all!", 2011, 0);
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("Sorry you do not have 30 players yet!"));
                                            GC.AddSend(Packets.NPCLink("Oh, i will wait", 1));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
for the commands add this:
Code:
if (Cmd[0] == "/dison")
                            {
                                foreach (Game.Character C in Game.World.H_Chars.Values)
                                {
                                    if (GC.MyChar.DisCityON)
                                    Game.World.SendMsgToAll("SYSTEM", "The Dis City quest has been started! Run to ApeMountain and find SolarSaint(530,482)!", 2011, 0);
                                }
                            }
                            if (Cmd[0] == "/disoff")
                            {
                                foreach (Game.Character C in Game.World.H_Chars.Values)
                                {
                                    if (!GC.MyChar.DisCityON)
                                    Game.World.SendMsgToAll("SYSTEM", "The entrance of Dis City quest now is blocked! Who don't get in try your luck next time!", 2011, 0);
                                }
                            }
in npc.txt at the very bottom add these

Quote:
3298 8350 2 0 2021 011 253
3299 8350 2 0 2022 056 156
3300 8350 2 0 2023 255 565
i doubt there in the right spots but i've never done dis so i have no idea where they should be if u want you can just change the npc's to where u want them

i'm working on the mob spawns and the spawning of ultimate pluto but its gonna take me some time.

credits to 12tails for his discity release for coemu
coreymills is offline  
Thanks
8 Users
Old 01/17/2010, 17:40   #2
 
elite*gold: 0
Join Date: Dec 2009
Posts: 87
Received Thanks: 2
thank you
alaa410 is offline  
Old 01/17/2010, 17:49   #3
 
elite*gold: 0
Join Date: Nov 2009
Posts: 342
Received Thanks: 17
LoL doesnot work
|xabi| is offline  
Old 01/17/2010, 18:00   #4
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
what part doesn't work
coreymills is offline  
Old 01/17/2010, 18:09   #5
 
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 505
Yay. Dialogues.
Great release.
Basser is offline  
Thanks
1 User
Old 01/17/2010, 18:14   #6
 
elite*gold: 0
Join Date: Nov 2009
Posts: 342
Received Thanks: 17
Quote:
Originally Posted by coreymills View Post
what part doesn't work

all
|xabi| is offline  
Old 01/17/2010, 18:59   #7
 
elite*gold: 0
Join Date: Jan 2010
Posts: 36
Received Thanks: 12
Nice release Corey.
Sinestro is offline  
Thanks
1 User
Old 01/17/2010, 21:00   #8
 
.Ryu's Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 119
Goodjob corey
Its good to see your getting better =P
.Ryu is offline  
Thanks
1 User
Old 01/17/2010, 21:34   #9
 
elite*gold: 0
Join Date: Sep 2009
Posts: 17
Received Thanks: 0
I want the rest of the places nps
لعبة الحيا is offline  
Old 01/17/2010, 22:19   #10
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
ya i'm working on that stuff
coreymills is offline  
Old 01/17/2010, 23:08   #11
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Ok unless I'm blind and missing something then you have a serious bug with your NPlayers count.

The npc script will only allow TWO players into level 3

You are using == operators saying that it must be EXACTLY equal. You have it saying if players == 0 teleport player and send msg to server... then you have an if saying if players == 1 (so 2nd player to go) does same thing but with two msg's sent to all players... and no else controlling further players.

Not quite sure why you coded it that way and it's a simple fix.. just something to be careful of (again, if this is just me being a blind idiot than I apologize)


Also: note an issue but why are you using a byte instead of a bool to control if diss city is on/off.... makes scripts a bit more messy cause you can't just do if(Disson) or w/e.

<edit> further things to bring up.

#1: Item checking. Not a big deal but it may be easier to create a check item void that lets you basically say if(InventoryContains(itemid, amount, character)
removefrominvent(itemid, amount, character);

Would save alot of duplication in your codes and make scripting alot easier.

Also, I suppose in this case it wouldn't make much of a difference but when using player scores (linking character in an event with a score of any type) you may want to consider using hashtables. They function perfectly from that type of thing.


Again: none of those are critical, just suggestions for future improvements.

Good job, nice to see people contributing.
pro4never is offline  
Thanks
1 User
Old 01/18/2010, 01:36   #12
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
thats just made from a 5095 code release that 12tails released i just made it so that it would work with 5165 and to how poorly its coded i'm still learning to code but thanks for the suggestions i'll try to improve my codes in the future
coreymills is offline  
Old 01/18/2010, 08:45   #13
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Hmm you are using an int when you should be using a bool.
Like for dis city on = 1;
Why don't you define it as a bool and do DisCityON = true;?
Arcо is offline  
Old 01/18/2010, 09:28   #14
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
as i said to pro i'm still learning to code
coreymills is offline  
Old 01/18/2010, 09:28   #15
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
public byte DisCityON = 0;

Should be better

public bool DisCityON = false;

I will help you to finish it. msg me on msn
~Yuki~ is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Release] DisCity NPCs (CoEmu v2)
05/04/2010 - CO2 PServer Guides & Releases - 14 Replies
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! 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...
[Help] NPCs 5165
03/13/2010 - CO2 Private Server - 1 Replies
I was changing the coordinates of npcs and everything was working fine, so I changed more NPC locations and when I tried to debug I got an error and it highlighted "Avatar = byte.Parse(Info);" and says something about the value being too small or too large for the unsighned byte. Funny thing is, I DIDN'T TOUCH SHIT OTHER THAN NPC COORDINATES UUGGGHHH!!!! No clue why the f*ck it did that but, it's RLY pissing me off. Can someone please help me
[5165] My NPCs
02/13/2010 - CO2 PServer Guides & Releases - 9 Replies
Hi, here i will post all my npcs: on NPCDialog.cs add this: #region Monsters Quest case 111234: { if (Control == 0) { GC.AddSend(Packets.NPCSay("Hi, this is a very dungerous quest, are you sure you want to start it?"));
[RELEASE]NPC teleport to Discity,TC pk & Lab
11/14/2009 - CO2 PServer Guides & Releases - 12 Replies
#REMOVED



All times are GMT +2. The time now is 10:45.


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.