EDIT: this is for the 5165 version
NOTE: this was coded using the ConquerSX source
the timer i had help doing so credits to StealArcher for help with the timer
go to program.cs and look for ur timers paste this there:
Code:
Program.SpawnDrag = new System.Timers.Timer(); Program.SpawnDrag.Interval = 3600000; Program.SpawnDrag.Elapsed += new System.Timers.ElapsedEventHandler(SpawnDrag_Elapsed); Program.SpawnDrag.Start();
Code:
static void CompanionThread_Execute()
Code:
public static void SpawnDrag_Elapsed(object source, System.Timers.ElapsedEventArgs e) { try { if (SpawnDrag != null) { Database.SpawnDragon(); Game.World.SendMsgToAll("Server", "Dragon Spawned in GuildWar Area", 2011, 0); SpawnDrag.Stop(); SpawnDrag.Close(); SpawnDrag = null; } } catch { } }
Code:
public static void SpawnDragon() { string[] DSpawn = File.ReadAllLines(@"OldCODB\MobInfos.txt"); Hashtable Mobs = new Hashtable(DSpawn.Length); for (int i = 0; i < DSpawn.Length; i++) { if (DSpawn[i][0] != '*') { Game.Mob M = new ConquerSx.Game.Mob(DSpawn[i]); Mobs.Add(M.MobID, M); } } string[] DMob = File.ReadAllLines(@"OldCODB\dragonspawn.txt"); foreach (string Spawn in DMob) { if (Spawn[0] == '*') return; { string[] SpawnInfo = Spawn.Split(' '); int MobID = int.Parse(SpawnInfo[0]); int Count = int.Parse(SpawnInfo[1]); ushort Map = ushort.Parse(SpawnInfo[2]); ushort XFrom = ushort.Parse(SpawnInfo[3]); ushort YFrom = ushort.Parse(SpawnInfo[4]); ushort XTo = ushort.Parse(SpawnInfo[5]); ushort YTo = ushort.Parse(SpawnInfo[6]); if (!Game.World.H_Mobs.Contains(Map)) Game.World.H_Mobs.Add(Map, new Hashtable()); Hashtable MapMobs = (Hashtable)Game.World.H_Mobs[Map]; DMap D = (DMap)DMaps.H_DMaps[Map]; for (int i = 0; i < Count; i++) { Game.Mob _Mob = new ConquerSx.Game.Mob((Game.Mob)Mobs[MobID]); _Mob.Loc = new ConquerSx.Game.Location(); _Mob.Loc.Map = Map; _Mob.Loc.X = (ushort)Program.Rnd.Next(Math.Min(XFrom, XTo), Math.Max(XFrom, XTo)); _Mob.Loc.Y = (ushort)Program.Rnd.Next(Math.Min(YFrom, YTo), Math.Max(YFrom, YTo)); while (D != null && D.GetCell(_Mob.Loc.X, _Mob.Loc.Y).NoAccess) { _Mob.Loc.X = (ushort)Program.Rnd.Next(Math.Min(XFrom, XTo), Math.Max(XFrom, XTo)); _Mob.Loc.Y = (ushort)Program.Rnd.Next(Math.Min(YFrom, YTo), Math.Max(YFrom, YTo)); } _Mob.StartLoc = _Mob.Loc; _Mob.EntityID = (uint)Program.Rnd.Next(400000, 500000); while (Game.World.H_Chars.Contains(_Mob.EntityID) || MapMobs.Contains(_Mob.EntityID)) _Mob.EntityID = (uint)Program.Rnd.Next(400000, 500000); MapMobs.Add(_Mob.EntityID, _Mob); } } } }
then in mobinfos.txt paste this(only if u dont have the info for Terato Dragon)Quote:
100 1 1038 334 326 334 326
and he'll spawn every hourQuote:
100 TeratoDragon 1 950 250 50000 2500 70 1500 0 0 100 70 21 8036 0 True 16 0 0 500 1 True
SideNote: this may be the wrong way to do it but i learned to do this on my own