Simple Second reborn quest (NPC Scripts Only)

12/23/2012 15:43 mujake#1
hello, i always wanted second reborn quest on my private server so, as i started working on my new project i made an simplified second reborn quest.
As most 5530+ sources have the NPCs already added to the database ill post only NPC Scripts:

in databse in entities add new row named SecondQuest

in entity.cs add

public uint SecondQuest = 0;

in monstertable add
Code:
            #region Satan/second reb
            if (killer.EntityFlag == Game.EntityFlag.Player)
                if (Owner.Name.Contains("Satan"))
                {
                    killer.SecondQuest ++;
                    Conquer_Online_Server.ServerBase.Kernel.SendWorldMessage(new Conquer_Online_Server.Network.GamePackets.Message("Congratulations! " + killer.Name + " Has Killed " + Name + " and finished Second Reborn Quest", System.Drawing.Color.Red, 2011), Conquer_Online_Server.ServerBase.Kernel.GamePool.Values);
                }
            #endregion
in npcs.cs
Code:
                #region SecRebMap
                case 1700:

                    {
                        switch (client.ActiveNpc)
                        {

                            #region Bruce Teleports you out
                            case 3604:
                                {
                                    switch (Request.LinkID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("Do you want to leave this map??? I can teleport you for free.");
                                                dialog.Link("Yeah. Thanks.", 1);
                                                dialog.Link("No , I shall stay here.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                client.Entity.Teleport(1002, 429, 378);
                                                break;
                                            }
                                    }
                                    break;
                                }

                            #endregion
                            #region Arthur
                            case 3601:
                                {
                                    switch (Request.LinkID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("I can give you 1 Feather Stone for 1 piece of 3 ingredients(Moss,DreamGrass,SoulAroma) or i give you one ImmortalStone for 3 FeatherStones");
                                                dialog.Link("Trade for FeatherStones", 1);
                                                dialog.Link("Trade for ImmortalStones", 2);
                                                dialog.Link("No , I shall stay here.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Inventory.Count <= 39 && client.Inventory.Contains(722723,1) && client.Inventory.Contains(722724,1) && client.Inventory.Contains(722725,1))
                                                {
                                                    client.Inventory.ExcluirItem(722723, 1);
                                                    client.Inventory.ExcluirItem(722724, 1);
                                                    client.Inventory.ExcluirItem(722725, 1);
                                                    client.Inventory.Add(722726, 0, 1);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have enough space in inventory or you dont have required materials!");
                                                    dialog.Link("I see.", 255);
                                                    dialog.Face(85);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Inventory.Count <= 39 && client.Inventory.Contains(722725, 3))
                                                {
                                                    client.Inventory.ExcluirItem(722725, 3);
                                                    client.Inventory.Add(722728, 0, 1);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have enough space in inventory or you dont have required materials!");
                                                    dialog.Link("I see.", 255);
                                                    dialog.Face(85);
                                                    dialog.Send();
                                                }
                                                break;
                                            }

                                    }
                                    break;
                                }

                            #endregion
                            #region Angela
                            case 3603:
                                {
                                    switch (Request.LinkID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("I can give you 1 VigorFragment for 3 ImmortalStones or i give you one ImpureVigor for 3 VigorFragments");
                                                dialog.Link("Trade for VigorFragments", 1);
                                                dialog.Link("Trade for ImpureVigor", 2);
                                                dialog.Link("No , I shall stay here.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Inventory.Count <= 39 && client.Inventory.Contains(722728, 3))
                                                {
                                                    client.Inventory.ExcluirItem(722728, 3);
                                                    client.Inventory.Add(722729, 0, 1);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have enough space in inventory or you dont have required materials!");
                                                    dialog.Link("I see.", 255);
                                                    dialog.Face(85);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Inventory.Count <= 39 && client.Inventory.Contains(722729, 3))
                                                {
                                                    client.Inventory.ExcluirItem(722728, 3);
                                                    client.Inventory.Add(722730, 0, 1);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have enough space in inventory or you dont have required materials!");
                                                    dialog.Link("I see.", 255);
                                                    dialog.Face(85);
                                                    dialog.Send();
                                                }
                                                break;
                                            }

                                    }
                                    break;
                                }

                            #endregion
                            #region Bryan
                            case 3602:
                                {
                                    switch (Request.LinkID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("I can give you 1 PureVigor for 3 ImpureVigors or i give you one SquamaBead for 3 PureVigor");
                                                dialog.Link("Trade for PureVigors", 1);
                                                dialog.Link("Trade for SquamaBead", 2);
                                                dialog.Link("No , I shall stay here.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Inventory.Count <= 39 && client.Inventory.Contains(722730, 3))
                                                {
                                                    client.Inventory.ExcluirItem(722730, 3);
                                                    client.Inventory.Add(722731, 0, 1);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have enough space in inventory or you dont have required materials!");
                                                    dialog.Link("I see.", 255);
                                                    dialog.Face(85);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                        case 2:
                                            {
                                                if (client.Inventory.Count <= 39 && client.Inventory.Contains(722731, 3))
                                                {
                                                    client.Inventory.ExcluirItem(722731, 3);
                                                    client.Inventory.Add(722727, 0, 1);
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have enough space in inventory or you dont have required materials!");
                                                    dialog.Link("I see.", 255);
                                                    dialog.Face(85);
                                                    dialog.Send();
                                                }
                                                break;
                                            }

                                    }
                                    break;
                                }


                            #endregion
                            #region Satan Spawn
                            case 3608:
                                {
                                    switch (Request.LinkID)
                                    {
                                        case 0:
                                            {
                                                dialog.Text("This is the final step in your quest to second reborn, defeat Satan and you shall be worthy of getting second reborn!You need and SquamaBead to call him into this world! ");
                                                dialog.Link("Bring that devil here!", 1);
                                                dialog.Link("No , I shall leave now.", 255);
                                                dialog.Send();
                                                break;
                                            }
                                        case 1:
                                            {
                                                if (client.Inventory.Contains(722727, 1))
                                                {
                                                    client.Inventory.ExcluirItem(722727, 1);
                                                    Database.MonsterInformation monster = new Conquer_Online_Server.Database.MonsterInformation();
                                                    monster.Hitpoints = 1500000;
                                                    monster.Level = 150;
                                                    monster.Mesh = 166;
                                                    monster.Name = "Satan";
                                                    monster.MaxAttack = 15000;
                                                    monster.AttackRange = 2;
                                                    monster.AttackType = 2;
                                                    monster.AttackSpeed = 500;
                                                    monster.ViewRange = 30;
                                                    monster.MoveSpeed = 500;
                                                    monster.RunSpeed = 500;
                                                    monster.MinAttack = 10000;
                                                    Game.Entity entity = new Game.Entity(Game.EntityFlag.Monster, false);
                                                    entity.MapObjType = Game.MapObjectType.Monster;
                                                    entity.MonsterInfo = monster;
                                                    entity.MonsterInfo.Owner = entity;
                                                    entity.Name = "Satan";
                                                    entity.MinAttack = monster.MinAttack;
                                                    entity.MaxAttack = entity.MagicAttack = monster.MaxAttack;
                                                    entity.Hitpoints = entity.MaxHitpoints = monster.Hitpoints;
                                                    entity.Body = monster.Mesh;
                                                    entity.Level = monster.Level;
                                                    entity.Defence = 10000;
                                                    entity.X = 314;
                                                    entity.Y = 324;
                                                    entity.UID = (uint)ServerBase.Kernel.Random.Next(500060, 500110);
                                                    entity.MapID = 1700;
                                                    entity.SendUpdates = true;
                                                    client.Map.RemoveEntity(entity);
                                                    client.Map.AddEntity(entity);

                                                    break;
                                                }
                                                else
                                                {
                                                    dialog.Text("You don't have  have required materials!");
                                                    dialog.Link("I see.", 255);
                                                    dialog.Face(85);
                                                    dialog.Send();
                                                }
                                                break;
                                            }
                                    }
                                    break;
                                }

                            #endregion

                        } break;
                    }
                           
                #endregion
in alex in npcs.cs add teleportation option to map as below
Code:
                                                dialog.Link("I would like to do complete the quest .", 2);
now for case2
Code:
                                        case 2: 
                                            {
                                                if (client.Entity.Level >= 120 && client.Entity.Reborn == 1)
                                                {
                                                   client.Entity.Teleport(1700, 600, 630);
                                                 }
                                                else
                                                {
                                                    dialog.Text("You must be 1 reborn and above level 120 to enter the second reborn quest map as the monsters are very strong.");
                                                    dialog.Link("I'll just leave", 255);
                                                    dialog.Send();

                                                }
                                                break;
                                            }
If there are some mistakes, please mention it, i've tested the script, worked for me, but i'm still learning C#..
12/23/2012 22:28 DontSpeakToMe#2
OK nice idea but you are missing staff so first from where he is getting 722723,722724,722725 and so after he finish can he get reborn from Alex you are missing code make Alex give him rebirth for finishing the quest and good luck if you need help in coding just ask
12/24/2012 06:09 mujake#3
after defeating satan he needs to talk to alex, also everyone knows that soul, moss, dream drops in that map so they can add those items drops, i added them in specialdrops in databse with map restriction, i haven't placed all alex script, as many sources have different reborn algorithm, and i skipped evil tooth and ghost horn stats, and the necessity of always having 1 soul,moss,dream when summoning those monsters to get feather stones, as i said it's more simple, basic one, for private servers as most players would use exemption tokens
12/24/2012 14:39 algentel#4
goodjob
03/26/2019 03:03 denominator#5
Can you possibly convert it for Albetros?
03/26/2019 12:05 KraHen#6
Massive necro. Closing.