[Guide\Release]Guards attack mobs

09/17/2008 20:32 YukiXian#16
Quote:
Originally Posted by Rechocto View Post
you could either disable following, or add to Move() "If(Target == null && MType == 1 && (PosX != StartX || PosY != StartY)) { PosX = StartX; PosY = StartY; World.SurroundMobs(this); World.SpawnMobForPlayers(this, true); }"

or something :)
I will try, Thanks :handsdown::handsdown::handsdown:
09/18/2008 01:06 Rechocto#17
don't just say thanks, use the *thanks button -.-
09/19/2008 06:53 konkizta#18
to make the guards kill the mods this error occurs, pulled the item not disappear.

The error was found in Entities.cs

go
Quote:
public void TimerElapsed(object source, ElapsedEventArgs e)
{
if (DateTime.Now > LastTargetting.AddMilliseconds(2000))
GetTarget();

if (Target != null)
if (Target.MyClient == null || !Target.MyClient.There || !Target.Alive || !Alive || Target.LocMap != Map)
Target = null;

if (Target != null)
if (MType != 1 && MType != 4 && MType != 5 && MType != 6)
if (Target.Flying)
Target = null;

if (Target != null)
{
Move();

}

else if (MType == 1)
{
Tgt = Other.MobNearest((uint)PosX, (uint)PosY, (uint)Map);
if (Tgt != null && Tgt.Alive == true && Tgt.MType != 1 && MyMath.PointDistance(PosX, PosY, Tgt.PosX, Tgt.PosY) <= 10)
Move2();
}

if (!Alive)
{
if (Revive == false)
{
if (DateTime.Now > Death.AddMilliseconds(3000))
Dissappear();
}
else
{
if (MType == 2)
{
if (Map == 1015)
{
if (DateTime.Now > Death.AddMilliseconds(60000))
ReSpawn();
}
if (Map != 1015)
{
if (DateTime.Now > Death.AddMilliseconds(600000))
ReSpawn();
}
}
if (MType == 0)
{
if (DateTime.Now > Death.AddMilliseconds(25000))
ReSpawn();
}
if (MType == 1)
{
if (DateTime.Now > Death.AddMilliseconds(250))
ReSpawn();

}
if (MType == 4)
{
if (DateTime.Now > Death.AddMilliseconds(25000))
ReSpawn();
}
if (MType == 3)
{
if (DateTime.Now > Death.AddMilliseconds(25000))
ReSpawn();

}
if (MType == 5)
{
if (DateTime.Now > Death.AddMilliseconds(25000))
ReSpawn();
}
if (MType == 6)
{
if (DateTime.Now > Death.AddMilliseconds(25000))
ReSpawn();
}
}
}
}
Does anyone know how to fix it?:confused:
09/19/2008 11:10 Rechocto#19
what items disapear?
10/20/2008 20:50 XxArcherMasterxX#20
added to [Only registered and activated users can see links. Click Here To Register...] (after request from the threadstarter)
10/21/2008 10:29 pauldexter#21
When I'm not using this code the process of the Server will be 0-9 randomly. But when i try to use this one the process of the server should be like 45-55 :o , it takes too much.
10/21/2008 20:25 AIOROSZ#22
ToT donīt func for mi ToT i make it all and my guards donīt kill mobs XD
sorry for my bad inglish xD
10/27/2008 01:51 XxArcherMasterxX#23
wrong section man but nice release
10/27/2008 06:49 tanelipe#24
# Moved
05/22/2009 20:19 Waley94#25
Code:
(if you have a server with moving mobs, if not.. You'll need to write in a Move() Function, CharNearest() function, and a MobUseSkill() Function.. Come back when you have done this. (You can write some of that based on what you'll be adding)
I didnt understand...do you think you could help me?:confused:
05/22/2009 21:07 IcedEarth#26
Quote:
Originally Posted by Waley94 View Post
Code:
(if you have a server with moving mobs, if not.. You'll need to write in a Move() Function, CharNearest() function, and a MobUseSkill() Function.. Come back when you have done this. (You can write some of that based on what you'll be adding)
I didnt understand...do you think you could help me?:confused:
This means if in your server the monsters are not moving you need to recode them and then come back to this topic :)