Jump to content
  • 0

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


Question

Posted

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!

4 answers to this question

Recommended Posts

  • 0
Posted
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
  • 0
Posted
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"

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