Advertisement
Arniceous

Custom Quits mIRC

Jan 28th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. menu * {
  2. Custom Quits
  3. .Quit: quit
  4. .-
  5. .Quit List: quitlist
  6. }
  7. alias quitlist { dialog -m quits quits }
  8. alias quit {
  9. if ($isfile(quits.txt) && ($lines(quits.txt) >= 1)) {
  10. var %total $lines(quits.txt)
  11. !quit Random Quit: $read(quits.txt,$rand(1,%total))
  12. }
  13. else { !quit $me is using "Random Quit" by Savage_CL! }
  14. }
  15. dialog quits {
  16. title "Custom Quits"
  17. size -1 -1 210 116
  18. option dbu
  19. text "Custom Quits by Savage_CL!", 1, 3 5 209 8, center
  20. list 34, 61 17 145 95, size
  21. button "Add", 35, 10 20 45 12
  22. button "Edit", 36, 10 35 45 12
  23. button "Delete", 37, 10 50 45 12
  24. button "Up", 38, 10 65 21 12
  25. button "Down", 39, 34 65 21 12
  26. button "Notepad", 46, 10 80 45 12
  27. }
  28. on 1:dialog:quits:init:0:{
  29. $iif($isfile(quits.txt),loadbuf -o quits 34 quits.txt)
  30. }
  31. ;add button (tab 2)
  32. on 1:dialog:quits:sclick:35: {
  33. write quits.txt $input(New Quit Message?,eo,Custom Quits)
  34. did -r quits 34
  35. loadbuf -o quits 34 quits.txt
  36. }
  37.  
  38. ;edit button (tab 2)
  39. on 1:dialog:quits:sclick:36: {
  40. if ($did(quits,34).sel != 0) {
  41. write -l $+ $didwm(quits,34,$did(quits,34).seltext) quits.txt $input(Edit:,eo,Custom Quits,$did(quits,34).seltext)
  42. did -r quits 34
  43. loadbuf -o quits 34 quits.txt
  44. }
  45. }
  46. ;delete button (tab 2)
  47. on 1:dialog:quits:sclick:37: {
  48. var %tempselline $did(quits,34).sel
  49. if (%tempselline != 0) {
  50. write -dl $+ $did(quits,34).sel quits.txt
  51. did -r quits 34
  52. loadbuf -o quits 34 quits.txt
  53. did -c quits 34 %tempselline
  54. }
  55. }
  56.  
  57. ;up/down buttons
  58. on 1:dialog:quits:sclick:38,39: {
  59. var %mSel = $did(quits, 34).sel, %mText = $did(quits, 34).seltext, %op = $iif($did == 38, -, +), %nSel = $calc(%mSel %op 1)
  60. var %sText = $did(quits, 34, %nSel).text
  61. if (%nSel > 0 && %nSel < $calc(1+$did(quits, 34).lines)) {
  62. did -oc quits 34 %nSel %mText
  63. did -o quits 34 %mSel %sText
  64. }
  65. savebuf -o quits 34 quits.txt
  66. }
  67.  
  68. ;notepad button (tab 2)
  69. on 1:dialog:quits:sclick:46: {
  70. did -r quits 34
  71. run quits.txt
  72. $iif($input(Please click ok when you are done editing!,o,Custom Quits),loadbuf -o quits 34 quits.txt)
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement