something like this ?
OnPCLoginEvent:
// Obtain account data
set .@getAccountType$,query_sql("SELECT `account_type` FROM login WHERE `account_id` = "+getcharid(3)+";",.@accountType$);
if( !newbie_vip_account && .@getAccountType$ == "" ){
.@accountId = getcharid(3);
query_sql("INSERT INTO vip_platinum (`account_id`,`account_name`,`start_date`,`end_date`,`status`) VALUES ("+.@accountId+",'"+.@accountName$+"','"+gettimestr("%Y-%m-%d",21)+"','"+gettimestr("%Y-%m-%d",21)+"','ACTIVE');");
query_sql("UPDATE vip_platinum SET end_date = DATE_ADD(start_date, INTERVAL "+.@platinumDays+" DAY) WHERE account_id = "+.@accountId+";");
query_sql("UPDATE `login` SET `level` = 3 WHERE `account_id` = "+.@accountId+";");
query_sql("UPDATE login SET `account_type` = 'PLATINUM' WHERE account_id = "+.@accountId+";");
newbie_vip_account = 1;
}