Advertisement
Emistry

[RO] Autotrade Max Limitation + Kick when WOE/Idle for Hours

Aug 29th, 2016
910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. // https://rathena.org/board/topic/107199-autotrade-customization/
  2.  
  3. - script atcmd_example FAKE_NPC,{
  4. OnInit:
  5. bindatcmd("autotrade", strnpcinfo(3)+"::OnAtcommand");
  6.  
  7. setbattleflag "at_timeout",( 8 * 60 );
  8. end;
  9.  
  10. OnAtcommand:
  11. query_sql( "SELECT COUNT(`char_id`) FROM `vendings` WHERE `autotrade` > 0",.@count );
  12. if ( .@count >= 50 ) {
  13. dispbottom "You cant autotrade now.";
  14. }
  15. else {
  16. atcommand "@autotrade";
  17. }
  18. end;
  19.  
  20. OnAgitStart:
  21. OnAgitStart2:
  22. addrid(0);
  23. if ( checkvending() & 2 ) {
  24. atcommand "@kick "+strcharinfo(0);
  25. }
  26. end;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement