Jump to content
  • 0

- About variables


MojoMojo

Question


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   1
  • Joined:  03/07/12
  • Last Seen:  

I want to create a variable to store numbers, but just for a specific player.

I have to use:

Script_commands.txt:


nothing  - A permanent variable attached to the character, the default variable
	   type. They are stored with all the account data in "save\athena.txt"
	   in TXT versions and in the SQL versions in the `global_reg_value`
	   table using type 3.

or

"@"	  - A temporary variable attached to the character.
	   SVN versions before 2094 revision and RC5 version will also treat
	   'l' as a temporary variable prefix, so beware of having variable
	   names starting with 'l' if you want full backward compatibility.

In this case, it will work, but if the server resets i think it gonna disappear.

Observation: Its necessary that variable still stored even if the server restart. I will give this variable to a character when he talks to "NPC 1", then when he talks with the "NPC 2" something will rappen based on the number stored in the variable.

Please: After tell me which is the correct variable to use, plz make an example of how using it?

Edited by MojoMojo
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  224
  • Reputation:   22
  • Joined:  03/23/12
  • Last Seen:  

Use a permanent char variable then like:

set quest, 1; // "quest" as example

then for the 2nd npc it would be something like this:

if(quest == 1) { mes "Hi!"; close; end; }
else { mes "Go away!"; close; end; }

Edited by F0xxy
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   1
  • Joined:  03/07/12
  • Last Seen:  

if in the script i just put:

set <Variable_Name>,<Amount>;

It will create a permanent variable for that player?

@EDIT

Thank you! Solved!

Edited by MojoMojo
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...