Release Spawns sistem for Hellmouth

03/15/2011 00:13 thesamuraivega#1
Hi I hope you understand me, I do not know much English :P im mexican
ok...
1.-Open The proyet Hellmouth with VisualStudio c# 2010 =)
2.-Find Monster.cs and replace Everything That there for:

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Hellmouth
{
    public class Mob : EntityObject
    {
        public uint Mesh;
        private string _Name;
        public DateTime Killed;
        public bool Alive;
        public BaseMob BaseMob;
        public ulong Status;
        public Spawn Spawn;
        public uint Amount;
        public ushort Spread;
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
    }
}
Save it

3.-Find Database.cs
4.-Find the lines
Code:
                   public static void GetSpawns()
        {
            //I've changed mob spawn code like 5 times.. this should still work though so w/e.
            /*MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT);
            cmd.Select("MobSpawns");
            uint Count = 0;
            MySqlReader r = new MySqlReader(cmd);
            while (r.Read())
            {
                MobSpawn S = new MobSpawn(r.ReadUInt16("Amount"), Dictionary.BaseMobs[r.ReadUInt16("SpawnMob")], r.ReadUInt16("X"), r.ReadUInt16("Z"), r.ReadUInt16("Spread"), r.ReadUInt16("Map"));
                Count += (uint)S.Members.Count;
            }
            Console.WriteLine(Program.Title + " Spawning " + Count + " monsters into the world");
        */
And Replace with the following

Code:
            public static void GetSpawns()
            {
                MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT);
                cmd.Select("mobspawns");
                uint Count = 0;
                MySqlReader r = new MySqlReader(cmd);
                while (r.Read())
                {
                    Mob Mon = new Mob();

                    Mon.Amount = r.ReadUInt16("Amount");
                    Mon.BaseMob = Dictionary.BaseMobs[r.ReadUInt16("SpawnMob")];
                    Mon.X = r.ReadUInt16("X");
                    Mon.Y = r.ReadUInt16("Y");
                    Mon.Spread = r.ReadUInt16("Spread");
                    Mon.Map = r.ReadUInt16("Map");
                    Mon.MobLevel = r.ReadByte("Level");
                    Mon.MobHP = r.ReadUInt16("HP");
                    Mon.UID = r.ReadUInt32("UID");
                    Mon.Name = r.ReadString("Name");
                    Mon.Mesh = r.ReadUInt16("Mesh");
                    Mon.Instance = r.ReadUInt16("Instance");
                    Count++;

                    if (!Dictionary.Maps.ContainsKey(Mon.Map))
                        Dictionary.Maps.ThreadSafeAdd(Mon.Map, new Map(0));
                    Dictionary.Maps[Mon.Map].AddMonster(Mon, Handler.SetCoord(Mon.X, Mon.Y));

                }
                Console.WriteLine(Program.Title + " Spawning " + Count + " monsters into the world Mysterious");
5.-Update more mobspawns

If not liberation but they seem to serve some ;)

Sorry for my bad English:cool::p

credits to zerovb.com

Here a pics

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

:)
03/15/2011 00:17 |_Beetle_|#2
Thats is so good, thanks very much :)
03/15/2011 00:41 pro4never#3
You are doing it wrong...

I suggest fixing the monsterspawn class. The way you posted works but has a number of problems.

#1: you don't have any of the functionality of knowing the mob spawns (spread info for respawn information, base mob for the spawn to avoid regenerating mob info, pulling number in spawn that are dead... etc)

#2: you dont have the dmap/object checking. The way I wrote the spawn class it ensures monsters never get located in the wrong spot (ontop of other monsters or in invalid coords)

#3: you have no reference for where spawns are and their members. Makes coding the mob ai system much more difficult.

#4: you are only generating 1 monster per spawn in db....

#5: you are not generating the monster uid (why hp doesn't show)
03/15/2011 00:48 thesamuraivega#4
Quote:
Originally Posted by pro4never View Post
You are doing it wrong...

I suggest fixing the monsterspawn class. The way you posted works but has a number of problems.

#1: you don't have any of the functionality of knowing the mob spawns (spread info for respawn information, base mob for the spawn to avoid regenerating mob info, pulling number in spawn that are dead... etc)

#2: you dont have the dmap/object checking. The way I wrote the spawn class it ensures monsters never get located in the wrong spot (ontop of other monsters or in invalid coords)

#3: you have no reference for where spawns are and their members. Makes coding the mob ai system much more difficult.

#4: you are only generating 1 monster per spawn in db....

#5: you are not generating the monster uid (why hp doesn't show)
xD is a basic sistem bro :p
03/15/2011 00:58 mohamedkhaled#5
Loled, from where did you got this code?!
i don't suggest it at all it only make a big mess with the spawn system.
03/15/2011 01:10 chickmagnet#6
Quote:
Originally Posted by mohamedkhaled View Post
Loled, from where did you got this code?!
i don't suggest it at all it only make a big mess with the spawn system.
kinda and kinda not it got the monster to spawn now all u gotta do is fix it
03/15/2011 01:21 mohamedkhaled#7
actually, i am the one who wrote it from lets say when this source have been released to test it only soo i released it as a base for people Lol, but i have coded a very nice mob system after i realized how it works in the source ^^!

<EDIT>
Note: i didn't code the full Mob system yet, i suggest not to annoy me right!?(don't get it wrong guys!!!!!) i mean don't ask for the mob system :)
03/15/2011 03:19 { Angelius }#8
Quote:
Originally Posted by chickmagnet View Post
kinda and kinda not it got the monster to spawn now all u gotta do is fix it
nope all you gota do is counting/reading

Plas hleb bug/ i can see mob hp mob dont atak,

lmao

here is some lovely mobs spwan
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
03/15/2011 07:50 262315610#9
Quote:
Originally Posted by pro4never View Post
You are doing it wrong...

I suggest fixing the monsterspawn class. The way you posted works but has a number of problems.

#1: you don't have any of the functionality of knowing the mob spawns (spread info for respawn information, base mob for the spawn to avoid regenerating mob info, pulling number in spawn that are dead... etc)

#2: you dont have the dmap/object checking. The way I wrote the spawn class it ensures monsters never get located in the wrong spot (ontop of other monsters or in invalid coords)

#3: you have no reference for where spawns are and their members. Makes coding the mob ai system much more difficult.

#4: you are only generating 1 monster per spawn in db....

#5: you are not generating the monster uid (why hp doesn't show)
i think it wrong too..

but it can test the mobspawn will be work real
03/15/2011 08:54 koko20#10
can you upload your Spwan mob bro4never
03/15/2011 09:06 mohamedkhaled#11
Quote:
Originally Posted by { Angelius } View Post
nope all you gota do is counting/reading

Plas hleb bug/ i can see mob hp mob dont atak,

lmao

here is some lovely mobs spwan
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]
That what i call mob spawn ^^!!
03/15/2011 10:14 BioHazarxPaul#12
:facepalm: and if releases like this keep up everyone is going to have sources almost as bad as lotf... Cause you know they are just going to copy&paste it. Making the Old HellmouthCo source even more unstable..
03/15/2011 10:46 CØĐ£Ř||Mã©hÍñє#13
Quote:
Originally Posted by koko20 View Post
can you upload your Spwan mob bro4never
huh you kidding us? bro4never ahaha last time i saw it was pro4never nt bro :D


go back to zerovb damn sloppy noob
03/15/2011 11:18 mohamedkhaled#14
Quote:
Originally Posted by BioHazarxPaul View Post
:facepalm: and if releases like this keep up everyone is going to have sources almost as bad as lotf... Cause you know they are just going to copy&paste it. Making the Old HellmouthCo source even more unstable..
Agree ^^!
03/15/2011 12:00 |xabi|#15
Quote:
Originally Posted by CØĐ£Ř||Mã©hÍñє View Post
huh you kidding us? bro4never ahaha last time i saw it was pro4never nt bro :D


go back to zerovb damn sloppy noob
hahahaha

Thx For A nice Topic