We start with Rebirth NPC,since I already released the rebirth code. Now,go Client.cs , and go around line 1236. Also be aware of that you should have already added the rebirth code which is in my other guide. Input this:
Quote:
if (CurrentNPC == 1278)
{
SendPacket(General.MyPackets.NPCSay("Hello, intresed in getting reborned? After level 120, you can get reborned,and it cost you an celestial stone. But if you already are first reborned,it cost you an ExtemptionToken. Still intresed?"));
SendPacket(General.MyPackets.NPCLink("Yeah,first rebirth", 1));
SendPacket(General.MyPackets.NPCLink("Yeah,second rebirth", 8));
SendPacket(General.MyPackets.NPCLink("No thanks,not yet.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
Now,move on to somewhere around line 3124,and input this:
Quote:
if (CurrentNPC == 1278)
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("Would you like to reborn?"));
if (MyChar.RBCount == 0 && MyChar.Level >= 120 || MyChar.Job == 135 && MyChar.Level >= 110)
SendPacket(General.MyPackets.NPCLink("Yes,first rebirth", 2));
if (MyChar.RBCount == 1 && MyChar.Level >= 120 || MyChar.Job == 135 && MyChar.Level >= 110)
SendPacket(General.MyPackets.NPCLink("Yeah,second rebirth", 8));
SendPacket(General.MyPackets.NPCLink("Let me think it over.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 2)
{
SendPacket(General.MyPackets.NPCSay("What would you like to get reborned into? Remember that your earlier skills don't save."));
SendPacket(General.MyPackets.NPCLink("Trojan", 3));
SendPacket(General.MyPackets.NPCLink("Warrior", 4));
SendPacket(General.MyPackets.NPCLink("Archer", 5));
SendPacket(General.MyPackets.NPCLink("Fire Taoist", 6));
SendPacket(General.MyPackets.NPCLink("WaterTaoist" , 7));
SendPacket(General.MyPackets.NPCLink("Let me think it over.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 3)
{
if (MyChar.InventoryContains(721259, 1))
{
MyChar.RemoveItem(MyChar.ItemNext(721259));
MyChar.ReBorn(11);
}
}
if (Control == 4)
{
if (MyChar.InventoryContains(721259, 1))
{
MyChar.RemoveItem(MyChar.ItemNext(721259));
MyChar.ReBorn(21);
}
}
if (Control == 5)
{
if (MyChar.InventoryContains(721259, 1))
{
MyChar.RemoveItem(MyChar.ItemNext(721259));
MyChar.ReBorn(41);
}
}
if (Control == 6)
{
if (MyChar.InventoryContains(721259, 1))
{
MyChar.RemoveItem(MyChar.ItemNext(721259));
MyChar.ReBorn(101);
}
}
if (Control == 7)
{
if (MyChar.InventoryContains(721259, 1))
{
MyChar.RemoveItem(MyChar.ItemNext(721259));
MyChar.ReBorn(131);
}
}
if (Control == 8)
{
SendPacket(General.MyPackets.NPCSay("What would you like to get second reborn into? Remember that your earlier skills don't save and it cost an ExemptionToken."));
SendPacket(General.MyPackets.NPCLink("Trojan", 9));
SendPacket(General.MyPackets.NPCLink("Warrior", 10));
SendPacket(General.MyPackets.NPCLink("Archer", 11));
SendPacket(General.MyPackets.NPCLink("Fire Taoist", 12));
SendPacket(General.MyPackets.NPCLink("WaterTaoist" , 13));
SendPacket(General.MyPackets.NPCLink("WaterTaoist" , 14));
SendPacket(General.MyPackets.NPCLink("Let me think it over.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 9)
{
if (MyChar.InventoryContains(721259, 1))
MyChar.ReBorn(11);
}
if (Control == 10)
{
if (MyChar.InventoryContains(721259, 1))
MyChar.ReBorn(21);
}
if (Control == 11)
{
if (MyChar.InventoryContains(721259, 1))
MyChar.ReBorn(41);
}
if (Control == 12)
{
if (MyChar.InventoryContains(721259, 1))
MyChar.ReBorn(101);
}
if (Control == 13)
{
if (MyChar.InventoryContains(721259, 1))
MyChar.ReBorn(131);
}
}
Now, go to your database and add a new NPC with npcid 1278. Good,your done!
Now,lets do DisCity,which will higher the status of your server,makes it look more professional. Remember that it will only work if you have the MonsterHunter quest added. Will post that one a bit later in this post.
Start with going to Client.cs,around line 1245. Copy and paste this there:
Quote:
if (CurrentNPC == 1279)
{
SendPacket(General.MyPackets.NPCSay("Hey there,want to enter Dis City. Only for level 110+, and you get alot of exp for every stage you enter,and exp from 10 expballs if you get to the last stage. But remember, its dangerous."));
SendPacket(General.MyPackets.NPCLink("Yes please,send me there", 1));
SendPacket(General.MyPackets.NPCLink("No thanks,not ready yet.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (CurrentNPC == 1280)
{
SendPacket(General.MyPackets.NPCSay("Are you sure you want to go to stage 2? Remember that you need 5 SoulStones."));
SendPacket(General.MyPackets.NPCLink("Yes please,send me there", 1));
SendPacket(General.MyPackets.NPCLink("No thanks,not ready yet.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (CurrentNPC == 1281)
{
SendPacket(General.MyPackets.NPCSay("Are you sure you want to go to stage 3? Remember that you need to kill 1300 Monster first"));
SendPacket(General.MyPackets.NPCLink("Yes please,send me there", 1));
SendPacket(General.MyPackets.NPCLink("No thanks,not ready yet.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
Now ,at client.cs , go around line 2836,and input this:
Now ,in Client.cs,go around line 1582,and input this:Quote:
if (CurrentNPC == 1279)
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("Are you really sure you want to enter?"));
if (MyChar.Level >= 110)
SendPacket(General.MyPackets.NPCLink("Yeah,im sure", 2));
SendPacket(General.MyPackets.NPCLink("No,I changed my mind.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 2)
{
if (MyChar.Level >= 110)
MyChar.Teleport(2021, 243, 421);
MyChar.AddItem("723700-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
MyChar.AddItem("723700-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
MyChar.AddItem("723700-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
MyChar.AddItem("723700-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
}
else if (MyChar.Level <= 110)
{
SendPacket(General.MyPackets.NPCSay("You are not level 110 yet,go level!"));
SendPacket(General.MyPackets.NPCLink("I'm sorry.", 255));
SendPacket(General.MyPackets.NPCLink("Terribly sorry!", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (CurrentNPC == 1280)
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("Do you wish to enter stage two?"));
SendPacket(General.MyPackets.NPCLink("Yeah,im sure", 2));
SendPacket(General.MyPackets.NPCLink("No,I changed my mind.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 2)
{
if (MyChar.InventoryContains(723085, 5))
MyChar.RemoveItem(MyChar.ItemNext(723085));
MyChar.RemoveItem(MyChar.ItemNext(723085));
MyChar.RemoveItem(MyChar.ItemNext(723085));
MyChar.RemoveItem(MyChar.ItemNext(723085));
MyChar.RemoveItem(MyChar.ItemNext(723085));
MyChar.Teleport(2022, 241, 338);
MyChar.AddItem("723700-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
MyChar.AddItem("723700-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
MyChar.AddItem("723700-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
MyChar.AddItem("723700-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
}
}
if (CurrentNPC == 1281)
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("Do you wish to enter stage three?"));
SendPacket(General.MyPackets.NPCLink("Yeah,im sure", 2));
SendPacket(General.MyPackets.NPCLink("No,I changed my mind.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 2)
{
if (MyChar.QuestKO > 5)
{
MyChar.Teleport(2024, 200, 200);
MyChar.QuestKO = 0;
MyChar.QuestMob = "";
SendPacket(General.MyPackets.NPCLink("Lets go!", 3));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
Quote:
if (CurrentNPC == 1281)
{
if (Control == 3)
MyChar.QuestMob = "DisBoss";
}
if (CurrentNPC == 1280)
{
if (Control == 2)
MyChar.QuestMob = "Phantoms";
}
Now,to make the Dis City monster stage 1 drop Soulstones,go into Entities.cs, and around line 545, input this:
Quote:
if (Name == "UndeadSpearman")
{
string Item = "723085-0-0-0-0-0";
DroppedItem item = DroppedItems.DropItem(Item, (uint)(PosX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(PosY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)Map, MoneyDrops);
World.ItemDrops(item);
if (Other.ChanceSuccess(10) || BossMob && Other.ChanceSuccess(30)) ;
}
}
Now,go into your database,first add all the DisCity npcs,with id's 1279,1280 and 1281. Then go into monster table,and insert some new mobs,should look like this :
Quote:
Mob id = You decide ( should be un taken )
Mech : 164
Name : UndeadSpearman
Life : 24300
Level : 116
Mobtype : 0
MinAtk : 790
MaxAtk : 1320
MagicAtk : 0
Quote:
Mob id = You decide ( should be un taken )
Mech : 265
Name : Phantoms
Life : 37000
Level : 124
Mobtype : 0
MinAtk : 1320
MaxAtk : 2100
MagicAtk : 0
And create one more monster,you decide how it should be,it should be the Dis City boss,be aware of that the name MUST be DisBoss
You could also add more monsters to discity,but I wont release all the mech id's. But I sell conquer's latest patch monster database,which have all the monsters.
I think thats it,not kinda sure,pretty tired. Tell me if it dont work.
Now,lets add MonsterHunter quest ( My edition, takes alot lesser space than Kinshi's )
Lets start,go to Character.cs , and add this under public Timer TheTimer = new Timer();
Quote:
public string QuestMob = "";
public uint QuestKO = 0;
Now go around line 1973,in Character.cs , and add this:
Now go around line 203 in World.cs,and add this:Quote:
if (MobTarget.GetDamage((uint)AttackDMG))
{
if (MobTarget.Name == QuestMob)
{
QuestKO++;
if (QuestKO >= 1300)
{
MyClient.SendPacket(General.MyPackets.SendMsg(MyCl ient.MessageId, "SYSTEM", Name, "You have killed enough monsters for the quest. Go report to the captain.", 2005));
}
}
Now go around line 984,in Client.cs, and add this :Quote:
if (Mob.GetDamage(Damage))
{
if (Mob.Name == User.QuestMob)
{
User.QuestKO++;
if (User.QuestKO >= 1300)
{
User.MyClient.SendPacket(General.MyPackets.SendMsg (User.MyClient.MessageId, "SYSTEM", User.Name, "You have killed enough monsters for the quest. Go report to the captain.", 2005));
}
}
}
Quote:
if (MyChar.QuestMob == "")
{
if (CurrentNPC == 280)
{
if (MyChar.Level < 23)
{
SendPacket(General.MyPackets.NPCSay("Do you want to take on the monster extermination quest? You need to kill 300 of the mob you choose."));
SendPacket(General.MyPackets.NPCLink("Go to kill Pheasant(Level 1)", 1));
SendPacket(General.MyPackets.NPCLink("Go to kill TurtleDove(Level 7)", 2));
SendPacket(General.MyPackets.NPCLink("Go to kill Robin(Level 12)", 3));
SendPacket(General.MyPackets.NPCLink("Go to kill Apparition(Level 17)", 4));
SendPacket(General.MyPackets.NPCLink("Go to kill Poltergeist(Level 22)", 5));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("Your level is not suitable to take the quest from this map."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (CurrentNPC == 281)
{
if (MyChar.Level < 43 && MyChar.Level > 22)
{
SendPacket(General.MyPackets.NPCSay("Do you want to take on the monster extermination quest? You need to kill 300 of the mob you choose."));
SendPacket(General.MyPackets.NPCLink("Go to kill WingedSnake(Level 27)", 1));
SendPacket(General.MyPackets.NPCLink("Go to kill Bandit(Level 32)", 2));
SendPacket(General.MyPackets.NPCLink("Go to kill FireRat(Level 37)", 3));
SendPacket(General.MyPackets.NPCLink("Go to kill FireSpirit(Level 42)", 4));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("Your level is not suitable to take the quest from this map."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (CurrentNPC == 282)
{
if (MyChar.Level < 63 && MyChar.Level > 42)
{
SendPacket(General.MyPackets.NPCSay("Do you want to take on the monster extermination quest? You need to kill 300 of the mob you choose."));
SendPacket(General.MyPackets.NPCLink("Go to kill Macaque(Level 47)", 1));
SendPacket(General.MyPackets.NPCLink("Go to kill GiantApe(Level 52)", 2));
SendPacket(General.MyPackets.NPCLink("Go to kill ThunderApe(Level 57)", 3));
SendPacket(General.MyPackets.NPCLink("Go to kill SnakeMan(Level 62)", 4));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("Your level is not suitable to take the quest from this map."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (CurrentNPC == 283)
{
if (MyChar.Level < 83 && MyChar.Level > 62)
{
SendPacket(General.MyPackets.NPCSay("Do you want to take on the monster extermination quest? You need to kill 300 of the mob you choose."));
SendPacket(General.MyPackets.NPCLink("Go to kill SandMonster(Level 67)", 1));
SendPacket(General.MyPackets.NPCLink("Go to kill HillMonster(Level 72)", 2));
SendPacket(General.MyPackets.NPCLink("Go to kill RockMonster(Level 77)", 3));
SendPacket(General.MyPackets.NPCLink("Go to kill BladeGhost(Level 82)", 4));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("Your level is not suitable to take the quest from this map."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (CurrentNPC == 284)
{
if (MyChar.Level < 98 && MyChar.Level > 82)
{
SendPacket(General.MyPackets.NPCSay("Do you want to take on the monster extermination quest? You need to kill 300 of the mob you choose."));
SendPacket(General.MyPackets.NPCLink("Go to kill BirdMan(Level 87)", 1));
SendPacket(General.MyPackets.NPCLink("Go to kill HawKing(Level 92)", 2));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("Your level is not suitable to take the quest from this map."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
if (CurrentNPC == 285)
{
if (MyChar.Level < 118 && MyChar.Level > 97)
{
SendPacket(General.MyPackets.NPCSay("Do you want to take on the monster extermination quest? You need to kill 300 of the mob you choose."));
SendPacket(General.MyPackets.NPCLink("Go to kill TombBat(Level 102)", 1));
SendPacket(General.MyPackets.NPCLink("Go to kill BloodyBat(Level 107)", 2));
SendPacket(General.MyPackets.NPCLink("Go to kill BullMonster(Level 112)", 3));
SendPacket(General.MyPackets.NPCLink("Go to kill RedDevilL117(Level 117)", 4));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("Your level is not suitable to take the quest from this map."));
SendPacket(General.MyPackets.NPCLink("I see.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
else if (MyChar.QuestKO < 300)
{
SendPacket(General.MyPackets.NPCSay("You haven't killed 300 of the mobs yet. Do you want to quit?"));
SendPacket(General.MyPackets.NPCLink("No, just passing by.", 255));
SendPacket(General.MyPackets.NPCLink("Yes, I want to quit.", 10));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
else
{
SendPacket(General.MyPackets.NPCSay("You have killed the 300 mobs. Do you want to end the quest and claim your rewards?"));
SendPacket(General.MyPackets.NPCLink("Yea, thank you.", 11));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
Now go around line 1566,in Client.cs,and add this :
Quote:
if (MyChar.QuestMob == "")
{
if (CurrentNPC == 280)
{
if (Control == 1)
MyChar.QuestMob = "Pheasant";
if (Control == 2)
MyChar.QuestMob = "Turtledove";
if (Control == 3)
MyChar.QuestMob = "Robin";
if (Control == 4)
MyChar.QuestMob = "Apparition";
if (Control == 5)
MyChar.QuestMob = "Poltergeist";
}
if (CurrentNPC == 1281)
{
if (Control == 3)
MyChar.QuestMob = "DisBoss";
}
if (CurrentNPC == 281)
{
if (Control == 1)
MyChar.QuestMob = "WingedSnake";
if (Control == 2)
MyChar.QuestMob = "Bandit";
if (Control == 3)
MyChar.QuestMob = "FireRat";
if (Control == 4)
MyChar.QuestMob = "FireSpirit";
}
if (CurrentNPC == 282)
{
if (Control == 1)
MyChar.QuestMob = "Macaque";
if (Control == 2)
MyChar.QuestMob = "GiantApe";
if (Control == 3)
MyChar.QuestMob = "ThunderApe";
if (Control == 4)
MyChar.QuestMob = "SnakeMan";
}
if (CurrentNPC == 283)
{
if (Control == 1)
MyChar.QuestMob = "SandMonster";
if (Control == 2)
MyChar.QuestMob = "HillMonster";
if (Control == 3)
MyChar.QuestMob = "RockMonster";
if (Control == 4)
MyChar.QuestMob = "BladeGhost";
}
if (CurrentNPC == 284)
{
if (Control == 1)
MyChar.QuestMob = "Birdman";
if (Control == 2)
MyChar.QuestMob = "HawKing";
}
if (CurrentNPC == 1280)
{
if (Control == 2)
MyChar.QuestMob = "Phantoms";
}
if (CurrentNPC == 285)
{
if (Control == 1)
MyChar.QuestMob = "TombBat";
if (Control == 2)
MyChar.QuestMob = "BloodyBat";
if (Control == 3)
MyChar.QuestMob = "BullMonster";
if (Control == 4)
MyChar.QuestMob = "RedDevilL117";
}
MyChar.QuestKO = 0;
}
else
{
if (Control == 10 && CurrentNPC <= 285 && CurrentNPC >= 280)
{
MyChar.QuestMob = "";
MyChar.QuestKO = 0;
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You have quit the quest.", 2005));
}
if (Control == 11 && CurrentNPC <= 285 && CurrentNPC >= 280)
{
MyChar.QuestMob = "";
MyChar.QuestKO = 0;
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You have finished the quest and got 1 meteor and 1 experience ball.", 2005));
MyChar.AddItem("723700-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
MyChar.AddItem("1088001-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
}
}
Now go around line 4418,in Client.cs , and add this command to check how many you killed so far:
Now,to make everything save,go to Database.cs. Search forQuote:
if (Message == "/quest")
{
SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "You have to kill 300 " + MyChar.QuestMob + "´s and you have killed " + MyChar.QuestKO + " so far.", 2000));
}
Replace that fully line,(didnt include fully ), with :Quote:
("UPDATE `Characters` SET `CharName` = '" + Charr.Name + "', `Level` = " + Charr.Level + ",`Exp` = " + Charr.Exp + ",`GuildDonation` = " + Charr.GuildDonation + ",`Strength` = " + Charr.Str + ",`Agility` = " + Charr.Agi + ",`Vitality` = " + Charr.Vit + ",`Spirit` = " + Charr.Spi + ",`Job` = " + Charr.Job + ",`Model` = " + Charr.RealModel + ",`Money` = " + Charr.Silvers + ",`CPs` = " + Charr.CPs + ",`CurrentHP` = " + Charr.CurHP + ",`StatPoints` = " + Charr.StatP + ",`MyGuild` = " + Charr.GuildID + ",`GuildPos` = " + Charr.GuildPosition + ",`LocationMap` = " + Charr.LocMap + ",`LocationX` =
Quote:
MySqlCommand Command = new MySqlCommand("UPDATE `Characters` SET `CharName` = '" + Charr.Name + "', `Level` = " + Charr.Level + ",`Exp` = " + Charr.Exp + ",`GuildDonation` = " + Charr.GuildDonation + ",`Strength` = " + Charr.Str + ",`Agility` = " + Charr.Agi + ",`Vitality` = " + Charr.Vit + ",`Spirit` = " + Charr.Spi + ",`Job` = " + Charr.Job + ",`Model` = " + Charr.RealModel + ",`Money` = " + Charr.Silvers + ",`CPs` = " + Charr.CPs + ",`CurrentHP` = " + Charr.CurHP + ",`StatPoints` = " + Charr.StatP + ",`MyGuild` = " + Charr.GuildID + ",`GuildPos` = " + Charr.GuildPosition + ",`LocationMap` = " + Charr.LocMap + ",`LocationX` = " + Charr.LocX + ",`LocationY` = " + Charr.LocY + ",`Hair` = " + Charr.Hair + ",`Equipment` = '" + Charr.PackedEquips + "',`Inventory` = '" + Charr.PackedInventory + "',`PKPoints` = " + Charr.PKPoints + ",`PrevMap` = " + Charr.PrevMap + ", `Skills` = '" + Charr.PackedSkills + "', `Profs` = '" + Charr.PackedProfs + "',`RBCount` = " + Charr.RBCount + ",`Avatar` = " + Charr.Avatar + ",`WHMoney` = " + Charr.WHSilvers + ",`VP` = " + Charr.VP + ",`Warehouses` = '" + Charr.PackedWHs + "',`Friends` = '" + Charr.PackedFriends + "',`Enemies` = '" + Charr.PackedEnemies + "',`QuestMob` = '" + Charr.QuestMob + "',`QuestKO` = " + Charr.QuestKO + " WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
And then,at line 1210,add this :
Quote:
Charr.WHSilvers = (uint)DR["WHMoney"];
Charr.QuestKO = (uint)DR["QuestKO"];
Now,go into your database,and add two new tabs in Character.cs, QuestKO and QuestMob.
Quote:
QuestKO should look like:
Field : QuestKO
Type : Int
Length/Values : 10
Attributes : Unsigned
Null : Not null
Defaut : 0
QuestMob should look like:
Field : QuestMob
Type : Text
Collaction : latin1_swedish_ci
Null : Not null
The fields that are not mentioned should be blank
Now,go into database again,and in NPC table,and add the new NPCs mentioned in the code.
Gosh,your done! Please enjoy
Now,lets add second rebirth quest. Now,if you want second rebirth quest instead of simply buying an exemption token to get second reborn,you have to modify the Rebirth npc a bit,will tell futher about that a bit down.
Lets start with the NPCs. Go into Client.cs,around line 1208.
Add this there:
Now,go around line 3304 in Client.cs,and add this :Quote:
if (CurrentNPC == 666)
{
SendPacket(General.MyPackets.NPCSay("Hey,wanna try complete 2nd rebirth quest to get second reborned?"));
SendPacket(General.MyPackets.NPCLink("Yeah,id wish to get second reborned", 1));
SendPacket(General.MyPackets.NPCLink("No thanks,not yet.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
Now go to Character.cs, around line 1983,and add this:Quote:
if (CurrentNPC == 666)
{
if (Control == 1)
{
SendPacket(General.MyPackets.NPCSay("Second rebirth has a serveral requirments,lets check if you got those."));
SendPacket(General.MyPackets.NPCSay("* Level 120+"));
SendPacket(General.MyPackets.NPCSay("* Already first reborned"));
SendPacket(General.MyPackets.NPCLink("Yes sir,I have the requirments", 2));
SendPacket(General.MyPackets.NPCLink("No,sorry,let me come back another time.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
if (Control == 2)
{
if (MyChar.Level > 120 && MyChar.RBCount < 2)
MyChar.Teleport(1700, 607, 625);
}
}
if (CurrentNPC == 667)
{
if (Control == 1)
{
if (MyChar.InventoryContains(722723, 3) && MyChar.InventoryContains(722724, 3) && MyChar.InventoryContains(722725, 3))
{
MyChar.RemoveItem(MyChar.ItemNext(722723));
MyChar.RemoveItem(MyChar.ItemNext(722724));
MyChar.RemoveItem(MyChar.ItemNext(722725));
MyChar.RemoveItem(MyChar.ItemNext(722723));
MyChar.RemoveItem(MyChar.ItemNext(722724));
MyChar.RemoveItem(MyChar.ItemNext(722725));
MyChar.RemoveItem(MyChar.ItemNext(722723));
MyChar.RemoveItem(MyChar.ItemNext(722724));
MyChar.RemoveItem(MyChar.ItemNext(722725));
MyChar.AddItem("722730-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
}
else
{
SendPacket(General.MyPackets.NPCSay("You dont have the required items,please get them!"));
SendPacket(General.MyPackets.NPCLink("My bad,sorry.", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
if (CurrentNPC == 668)
{
if (Control == 1)
{
if (MyChar.InventoryContains(722730, 5))
{
SendPacket(General.MyPackets.NPCSay("Ready for stage two? This one is the fun part."));
SendPacket(General.MyPackets.NPCSay("You need to destroy an mountain of 30.000 meters,and per every kill"));
SendPacket(General.MyPackets.NPCSay(" it will sink by 30 meters,and DO NOT drop the SquamaBead during stage two. Are you ready?"));
SendPacket(General.MyPackets.NPCLink("Lets go!", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
MyChar.RemoveItem(MyChar.ItemNext(722730));
MyChar.RemoveItem(MyChar.ItemNext(722730));
MyChar.RemoveItem(MyChar.ItemNext(722730));
MyChar.RemoveItem(MyChar.ItemNext(722730));
MyChar.RemoveItem(MyChar.ItemNext(722730));
MyChar.AddItem("722727-0-0-0-0-0", 0, (uint)General.Rand.Next(99999999));
}
else
{
SendPacket(General.MyPackets.NPCSay("You dont have five PureVigors"));
SendPacket(General.MyPackets.NPCLink("Ok,sorry", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
}
}
}
if (CurrentNPC == 669)
{
if (Control == 1)
{
if (MyChar.Mountain >= 30000)
{
SendPacket(General.MyPackets.NPCSay("Now you are going to fight Satan. Kill them in this order :"));
SendPacket(General.MyPackets.NPCSay("First FurySatan, then BeastSatan, then Satan. Goodluck! "));
SendPacket(General.MyPackets.NPCSay("Remember: You should get the PureVigor"));
SendPacket(General.MyPackets.NPCLink("Ok,thanks,im ready!", 255));
SendPacket(General.MyPackets.NPCSetFace(30));
SendPacket(General.MyPackets.NPCFinish());
MyChar.Teleport(1767, 50, 50);
MyChar.QuestMob = "Satan";
MyChar.QuestKO = 0;
}
}
}
taking a break! do not use mountain code,its not doneQuote:
if (MobTarget.GetDamage((uint)AttackDMG))
{
if (RBQuestDone == false && LocMap == 1700)
{
Mountain += 30;
MyClient.SendPacket(General.MyPackets.SendMsg(MyCl ient.MessageId, "SYSTEM", Name, "You have now destroyed " + Mountain + " meters of the mountain", 2005));
if (Mountain >= 30000)
{
MyClient.SendPacket(General.MyPackets.SendMsg(MyCl ient.MessageId, "SYSTEM", Name, "Mountain is now destroyed.", 2005));
}
}
}







