Advertisement
Guest User

points system and command script mirc for twitch

a guest
Jan 16th, 2014
1,032
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.03 KB | None | 0 0
  1. alias -l addPoints {
  2. if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
  3. var %topic $+($chan,.,$nick)
  4. var %points $calc($readini(Points.ini,%topic,Points) + $1)
  5. writeini -n Points.ini %topic Points %points
  6. return %points
  7. }
  8.  
  9. alias -l lookUpPoints {
  10. var %topic $+($chan,.,$nick)
  11. var %points $readini(Points.ini,%topic,Points)
  12. return %points
  13. }
  14. alias doaddpoints {
  15. if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
  16. var %topic $+($1,.,$2)
  17. var %points $calc($readini(Points.ini,%topic,Points) + $3)
  18. writeini -n Points.ini %topic Points %points
  19. echo -a Added points for %topic
  20. }
  21.  
  22. alias dorempoints {
  23. var %topic $+($1,.,$2)
  24. remini -n Points.ini %topic Points
  25. echo -a Removed points for %topic
  26. }
  27.  
  28. on *:text:!points:#:{
  29. if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
  30. set -u10 %floodpoints On
  31. set -u30 %floodpoints. $+ $nick On
  32. msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points.
  33. }
  34.  
  35.  
  36. on *:text:!points:#:{
  37. if ((%floodpoints) || ($($+(%,floodpoints.,$echo),2))) { return }
  38. set -u10 %floodpoints On
  39. set -u30 %floodpoints. $+ $nick On
  40. msg # $nick has $readini(Points.ini,$+(#,.,$echo),Points) total points.
  41. }
  42.  
  43.  
  44. on $*:text:/!points (add|remove)/Si:#:{
  45. if ($nick isop #) {
  46. if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
  47. writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
  48. { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. }
  49. }
  50. else { msg $chan This command is only available to moderators. }
  51. }
  52. on !*:join:#:{
  53. $+(.timerpoints.,#,.,$nick) 1 60 add.pts $+(#,.,$nick)
  54. add.pts $+(#,.,$nick)
  55. }
  56. on !*:part:#:$+(.timerpoints.,#,.,$nick) off
  57. alias -l add.pts {
  58. writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
  59. }
  60.  
  61.  
  62. alias -l addPoints { if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt } var %topic $+($chan,.,$nick) var %points $calc($readini(Points.ini,%topic,Points) + $1) writeini -n Points.ini %topic Points %points return %points } alias -l lookUpPoints { var %topic $+($chan,.,$nick) var %points $readini(Points.ini,%topic,Points) return %points } alias doaddpoints { if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt } var %topic $+($1,.,$2) var %points $calc($readini(Points.ini,%topic,Points) + $3) writeini -n Points.ini %topic Points %points echo -a Added points for %topic } alias dorempoints { var %topic $+($1,.,$2) remini -n Points.ini %topic Points echo -a Removed points for %topic } on *:text:!points:#:{ if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return } set -u10 %floodpoints On set -u30 %floodpoints. $+ $nick On msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points. } on $*:text:/!points (add|remove)/Si:#:{ if ($nick isop #) { if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return } writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1)) { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. } } else { msg $chan This command is only available to moderators. } } on !*:join:#:{ $+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick) add.pts $+(#,.,$nick) } on !*:part:#:$+(.timerpoints.,#,.,$nick) off alias -l add.pts { writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1) }
  63.  
  64.  
  65. alias -l addPoints { if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt } var %topic $+($chan,.,$nick) var %points $calc($readini(Points.ini,%topic,Points) + $1) writeini -n Points.ini %topic Points %points return %points } alias -l lookUpPoints { var %topic $+($chan,.,$nick) var %points $readini(Points.ini,%topic,Points) return %points } alias doaddpoints { if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt } var %topic $+($1,.,$2) var %points $calc($readini(Points.ini,%topic,Points) + $3) writeini -n Points.ini %topic Points %points echo -a Added points for %topic } alias dorempoints { var %topic $+($1,.,$2) remini -n Points.ini %topic Points echo -a Removed points for %topic } on *:text:!points:#:{ if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return } set -u10 %floodpoints On set -u30 %floodpoints. $+ $nick On msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points. } on $*:text:/!points (add|remove)/Si:#:{ if ($nick isop #) { if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return } writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1)) { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. } } else { msg $chan This command is only available to moderators. } } on !*:join:#:{ $+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick) add.pts $+(#,.,$nick) } on !*:part:#:$+(.timerpoints.,#,.,$nick) off alias -l add.pts { writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1) }
  66.  
  67.  
  68. alias doaddlevels {
  69. if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
  70. var %topic $+($1,.,$2)
  71. var %levels $calc($readini(Levels.ini,%topic,Levels) + $3)
  72. writeini -n Levels.ini %topic Levels %Levels
  73. echo -a Added levels for %topic
  74. }
  75. alias -1 addlevels {
  76. if ($1 !isnum) { echo 2 -st is not a number. it needs to be a number. | halt }
  77. var %topic $+($chan,.,$nick)
  78. var %levels $calc(readini(levels.ini,%topic,levels) + $1)
  79. writeini -n levels.ini %topic levels %levels
  80. return %levels
  81. }
  82.  
  83.  
  84.  
  85. on $*:text:!levels (add|remove)/Si:#:{
  86. if ($nick isop #) {
  87. if ($0 < 3) { msg # Insufficient parameters: Use !lvl <add|remove> <user> [number] | return }
  88. writeini -n Levels.ini $+(#,.,$3) levels $calc($readini(Levels.ini,$+(#,.,$3),Levels) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
  89. { msg $chan $3 now has $readini(Levels.ini,$+(#,.,$3),levels) total level. }
  90. }
  91. else { msg $chan This command is only available to moderators. }
  92. }
  93.  
  94.  
  95.  
  96. on *:text:!*:#: {
  97. var %get $+(#,.,$1)
  98. var %name $1
  99. var %text $readini(cmds.ini,%get,text)
  100. if (!%text) {
  101. /msg # No such command available.
  102. }
  103. else {
  104. if (%flood3) { return }
  105. set -u30 %flood3 On
  106. /msg # %text
  107. }
  108. }
  109. on *:text:#*:#: {
  110. if (ismod) {
  111. if ($1 == #add) {
  112. if ($0 < 3) { msg # Insufficient parameters: Use #add !<command name> <text> | return }
  113. writeini -n cmds.ini $+(#,.,$2) text $3-
  114. /msg # $2 command added as $3-
  115. }
  116. elseif ($1 == #edit) {
  117. if ($0 < 3) { msg # Insufficient parameters: Use #edit !<command name> <text> | return }
  118. writeini -n cmds.ini $+(#,.,$2) text $3-
  119. /msg # Edited $2 to $3-
  120. }
  121. elseif ($1 == #delete) {
  122. /remini cmds.ini $+(#,.,$2)
  123. /msg # Command $2 has been removed.
  124. }
  125. }
  126. }
  127. else {
  128. /msg # $nick $+ , you do not have permission to use mod commands.
  129. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement