5290+ source montser spawn code??

09/12/2010 11:27 262315610#1
first , thank pro4ever,Immu..rel this source!!

I want try spawn monster like this code:
(but not work!)


PHP Code:
    public class MobSpawn ExodusPacket 
    

        public 
MobSpawn(uint UID,Status type,ulong value
            : 
base(36
        { 
            
byte[] bt=new byte[8+36]; 
            
WORD((ushort)(bt.Length-8)); 
            
WORD((ushort)10017); 
            
DWORD32(UID); 
            
DWORD32(0x01); 
            
DWORD32((uint)type); 
            
DWORD(value); 
        } 
    } 
The MobThreadExecute

PHP Code:
static void MobThread_Execute() 
        { 
            try 
            { 
                if (
H_Chars.Count 0
                { 
                    try 
                    { 
                        foreach (
Hashtable H in H_Mobs.Values
                        { 
                            foreach (
MobStruct M in H.Values
                            { 
                                
//M.Step(); 

                                
if (M.PoisonedInfo != null
                                { 
                                    if (
DateTime.Now M.PoisonedInfo.LastAttack.AddSeconds(3)) 
                                    { 
                                        if (
M.CurrentHP == 0
                                        { 
                                            
M.PoisonedInfo null
                                            foreach (
Entity C in H_Chars.Values
                                                if (
M.Loc.Map == C.MapID
                                                    if (
MyMath.PointDistance(M.Loc.XM.Loc.YC.XC.Y) <= 20
                                                        
C.Client.Send(new MobSpawn(M.EntityIDStatus.Effect0)); 
                                            continue; 
                                        } 
                                        
//M.PoisonedInfo.Times--; 
                                        
M.PoisonedInfo.LastAttack DateTime.Now
                                        
uint Dmg = (uint)(M.CurrentHP * (10 M.PoisonedInfo.SpellLevel 10) / 100); 
                                        if (
Dmg == 1
                                            continue; 
                                       
// M.TakeAttack(M, Dmg, AttackType.Melee); 
                                        
if (M.PoisonedInfo.Times == 0
                                        { 
                                            
M.PoisonedInfo null
                                            foreach (
Entity C in H_Chars.Values
                                                if (
M.Loc.Map == C.MapID
                                                    if (
MyMath.PointDistance(M.Loc.XM.Loc.YC.XC.Y) <= 20
                                                        
C.Client.Send(new MobSpawn(M.EntityIDStatus.Effect0));//.AddSend(Packets.Status(M.EntityID, ConquerSx.Game.Status.Effect, 0)); 
                                        

                                    } 
                                } 
                            } 
                        } 
                    } 
                    catch (
Exception Exc) { Console.WriteLine(Exc); } 
                } 
            } 
            catch (
Exception Exc) { Console.WriteLine(Exc); } 
        } 
And in Exodus

PHP Code:
            MyThread MobThread = new MyThread(); 
            
MobThread.Execute += new Execute(MobThread_Execute); 
            
MobThread.Start(400); 
If you want know more , I will upload my edit source!
I hope study to this will help!

[Only registered and activated users can see links. Click Here To Register...]
09/12/2010 16:42 Arcо#2
Lul don't use NewestCOServer as an example when doing important functions.