Custom Mob Modes

Juan Meissner

New member
Messages
72
Points
0
Hello everyone, i'm trying to create new modes for monsters AI, but i really don't know how to make that, let me say what i'm trying to do, 

NightTime = The monster just are aggressive in night time.

DayTime = The monster just are aggressive in day time

ChangeTargetWeaker = The monster always change to more weaker target, (Anyone who has less HP)

ChangeTargetLessDef = The mob always change to anyone who has less DEF

ChangeTargetLessHp = The mob always change to anyone who has less HP.

So anyone can help me to do that? i think that could be a good update for Mob Modes.

 
Instead of adding dynamic mob modes I would suggest a more flexible approach: a new script command that allows to change mob data at any given time so you could do

- script DayNight FAKE_NPC,{
OnClock0600:
day();

// make Poring passive at daytime
setmonsterinfo(PORING, MOB_MODE,
getmonsterinfo(PORING, MOB_MODE) &~ 0x4);
end;

OnInit:
// setting correct mode upon server start-up
if (gettime(GETTIME_HOUR) >= 6 && gettime(GETTIME_HOUR) < 18) {
end;
}

OnClock1800:
night();

// make Poring aggressive at night
setmonsterinfo(PORING, MOB_MODE,
getmonsterinfo(PORING, MOB_MODE) | 0x4);
end;
}




If this is desirable please fill an issue here and I will add it when I get some time: https://github.com/HerculesWS/Hercules/issues/new

 
Back
Top