Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 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. alias -l add.pts {
  9. writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
  10. }
  11. alias -l lookUpPoints {
  12. var %topic $+($chan,.,$nick)
  13. var %points $readini(Points.ini,%topic,Points)
  14. return %points
  15. }
  16. alias doaddpoints {
  17. if ($3 !isnum) { echo 2 -st $3 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) + $3)
  20. writeini -n Points.ini %topic Points %points
  21. echo -a Added points for %topic
  22. }
  23. alias dorempoints {
  24. var %topic $+($1,.,$2)
  25. remini -n Points.ini %topic Points
  26. echo -a Removed points for %topic
  27. }
  28. on *:text:!points*:#:{
  29. if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
  30. set -u15 %floodpoints On
  31. set -u15 %floodpoints. $+ $nick On
  32. if ($2 == add) || ($2 == remove) {
  33. if ($nick isop #) {
  34. if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
  35. writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
  36. { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. }
  37. }
  38. }
  39. elseif $2 == $null {
  40. msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points.
  41. }
  42. else {
  43. msg $chan $2 now has $readini(Points.ini,$+(#,.,$2),Points) total points.
  44. }
  45. }
  46. on !*:join:#:{
  47. $+(.timerpoints.,#,.,$nick) 0 600 add.pts $+(#,.,$nick)
  48. add.pts $+(#,.,$nick)
  49. }
  50. on !*:part:#:$+(.timerpoints.,#,.,$nick) off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement