Register for your free account! | Forgot your password?

You last visited: Today at 09:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release]Dragon Spawning

Discussion on [Release]Dragon Spawning within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
[Release]Dragon Spawning

this will only work if u have Terato Dragon in ur client

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();
next search for:
Code:
static void CompanionThread_Execute()
after the closing bracket "}" paste this code

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 { }
        }
now open Database.cs and paste this
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);
                    }
                }
            }
        }
in your OldCODB create a text doc and call it dragonspawn.txt and paste this
Quote:
100 1 1038 334 326 334 326
then in mobinfos.txt paste this(only if u dont have the info for Terato Dragon)
Quote:
100 TeratoDragon 1 950 250 50000 2500 70 1500 0 0 100 70 21 8036 0 True 16 0 0 500 1 True
and he'll spawn every hour

SideNote: this may be the wrong way to do it but i learned to do this on my own
coreymills is offline  
Thanks
2 Users
Old 12/27/2010, 14:01   #2
 
elite*gold: 0
Join Date: Apr 2010
Posts: 291
Received Thanks: 61
Wasting time..for useless *****...
Code:
100 TeratoDragon 1 950 250 50000 2500 70 1500 0 0 100 70 21 8036 0 True 16 0 0 500 [COLOR="Red"]1[/COLOR] True
The red one is spawning time. (in seconds)
†he Knight is offline  
Thanks
1 User
Old 12/27/2010, 14:49   #3
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
Quote:
Originally Posted by coreymills View Post
SideNote: this may be the wrong way to do it but i learned to do this on my own
did u not read
coreymills is offline  
Old 12/28/2010, 01:47   #4
 
elite*gold: 0
Join Date: Aug 2010
Posts: 940
Received Thanks: 76
So then the 1 should be 3600 for an hour?
denominator is offline  
Old 12/28/2010, 14:21   #5
 
elite*gold: 0
Join Date: Apr 2010
Posts: 291
Received Thanks: 61
Quote:
Originally Posted by coreymills View Post
did u not read
Well my friend your learning is a piece of ****.. You aren't learning anything for now. When i started , I Was far behind you , Now I'm Far Ahead.

Quote:
Originally Posted by denominator View Post
So then the 1 should be 3600 for an hour?
Seems So.
†he Knight is offline  
Old 12/28/2010, 16:34   #6
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
i'm teaching all this to myself
coreymills is offline  
Old 12/28/2010, 21:28   #7
 
elite*gold: 0
Join Date: Aug 2010
Posts: 940
Received Thanks: 76
Well I changed the 1 to 3600 but haven`t bothered to log the server on to test it *****. I will eventually test it lol. Thanks for that little bit of info I probably read it elsewhere in the past but as with most things over time I forgot lol.
denominator is offline  
Old 12/29/2010, 22:35   #8
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
So much bashing... While I agree with the fact that it's far from perfect and that making it so focused ("LETS SPAWN DRAGON!" instead of a entity spawn method to add w/e mob you want) is a bit limiting but I don't recall seeing anything posted before to do this sort of stuff and he's teaching himself.

Needs improvement but still.. he's learning so that should not be bashed.
pro4never is offline  
Thanks
4 Users
Old 12/31/2010, 16:17   #9
 
elite*gold: 0
Join Date: Feb 2008
Posts: 23
Received Thanks: 0
I cannot find the timers with in the program.cs. I am probably over looking them. lol
cahanf is offline  
Old 12/31/2010, 20:44   #10
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
search for:
Code:
static void Main(string[] args)
search inside that codeblock
coreymills is offline  
Old 01/01/2011, 01:21   #11
 
elite*gold: 0
Join Date: Feb 2008
Posts: 23
Received Thanks: 0
The only mention of timer I see is that and if that is the correct line do I put it underneath... and how exactly do you distinguish the timer. I have never donw anything with the timer before and Im curious about it. tThanks
Code:
public static System.Timers.Timer DropEventTimer = null;
cahanf is offline  
Old 01/01/2011, 01:30   #12
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
what source version are u using?
coreymills is offline  
Thanks
1 User
Old 01/01/2011, 02:37   #13
 
elite*gold: 0
Join Date: Feb 2008
Posts: 23
Received Thanks: 0
I'm using Arcos 5165 version.
cahanf is offline  
Old 01/01/2011, 03:07   #14
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
search for:
Code:
MyThread MobThread = new MyThread();
                MobThread.Execute += new Execute(MobThread_Execute);
                MobThread.Start(400);
paste it under the MobThread.Start(400);
coreymills is offline  
Old 01/28/2011, 08:08   #15
 
elite*gold: 0
Join Date: Dec 2010
Posts: 12
Received Thanks: 1
all error i'm using C#
hunterlow2 is offline  
Reply


Similar Threads Similar Threads
[Release]DRAGON PSG-1 W/ FAST SWITCH
10/27/2010 - Soldier Front Hacks, Bots, Cheats & Exploits - 13 Replies
PATCHED :(
[Release] Dragon Fist
05/26/2010 - S4 League Hacks, Bots, Cheats & Exploits - 24 Replies
Hya , i want to post the iteminfo.x4 about the dragon fist that posted revolution in the other topic , for who didnt understand the german xD In this Item u will find Only the DragonFist (sound like dragonball xD) http://i45.tinypic.com/el1mp0.jpg Here's The Link http://www.mediafire.com/?0izfmjoojjc Credit By Revolution-X
[Release] Npc spawning
01/29/2010 - CO2 PServer Guides & Releases - 7 Replies
Ok so this is sorta a mini/partial release. I'm tired and I really don't feel like finishing this (did conquer 1.0 not have blue mouse or is everything just fucked up on my end?...) Anyways I wanted to finish up a blue mouse system for people but due to my own lazyness and stupidity I can't finish it up right now. Figured I may as well release what I have done for people to use. THIS IS FOR COFUTURE CONQUER 1.0 SOURCE! Co Emu will be virtually IDENTICAL, lotf will require a bit of...
[Release]Undetected DRAGON FA-MAS[100%]
12/18/2009 - Soldier Front Hacks, Bots, Cheats & Exploits - 11 Replies
http://i46.photobucket.com/albums/f150/xXNIEGELXx/ patched.gif



All times are GMT +2. The time now is 09:40.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.