Guest User

Twitch Bot problem

a guest
Dec 21st, 2015
291
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (I'm using tutorials by 2 different people)
  2.  
  3. mIRC:
  4.  
  5. // Format: !addUser [name] [points]
  6. on *:text:!addUser*:#: {
  7. var %name = $2
  8. var %points = $3
  9.  
  10. writeini -n %rosterFile $calc(%rosterID + 1) name %name
  11. writeini -n %rosterFile $calc(%rosterID + 1) points %points
  12.  
  13. msg $chan /me %name was added too the system for %points points
  14. inc %points
  15. }
  16. alias -l addPoints {
  17. if ($1 !isnum { echo 2 -st $1 Is not a number. It needs to be a number | halt }
  18. var %topic $+($1,.,$2)
  19. var %points $calc($readini(points.ini,%topic,points) + $1)
  20. writeini -n points.ini %topic Points %points
  21. }
  22.  
  23. on *:text:!points:#: {
  24. msg # $nick has $readini(points.ini,$+(#,.,$name),points)
  25. }
  26.  
  27. ini File:
  28. [1]
  29. name=AquaPlayzX
  30. points=999999
  31.  
  32. [2]
  33. name=Moobot
  34. points=3
RAW Paste Data