Jump to content
  • 0
Sign in to follow this  
hadiesyafiq

Request VIP System or premium accounts for Hercules

Question

Hi all can someone help me to build premium account or vip account alike...

Have 3 type

daily,weekly and monthly 

use vip coupon and claim group id on NPC

benefit got double exp on all,refine rate 50% success can use all cash npc like stylish,font changer,font color....and will get increase agility and blessing when warp or login...

and got custom aura for known as VIP...when level 99 the aura become double...normal aura 99 + VIP aura

if possible please teach me how...

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 1
Guest

Hi,

First you will need to create 3 custom item into your item_db

30044,VIP_Ticket_7,VIP Ticket 7D,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_TicketAddVip7"; },{},{}
30045,VIP_Ticket_15,VIP Ticket 15D,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_TicketAddVip15"; },{},{}
30046,VIP_Ticket_30,VIP Ticket 30D,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_TicketAddVip"; },{},{}

Than you will need to make script with function to add their VIP, so you will need 3 functions here, F_TicketAddvip7, F_TicketAddVip15 and F_TicketAddVip.

 

Function:

Inside those function you can use something like these to add 30 days (you will need to duplicate this functions to make the 7 days and 15 days).
 

function	script	F_TicketAddVip	{
	Query_SQL "SELECT `days` FROM `viptable` WHERE `vipacc_id` = '"+GetCharID(3)+"'", .@checkDays;
	if (.@checkDays > 0) {
		Set .@setDays, (.@checkDays + 30);
		Query_SQL "UPDATE `viptable` SET `days`='"+.@setDays+"' WHERE `vipacc_id`='"+GetCharID(3)+"'";
		Query_SQL "SELECT `group_id` FROM `login` WHERE  `account_id`='"+GetCharID(3)+"'", .@userLevel;
		If (.@userLevel < 1) 
			Query_SQL "UPDATE `login` SET `group_id`='2' WHERE `account_id`='"+GetCharID(3)+"'";
	}
	Else {
		Query_SQL "UPDATE `login` SET `group_id`='2' WHERE `account_id`='"+GetCharID(3)+"'";
		Query_SQL "SELECT `userid` FROM `login` WHERE `account_id`='"+GetCharID(3)+"'", .@userID$;
		Query_SQL "SELECT `email` FROM `login` WHERE `account_id`='"+GetCharID(3)+"'", .@userEmail$;
		Query_SQL "INSERT INTO `viptable` (`vipacc_id`,`vip_id`,`days`,`email`) VALUES ('"+GetCharID(3)+"','"+.@userID$+"','30','"+.@accEmail$+"')";
	}
	AtCommand "@reloadpcdb";
	dispbottom "You received 30 days of VIP Account, congrats!";
	specialeffect2 338;
	End;
Return;
}

 

You will need this SQL CODE

DROP TABLE IF EXISTS `viptable`;
CREATE TABLE `viptable` (
  `vipacc_id` int(11) unsigned NOT NULL default '0',
  `vip_id` varchar(255) NOT NULL default '',
  `days` int(11) NOT NULL default '0',
  `email` varchar(39) NOT NULL default '',
  PRIMARY KEY  (`vipacc_id`),
  KEY `name` (`vip_id`)
) ENGINE=MyISAM; 

INSERT INTO `viptable` (`vipacc_id`, `vip_id`, `days`, `email`) VALUES ('1', 'VIP', '1', '[email protected]');

Dont forget to add the items into your DATA Folder with some sprite too.


With this you will have your VIP system with 7,15 and 30 days.

To custom aura you could use @Functor system, it's paid custom aura.

 

Edited by Guest

Share this post


Link to post
Share on other sites
  • 0

Thanks sir...i will try and let you know...but how to set benefit like double exp,double refine rate,got agi and bless when login...because herc doesn’t have official vip account that why need use group id...

Edited by hadiesyafiq

Share this post


Link to post
Share on other sites
  • 0
On 11/2/2019 at 5:38 AM, trackxart said:

Hi,

First you will need to create 3 custom item into your item_db

30044,VIP_Ticket_7,VIP Ticket 7D,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_TicketAddVip7"; },{},{} 30045,VIP_Ticket_15,VIP Ticket 15D,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_TicketAddVip15"; },{},{} 30046,VIP_Ticket_30,VIP Ticket 30D,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_TicketAddVip"; },{},{}


30044,VIP_Ticket_7,VIP Ticket 7D,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_TicketAddVip7"; },{},{}
30045,VIP_Ticket_15,VIP Ticket 15D,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_TicketAddVip15"; },{},{}
30046,VIP_Ticket_30,VIP Ticket 30D,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_TicketAddVip"; },{},{}

Than you will need to make script with function to add their VIP, so you will need 3 functions here, F_TicketAddvip7, F_TicketAddVip15 and F_TicketAddVip.

 

Function:

Inside those function you can use something like these to add 30 days (you will need to duplicate this functions to make the 7 days and 15 days).
 

function script F_TicketAddVip { Query_SQL "SELECT `days` FROM `viptable` WHERE `vipacc_id` = '"+GetCharID(3)+"'", .@checkDays; if (.@checkDays > 0) { Set .@setDays, (.@checkDays + 30); Query_SQL "UPDATE `viptable` SET `days`='"+.@setDays+"' WHERE `vipacc_id`='"+GetCharID(3)+"'"; Query_SQL "SELECT `group_id` FROM `login` WHERE `account_id`='"+GetCharID(3)+"'", .@userLevel; If (.@userLevel < 1) Query_SQL "UPDATE `login` SET `group_id`='2' WHERE `account_id`='"+GetCharID(3)+"'"; } Else { Query_SQL "UPDATE `login` SET `group_id`='2' WHERE `account_id`='"+GetCharID(3)+"'"; Query_SQL "SELECT `userid` FROM `login` WHERE `account_id`='"+GetCharID(3)+"'", .@userID$; Query_SQL "SELECT `email` FROM `login` WHERE `account_id`='"+GetCharID(3)+"'", .@userEmail$; Query_SQL "INSERT INTO `viptable` (`vipacc_id`,`vip_id`,`days`,`email`) VALUES ('"+GetCharID(3)+"','"+.@userID$+"','30','"+.@accEmail$+"')"; } AtCommand "@reloadpcdb"; dispbottom "You received 30 days of VIP Account, congrats!"; specialeffect2 338; End; Return; }


function	script	F_TicketAddVip	{
	Query_SQL "SELECT `days` FROM `viptable` WHERE `vipacc_id` = '"+GetCharID(3)+"'", .@checkDays;
	if (.@checkDays > 0) {
		Set .@setDays, (.@checkDays + 30);
		Query_SQL "UPDATE `viptable` SET `days`='"+.@setDays+"' WHERE `vipacc_id`='"+GetCharID(3)+"'";
		Query_SQL "SELECT `group_id` FROM `login` WHERE  `account_id`='"+GetCharID(3)+"'", .@userLevel;
		If (.@userLevel < 1) 
			Query_SQL "UPDATE `login` SET `group_id`='2' WHERE `account_id`='"+GetCharID(3)+"'";
	}
	Else {
		Query_SQL "UPDATE `login` SET `group_id`='2' WHERE `account_id`='"+GetCharID(3)+"'";
		Query_SQL "SELECT `userid` FROM `login` WHERE `account_id`='"+GetCharID(3)+"'", .@userID$;
		Query_SQL "SELECT `email` FROM `login` WHERE `account_id`='"+GetCharID(3)+"'", .@userEmail$;
		Query_SQL "INSERT INTO `viptable` (`vipacc_id`,`vip_id`,`days`,`email`) VALUES ('"+GetCharID(3)+"','"+.@userID$+"','30','"+.@accEmail$+"')";
	}
	AtCommand "@reloadpcdb";
	dispbottom "You received 30 days of VIP Account, congrats!";
	specialeffect2 338;
	End;
Return;
}

 

You will need this SQL CODE

DROP TABLE IF EXISTS `viptable`; CREATE TABLE `viptable` ( `vipacc_id` int(11) unsigned NOT NULL default '0', `vip_id` varchar(255) NOT NULL default '', `days` int(11) NOT NULL default '0', `email` varchar(39) NOT NULL default '', PRIMARY KEY (`vipacc_id`), KEY `name` (`vip_id`) ) ENGINE=MyISAM; INSERT INTO `viptable` (`vipacc_id`, `vip_id`, `days`, `email`) VALUES ('1', 'VIP', '1', '[email protected]');


DROP TABLE IF EXISTS `viptable`;
CREATE TABLE `viptable` (
  `vipacc_id` int(11) unsigned NOT NULL default '0',
  `vip_id` varchar(255) NOT NULL default '',
  `days` int(11) NOT NULL default '0',
  `email` varchar(39) NOT NULL default '',
  PRIMARY KEY  (`vipacc_id`),
  KEY `name` (`vip_id`)
) ENGINE=MyISAM; 

INSERT INTO `viptable` (`vipacc_id`, `vip_id`, `days`, `email`) VALUES ('1', 'VIP', '1', '[email protected]');

Dont forget to add the items into your DATA Folder with some sprite too.


With this you will have your VIP system with 7,15 and 30 days.

To custom aura you could use @Functor system, it's paid custom aura.

 

hi sir @trackxart i have problem with the function script how to fix this?

here the error...

viperror.png

Share this post


Link to post
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.   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.