Jump to content
  • 0

Custom Unit HP Bar System


noobzter003

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  109
  • Reputation:   5
  • Joined:  03/17/16
  • Last Seen:  

payon,147,229,4	script	Test#HPbar	1_F_MARIA,{

	if (.HP_Bar == 0)
	{
		.HP_Bar = 1;
		.mobGID = monster ("payon",148,226,"[T] HP Test",POPORING,1,strnpcinfo(0)+"::OnDie");
			setunitdata .mobGID,UMOB_MAXHP,4000;
			setunitdata .mobGID,UMOB_HP,4000;
		.@count = getunits(BL_PC, .@units, false, "payon");
		for (.@i = 0; .@i < .@count; .@i++)
			addtimer(0,strnpcinfo(0)+"::OnHPBar", .@units[.@i]);
	}
	end;
	
OnDie:
.HP_Bar = 0;
end;
	
OnHPBar:
.U_MAXHP = getunitdata (.mobGID,UMOB_MAXHP);
while (.HP_Bar != 0)
{
	.U_HP = getunitdata (.mobGID,UMOB_HP);
	.P_HP = (.U_HP*100)/.UMOB_MAXHP;

	cutin(""+.P_HP+"", 1);
	 
	sleep2 100;
}
cutin("0", 1);
sleep2 5000; //Delay to hide HP Bar
cutin("", 255);
end;

}

anyone can help me to correct this script..

im trying to convert this script https://herc.ws/board/topic/15975-custom-unit-hp-bar-system/ to rathena

TIA.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  109
  • Reputation:   5
  • Joined:  03/17/16
  • Last Seen:  

On 10/16/2019 at 5:45 AM, HD Scripts said:

u got some error? show us

heres the error.

12312312312312.png

 

up anyone?

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...