Jump to content
  • 0
Sign in to follow this  
fiction

Q> about setunitdata

Question

Hi, i'm having problem with the setunitdata hp, max hp and lvl.

For some reason isn't working for me, for example i made the following script:

		.@LordBaphomet[0] = monster(.@map$, 145, 311, "--ja--", 1929, 1, .@label$ + "::OnBaphometDead");

		setunitdata ( .@LordBaphomet[0],UDT_HP,35000000);
		setunitdata ( .@LordBaphomet[0],UDT_MAXHP,35000000);
		setunitdata ( .@LordBaphomet[0],UDT_LEVEL,130);

when the monster appear, his HP appear in 14% instead of the 100%, and i need to attack the monster to update his lvl.

Before the first attack, his HP is on 14% and his lvl isn't updated.

b.PNG.7f027244cfd74526651741db29c55812.PNG

After the first attack, his lvl has been updated.

b2.PNG.1fd6e69e7a20f405607e1084c3dc62fd.PNG

Edited by fiction

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
56 minutes ago, lllaaazzz said:

well your numbers are that 14% hp is the original hp of the great demon baphomet

 

cant you set these stats before you spawn him ? not sure 

Yes, you can manipulate the monster statistic before or after the spawn.

Share this post


Link to post
Share on other sites
  • 1

that's why I keep saying hercules mob controller is utterly broken

there are 2 problems here

1. the hp and max hp is very strange thing
when you want to increase the monster hp, setunitdata UDT_MAXHP 1st, then UDT_HP later
when you want to decrease the monster hp, setunitdata UDT_HP 1st, then UDT_MAXHP later
I'm not even sure need to fix this or not, because rathena also doing this way

2. yes, our recalculate monster status are broken
https://github.com/HerculesWS/Hercules/pull/2408

prontera,155,185,5	script	askdaksd	1_F_MARIA,{
	.@mobgid = monster( "this", -1,-1, "--ja--", PORING, 1 );
	setunitdata .@mobgid, UDT_MAXHP, 1000000;
	setunitdata .@mobgid, UDT_HP, 1000000;
	setunitdata .@mobgid, UDT_LEVEL, 99;
	end;
}

 

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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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