Jump to content
  • 0

Oficial VIP remaining time display


Question

Posted (edited)

Hi, I have been trying to figure out how to display to users their remaining VIP account time.

However, I wasn't able to figure out how to do it.

From what I see, VIP time is stored in the login database as "vip_time", however, the numbers which are displayed there are confusing.

I have managed to create a script to "Add VIP time" using:

atcommand "@vip +24h "+strcharinfo(0)+"";

But how can I display how much VIP time is left for the account each time the user logs in?

I noticed that whenever I use the script above, it bottomdisplays my VIP time remaining, where can I find this code? Is it possible to modify the text it currently displays?

vip.png.b68aec10876e459eb7f98ce4ec16cc65.png

Thanks!

Edited by Profile

7 answers to this question

Recommended Posts

  • 1
Posted

I have solved the issue after playing with the code for a while.

Here is my solution:

-	script	VIP_TIME	-1,{
OnPCLoginEvent:
		if (vip_status(1)) {
			dispbottom "Your VIP expires on : "+vip_status(2);
			dispbottom "Time left : "+vip_status(3);
			end;
		}
	}

Is it possible to change the time/date format?

This is how it is currently:

vip2.png.88eb52ce98eed7e1c4518fcb901dc25f.png

  • 0
Posted
Spoiler
---------------------------------------
   
  *vip_status(<type>,{"<character name>"})
   
  Returns various information about a player's VIP status.
   
  Valid types:
  VIP_STATUS_ACTIVE - VIP status: true if the player is a VIP or false if not
  VIP_STATUS_EXPIRE - VIP expire timestamp if the player is VIP or 0 if not
  VIP_STATUS_REMAINING - VIP time remaining in seconds
   
  NOTE: This command is only available if the VIP System is enabled.
   
  ---------------------------------------
   
  *vip_time <time>,{"<character name>"};
   
  Changes a player's VIP time (in minutes). A positive value will increase time, and a
  negative value will decrease time.
   
  NOTE: This command is only available if the VIP System is enabled.
   
  ---------------------------------------

source: https://github.com/rathena/rathena/blob/master/doc/script_commands.txt

  • 0
Posted
36 minutes ago, SpiritD said:
  Reveal hidden contents
---------------------------------------
   
  *vip_status(<type>,{"<character name>"})
   
  Returns various information about a player's VIP status.
   
  Valid types:
  VIP_STATUS_ACTIVE - VIP status: true if the player is a VIP or false if not
  VIP_STATUS_EXPIRE - VIP expire timestamp if the player is VIP or 0 if not
  VIP_STATUS_REMAINING - VIP time remaining in seconds
   
  NOTE: This command is only available if the VIP System is enabled.
   
  ---------------------------------------
   
  *vip_time <time>,{"<character name>"};
   
  Changes a player's VIP time (in minutes). A positive value will increase time, and a
  negative value will decrease time.
   
  NOTE: This command is only available if the VIP System is enabled.
   
  ---------------------------------------

source: https://github.com/rathena/rathena/blob/master/doc/script_commands.txt

I did check it out, still didn't help much...

  • 0
Posted
On 16/09/2017 at 18:22, Profile said:

Eu resolvi o problema depois de brincar com o código por um tempo.

Aqui está a minha solução:



		  
		
	

É possível alterar o formato de hora/data?

Atualmente é assim:

vip2.png.88eb52ce98eed7e1c4518fcb901dc25f.png

Ola amigo, sou novato na area estou aprendendo, ai como eu adiciono ao meu servidor? tipo como eu crio um comando pro player ver o time vip?

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