Jump to content
  • 0

Automatic Change HP


dubstep

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  35
  • Reputation:   2
  • Joined:  07/25/15
  • Last Seen:  

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!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

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;
	}
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  11/17/16
  • Last Seen:  

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

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  35
  • Reputation:   2
  • Joined:  07/25/15
  • Last Seen:  

Bump :(

Link to comment
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.

×
×
  • Create New...