Jump to content
  • 0
Sign in to follow this  
Liant

Ticket Vip

Question

Good afternoon, my friends. 
I wonder why, my vip ticket to have no function, I use it but nothing happens. 
Thanks in advance.

 

item_db2:

20000,Ticket_Vip,Ticket Vip #15,0,10000,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "vip15"; },{},{}20001,Ticket_Vip,Ticket Vip #30,0,10000,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "vip30"; },{},{}

npc:

 

//=============================================================================//				 Função que adiciona 15 dias Vip ao usuário//==========================================================================================================================function	script	vip15	{set $nivelVip, 1;set $diasVip, 15;set $verificaVip, 1;	if (getgmlevel() == 1) goto extender;	query_sql "UPDATE `login` SET `level` = "+$nivelVip+", `data_vip` = DATE_ADD(CURDATE(),INTERVAL "+$diasVip+" DAY) WHERE `level` = 0 AND `account_id` = "+getcharid(3);	dispbottom "Vip inserido com sucesso! Relogue seu personagem para ativá-lo.";	end;estender:	query_sql "UPDATE `login` SET `level` = "+$nivelVip+", `data_vip` = DATE_ADD(`data_vip`,INTERVAL "+$diasVip+" DAY) WHERE `level` = "+$nivelVip+" AND `account_id` = "+getcharid(3);	dispbottom "Vip estendido por mais "+$diasVip+" dias! Relogue seu personagem para ativá-lo.";	end;}//==========================================================================================================================//				 Função que adiciona 30 dias Vip ao usuário//==========================================================================================================================function	script	vip30	{set $nivelVip, 1;set $diasVip, 30;set $verificaVip, 1;	if (getgmlevel() == 1) goto extender;	query_sql "UPDATE `login` SET `level` = "+$nivelVip+", `data_vip` = DATE_ADD(CURDATE(),INTERVAL "+$diasVip+" DAY) WHERE `level` = 0 AND `account_id` = "+getcharid(3);	dispbottom "Vip inserido com sucesso! Relogue seu personagem para ativá-lo.";	end;estender:	query_sql "UPDATE `login` SET `level` = "+$nivelVip+", `data_vip` = DATE_ADD(`data_vip`,INTERVAL "+$diasVip+" DAY) WHERE `level` = "+$nivelVip+" AND `account_id` = "+getcharid(3);	dispbottom "Vip estendido por mais "+$diasVip+" dias! Relogue seu personagem para ativá-lo.";	end;}//==========================================================================================================================//			 Função que controla a data de término da conta vip e anúncios ao logar//==========================================================================================================================-	script	GerenciadorVip	-1,{		OnPCLoginEvent:	set @site$, "www.sitedoseuservidor.com.br";		query_sql "UPDATE `login` SET `level`= 0 WHERE `level` = "+$nivelVip+" AND (`data_vip` IS NULL OR `data_vip` < CURDATE())";		query_sql "SELECT (`data_vip` IS NULL OR `data_vip` < CURDATE()) FROM `login` WHERE `account_id` = "+getcharid(3), @verificaVip;		if (@verificaVip) {		dispbottom "Torne-se um(a) jogador(a) Vip e tenha benefícios esclusivos!";		dispbottom "Acesse "+@site$+" e saiba mais!";		end;}	query_sql "SELECT DATE_FORMAT(`data_vip`, '%d/%m/%Y') FROM `login` WHERE `account_id` = "+getcharid(3), @dataVencimento$;	dispbottom "Sua conta Vip é válida até o dia "+@dataVencimento$+"";	end;}
 
SQL:
 
ALTER TABLE `login` ADD (`data_vip` DATE);

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

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

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.