Jump to content
  • 0

[ASK] how to check player HP in percent


Akbare

Question


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  491
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

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
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

percentheal 100,100;

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  491
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

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


if ( Hp < ( Hp * 3 / 10 ) ) {

percentheal 100,100;

}

end;

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  491
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

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;
}
Link to comment
Share on other sites

  • 0

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


if ( Hp < ( MaxHp * 3 / 10 ) ) {

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