y dont u make it With spell.Range ? it would be Easier like this
Code:
if (ServerBase.Kernel.GetDistance(attacker.X, attacker.Y, attacked.X, attacked.Y) <= spell.Range)
{
// Attacker in this case is monster
Ur Calculations
}
foreach (IMapObject objs in attacker.Owner.Screen.Objects.ToArray())
the attacker is monster... is that correct I called it like attacker.Owner.Screen.Objects.ToArray() i have use the Impulse public source...
You should use: attacked.Owner.Screen.Objects (as monsters don't have a Screen variable - they do have a variable called Owner but that is null).
Other than that your code is good except you should add before that foreach
this:
[HELP] Monster dont attack 07/18/2011 - Dekaron Private Server - 0 Replies Hello, I have a problem with monsters, some monsters action 7 and 8 action are not attacking the character, are just running from one side to another, but can not attack someone post here how to solve this problem. and that damn monster attack?
thanks alot.
[HELP]Monster don't attack 06/15/2011 - Dekaron Private Server - 7 Replies Hii to all, i'm actually work on files of KingTuT release Action 9.
Here is my problem, is just that some monster follow me but they don't attack, i don't know why, i've been looking but i dont find anything so, any ideas? If you can help me I appreciated that.
Greetings. :handsdown:
[HELP]Monster Attack Modding 04/09/2010 - Metin2 Private Server - 1 Replies Also...
Ich hab den Gelben Tigergeist gemoddet und den Schlag zu einem DS gemacht...
Es geht auch...
Aber er "verkrüpelt" sich wenn man die Attacke aussführt dann sieht er aus wie ein "Klumpen" und das sieht unschön aus, deshalb wollte ich fragen wie man das ändern kann...
Pic:
http://img534.imageshack.us/img534/9379/screensho t1fz.jpg
My Agbot is dont attack untill monster attack him 08/21/2008 - Silkroad Online - 6 Replies I use Agbot and he is not attack untill monster come and attack him.
after monster attack him he is starting to kill like 20 seconds and after again dont attack.
how can I make him attack always?