[FAQ] HellmouthSource

03/20/2011 13:19 PePsI_MaN#151
Quote:
Originally Posted by mohamedkhaled View Post
I already coding NPCS with Python !!! but i don't think that i will have time to code 290 NPCS for hellmouthCO or what ever ^^!
pro how ican coded monster
03/20/2011 15:05 romeoromeo#152
sorry if this is dump . but this is what im thinking atm about mobs .
it would be nice if you helped me guys , specially pro4.. and i would release what i got ( if it works ) :P and i almost finished all NPCs . :D except reb and reincamate coz i didnt know how to get the prev jobs
well about mobs ...... if (( IF )) i made a mobtoclient.cs . and codded "walk" ,IE ... where should i put that to make mobs follow the code :D
and also , where to put the code
(Packets.GeneralData(XXXXXX, 0, 0, 0, 135)) for the dead mobs to remove it
hmmmm what else .
Ooh yes, im sure that you guys made the same code of NPCs 80 percent shorter than mine :P .. but it still working good for me .
03/20/2011 16:43 BioHazarxPaul#153
I do not recommend copying and pasting stuff from other sources...
03/20/2011 17:37 jake12#154
can somebody post guilddirector dialog plz !
03/20/2011 17:51 pro4never#155
Quote:
Originally Posted by romeoromeo View Post
sorry if this is dump . but this is what im thinking atm about mobs .
it would be nice if you helped me guys , specially pro4.. and i would release what i got ( if it works ) :P and i almost finished all NPCs . :D except reb and reincamate coz i didnt know how to get the prev jobs
well about mobs ...... if (( IF )) i made a mobtoclient.cs . and codded "walk" ,IE ... where should i put that to make mobs follow the code :D
and also , where to put the code
(Packets.GeneralData(XXXXXX, 0, 0, 0, 135)) for the dead mobs to remove it
hmmmm what else .
Ooh yes, im sure that you guys made the same code of NPCs 80 percent shorter than mine :P .. but it still working good for me .
To be perfectly honest I don't want anyone using this source to have monsters... unless they are capable of coding the system themselves. So saying you'll release what you get (after I do it for you essentially) is just one more reason for me NOT to do it.

-I released this as something for people to build on... they are welcome to do so and post what they worked on

-Does NOT mean I want it to become the new lotf where every single thing is done for you.. that simply encourages people to never learn what they are doing and encourages lazy, bad pservers.

-Seeing as I still am doing pserver stuff it's not like I LOVE the idea of having 50000 other pservers on the same patch as myself using some of the features I designed (such as the way our ctf system works) competing with me. As I said when I released this though, 'it's not like the source is good enough that I can't compete with it' so not exactly worried about that.


People need to learn to program if they want to do a proper pserver. This is simply a kick in the pants to encourage some people to go do it.

Quote:
Originally Posted by jake12 View Post
can somebody post guilddirector dialog plz !
Would be pointless seeing as none of the guild system is coded ;)
03/21/2011 07:42 romeoromeo#156
Quote:
Originally Posted by pro4never View Post
To be perfectly honest I don't want anyone using this source to have monsters... unless they are capable of coding the system themselves. So saying you'll release what you get (after I do it for you essentially) is just one more reason for me NOT to do it.

-I released this as something for people to build on... they are welcome to do so and post what they worked on

-Does NOT mean I want it to become the new lotf where every single thing is done for you.. that simply encourages people to never learn what they are doing and encourages lazy, bad pservers.

-Seeing as I still am doing pserver stuff it's not like I LOVE the idea of having 50000 other pservers on the same patch as myself using some of the features I designed (such as the way our ctf system works) competing with me. As I said when I released this though, 'it's not like the source is good enough that I can't compete with it' so not exactly worried about that.


People need to learn to program if they want to do a proper pserver. This is simply a kick in the pants to encourage some people to go do it.



Would be pointless seeing as none of the guild system is coded ;)
:) .. i did not mean to release a pach or server i just meant to release a code ... i didnt know you dont want that to happen , i thought that you released it for helping and also to cooperate not compete.... anyway .... i wont ask anything no more unless if its about bugs .
03/21/2011 15:30 zoro7070#157
how can i make my account a GM or a PM ?
03/21/2011 15:36 jake12#158
just type in database in perm... 5 or 6
03/22/2011 06:38 romeoromeo#159
:P i got the mobs move and drop but the problem is . ((((MATH)))) dont know how to make them target me lol , they only stop if im in thier way :D . any clue ? anything code or math hehehe just how to calc direction
03/22/2011 06:55 pro4never#160
Hmm lets see. You already have them attacking you if you're in range correct?

Well the simplest way for them to work would be....


-Pull closest player to monster
>>something like cycling through clients on map and return distance something like... math.abs(math.max(Math.Abs(x1 - x2), Math.Abs(y1-y2)));

-Calculate direction to move
>>use same as the walk calculations + From/To coord calculations to determine which direction(s) you need to move.

Once you calculate the direction, update the server coords for the mob and send the walk packet for the monster to all clients on it's screen.

Tada! It now works :P
03/22/2011 07:21 romeoromeo#161
Quote:
Originally Posted by pro4never View Post
Hmm lets see. You already have them attacking you if you're in range correct?

Well the simplest way for them to work would be....


-Pull closest player to monster
>>something like cycling through clients on map and return distance something like... math.abs(math.max(Math.Abs(x1 - x2), Math.Abs(y1-y2)));

-Calculate direction to move
>>use same as the walk calculations + From/To coord calculations to determine which direction(s) you need to move.

Once you calculate the direction, update the server coords for the mob and send the walk packet for the monster to all clients on it's screen.

Tada! It now works :P
Thanks alot , i will try that and inform you , i didnt expect you to help , thanks alot :) ..... and No mobs not attack yet , they just move and stop if im im in rang :D , . attack is easy to do ;) .
03/22/2011 08:02 pro4never#162
kk well if you already have a thread that moves them properly you may want to write some basic methods such as...


PullClosestTarget

PullTargetDirection

PullTargetRange

etc. Basically just helpers to determine which action the mob should be taking range < attack range? Attack! else move towards nearest target (target locking can be added but depends how you want mobs to behave).
03/22/2011 16:32 jake12#163
public static void NewSpawnSystem()
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT);
cmd.Select("Spawnit");
uint Count = 0;
MySqlReader r = new MySqlReader(cmd);
while (r.Read())
{
Mob Monster = new Mob();
Monster.X = r.ReadUInt16("X");
Monster.Y = r.ReadUInt16("Y");
Monster.NextX = r.ReadUInt16("X2");
Monster.NextY = r.ReadUInt16("Y2");
Monster.MobLevel = r.ReadByte("Level") ;
Monster.MobHP = r.ReadUInt16("HP");
Monster.UID = r.ReadUInt32("UID");
Monster.Name = r.ReadString("Name");
Monster.Mesh = r.ReadUInt16("Mesh");
Monster.Instance = r.ReadUInt16("Instance");
Monster.Map = r.ReadUInt16("Map");
Dictionary.Maps.ThreadSafeAdd(Monster.Map, new Map(0));
Count++;
}
Console.WriteLine(Program.Title + " Spawning " + Count + " monsters");
} (is this right?)
03/22/2011 16:58 mohamedkhaled#164
Quote:
Originally Posted by jake12 View Post
public static void NewSpawnSystem()
{
MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT);
cmd.Select("Spawnit");
uint Count = 0;
MySqlReader r = new MySqlReader(cmd);
while (r.Read())
{
Mob Monster = new Mob();
Monster.X = r.ReadUInt16("X");
Monster.Y = r.ReadUInt16("Y");
Monster.NextX = r.ReadUInt16("X2");
Monster.NextY = r.ReadUInt16("Y2");
Monster.MobLevel = r.ReadByte("Level") ;
Monster.MobHP = r.ReadUInt16("HP");
Monster.UID = r.ReadUInt32("UID");
Monster.Name = r.ReadString("Name");
Monster.Mesh = r.ReadUInt16("Mesh");
Monster.Instance = r.ReadUInt16("Instance");
Monster.Map = r.ReadUInt16("Map");
Dictionary.Maps.ThreadSafeAdd(Monster.Map, new Map(0));
Count++;
}
Console.WriteLine(Program.Title + " Spawning " + Count + " monsters");
} (is this right?)
No it won't work!
03/22/2011 21:31 jake12#165
Quote:
Originally Posted by mohamedkhaled View Post
No it won't work!
why?