Hi, i tried to make script premium service with change group_id, its work, but there something problem....
it doesnt work when the time is up. its my script
prontera,166,181,3 script Premium Service 54,{ // Configs set .itemIDP, 7280; // Set this number to the VIP ticket set $VIP_Cooldown,60; // 60 sec Duration for test // Don't edit this config @last - @seconds set .@last,#VIP_Lasttime + $VIP_Cooldown - gettimetick(2); set .@days,.@last / 60 / 60 / 24; set .@hours,.@last / 60 / 60 % 60; set .@minutes,.@last / 60 % 60; set .@seconds,.@last % 60; // Premium Service Duration if(#VIPSERVICE == 1 && #VIP_Lasttime + $VIP_Cooldown > gettimetick(2) && #VIP_Lasttime < gettimetick(2) && getgroupid() == 1) { mes "[Premium Service]"; mes "You have: "; mes ""+.@days+" days "+.@hours+" hours "+.@minutes+" minutes "+.@seconds+" seconds"; mes "in your Premium Service remaining."; close; } // Mainly Script Premium Service mes "[Premium Service]"; mes "Hello!"; mes "Would you like to redeem your Premium Service ticket?"; switch(select("Yes!:No.")) { case 1: if (countitem(.itemIDP) > 0 && getgroupid() == 0 ) { delitem .itemIDP,1; set #VIPSERVICE,1; set #VIP_Lasttime,gettimetick(2); mes "Congrats, you now have Premium Member!"; query_sql "UPDATE `login` SET `group_id` = 1 WHERE `group_id` = 0 AND `account_id` = "+getcharid(3); dispbottom "You must relog for it to take effect."; next; atcommand "@kick "+strcharinfo(0)+""; close; } else if (countitem(.itemIDP) == 0) { next; mes "[Premium Service]"; mes "You do not have a Premium Service ticket!"; mes "Come back when you get one."; close; } else { next; mes "[Premium Service]"; mes "Only player can using Premium Service"; close; } case 2: next; mes "[Premium Service]"; mes "Very well, I shall be here if you change your mind."; close; }OnPCLoginEvent: if(#VIPSERVICE == 1 && #VIP_Lasttime + $VIP_Cooldown - gettimetick(2) == 0 && getgroupid() == 1) { //Problem mes "[Premium Service]"; mes "You're premium service duration has gone."; mes "Please relog again."; mes "To take effect."; next; query_sql "UPDATE `login` SET `group_id` = 0 WHERE `group_id` = 1 AND `account_id` = "+getcharid(3); set #VIPSERVICE,0; set #VIP_Lasttime,0; atcommand "@kick "+strcharinfo(0)+""; close; }}
i already underline the problem,i think its the problem why not trigger my script, i dunnow must put that... please help me
Hi, i tried to make script premium service with change group_id, its work, but there something problem....
it doesnt work when the time is up. its my script
i already underline the problem,i think its the problem why not trigger my script, i dunnow must put that... please help me
Edited by ahmadshidqiShare this post
Link to post
Share on other sites