Hey guys been working on this quest a while now. Thought I would release it to the community. Thanks to .Arco for helping me out.
This could do with some tweaks so please feel free to tinker with it.
Lets start by adding the NPC's. Add these to the bottom of you NPCDialog.cs
Code:
#region Gem Hunter Quest
case 87468:
{
if (Control == 0) // Start of quest
{
GC.AddSend(Packets.NPCSay("Welcome brave Warrior! Will you help me? This is a hard quest i would advise you to bring some friends and be at least lvl 100."));
GC.AddSend(Packets.NPCLink("Yes", 1));
GC.AddSend(Packets.NPCLink("I have what you need", 10));
GC.AddSend(Packets.NPCLink("I dont have the time", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 10 && GC.MyChar.InventoryContains(722343, 1) && GC.MyChar.InventoryContains(722344, 1) && GC.MyChar.InventoryContains(722345, 1) && GC.MyChar.InventoryContains(722346, 1) && GC.MyChar.InventoryContains(722347, 1) && GC.MyChar.InventoryContains(722348, 1) && GC.MyChar.InventoryContains(722349, 1) && GC.MyChar.InventoryContains(722350, 1) && GC.MyChar.InventoryContains(722351, 1) && GC.MyChar.InventoryContains(722352, 1)) // Quest Reward Items
{
GC.AddSend(Packets.NPCSay("Wow thank you for doing this i will reward you handsomly!"));
GC.AddSend(Packets.NPCLink("Thank you so much", 2));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 2) // Reward for completing the quest
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722343));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722344));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722345));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722346));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722347));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722348));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722349));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722350));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722351));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722352));
GC.MyChar.CPs += 100000;
GC.MyChar.AddItem(181355); // Dark Wizard
GC.MyChar.AddItem(530359); // Change this item.
GC.AddSend(Packets.NPCSay("Here you go."));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1) // Sob story
{
GC.AddSend(Packets.NPCSay("My family has been fighting these terrible monsters for over 1000 years and we cannot banish them, My great great GrandFather was the first of us to try."));
GC.AddSend(Packets.NPCLink("I see", 3));
GC.AddSend(Packets.NPCLink("I dont want to listen to your sob story", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 3) // Sob Story Part II
{
GC.AddSend(Packets.NPCSay("Since then many more of us have tried to defeat these terrible monsters but no one has done it, Are you sure you want to help me?"));
GC.AddSend(Packets.NPCLink("Yes! I am sure!", 4));
GC.AddSend(Packets.NPCLink("No way!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 4) // Special Map teleport I
{
GC.AddSend(Packets.NPCSay("I am going to teleport you to a special map, These monsters are everywhere! You will need to collect 10 different items from these monsters to prove that you have defeated them."));
GC.AddSend(Packets.NPCLink("Sure", 5));
GC.AddSend(Packets.NPCLink("I am too scared i dont want to do this now!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 5) // Special Map teleport II
{
GC.MyChar.Teleport(1844, 150, 162);
GC.AddSend(Packets.NPCSay("Ok, Please find me these items"));
GC.AddSend(Packets.NPCSay("Blessing 1 - Blessing 10, These items will drop from the monsters, It is a rare chance to find them though."));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
break;
}
#endregion
#region Teleport back Gem Hunter
case 87469: // Change case label
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Would you like to leave here?"));
GC.AddSend(Packets.NPCLink("Yes please", 1));
GC.AddSend(Packets.NPCLink("No i want to stay!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.MyChar.Teleport(1002, 453, 380); // Change map location if you need to
GC.AddSend(Packets.NPCSay("You are now back in Twin City"));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
break;
}
#endregion
Go to NPC.txt in your OldCODB Folder and add these to the bottom line.
Code:
87468 6282 2 0 1002 456 384
87469 6282 2 0 1844 140 151
Now we are going to add the Mobs to the game for this quest to work.
Go to Mobinfos.txt this is again found in your OldCODB Folder.
You will need to add this to the bottom of this.
Code:
108 Iron 1 127 150 30000 10000 10000 0 10000 10000 1 100 2 True 10 331 1231231 10000 4 True
109 Sarah 1 127 160 30000 10000 10000 0 10000 10000 1 100 2 True 10 331 1231231 10000 4 True
110 Hyper 1 127 180 30000 10000 10000 0 10000 10000 1 100 2 True 10 331 1231231 10000 4 True
You will need to change some of these infos as all of the mobs have the same attk, MP, HP, Def and stuff.
Now go to MobSpawns.txt in your OldCODB Folder.
Add this to the bottom.
Code:
108 15 1844 139 113 161 134
109 15 1844 215 113 240 138
110 15 1844 176 111 200 136
108 15 1844 214 156 239 176
109 15 1844 176 111 200 136
110 15 1844 215 192 240 221
108 15 1844 178 194 200 222
109 15 1844 138 192 161 220
That's the real easy stuff out of the way. Only a couple more things and you will be ready to go.
Go to Mob.cs and search for
Code:
else if (MyMath.ChanceSuccess(DropRates.Meteor))
Under this void add
Code:
#region Gem Hunter Quest Drops
if (Name == "Iron" || Name == "Sarah" || Name == "Hyper")
{
if (MyMath.ChanceSuccess(.8))
{
DI2.Info.ID = 722343;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(.8))
{
DI2.Info.ID = 722344;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(.8))
{
DI2.Info.ID = 722345;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(.8))
{
DI2.Info.ID = 722346;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(.8))
{
DI2.Info.ID = 722347;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(.8))
{
DI2.Info.ID = 722348;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(.8))
{
DI2.Info.ID = 722349;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(.8))
{
DI2.Info.ID = 722350;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(.8))
{
DI2.Info.ID = 722351;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(.8))
{
DI2.Info.ID = 722352;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
}
#endregion
This will add the item drops to the server.
Almost forgot this part. This is very important without this you will not have a map to go to.
Goto DMap.cs and You should see near the top
Code:
public static ArrayList MapsAdding = new ArrayList()
To to the very end of this code and add a new map the map ID you will need is
I dont think I have missed anything out. If i have please leave a comment and I will add it as soon as I can. Walkthrough has been added for download at the bottom.
Hit the thanks button if you like this release and or use it.
I am also taking requests for quests.