Jump to content
  • 0

Code for "read" the user level? For "zenny cost per level"


aleph075

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  1.00
  • Content Count:  46
  • Reputation:   0
  • Joined:  04/10/24
  • Last Seen:  

Wich is the command to read the level of the user? I wanna make the players pay for healing, depending on the level. But dunno the code.
I aprecciate if u give me some "basic useful" commands like this, or a guide where i can read it. THX!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  896
  • Reputation:   118
  • Joined:  05/23/12
  • Last Seen:  

If(BaseLevel >= 50)

We ve pre-defined variables. I recommend u to take a look in the doc folder.

https://github.com/rathena/rathena/blob/81894eeba6ee613d5c40bedeb48455303f703ccc/doc/script_commands.txt#L580

 

Rynbef~

Edited by Rynbef
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  461
  • Reputation:   61
  • Joined:  08/28/12
  • Last Seen:  

22 hours ago, aleph075 said:

Wich is the command to read the level of the user? I wanna make the players pay for healing, depending on the level. But dunno the code.
I aprecciate if u give me some "basic useful" commands like this, or a guide where i can read it. THX!

You can use stuff like this:
Zeny -= value * BaseLevel;

or like Rynbef said, do if checks like

if (BaseLevel >= 30)
Zeny -= 2000;
else if (BaseLevel >= 20)
Zeny -= 1000;

and so on

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  1.00
  • Content Count:  46
  • Reputation:   0
  • Joined:  04/10/24
  • Last Seen:  

On 4/13/2024 at 12:21 PM, Rynbef said:

If(BaseLevel >= 50)

We ve pre-defined variables. I recommend u to take a look in the doc folder.

https://github.com/rathena/rathena/blob/81894eeba6ee613d5c40bedeb48455303f703ccc/doc/script_commands.txt#L580

 

Rynbef~

I try to use "BaseLevel" in the skill.cpp file, and din't work.

 

	case NV_FIRSTAID:
		clif_skill_nodamage(src,bl,skill_id,5,1);
		status_heal(bl,7 + BaseLevel , 0, 0, 0); <----Here
		break;

and says "Identificador no declarado" (spanish). I guess it's "Undeclared Identifier"

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  461
  • Reputation:   61
  • Joined:  08/28/12
  • Last Seen:  

Yea BaseLevel is used in scripts. For source you need sd->status.base_level if i remember correct.

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