Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.73 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 == titles) { msg $chan Championship Titles: World[ $+ %ftitle.world $+ / $+ %ftitle.world.def $+ ] IC[ $+ %ftitle.ic $+ / $+ %ftitle.ic.def $+ ] Hardcore[ $+ %ftitle.hardcore $+ / $+ %ftitle.hardcore.def $+ ] | halt }
  47. if ($2 == top10) {
  48. 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 }
  49. else { set -u30 %top10flood on | set %top10chan $chan | top10 | return }
  50. }
  51. if ($2 == stats) {
  52. if ($3 == $Null) { msg $chan 7,1 $+ $nick $+ 14's Fight stats7:0 %SA. [ $+ [ $address($nick,6) ] ] | halt }
  53. if ($3) {
  54. if (!%SA. [ $+ [ $address($3,6) ] ]) { .msg $chan There is no Attack Record for $3 $+ . | halt }
  55. .msg $chan 7,1 $+ $3 $+ 14's Fight stats7:0 %SA. [ $+ [ $address($3,6) ] ]
  56. }
  57. else { .notice $nick Syntax: !fight stats nickname }
  58. halt
  59. }
  60. if ($2) {
  61. .timersavefight 1 3600 save -rv Fight.ini
  62. if ($2 ison $chan) {
  63. if ((World isin $3) && (%ftitles.world != $2) || (%ftitles.world != $null)) { msg $chan World title picked, but %ftitles.world is not in the match | halt }
  64. if ((IC isin $3) && (%ftitles.ic != $2) || (%ftitles.ic != $null)) { msg $chan IC title picked, but %ftitles.ic is not in the match | halt }
  65. if ((Hardcore isin $3) && (%ftitles.Hardcore != $2) || (%ftitles.Hardcore != $null)) { msg $chan Hardcore title picked, but %ftitles.Hardcore is not in the match | halt }
  66. msg $chan $nick vs. $2 $iif(World == $3, [World Championship Title Match], $null) $iif(IC == $3, [IC Championship Title Match], $null) $iif(Hardcore == $3, [Hardcore Championship Title Match], $null)
  67. var %sa $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,10) / 10)
  68. var %da $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,10) / 10)
  69. if (%sa == %da) {
  70. msg $chan the Fight is a 13draw! Your Experience:9 %sa vs $2 $+ 's Experience:9 %da 
  71. set %SA. [ $+ [ $address($nick,6) ] ] $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,30) / 10)
  72. set %SA. [ $+ [ $address($2,6) ] ] $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,30) / 10)
  73. ;**************************************Fight - by newklear 2018 (edited in 2019 by H}{H & nettocash)***************************************
  74. }
  75. }
  76.  
  77. if (%sa > %da) {
  78. set %SA. [ $+ [ $address($nick,6) ] ] $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,30) / 10)
  79. set %SA. [ $+ [ $address($2,6) ] ] $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,70) / 10)
  80. 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
  81. if ((World == $3) && (%ftitles.world == $nick)) { msg $chan STILL YOUR WORLD CHAMPION, $nick $+ ! }
  82. if ((IC == $3) && (%ftitles.ic == $nick)) { msg $chan STILL YOUR IC CHAMPION, $nick $+ ! }
  83. if ((Hardcore == $3) && (%ftitles.hardcore == $nick)) { msg $chan STILL YOUR HARDCORE CHAMPION, $nick $+ ! }
  84.  
  85. if ((World == $3) && (%ftitles.world != $nick)) { msg $chan YOUR NEW WORLD CHAMPION, $nick $+ ! }
  86. if ((IC == $3) && (%ftitles.ic != $nick)) { msg $chan YOUR NEW IC CHAMPION, $nick $+ ! }
  87. if ((Hardcore == $3) && (%ftitles.hardcore != $nick)) { msg $chan YOUR NEW HARDCORE CHAMPION, $nick $+ ! }
  88. 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) ] ]
  89. }
  90. }
  91.  
  92.  
  93. if (%sa < %da) {
  94. set %SA. [ $+ [ $address($nick,6) ] ] $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,60) / 10)
  95. set %SA. [ $+ [ $address($2,6) ] ] $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,40) / 10)
  96. 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
  97. if ((World == $3) && (%ftitles.world == $nick)) { msg $chan STILL YOUR WORLD CHAMPION, $nick $+ ! | inc %ftitles.world.def }
  98. if ((IC == $3) && (%ftitles.ic == $nick)) { msg $chan STILL YOUR IC CHAMPION, $nick $+ ! | inc %ftitles.ic.def }
  99. if ((Hardcore == $3) && (%ftitles.hardcore == $nick)) { msg $chan STILL YOUR HARDCORE CHAMPION, $nick $+ ! | inc %ftitles.hardcore.def }
  100.  
  101. if ((World == $3) && (%ftitles.world != $nick)) { msg $chan YOUR NEW WORLD CHAMPION, $nick $+ ! | set %ftitles.world $nick | set %ftitles.world.def 0 }
  102. if ((IC == $3) && (%ftitles.ic != $nick)) { msg $chan YOUR NEW IC CHAMPION, $nick $+ ! | set %ftitles.ic $nick | set %ftitles.ic.def 0 }
  103. if ((Hardcore == $3) && (%ftitles.hardcore != $nick)) { msg $chan YOUR NEW HARDCORE CHAMPION, $nick $+ ! | set %ftitles.hardcore $nick | set %ftitles.hardcore.def 0 }
  104. 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) ] ]
  105. }
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement