Jump to content
  • 0

[ASK] how to check player HP in percent


Question

Posted (edited)

my idea  /ok

under 30% HP npc can use heal

upper 30% HP npc can't heal

 

this my script

 

my problem :  he did heal continuous /hum

prontera,166,66,4	script	Free Healer	113,{
if (MaxHprate < 30)
		dispbottom "free healer";
		percentheal 30,30;
		skilleffect 28,0;
	} else {
	mes "Maaf kamu tidak bisa menggunakan layanan ini";
	close;
}

thanks for advance  /ok

Edited by Akbare

6 answers to this question

Recommended Posts

  • 0
Posted (edited)
prontera,166,66,4	script	Free Healer	113,{

if (Hp = MaxHP*0.3) {
		dispbottom "free healer";
		percentheal 30,30;
		skilleffect 28,0;
	} else {
	mes "Maaf kamu tidak bisa menggunakan layanan ini";
	close;
}

Not sure if that's right, but there you go. (not really sure if 0.3 will work or not hahaha).

 

other special variables: https://rathena.org/board/topic/72019-where-i-can-find-default-variables-of-game/?p=143798

Edited by sotf
  • Upvote 1
  • 0
Posted (edited)
prontera,166,66,4	script	Free Healer	113,{

if (Hp = MaxHP*0.3) {
		dispbottom "free healer";
		percentheal 30,30;
		skilleffect 28,0;
	} else {
	mes "Maaf kamu tidak bisa menggunakan layanan ini";
	close;
}

Not sure if that's right, but there you go. (not really sure if 0.3 will work or not hahaha).

 

other special variables: https://rathena.org/board/topic/72019-where-i-can-find-default-variables-of-game/?p=143798

 

 

hahhaa thanks for help

but there is error

if (Hp = MaxHP*0.3) {

i can try other variables, maybe someone can help me

Edited by Akbare
  • 0
Posted
if ( Hp < ( Hp * 3 / 10 ) ) {
    percentheal 100,100;
}
end;

 

not working sir

HP < 30% npc can heal player

but

HP >30% npc can't heal

prontera,166,66,4	script	Free Healer	113,{

if ( Hp < ( Hp * 3 / 10 ) ) {
    percentheal 100,100;
	mes "THis Heal power for you";
	close;
}
mes "can't heal";
close;
}

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