Q> about setunitdata

fiction

New member
Messages
154
Points
0
Age
32
Location
Santiago, Chile
Emulator
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

After the first attack, his lvl has been updated.

b2.PNG

 
Last edited by a moderator:
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 

 
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

Code:
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;
}
 
Back
Top