Jump to content
  • 0
Sign in to follow this  
dubstep

Automatic Change HP

Question

Hi there! Is it possible to automatically change the HP of a specific mob (1288-Emperium) everyday?

E.g.:

Monday = 1m

Tuesday = 5m

Wed = 1m

Thurs = 5m

Can you give me a script if it's possible? Thank you in advance!

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

npc/guild/agit_main.txt#L96-L98

if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
	monster strnpcinfo(2),[email protected][0],[email protected][1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
}

change to

if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
	monster strnpcinfo(2),[email protected][0],[email protected][1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
	[email protected] = [email protected][0];
	switch ( gettime(DT_DAYOFWEEK) ) {
		case MONDAY: 
		case WEDNESDAY: 
			[email protected]_hp = 1000000; 
			break;
		case TUESDAY: 
		case THURSDAY: 
			[email protected]_hp = 5000000; 
			break;
		default: break;
	}
	if ( [email protected]_hp > 0 ) {
		setunitdata [email protected],UMOB_MAXHP,[email protected]_hp;
		setunitdata [email protected],UMOB_HP,[email protected]_hp;
	}
}

 

Share this post


Link to post
Share on other sites
  • 0
On 6/25/2017 at 5:07 AM, Emistry said:

npc/guild/agit_main.txt#L96-L98

if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
	monster strnpcinfo(2),[email protected][0],[email protected][1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
}

change to

if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
	monster strnpcinfo(2),[email protected][0],[email protected][1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
	[email protected] = [email protected][0];
	switch ( gettime(DT_DAYOFWEEK) ) {
		case MONDAY: 
		case WEDNESDAY: 
			[email protected]_hp = 1000000; 
			break;
		case TUESDAY: 
		case THURSDAY: 
			[email protected]_hp = 5000000; 
			break;
		default: break;
	}
	if ( [email protected]_hp > 0 ) {
		setunitdata [email protected],UMOB_MAXHP,[email protected]_hp;
		setunitdata [email protected],UMOB_HP,[email protected]_hp;
	}
}

 

@Emistry / to All

Does not work for me after @reloadscript.

Is a restart needed for it to take effect?

Target Output

My default Emperium HP is 10m via mob_db.txt, I would want it to be re-scaled at 500k during Saturday and Sunday 7-8pm only, then back to default 10m HP by 9-10PM for my 2nd WoE Sched.

Weekdays = Normal HP (10m)

This is my agit_main.txt

 

agit_main.txt

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.   Paste as plain text instead

  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.

Sign in to follow this  

×
×
  • Create New...

Important Information

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