Advertisement
thetechboy

SpaceTimeBot Code 2/27/2014 01

Feb 27th, 2014
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.07 KB | None | 0 0
  1. ;-------------------
  2. ;| Trigger Commands |
  3. ;-------------------
  4.  
  5. on *:text:!*:#: {
  6. var %get $+(#,.,$1)
  7. var %name $1
  8. var %text $readini(cmds.ini,%get,text)
  9. else {
  10. if (%flood3) { return }
  11. set -u30 %flood3 On
  12. /msg # %text
  13. }
  14. }
  15.  
  16. ;----------------
  17. ;| Mod Commands |
  18. ;----------------
  19. on *:text:#*:#: {
  20. if (ismod) {
  21. if ($1 == #add) {
  22. if ($0 < 3) { msg # Insufficient parameters: Use #add !<command name> <text> | return }
  23. writeini -n cmds.ini $+(#,.,$2) text $3-
  24. /msg # $2 command added as $3-
  25. }
  26. elseif ($1 == #edit) {
  27. if ($0 < 3) { msg # Insufficient parameters: Use #edit !<command name> <text> | return }
  28. writeini -n cmds.ini $+(#,.,$2) text $3-
  29. /msg # Edited $2 to $3-
  30. }
  31. elseif ($1 == #delete) {
  32. /remini cmds.ini $+(#,.,$2)
  33. /msg # Command $2 has been removed.
  34. }
  35. }
  36. }
  37. ;------------------------------------
  38. ;| Moderator + Level Acess Comamands |
  39. ;------------------------------------
  40. on *:TEXT:!teamspeak:#: {
  41. if ((%floodteamspeak) || ($($+(%,floodteamspeak.,$nick),2))) { return }
  42. set -u10 %teamspeak On
  43. set -u30 %teamspeak. $+ $nick On
  44. if ($nick isop #) { msg # The TeamSpeak server IP is: 5.175.161.118 }
  45. else { msg # Please ask a moderator to use this command. }
  46. }
  47. on *:TEXT:!tstutorial:#: {
  48. if ((%floodtstutorial) || ($($+(%,floodtstutorial.,$nick),2))) { return }
  49. set -u10 %getteamspeak On
  50. set -u30 %getteamspeak. $+ $nick On
  51. if ($nick isop #) { msg $chan This tutorial explains how to connect to a Team Speak server, just replace the ip with "5.175.161.118" http://tserverhq.com/clients/knowledgebase/99/How-to-connect-to-a-Teamspeak-3-server.html }
  52. else { msg # Please ask a moderator to use this command. }
  53. }
  54. on *:TEXT:!moderator:#: {
  55. if ((%moderator) || ($($+(%,moderator.,$nick),2))) { return }
  56. set -u10 %moderator On
  57. set -u30 %moderator. $+ $nick On
  58. if ($nick isop #) { msg $chan Thetechboy (Ryan) only selects former CIA agents that have a perfect eye, and can survive a bullet. So what are your chances? }
  59. else { msg # Please ask a moderator to use this command. }
  60. }
  61. ;---------
  62. ;| Timers |
  63. ;---------
  64. ;---------------
  65. ;| Point System |
  66. ;---------------
  67. alias -l addPoints {
  68. if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
  69. var %topic $+($chan,.,$nick)
  70. var %points $calc($readini(Points.ini,%topic,Points) + $1)
  71. writeini -n Points.ini %topic Points %points
  72. return %points
  73. }
  74.  
  75. alias -l lookUpPoints {
  76. var %topic $+($chan,.,$nick)
  77. var %points $readini(Points.ini,%topic,Points)
  78. return %points
  79. }
  80. alias doaddpoints {
  81. if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
  82. var %topic $+($1,.,$2)
  83. var %points $calc($readini(Points.ini,%topic,Points) + $3)
  84. writeini -n Points.ini %topic Points %points
  85. echo -a Added points for %topic
  86. }
  87.  
  88. alias dorempoints {
  89. var %topic $+($1,.,$2)
  90. remini -n Points.ini %topic Points
  91. echo -a Removed points for %topic
  92. }
  93.  
  94. on *:text:!points:#:{
  95. if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
  96. set -u10 %floodpoints On
  97. set -u30 %floodpoints. $+ $nick On
  98. msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points.
  99. }
  100.  
  101. on $*:text:/!points (add|remove)/Si:#:{
  102. if ($nick isop #) {
  103. if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
  104. writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
  105. { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. }
  106. }
  107. else { msg $chan This command is only available to moderators. }
  108. }
  109. on !*:join:#:{
  110. $+(.timerpoints.,#,.,$nick) 0 60 add.pts $+(#,.,$nick)
  111. msg $chan Welcome $nick to Thetechboy's Stream, enjoy your stay!
  112. add.pts $+(#,.,$nick)
  113. }
  114. on !*:part:#:
  115. $+(.timerpoints.,#,.,$nick) off
  116. alias -l add.pts {
  117. writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1)
  118. }
  119. on !*:part:#:{
  120. msg $chan Thanks for Watching the stream $nick , see you next time!
  121. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement