Jump to content
  • 0

Question

Posted

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!

3 answers to this question

Recommended Posts

  • 0
Posted

npc/guild/agit_main.txt#L96-L98

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

change to

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

 

  • 0
Posted
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),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
}

change to


if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) {
	monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak";
	.@gid = $@mobid[0];
	switch ( gettime(DT_DAYOFWEEK) ) {
		case MONDAY: 
		case WEDNESDAY: 
			.@max_hp = 1000000; 
			break;
		case TUESDAY: 
		case THURSDAY: 
			.@max_hp = 5000000; 
			break;
		default: break;
	}
	if ( .@max_hp > 0 ) {
		setunitdata .@gid,UMOB_MAXHP,.@max_hp;
		setunitdata .@gid,UMOB_HP,.@max_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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...