Add this getgroupid check at the beginning:
- script vip_for_1week -1,{
OnPCLoginEvent:
if (getgroupid() != 0) end;
// first time logging into this account
if (#VIP_expire == 0) {
set #VIP_expire, gettimetick(2) + (7*86400); // 7 days
dispbottom "Welcome to the server!";
dispbottom "You have been upgraded to a VIP for 1 week.";
}
if (#VIP_expire > gettimetick(2)) {
// they still have time left
dispbottom "VIP Rental : expires in " + callfunc("Time2Str",#VIP_expire);
atcommand "@adjgroup 1";
deltimer strnpcinfo(3)+"::OnPCLoginEvent";
if ((#VIP_expire - gettimetick(2)) < 2147483) { // prevent overflow error
addtimer (#VIP_expire - gettimetick(2)) *1000, strnpcinfo(3)+"::OnPCLoginEvent";
} else {
addtimer 2147483000, strnpcinfo(3)+"::OnPCLoginEvent";
}
} else if (#VIP_expire > 1) {
set #VIP_expire, 1;
atcommand "@adjgroup 0";
dispbottom "Your VIP Rental has expired.";
}
end;
}