Jump to content
  • 0

Increase a player's HP permanently by %?


Yuka

Question


  • Group:  Members
  • Topic Count:  100
  • Topics Per Day:  0.03
  • Content Count:  333
  • Reputation:   7
  • Joined:  03/01/14
  • Last Seen:  

Hello,

 

I would like to reward players with +3% Max HP and with +x% ATK/MATK, is there a way to do this?

 

Thanks! :)

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

-	script	sample	-1,{

OnPCLoginEvent:
	if(rewarded) {
		bonus_script "{ bonus bMaxHPRate,3; }",9999999;
	}
end;


}

Try this, the script should work if the player has 'rewarded' variable > 0. Not sure if it would work permanently though.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

A better way to do this:

OnPCStatCalcEvent:
	if (condition) {
		bonus bMaxHPrate,3;
		bonus bAtkRate,5;
		bonus bMatkRate,5;
	}
	end;
'OnPCStatCalcEvent' is a fairly new label that triggers each time a player's stats are recalculated.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  100
  • Topics Per Day:  0.03
  • Content Count:  333
  • Reputation:   7
  • Joined:  03/01/14
  • Last Seen:  

A better way to do this:

OnPCStatCalcEvent:
	if (condition) {
		bonus bMaxHPrate,3;
		bonus bAtkRate,5;
		bonus bMatkRate,5;
	}
	end;
'OnPCStatCalcEvent' is a fairly new label that triggers each time a player's stats are recalculated.

 

 

So the condition needs to stay true?

Oh and how can I give a player Status Points permanently? D:

And how can I change a players MaxWeight without the Skill? :P

A better way to do this:

OnPCStatCalcEvent:
	if (condition) {
		bonus bMaxHPrate,3;
		bonus bAtkRate,5;
		bonus bMatkRate,5;
	}
	end;
'OnPCStatCalcEvent' is a fairly new label that triggers each time a player's stats are recalculated.

 

[Warning]: npc_event: player's event queue is full, can't add event 'Achievements::OnPCStatCalcEvent' !

It spamms my chatbox with this. D:

-	script	sample	-1,{

OnPCLoginEvent:
	if(rewarded) {
		bonus_script "{ bonus bMaxHPRate,3; }",9999999;
	}
end;


}

Try this, the script should work if the player has 'rewarded' variable > 0. Not sure if it would work permanently though.

 

Hm, when I only call that once, it only lasts for "9999999" ms, right?

Edited by Greyford
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

Yep, try to increase the config limit for statcalc, it's the proper way.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  100
  • Topics Per Day:  0.03
  • Content Count:  333
  • Reputation:   7
  • Joined:  03/01/14
  • Last Seen:  

Yep, try to increase the config limit for statcalc, it's the proper way.

Where can I change the limit for statcalc? D:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  100
  • Topics Per Day:  0.03
  • Content Count:  333
  • Reputation:   7
  • Joined:  03/01/14
  • Last Seen:  

Bump. x_X

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

src/map/map.h#L43

change the

#define MAX_EVENTQUEUE 2
then recompile your server
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...