#region RebirthMaster
case 59558:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text(
"I devote all my life to the research of eternity. And finally I Know the secret of");
dialog.Text(" rebirth! Well, anything I can help you with?");
dialog.Option("1st Rebirth.", 1);
dialog.Option("2nd Rebirth.", 2);
dialog.Option("level UP 140.", 5);
dialog.Option("Upgrade Class.", 6);
dialog.Option("Reincarnation.", 3);
dialog.Option("Reallot my Attribute Points.", 4);
dialog.Option("Just Passing By.", 255);
dialog.Avatar(51);
dialog.Send();
break;
}
case 1:
{
dialog.Text(
"Hello conqueror. You know, there are ancient stories about a second life and many people chose not to believe it. Even so, there are some people that believe in it, and that inspired me to learn about it. In my study, I found out how to reborn someone. But, in this quest, a CelestialStone may be needed. To get one, talk with Celestine(TwinCity 365, 92).");
dialog.Option("Tell me more about it.", 10);
dialog.Option("Reborn me.", 12);
dialog.Option("Nothing thank you.", 255);
dialog.Send();
break;
}
case 10:
{
dialog.Text(
"So you want to know more? When you reborn, you can chose what class you want to be the second life. Once you reborn you will start again the journey to conquer this world from level 15. Beware that you may gain some special skills depending on the class you chose to reborn, and you'll be able to get an own pet, that will follow and help you level or fight. The cost is a CelestialStone.");
dialog.Option("Reborn me.", 2);
dialog.Option("Nothing thank you.", 255);
dialog.Send();
break;
}
case 12:
{
if (client.Entity.Reborn == 0)
{
if (client.Entity.Class % 10 == 5 &&
client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
{
dialog.Text(
"There are two kinds of reborns. One is the normal one and the second one is blessed. The normal reborn will give you the chance to get a Super Gem and the blessed reborn will set a -1 into one of your equipment that you wear during the reborn. What do you chose?");
dialog.Option("Normal reborn.", 15);
dialog.Option("Blessed reborn.", 13);
dialog.Option("Nothing thank you.", 255);
dialog.Send();
}
else
{
dialog.Text(
"You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
dialog.Option("Ahh.", 255);
dialog.Send();
}
}
else
{
dialog.Text(
"You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
break;
}
case 15:
{
if (client.Entity.Reborn == 0)
{
if (client.Entity.Class % 10 == 5 &&
client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
{
dialog.Text("Select the super gem you desire.");
dialog.Option("SuperPhoenixGem.", 203);
dialog.Option("SuperDragonGem.", 213);
dialog.Option("SuperFuryGem.", 223);
dialog.Option("SuperRainbowGem.", 233);
dialog.Option("SuperVioletGem.", 253);
dialog.Option("SuperMoonGem.", 254);
dialog.Option("SuperKylinGem.", 243);
dialog.Option("Nothing thank you.", 255);
dialog.Send();
}
else
{
dialog.Text(
"You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
dialog.Option("Ahh.", 255);
dialog.Send();
}
break;
}
else
{
dialog.Text(
"You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
break;
}
case 13:
{
if (client.Entity.Reborn == 0)
{
if (client.Entity.Class % 10 == 5 &&
client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
{
dialog.Text("Select the class you want to reborn in.");
dialog.Option("Trojan.", (byte)(10 + npcRequest.OptionID));
dialog.Option("Warrior.", (byte)(20 + npcRequest.OptionID));
dialog.Option("Archer.", (byte)(40 + npcRequest.OptionID));
dialog.Option("WaterTaoist.", (byte)(132 + npcRequest.OptionID));
dialog.Option("FireTaoist.", (byte)(142 + npcRequest.OptionID));
dialog.Option("WindWalker", (byte)(160 + npcRequest.OptionID));
dialog.Option("Ninja.", (byte)(50 + npcRequest.OptionID));
dialog.Option("Monk.", (byte)(60 + npcRequest.OptionID));
dialog.Option("Pirate.", (byte)(70 + npcRequest.OptionID));
dialog.Option("Dragon-Warrior", (byte)(80 + npcRequest.OptionID));
dialog.Send();
}
else
{
dialog.Text(
"You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
dialog.Option("Ahh.", 255);
dialog.Send();
}
break;
}
else
{
dialog.Text(
"You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
break;
}
default:
{
if (client.Entity.Reborn == 0)
{
if (client.Entity.Class % 10 == 5 &&
client.Entity.Level >= (client.Entity.Class == 135 ? 110 : 120))
{
if (npcRequest.OptionID == 255)
return;
if (npcRequest.OptionID >= 200 && npcRequest.OptionID <= 254)
{
client.SelectedGem = (byte)(npcRequest.OptionID % 100);
if (client.SelectedGem == 54)
client.SelectedGem = 63;
if (client.Entity.Reborn == 0)
{
byte id = 4;
dialog.Text("Select the class you want to reborn in.");
dialog.Option("Trojan.", (byte)(10 + id));
dialog.Option("Warrior.", (byte)(20 + id));
dialog.Option("Archer.", (byte)(40 + id));
dialog.Option("WaterTaoist.", (byte)(132 + id));
dialog.Option("FireTaoist.", (byte)(142 + id));
dialog.Option("WindWalker", (byte)(161 + id));
dialog.Option("Ninja.", (byte)(50 + id));
dialog.Option("Monk.", (byte)(60 + id));
dialog.Option("Pirate.", (byte)(70 + id));
dialog.Option("Dragon-Warrior", (byte)(80 + id));
dialog.Send();
break;
}
else
{
dialog.Text(
"You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
}
else
{
if (client.Inventory.Contains(721259, 1))
{
byte _class = (byte)(npcRequest.OptionID - npcRequest.OptionID % 10);
if (_class > 100)
_class += 2;
byte type = (byte)(npcRequest.OptionID - _class);
if (_class < 100)
_class++;
if (type != 4)
{
_class -= 10;
}
if (client.Reborn(_class))
{
client.Inventory.Remove(721259, 1);
if (type == 4)
{
if (client.SelectedGem != 0)
{
uint gemid = (uint)(client.SelectedGem + 700000);
client.Inventory.Add(gemid, 0, 1);
}
}
else
{
int availableshots = 0;
for (byte count = 0; count < 12; count++)
if (!client.Equipment.Free(count))
if (client.Equipment.TryGetItem(count).Bless == 0)
availableshots++;
if (availableshots != 0)
{
byte ex = (byte)Kernel.Random.Next(12);
if (!client.Equipment.Free(ex))
if (client.Equipment.TryGetItem(ex).Bless == 0)
{
var item = client.Equipment.TryGetItem(ex);
item.Bless = 1;
item.Mode =
AhMeDHaliM.Game.Enums.ItemMode.Update;
item.Send(client);
AhMeDHaliM.Database.ConquerItemTable
.UpdateBless(item);
}
}
}
}
else
{
dialog.Text(
"Sorry, but you need atleast 2 free spaces in your inventory.");
dialog.Option("Ohh.", 255);
dialog.Send();
}
}
}
}
else
{
dialog.Text(
"You cannot reborn if your level is not 110+ for water saints and 120+ for other masters.");
dialog.Option("Ahh.", 255);
dialog.Send();
}
}
else
{
dialog.Text(
"You cannot reborn again here. Alex, an elder who lives in Ape Canyon, will tell you about the third life.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
break;
}
}
break;
}
#endregion