Jump to content
  • 0
Juan Meissner

Custom Mob Modes

Question

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

1 answer to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.