Advertisement
Sehrentos

rAthena NPC script limit same ip

Oct 9th, 2018
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. //===== rAthena Script =======================================
  2. //= Limit IP
  3. //===== By: ==================================================
  4. //= Sehrentos
  5. //===== Current Version: =====================================
  6. //= 1.0
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= Limit online IP addresses to X amount.
  11. //===== Additional Comments: =================================
  12. //= 1.0 Initial script.
  13. //============================================================
  14. - script #limit_same_ip -1,{
  15. OnPCLoginEvent:
  16. .@rows = query_sql("SELECT login.account_id FROM login INNER JOIN `char` ON char.account_id=login.account_id WHERE login.last_ip='"+getcharip()+"' AND char.online=1;", .@account_id);
  17. if (.@rows > 1) {
  18. mes "[IP notice]";
  19. mes "Too many online from same IP address.";
  20. // Block, Kick, etc.
  21. pcblockmove getcharid(3),1;
  22. pcblockskill getcharid(3),1;
  23. sleep2 5000;
  24. atcommand "@kick " + getcharid(0);
  25. close;
  26. }
  27. end;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement