Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2013
11,425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 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. on $*:text:/!points (add|remove)/Si:#:{
  36. if ($nick isop #) {
  37. if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
  38. writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
  39. { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. }
  40. }
  41. else { msg $chan This command is only available to moderators. }
  42. }
  43. on !*:join:#:{
  44. $+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick)
  45. add.pts $+(#,.,$nick)
  46. }
  47. on !*:part:#:$+(.timerpoints.,#,.,$nick) off
  48. alias -l add.pts {
  49. writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement