paintbalbot

Untitled

May 8th, 2014
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. on $*:text:/^!repeat !?(\S+) (off|\d+)/iS:#:{
  2. if ($read(sreglist.txt,nw,$nick)) {
  3.  
  4. var %command = $regml(1), %interval = $regml(2)
  5.  
  6. if ($timer(command. $+ %command)) {
  7. if (%interval == off) .timercommand. $+ %command off
  8. if (%interval == off) msg $chan $$2 is no longer repeating
  9. else msg # ! $+ %command is already repeating
  10. }
  11. elseif ($readini(allcommands.ini,n,commands,%command)) {
  12. var %response = $v1
  13. .timercommand. $+ %command 0 $iif(%interval < 5,5,%interval) msg # $safe(%response)
  14. msg # %response
  15. }
  16. }
  17. }
  18. alias safe return $!decode( $encode($1,m) ,m)
  19.  
  20. on $*:text:/^!addcom !?(\S+)/iS:#:{
  21. if ($read(sreglist.txt,nw,$nick)) && ($3 != $null) {
  22. msg $chan added $2 to commands!
  23. writeini allcommands.ini commands $regml(1) $3-
  24.  
  25. var %text $read(commandsresonse.txt,1)
  26. if %text == $null {
  27. var %line the current commands and their info for the bot http://bit.ly/PBBcommands $+ , ! $+ $regml(1)
  28. }
  29. else {
  30. var %line %text ! $+ $regml(1)
  31. }
  32.  
  33. write -l1 commandsresonse.txt %line
  34. }
  35. }
  36. on $*:text:/^!delcom !?(\S+)/iS:#:{
  37. if ($read(sreglist.txt,nw,$nick)) && ($2 != $null) {
  38. msg $chan removed $2 from commands!
  39. remini allcommands.ini commands $regml(1)
  40.  
  41. var %text $read(commandsresonse.txt,1)
  42. if %text != $null {
  43. var %line $remove(%text,! $+ $regml(1))
  44. }
  45.  
  46. write -l1 commandsresonse.txt %line
  47. }
  48. }
  49. on $*:text:/^!(\S+)/:#:{
  50. if ((%floodcom) || ($($+(%,floodcom. $+ $regml(1) $+,$2),3))) { return }
  51. set -u4 %floodcom $+ $regml(1) On
  52. if ($readini(allcommands.ini,n,commands,$regml(1))) msg # $v1
  53. }
Advertisement
Add Comment
Please, Sign In to add comment