![]() |
|
|
#1 |
|
Архивный участник
Join Date: Feb 2006
Posts: 453
|
first lets look on common code for aggro mobs:
class warrior_aggressive_patrol : warrior_patrol inside SEE_CREATURE handler: Code:
EventHandler SEE_CREATURE(creature, myself) {
if ((GetLifeTime() > 7) && InMyTerritory(myself.sm)) {
AddAttackDesire(creature, 1, 200);
}
}
// 3 functions called (1+2)
sorry, 200 - is not distance.. its something like probability easy, we can change 200 to 500 or to 50 to some mobs, just for diversify somehow mobs behaviour or we can add something like "if Rand(100)<5" so mob will desire attack only 5% and turn on your lively imagination =) example 1: what if mob desire attack players with level>40 only? example 2: what if mob desire attack only if player not have some quest item (OwnItemCount function) hmm.. (almost same as "silence" skill =))? example 3: what if mob desire attack orcs only ? etc... etc... |
|
|
|
|