Jump to content


Popular Content

Showing content with the highest reputation on 12/19/20 in all areas

  1. 1 point
    hi all i use vip script base on group id...but how to put message expired time for that script?i need change the script?i need alter SQL table? can someone teach me? here vip script that i use.. here SQL table here the script can someone teach me how add?
  2. 1 point
    Thank you very much sir @Kenpachi all working nice
  3. 1 point
    Open script file in editor. Find the line which contains query_sql "DELETE FROM `viptable` ...... Set cursor to the end of that line (click behind the semicolon) Press Backspace. Save file. You'll notice that the semicolon wasn't removed, because you deleted the hidden character (whitespace) behind it. ~Kenpachi
  4. 1 point
    Can you teach me how to fix ?
  5. 1 point
    There is a hidden character behind the semicolon in that line. (Probably caused by text encoding mismatch.)
  6. 1 point
    i got this error @Kenpachi
  7. 1 point
  8. 1 point
    Hi. Alter your SQL table: ALTER TABLE `viptable` ADD COLUMN `insert_on` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `email`; Or recreate it: 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 '', `insert_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`vipacc_id`), KEY `name` (`vip_id`) ) ENGINE=MyISAM; Change your function (note line 2): function script F_TicketAddVip { Query_SQL "DELETE FROM `viptable` WHERE `vipacc_id` = '"+GetCharID(3)+"' AND DATEDIFF(DATE_ADD(`insert_on`, INTERVAL `days` DAY), NOW()) < 0"; // remove expired VIP status before reapplying Query_SQL "SELECT `days` FROM `viptable` WHERE `vipacc_id` = '"+GetCharID(3)+"'", [email protected]; if ([email protected] > 0) { Set [email protected], ([email protected] + 30); Query_SQL "UPDATE `viptable` SET `days`='"[email protected]+"' WHERE `vipacc_id`='"+GetCharID(3)+"'"; Query_SQL "SELECT `group_id` FROM `login` WHERE `account_id`='"+GetCharID(3)+"'", [email protected]; If ([email protected] < 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)+"'", [email protected]$; Query_SQL "SELECT `email` FROM `login` WHERE `account_id`='"+GetCharID(3)+"'", [email protected]$; Query_SQL "INSERT INTO `viptable` (`vipacc_id`,`vip_id`,`days`,`email`) VALUES ('"+GetCharID(3)+"','"[email protected]$+"','30','"[email protected]$+"')"; } AtCommand "@reloadpcdb"; dispbottom "You received 30 days of VIP Account, congrats!"; specialeffect2 338; End; Return; } The info script could look like this: - script VIP_STATUS FAKE_NPC,{ OnPCLoginEvent: if (getgroupid() >= 2) { Query_SQL "SELECT DATE(DATE_ADD(`insert_on`, INTERVAL `days` DAY)), DATEDIFF(DATE_ADD(`insert_on`, INTERVAL `days` DAY), NOW()) FROM `viptable` WHERE `vipacc_id` = '"+GetCharID(3)+"'", [email protected]_date$, [email protected]_left; dispbottom "========================"; dispbottom "Account Status : VIP"; dispbottom "Expire Date : " + [email protected]_date$; dispbottom "Time left : " + [email protected]_left; dispbottom "========================"; end; } } ~Kenpachi
  • Create New...

Important Information

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