Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.35 KB | None | 0 0
  1. alias top10 {
  2. var %i = $var(%SA.*,0)
  3. while (%i > 0) {
  4. writeini fightstats.ini $var(%SA.*,%i) wins $var(%SA.*,%i).value
  5. dec %i
  6. }
  7. fightrank
  8. }
  9.  
  10. alias statread3 { return $readini(fightstats.ini,$1,$2) }
  11.  
  12. alias fightrank {
  13. window -c @rankings
  14. var %i = $ini(fightstats.ini,0)
  15. window -lne @rankings
  16. while (%i > 0) {
  17. aline @rankings $statread3($ini(fightstats.ini,%i),wins) $ini(fightstats.ini,%i)
  18. dec %i
  19. }
  20. filter -ctue 1 10 @rankings @rankings
  21. write -c fightranks.txt
  22. var %i = 1
  23. var %i2 = $calc($line(@rankings,0) +1)
  24. while (%i < %i2) {
  25. write fightranks.txt 14,01 $+ $ord(%i) $+ 07)00 $gettok($gettok($gettok($line(@rankings,%i),2,32),1,33),2,46) 07[14Stats07:00 $gettok($line(@rankings,%i),1,32) $+ 07]
  26. inc %i
  27. }
  28. msg %top10chan 14,01Top 001014 Fighters07:
  29. msg %top10chan $read(fightranks.txt, 1) $chr(124) $read(fightranks.txt, 2) $chr(124) $read(fightranks.txt, 3) $chr(124) $read(fightranks.txt, 4) $chr(124) $read(fightranks.txt, 5)
  30. msg %top10chan $read(fightranks.txt, 6) $chr(124) $read(fightranks.txt, 7) $chr(124) $read(fightranks.txt, 8) $chr(124) $read(fightranks.txt, 9) $chr(124) $read(fightranks.txt, 10)
  31. }
  32. return
  33. }
  34.  
  35.  
  36.  
  37.  
  38. on *:TEXT:!Fight*:#:{
  39. if (%flfight. [ $+ [ $address($nick,6) ] ] >= 5) { halt }
  40. if (%flfight. [ $+ [ $address($nick,6) ] ] == 3) { .notice $nick You have one more !fight use within a 30 second period. }
  41. inc -u30 %flfight. [ $+ [ $address($nick,6) ] ] 1
  42. if ($2 == $nick) { .msg $chan You cannot attack yourself dumbass, stop trying to cheat! | halt }
  43. if ($2 == $me) { .msg $chan You cannot attack the Bot dumbass, stop trying to cheat! | halt }
  44. if ($2 == Refbot) { .msg $chan You cannot attack RefBot dumbass, stop trying to cheat! | halt }
  45. if ($2 == help) { .notice $nick Fight Help Commands are: !fight, !fight Stats, !fight help | halt }
  46. if ($2 == top10) {
  47. if (%top10flood != $null) { .notice $nick Top 10 command was recently used on %top10chan $+ . Please wait at least 30 seconds before using it again to prevent flooding | return }
  48. else { set -u30 %top10flood on | set %top10chan $chan | top10 | return }
  49. }
  50. if ($2 == stats) {
  51. if ($3 == $Null) { msg $chan 7,1 $+ $nick $+ 14's Fight stats7:0 %SA. [ $+ [ $address($nick,6) ] ] | halt }
  52. if ($3) {
  53. if (!%SA. [ $+ [ $address($3,6) ] ]) { .msg $chan There is no Attack Record for $3 $+ . | halt }
  54. .msg $chan 7,1 $+ $3 $+ 14's Fight stats7:0 %SA. [ $+ [ $address($3,6) ] ]
  55. }
  56. else { .notice $nick Syntax: !fight stats nickname }
  57. halt
  58. }
  59. if ($2) {
  60. .timersavefight 1 3600 save -rv Fight.ini
  61. if ($2 ison $chan) {
  62. var %sa $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,10) / 10)
  63. var %da $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,10) / 10)
  64. if (%sa == %da) {
  65. msg $chan the Fight is a 13draw! Your Experience:9 %sa vs $2 $+ 's Experience:9 %da 
  66. set %SA. [ $+ [ $address($nick,6) ] ] $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,30) / 10)
  67. set %SA. [ $+ [ $address($2,6) ] ] $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,30) / 10)
  68. ;**************************************Fight - by newklear 2018 (edited in 2019 by H}{H & nettocash)***************************************
  69. }
  70. }
  71.  
  72. if (%sa > %da) {
  73. set %SA. [ $+ [ $address($nick,6) ] ] $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,30) / 10)
  74. set %SA. [ $+ [ $address($2,6) ] ] $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,70) / 10)
  75. msg $chan 7,01 $+ $nick 14has 9beaten7 $2 $+ 14!7 $nick $+ 14's Attack was:0 %sa 14and was larger than7 $2 $+ 14's Defence of:0 %da
  76. msg $chan 7,01 $+ $nick $+ 14's fight stats is now:0 %SA. [ $+ [ $address($nick,6) ] ] 14& 7 $+ $2 $+ 14's fight stats is now:0 %SA. [ $+ [ $address($2,6) ] ]
  77. }
  78. }
  79.  
  80.  
  81. if (%sa < %da) {
  82. set %SA. [ $+ [ $address($nick,6) ] ] $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,60) / 10)
  83. set %SA. [ $+ [ $address($2,6) ] ] $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,40) / 10)
  84. msg $chan 7,01 $+ $nick 14has 4lost14 to7 $2 $+ 14! 7 $+ $nick $+ 14's Attack was:0 %sa 14and was lower than7 $2 $+ 14's Defence of:0 %da
  85. msg $chan 7,01 $+ $2 $+ 14's fight stats is now:0 %SA. [ $+ [ $address($2,6) ] ] 14& 7 $+ $nick $+ 14's fight stats is now:0 %SA. [ $+ [ $address($nick,6) ] ]
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement