Advertisement
Guest User

HeatedHeart

a guest
Aug 13th, 2009
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;Deck Keeper Record Tracker---------;;
  3. ;;Coded By HeatedHeart---------------;;
  4. ;;For Use With XeroChat3-------------;;
  5. ;;All Rights Reserved:XeroChat Team--;;
  6. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7. ;#### Startup
  8. on *:LOAD:{
  9. hmake DKRT 50
  10. }
  11. on *:START:{
  12. hmake DKRT 50
  13. hload DKRT DKRT.txt
  14. }
  15. on *:DIALOG:DKRT:close:*: {
  16. hsave DKRT DKRT.txt
  17. }
  18. on *:EXIT:{
  19. hsave DKRT DKRT.txt
  20. }
  21. on *:DIALOG:DKRT:init:*: {
  22. ShowDecks
  23. }
  24. ;#### Popups
  25. menu * {
  26. DKRT
  27. .Deck Record Keeper Tracker: dialog -vmd DKRT DKRT
  28. }
  29. ;#### Alias
  30. alias DisplayFile {
  31. did -r $dname 21
  32. var %dir $Gettok($Hget(DKRT,$did(1).seltext),1,34)
  33. var %Lines $lines($Gettok($Hget(DKRT,$did(1).seltext),1,34))
  34. var %Loop 1
  35. while (%Loop <= %Lines) {
  36. did -a $dname 21 $read($qt(%dir),%Loop)
  37. inc %loop
  38. }
  39. }
  40. alias StatRefresh {
  41. var %x 7 15 16 17 18
  42. var %loop 1
  43. while (%loop <= 5) {
  44. did -r $dname $Gettok(%x,%Loop,32)
  45. inc %Loop
  46. }
  47. did -a $dname 7 $Gettok($Hget(DKRT,$did(1).seltext),1,34)
  48. did -a $dname 15 $did(1).seltext
  49. did -a $dname 16 $Gettok($asctime($file($Gettok($Hget(DKRT,$did(1).seltext),1,34)).ctime),1-3,32)
  50. did -a $dname 17 $Gettok($Hget(DKRT,$did(1).seltext),2,124)
  51. did -a $dname 18 $Gettok($Hget(DKRT,$did(1).seltext),3,124)
  52. }
  53. alias ShowDecks {
  54. did -r $dname 1
  55. var %x $hget(DKRT,0).item
  56. var %loop 1
  57. while (%Loop <= %X) {
  58. did -a $dname 1 $Hget(DKRT,%Loop).item
  59. inc %loop
  60. }
  61. }
  62.  
  63. ;#### Dialog
  64. dialog DKRT {
  65. title "Deck Record Tracker"
  66. size -1 -1 610 359
  67. option pixels notheme
  68. box "Control", 10, 186 146 239 123
  69. box "", 8, 6 320 599 27
  70. list 1, 5 22 174 316
  71. box "Infromation", 2, 185 17 242 100
  72. text "Wins:", 3, 193 61 26 17
  73. text "Loss's:", 4, 193 75 32 16
  74. text "Created:", 5, 192 47 43 17
  75. text "Name:", 6, 192 32 31 17
  76. text "5", 7, 11 328 590 17
  77. button "Add Win", 9, 192 165 65 25
  78. button "Add Loss", 11, 352 165 65 25
  79. button "Add Deck", 13, 193 195 65 25
  80. button "Delete Deck", 14, 352 195 65 25
  81. button "Reset Deck Keeper", 12, 192 234 228 25
  82. text "1", 15, 223 32 101 17
  83. text "2", 16, 237 47 100 17
  84. text "3", 17, 221 62 100 17
  85. text "4", 18, 226 75 100 17
  86. link "www.XeroCreative.com", 19, 25 2 120 17
  87. list 21, 430 17 174 316
  88. button "Display Record", 20, 267 165 78 25
  89. button "Display Deck", 22, 268 195 78 25
  90. }
  91. ;#### Coding
  92. on *:dialog:DKRT:SCLICK:*: {
  93. if ($did == 22) {
  94. var %dir $Gettok($Hget(DKRT,$did(1).seltext),1,34)
  95. var %Lines $lines($Gettok($Hget(DKRT,$did(1).seltext),1,34))
  96. var %Loop 1
  97. while (%Loop <= %Lines) {
  98. msg $active $read($qt(%dir),%Loop)
  99. inc %loop
  100. }
  101. }
  102. if ($did == 11) {
  103. var %dir $Gettok($Hget(DKRT,$did(1).seltext),1,34)
  104. var %win $Gettok($Hget(DKRT,$did(1).seltext),2,124)
  105. var %loss $Gettok($Hget(DKRT,$did(1).seltext),3,124)
  106. inc %loss
  107. hadd DKRT $did(1).seltext $qt(%dir) $chr(124) $+ %win $+ $chr(124) $+ %loss $+ $chr(124)
  108. statrefresh
  109. }
  110. if ($did == 9) {
  111. var %dir $Gettok($Hget(DKRT,$did(1).seltext),1,34)
  112. var %loss $Gettok($Hget(DKRT,$did(1).seltext),3,124)
  113. var %win $Gettok($Hget(DKRT,$did(1).seltext),2,124)
  114. inc %win
  115. hadd DKRT $did(1).seltext $qt(%dir) $chr(124) $+ %win $+ $chr(124) $+ %loss $+ $chr(124)
  116. statrefresh
  117. }
  118. if ($did == 20) {
  119. msg $active 0(4 $+ $did(1).seltext $+ 0)14 W15ins4: 0(4 $+ $Gettok($Hget(DKRT,$did(1).seltext),2,124) $+ 0) 14L15oss's4: 0(4 $+ $Gettok($Hget(DKRT,$did(1).seltext),3,124) $+ 0)
  120. }
  121. if ($did == 1) {
  122. displayfile
  123. statrefresh
  124. }
  125. if ($did == 12) {
  126. hfree DKRT
  127. hmake DKRT 50
  128. showdecks
  129. statrefresh
  130. }
  131. if ($did == 13) {
  132. var %x $sfile(dir)
  133. hadd DKRT $gettok(%x,$numtok(%x,92),92) $qt(%x) |0|0|
  134. showdecks
  135. statrefresh
  136. }
  137. if ($did == 14) {
  138. hdel DKRT $did(1).seltext
  139. showdecks
  140. statrefresh
  141. }
  142. }
  143. ;#### End DRT
  144.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement