Hi! is this possible to check onminute at the second script, I would like it to check every 15/30mins cause other players were able to bypass the first script.
(I don't want to use mac_ip)
I tried this script but it has an error of:
[Error]: script_rid2sd: fatal error ! player not attached! [Debug]: Function: strcharinfo (1 parameter): [Debug]: Data: number value=0 [Debug]: Source (NPC): Only2perIPs (invisible/not on a map)
Advance thanks
- script Only2perIP -1,{
OnPCLoginEvent:
if (getgmlevel() >= 99) end;
set .@name$, strcharinfo(0);
if (query_sql("SELECT login.account_id FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") AND `char`.online=1", .@account_id) > 2) {
announce "Sorry, only 2 accounts per PC can be logged in at a time.", bc_self;
sleep 1000;
atcommand "@kick " + .@name$;
}
end;
}
- script Only2perIPs -1,{
OnMinute15:
OnMinute30:
OnMinute40:
OnMinute55:
StartEvent:
set .@name$, strcharinfo(0);
if (query_sql("SELECT login.account_id FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id WHERE login.last_ip=(SELECT last_ip FROM login WHERE account_id="+getcharid(3)+") AND `char`.online=1", .@account_id) > 2) {
announce "Sorry, only 2 accounts per PC can be logged in at a time.", bc_self;
sleep 1000;
atcommand "@kick " + .@name$;
}
end;
}
Question
mightyryan
Hi! is this possible to check onminute at the second script, I would like it to check every 15/30mins cause other players were able to bypass the first script.
(I don't want to use mac_ip)
I tried this script but it has an error of:
[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: strcharinfo (1 parameter):
[Debug]: Data: number value=0
[Debug]: Source (NPC): Only2perIPs (invisible/not on a map)
Advance thanks
Edited by mightyryan4 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.