mall01,92,135,5 script GVipRegist612,{if(gettimetick(2)<#gtimer) {
mes .NPC$;
mes "Dear "+strcharinfo(2)+", you are still a vip guild. You cannot talk to me until you are not a vip guild";
close;}
mes .NPC$;
mes "Hello "+strcharinfo(2)+", What can i do for you?";
next;if(select("- I want to be a vip:- Nothing")-1) close;
mes .NPC$;
mes "Okay then, before you become a vip you need the following : ";
mes "- "+.Amount+"x "+getitemname(.ID);
next;
mes .NPC$;
mes "So what do you want now?";
next;if(select("Yes, i have those requirements:I'll think over it again")-1) close;
mes .NPC$;
mes "Let me check your items to ensure that you have my requirements";
next;if(countitem(.ID)<.Amount){
mes .NPC$;
mes "Sorry "+strcharinfo(2)+" seems like you doesn't meet my requirements.";
close;}
mes .NPC$;
mes "Alright then, i will register your guild as a vip, guild"+getcharid(2)+"must be relog";set.@timeConverter,.Days*24*60*60;
query_sql "INSERT INTO `vip_guild` (`guild_id`, `time`) VALUES ('"+getcharid(2)+"', '"+.@timeConverter+"')";
delitem .ID,.Amount;set#gtimer,gettimetick(2) + .@timeConverter;
close2;OnPCLoginEvent:if(gettimetick(2)>#gtimer) {
dispbottom "Your vip guild is already expired";
query_sql "DELETE FROM `vip_guild` WHERE `guild_id` = '"+getcharid(2)+"'";
end;}set.@timeInSeconds,#gtimer - gettimetick(2);set.@daysLeft,.@timeInSeconds/60/60/24;
dispbottom "Hello "+strcharinfo(2)+" your vip guild still have "+.@daysLeft+" days";
end;OnInit:.NPC$ ="[ "+strnpcinfo(1)+" ]";.Amount=30;.ID =51582;.Days=30;
query_sql "CREATE TABLE IF NOT EXISTS `vip_guild` (`guild_id` INT NOT NULL, `time` INT NOT NULL) ENGINE=MyISAM";
end;}
This script has a bug, when guild members login at the same time it will be erased faster in SQL, how to edit the Vip Guild System run smoothly? I mean how can this VIP guild run out for 1 month? Please help me
Question
bambang777
This script has a bug, when guild members login at the same time it will be erased faster in SQL, how to edit the Vip Guild System run smoothly? I mean how can this VIP guild run out for 1 month? Please help me
Link to comment
Share on other sites
2 answers 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.