Hello again, this time i am posting my own custom Dis City quest...
little info shall we?
What is required of the player?
A: first level 5 eggs, second level 3 eggs, reward is in last level after defeating
the dragon
What eggs?
A: eggs such as egg(Mercury), Egg(Galaxy), look it up... and yes they are individuals so it is pretty hard to progress with my setup
Is there any restrictions?
A: Yes, the NPC only allows teleports every 15 minutes... also there is a level 130 and reborn 1 requirement... you can customize it the way u want if u know how...
How do they receive the reward at the end?
A: if u follow the code its a drop from the monster, which can easily be changed to CPS or whatever you like, just pay attention to red text like always =)
ok first of all, lets get your NPCs done.. your current beginning teleporter is already there most of the time but i will put his numbers just in case
Step 1: Access your NPC.txt file and place in this, the last one is the first dis city guy
10046 1260 2 0 1070 192 188
10045 1260 2 0 1037 232 228
3215 1314 2 67 1020 532 480
Step 2: place your talk code, i have taken the liberty of making it simple and easily editable... ( so i think); access NPCDialog.cs
#region Level 3 Dis city transporter
case 10046:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Hello, i am able to transport you if you have the necessary items..."));
GC.AddSend(Packets.NPCLink("What are they!?!", 1));
GC.AddSend(Packets.NPCLink("YaYa, i already know", 2));
GC.AddSend(Packets.NPCLink("Get out of my way N00B", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)//722031
{
GC.AddSend(Packets.NPCSay("You must obtain eggs, of Moon, Star, and Galaxy "));
GC.AddSend(Packets.NPCLink("I HAVE IT!!", 2));
GC.AddSend(Packets.NPCLink("Thanks", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 2)
{
bool Req = false;
if (GC.MyChar.InventoryContains(722031, 1) && GC.MyChar.InventoryContains(722032, 1) && GC.MyChar.InventoryContains(722033, 1))
Req = true;
string missing = "";
if (!GC.MyChar.InventoryContains(722031, 1))
missing += ", Moon ";
if (!GC.MyChar.InventoryContains(722032, 1))
missing += ", Star ";
if (!GC.MyChar.InventoryContains(722033, 1))
missing += ", Galaxy ";
if (Req == true)
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722031));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722032));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722033));
GC.MyChar.Teleport(2024, 148, 227);
GC.AddSend(Packets.NPCSay("Very good!! now you will go on to the Third level, go to the top right of this map and face the LORD DRAGON!!"));
GC.AddSend(Packets.NPCLink("Thanks", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("you still havent completed the quest, you are missing " + missing + "Egg(s)"));
GC.AddSend(Packets.NPCLink("Thanks", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
#region Level 2 Dis city transporter
case 10045:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Hello, i am able to transport you if you have the necessary items..."));
GC.AddSend(Packets.NPCLink("What are they!?!", 1));
GC.AddSend(Packets.NPCLink("YaYa, i already know", 2));
GC.AddSend(Packets.NPCLink("Get out of my way N00B", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.AddSend(Packets.NPCSay("You must obtain eggs, of Jupiter, Mercury, Mars, Saturn, and Earth"));
GC.AddSend(Packets.NPCLink("I HAVE IT!!", 2));
GC.AddSend(Packets.NPCLink("Thanks", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 2)
{
bool Req = false;
if (GC.MyChar.InventoryContains(722022, 1) && GC.MyChar.InventoryContains(722023, 1) && GC.MyChar.InventoryContains(722024, 1) && GC.MyChar.InventoryContains(722025, 1) && GC.MyChar.InventoryContains(722025, 1))
Req = true;
string missing = "";
if (!GC.MyChar.InventoryContains(722022, 1))
missing += ", Jupiter ";
if (!GC.MyChar.InventoryContains(722023, 1))
missing += ", Mercury ";
if (!GC.MyChar.InventoryContains(722024, 1))
missing += ", Mars ";
if (!GC.MyChar.InventoryContains(722024, 1))
missing += ", Saturn ";
if (!GC.MyChar.InventoryContains(722024, 1))
missing += ", Earth ";
if (Req == true)
{
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722022));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722023));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722024));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722025));
GC.MyChar.RemoveItem(GC.MyChar.NextItem(722026));
GC.MyChar.Teleport(1070, 25, 25);
GC.AddSend(Packets.NPCSay("Very good!! now you will go on to the second level, obtain the 3 eggs, Moon, Star, and Galaxy"));
GC.AddSend(Packets.NPCLink("Thanks", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("you still havent completed the quest, you are missing " + missing + "Egg(s)"));
GC.AddSend(Packets.NPCLink("Thanks", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
#region Dis City Start
case 3215:
{
if (DateTime.Now.Minute == 00 || DateTime.Now.Minute == 15 || DateTime.Now.Minute == 30 || DateTime.Now.Minute == 45)
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Welcome to the Dis city quest, here you will be required to gather a few eggs from monster drops to progress to the ultimate dragon... he will drop power expball...have fun =)"));
GC.AddSend(Packets.NPCLink("I think i can handle it", 1));
GC.AddSend(Packets.NPCLink("NO THANKS", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.AddSend(Packets.NPCSay("The requirements of this quest is at least level 130, and rebirth of at least 1"));
GC.AddSend(Packets.NPCLink("I am ready!!", 2));
GC.AddSend(Packets.NPCLink("Nevermind", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 2)
{
bool Req = true;
string Missing = "";
if (GC.MyChar.Reborns == 0)
{
Req = false;
Missing += " Reborn level ";
}
if (GC.MyChar.Level < 130)
{
Req = false;
Missing += ", Experience level ";
}
if (Req == true)
{
GC.MyChar.Teleport(1037,227, 231);
GC.AddSend(Packets.NPCSay("Welcome to dis city, Gather all 5 kinds of eggs here, Jupiter, Mercury, Mars, Saturn, and Earth"));
GC.AddSend(Packets.NPCLink("ok", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else
{
GC.AddSend(Packets.NPCSay("im sorry... you lack the" + Missing + "required to join here"));
GC.AddSend(Packets.NPCLink("ok", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
}
else
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("Im sorry, Dis City only opens every 15 minutes, Example: XX:00 XX:15 XX:30 XX:45"));
GC.AddSend(Packets.NPCLink("i need info", 1));
GC.AddSend(Packets.NPCLink("Alright, ill come back", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
if (Control == 1)
{
GC.AddSend(Packets.NPCSay("O alright, well this is the DisCity Quest, here you will be required to gather a few eggs from monster drops to progress to the ultimate dragon... he will drop power expball...have fun =)"));
GC.AddSend(Packets.NPCLink("Sounds simple", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
}
break;
}
#endregion
Step 3: Now comes the actual monsters... Go to your MobInfos.txt and place this at the end, you can change the first number as u see fit if u have other custom mobs
99 DragonLord 1 950 250 10000000 5000 700 20000 0 0 5 5 21 1120 3 False 18 1000000 500000 5 3 False
100 WhiteTiger 1 384 120 100000 2000 700 10000 0 0 100 70 21 1150 7 False 18 1000000 500000 500 3 False
101 Destroyer 1 151 120 100000 2000 700 10000 0 0 100 70 21 1150 7 False 18 1000000 500000 500 3 False
Red = health
Step 4: well we have the monster in database... now we need to spawn it.. yep you guessed it.. get into your MobSpawns.txt and add in this
99 1 2024 151 035 151 035
100 25 1037 258 276 298 267
100 25 1037 292 292 283 258
100 25 1037 258 283 263 286
101 25 1070 51 61 127 134
101 25 1070 52 62 128 135
101 25 1070 53 63 129 136
101 25 1070 54 64 130 137
101 25 1070 55 65 131 138
do not touch that unless u really know what you are doing..
and last but not least... your drop info
Step 5: go to your mob.cs and search for
Code:
else if (MyMath.ChanceSuccess(DropRates.CleanWater))
under that entire code, you must paste
else if (Name == "DragonLord")
{
if (MyMath.ChanceSuccess(100))//change 100 to what ever u want the droprate to be
{
Char.AddItem(722057);
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
Char.Teleport(1020, 532, 480);
}
}
else if (Name == "WhiteTiger")
{
if (MyMath.ChanceSuccess(60))//change 100 to what ever u want the droprate to be
{
DI2.Info.ID = 722022;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(60))//change 100 to what ever u want the droprate to be
{
DI2.Info.ID = 722023;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(60))//change 100 to what ever u want the droprate to be
{
DI2.Info.ID = 722024;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(60))//change 100 to what ever u want the droprate to be
{
DI2.Info.ID = 722025;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(60))//change 100 to what ever u want the droprate to be
{
DI2.Info.ID = 722026;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
}
else if (Name == "Destroyer")
{
if (MyMath.ChanceSuccess(60))//change 100 to what ever u want the droprate to be
{
DI2.Info.ID = 722031;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(60))//change 100 to what ever u want the droprate to be
{
DI2.Info.ID = 722032;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
if (MyMath.ChanceSuccess(60))//change 100 to what ever u want the droprate to be
{
DI2.Info.ID = 722033;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
}
i believe that is it, now go test it out and if there is a probem post it, and i will revise as needed... Have fun coding