Juan Meissner 9 Posted August 12, 2017 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. Quote Share this post Link to post Share on other sites
0 meko 170 Posted August 12, 2017 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 Quote Share this post Link to post Share on other sites
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.
Share this post
Link to post
Share on other sites