Solucion spawn Nemesis y Snowbanshee en Dragon Island (Source Hector o derivados)
Buscamos en Npcs.cs ''#region Nemesis'' y reemplazamos el npc de Nemesis y Snowbanshee por lo siguiente
#region NemesisTyrant
case 3080:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hah! Want my treasures? Go to hell! Show me what you`re made of!");
dialog.Option("We`ll~see!", 1);
dialog.Option("Leave.", 255);
dialog.Avatar(0);
dialog.Send();
break;
}
case 1:
{
Kernel.SpawnNemesis2 = false;
Database.MonsterInformation mob;
Database.MonsterInformation.MonsterInformations.TryGetValue(4220, out mob);
client.Map.Spawnthis(mob, client, npcs.MapID, npcs.X, npcs.Y);
Kernel.SpawnBanshee2 = false;
Kernel.Maps[10137].Npcs.Remove(3080);
client.SendScreen(new MsgAction(true) { UID = 3080, ID = MsgAction.Mode.RemoveEntity }, true);
MsgMapItem Send = new MsgMapItem(true);
Send.UID = 3080;
Send.X = 568;
Send.Y = 372;
Send.Type = 6;
client.SendScreenSpawn(Send, true);
}
break;
}
break;
}
#endregion
#region SnowBanshee
case 37896:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hah! Want my SnowBanshee? Go to hell! Show me what you`re made of!");
dialog.Option("We`ll~see!", 1);
dialog.Option("Leave.", 255);
dialog.Avatar(0);
dialog.Send();
break;
}
case 1:
{
Database.MonsterInformation mob;
Database.MonsterInformation.MonsterInformations.TryGetValue(4171, out mob);
client.Map.Spawnthis(mob, client, npcs.MapID, npcs.X, npcs.Y);
Kernel.SpawnBanshee2 = false;
Kernel.Maps[10137].Npcs.Remove(37896);
client.SendScreen(new MsgAction(true) { UID = 37896, ID = MsgAction.Mode.RemoveEntity }, true);
MsgMapItem Send = new MsgMapItem(true);
Send.UID = 37896;
Send.X = client.Player.X;
Send.Y = client.Player.Y;
Send.Type = 6;
client.SendScreenSpawn(Send, true);
}
break;
}
break;
}
#endregion
luego nos dirijimos a MsgMonsterSpawn.cs y reemplazamos todo lo que hay por esto
using System;
using COServer.Game;
using System.Drawing;
using COServer.Client;
using COServer.Network.GamePackets;
namespace COServer.Database
{
public unsafe class MonsterSpawn
{
public static Time32 LastDemonSpawn;
public static void SpawnSnowDemon()
{
if (Time32.Now < LastDemonSpawn.AddMinutes(30)) return;
LastDemonSpawn = Time32.Now;
Database.MonsterInformation mob;
Database.MonsterInformation.MonsterInformations.TryGetValue(4220, out mob);
Kernel.Maps[10137].Spawnthiskingdom(mob, Convert.ToUInt16(561), Convert.ToUInt16(649));
// Console.WriteLine("NemesisTyrant has been spawned.");
Kernel.SendWorldMessage(new MsgTalk("The NemesisTyrant appeared in Dragon Island (591,405)! Defeat it!", Color.White, MsgTalk.System));
}
public static Time32 LastSnowBSpawn;
public static void SpawnSnowB()
{
if (Time32.Now < LastSnowBSpawn.AddMinutes(30)) return;
LastSnowBSpawn = Time32.Now;
Database.MonsterInformation mob;
Database.MonsterInformation.MonsterInformations.TryGetValue(4171, out mob);
Kernel.Maps[10137].Spawnthiskingdom(mob, Convert.ToUInt16(810), Convert.ToUInt16(574));
// Console.WriteLine("SnowBanshee has been spawned.");
Kernel.SendWorldMessage(new MsgTalk("The Snow Banshee appeared in Dragon Island (636,695)! Defeat it!", Color.White, MsgTalk.System));
}
public static Time32 LastTeratoSpawn;
public static void StartSnowBanshee(GameState client)
{
if (!Kernel.Maps[10137].Npcs.ContainsKey(37896))
{
Kernel.SpawnBanshee = true;
Kernel.SpawnBanshee2 = true;
NpcSpawn npc = new NpcSpawn();
npc.UID = 37896;
npc.Mesh = 16537;
npc.X = 683;
npc.Y = 699;
npc.MapID = 10137;
npc.Type = Enums.NpcType.Talker;
Kernel.Maps[10137].Npcs.Add(37896, npc);
npc.SendSpawn(client);
// client.MsgTalkBox("SnowBanshee has appeared ? Teleport me?", (p) => p.Player.Teleport(1927, 540, 430), null, 60);
Kernel.SendWorldMessage(new MsgTalk("The Snow Banshee appeared in Dragon Island (683,699)! Defeat it!", Color.White, MsgTalk.System));
}
}
public static void StartNemesisTyrant(GameState client)
{
uint UID = 3080;
ushort MapID = 10137;
ushort Mesh = 30796;
Random Random = new Random();
//int random = Random.Next(1, 3);
//if (!Kernel.Maps[MapID].Npcs.ContainsKey(UID))
//{
// if (random == 1)
// {
Kernel.SpawnNemesis = true;
Kernel.SpawnNemesis2 = true;
NpcSpawn npc = new NpcSpawn();
npc.UID = UID;
npc.Mesh = Mesh;
npc.X = 589;
npc.Y = 437;
npc.MapID = MapID;
npc.Type = Enums.NpcType.Talker;
Kernel.Maps[MapID].Npcs.Add(UID, npc);
npc.SendSpawn(client);
Kernel.SendWorldMessage(new MsgTalk("The NemesisTyrant has shown up in the Dragon Island in (589, 437)", Color.White, MsgTalk.System));
//}
//else if (random == 2)
//{
// Kernel.SpawnNemesis = true;
// Kernel.SpawnNemesis2 = true;
// NpcSpawn npc = new NpcSpawn();
// npc.UID = UID;
// npc.Mesh = Mesh;
// npc.X = 558;
// npc.Y = 380;
// npc.MapID = MapID;
// npc.Type = Enums.NpcType.Talker;
// Kernel.Maps[MapID].Npcs.Add(UID, npc);
// npc.SendSpawn(client);
// Kernel.SendWorldMessage(new MsgTalk("The NemesisTyrant has shown up in the Dragon Island in (558, 380)", Color.White, MsgTalk.System));
//}
//else if (random == 3)
//{
// Kernel.SpawnNemesis = true;
// Kernel.SpawnNemesis2 = true;
// NpcSpawn npc = new NpcSpawn();
// npc.UID = UID;
// npc.Mesh = Mesh;
// npc.X = 587;
// npc.Y = 365;
// npc.MapID = MapID;
// npc.Type = Enums.NpcType.Talker;
// Kernel.Maps[MapID].Npcs.Add(UID, npc);
// npc.SendSpawn(client);
// Kernel.SendWorldMessage(new MsgTalk("The NemesisTyrant has shown up in the Dragon Islan in (587, 365)", Color.White, MsgTalk.System));
//}
//else if (random == 4)
//{
// Kernel.SpawnNemesis = true;
// Kernel.SpawnNemesis2 = true;
// NpcSpawn npc = new NpcSpawn();
// npc.UID = UID;
// npc.Mesh = Mesh;
// npc.X = 137;
// npc.Y = 88;
// npc.MapID = MapID;
// npc.Type = Enums.NpcType.Talker;
// Kernel.Maps[MapID].Npcs.Add(UID, npc);
// npc.SendSpawn(client);
// Kernel.SendWorldMessage(new MsgTalk("The NemesisTyrant has shown up in the Bloodshed Sea in (137, 088)", Color.White, MsgTalk.System));
//}
//else if (random == 5)
//{
// Kernel.SpawnNemesis = true;
// Kernel.SpawnNemesis2 = true;
// NpcSpawn npc = new NpcSpawn();
// npc.UID = UID;
// npc.Mesh = Mesh;
// npc.X = 229;
// npc.Y = 349;
// npc.MapID = MapID;
// npc.Type = Enums.NpcType.Talker;
// Kernel.Maps[MapID].Npcs.Add(UID, npc);
// npc.SendSpawn(client);
// Kernel.SendWorldMessage(new MsgTalk("The NemesisTyrant has shown up in the Bloodshed Sea in (229, 106)", Color.White, MsgTalk.System));
//}
//}
}
public static void EpicTrojan1(GameState client)
{
if (!Kernel.Maps[3825].Npcs.ContainsKey(3000))
{
Kernel.SpawnBanshee = true;
Kernel.SpawnBanshee2 = true;
NpcSpawn npc = new NpcSpawn();
npc.UID = 3000;
npc.Mesh = 35930;
npc.X = 39;
npc.Y = 45;
npc.MapID = client.Player.MapID;
MsgName str = new MsgName(true);
str.TextsCount = 1;
str.PositionX = (ushort)npc.X;
str.PositionY = (ushort)npc.Y;
str.Action = MsgName.Mode.MapEffect;
str.Texts.Add("fam_exp_special");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
npc.Type = Enums.NpcType.Talker;
Kernel.Maps[3825].Npcs.Add(3000, npc);
npc.SendSpawn(client);
MsgName str2 = new MsgName(true);
str2.TextsCount = 1;
str2.PositionX = (ushort)45;
str2.PositionY = (ushort)45;
str2.Action = MsgName.Mode.MapEffect;
str2.Texts.Add("fire3");
client.SendScreen(str2, true);
client.SendScreen(str2.ToArray(), true);
}
}
public static void EpicTrojan2(GameState client)
{
if (!Kernel.Maps[3825].Npcs.ContainsKey(2998))
{
Kernel.SpawnBanshee = true;
Kernel.SpawnBanshee2 = true;
NpcSpawn npc = new NpcSpawn();
npc.UID = 2998;
npc.Mesh = 35930;
npc.X = 45;
npc.Y = 39;
npc.MapID = client.Player.MapID;
MsgName str = new MsgName(true);
str.TextsCount = 1;
str.PositionX = (ushort)npc.X;
str.PositionY = (ushort)npc.Y;
str.Action = MsgName.Mode.MapEffect;
str.Texts.Add("fam_exp_special");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
npc.Type = Enums.NpcType.Talker;
Kernel.Maps[3825].Npcs.Add(2998, npc);
npc.SendSpawn(client);
MsgName str2 = new MsgName(true);
str2.TextsCount = 1;
str2.PositionX = (ushort)45;
str2.PositionY = (ushort)45;
str2.Action = MsgName.Mode.MapEffect;
str2.Texts.Add("fire3");
client.SendScreen(str2, true);
client.SendScreen(str2.ToArray(), true);
}
}
public static void EpicTrojan4(GameState client)
{
if (!Kernel.Maps[3825].Npcs.ContainsKey(2999))
{
Kernel.SpawnBanshee = true;
Kernel.SpawnBanshee2 = true;
NpcSpawn npc = new NpcSpawn();
npc.UID = 2999;
npc.Mesh = 35930;
npc.X = 50;
npc.Y = 45;
npc.MapID = client.Player.MapID;
MsgName str = new MsgName(true);
str.TextsCount = 1;
str.PositionX = (ushort)npc.X;
str.PositionY = (ushort)npc.Y;
str.Action = MsgName.Mode.MapEffect;
str.Texts.Add("fam_exp_special");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
MsgName str2 = new MsgName(true);
str2.TextsCount = 1;
str2.PositionX = (ushort)45;
str2.PositionY = (ushort)45;
str2.Action = MsgName.Mode.MapEffect;
str2.Texts.Add("fire3");
client.SendScreen(str2, true);
client.SendScreen(str2.ToArray(), true);
npc.Type = Enums.NpcType.Talker;
Kernel.Maps[3825].Npcs.Add(2999, npc);
npc.SendSpawn(client);
}
}
public static void EpicTrojan3(GameState client)
{
if (!Kernel.Maps[3825].Npcs.ContainsKey(2997))
{
Kernel.SpawnBanshee = true;
Kernel.SpawnBanshee2 = true;
NpcSpawn npc = new NpcSpawn();
npc.UID = 2997;
npc.Mesh = 35930;
npc.X = 45;
npc.Y = 50;
npc.MapID = client.Player.MapID;
npc.Type = Enums.NpcType.Talker;
MsgName str = new MsgName(true);
str.TextsCount = 1;
str.PositionX = (ushort)npc.X;
str.PositionY = (ushort)npc.Y;
str.Action = MsgName.Mode.MapEffect;
str.Texts.Add("fam_exp_special");
client.SendScreen(str, true);
client.SendScreen(str.ToArray(), true);
MsgName str2 = new MsgName(true);
str2.TextsCount = 1;
str2.PositionX = (ushort)45;
str2.PositionY = (ushort)45;
str2.Action = MsgName.Mode.MapEffect;
str2.Texts.Add("fire3");
client.SendScreen(str2, true);
client.SendScreen(str2.ToArray(), true);
Kernel.Maps[3825].Npcs.Add(2997, npc);
npc.SendSpawn(client);
}
}
public static uint mapxy = 1;
public static void GoldBoxStart(GameState client)
{
if (client.Inventory.Contains(3004296, 1))
{
client.Inventory.Remove(3004296, 1);
}
if (Kernel.goldbox == false)
{
Kernel.goldbox = true;
client.Map.SpawnGoldBox(client, 3846, 223, 209);
client.Map.SpawnGoldBox(client, 3846, 255, 182);
client.Map.SpawnGoldBox(client, 3846, 215, 293);
client.Map.SpawnGoldBox(client, 3846, 134, 241);
client.Map.SpawnGoldBox(client, 3846, 128, 190);
client.Map.SpawnGoldBox(client, 3846, 185, 137);
client.Map.SpawnGoldBox(client, 3846, 75, 97);
client.Map.SpawnGoldBox(client, 3846, 266, 120);
client.Map.SpawnGoldBox(client, 3846, 323, 286);
}
}
}
}
por ultimo buscamos lo siguiente
if (client.Player.MapID == 3846||client.Player.MapID == 10137 && Kernel.SpawnNemesis2)
Reemplazamos todo el SpawnNemesis2 y el SpawnBanshee2 por el siguiente
if (client.Player.MapID == 3846||client.Player.MapID == 10137 && Kernel.SpawnNemesis2)
{
foreach (INpc Npc in client.Map.Npcs.Values)
{
if (Npc.MapID == 10137 && (Npc.UID == 3080) && Kernel.GetDistance(client.Player.X, client.Player.Y, Npc.X, Npc.Y) < 17)
{
Npc.SendSpawn(client);
}
}
}
if (client.Player.MapID == 10137 && Kernel.SpawnBanshee2)
{
foreach (INpc Npc in client.Map.Npcs.Values)
{
if (Npc.MapID == 1927 && (Npc.UID == 2999) && Kernel.GetDistance(client.Player.X, client.Player.Y, Npc.X, Npc.Y) < 17)
{
Npc.SendSpawn(client);
}
}
}
---------------------------------------------------------------------------
Loading Image