Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias top10 {
- var %i = $var(%SA.*,0)
- while (%i > 0) {
- writeini fightstats.ini $var(%SA.*,%i) wins $var(%SA.*,%i).value
- dec %i
- }
- fightrank
- }
- alias statread3 { return $readini(fightstats.ini,$1,$2) }
- alias fightrank {
- window -c @rankings
- var %i = $ini(fightstats.ini,0)
- window -lne @rankings
- while (%i > 0) {
- aline @rankings $statread3($ini(fightstats.ini,%i),wins) $ini(fightstats.ini,%i)
- dec %i
- }
- filter -ctue 1 10 @rankings @rankings
- write -c fightranks.txt
- var %i = 1
- var %i2 = $calc($line(@rankings,0) +1)
- while (%i < %i2) {
- 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]
- inc %i
- }
- msg %top10chan 14,01Top 001014 Fighters07:
- msg %top10chan $read(fightranks.txt, 1) $read(fightranks.txt, 2) $read(fightranks.txt, 3) $read(fightranks.txt, 4) $read(fightranks.txt, 5)
- msg %top10chan $read(fightranks.txt, 6) $read(fightranks.txt, 7) $read(fightranks.txt, 8) $read(fightranks.txt, 9) $read(fightranks.txt, 10)
- }
- return
- }
- on *:TEXT:!Fight*:#:{
- if (%flfight. [ $+ [ $address($nick,6) ] ] >= 5) { halt }
- if (%flfight. [ $+ [ $address($nick,6) ] ] == 3) { .notice $nick You have one more !fight use within a 30 second period. }
- inc -u30 %flfight. [ $+ [ $address($nick,6) ] ] 1
- if ($2 == $nick) { .msg $chan You cannot attack yourself dumbass, stop trying to cheat! | halt }
- if ($2 == $me) { .msg $chan You cannot attack the Bot dumbass, stop trying to cheat! | halt }
- if ($2 == Refbot) { .msg $chan You cannot attack RefBot dumbass, stop trying to cheat! | halt }
- if ($2 == help) { .notice $nick Fight Help Commands are: !fight, !fight Stats, !fight help | halt }
- if ($2 == top10) {
- 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 }
- else { set -u30 %top10flood on | set %top10chan $chan | top10 | return }
- }
- if ($2 == stats) {
- if ($3 == $Null) { msg $chan 7,1 $+ $nick $+ 14's Fight stats7:0 %SA. [ $+ [ $address($nick,6) ] ] | halt }
- if ($3) {
- if (!%SA. [ $+ [ $address($3,6) ] ]) { .msg $chan There is no Attack Record for $3 $+ . | halt }
- .msg $chan 7,1 $+ $3 $+ 14's Fight stats7:0 %SA. [ $+ [ $address($3,6) ] ]
- }
- else { .notice $nick Syntax: !fight stats nickname }
- halt
- }
- if ($2) {
- .timersavefight 1 3600 save -rv Fight.ini
- if ($2 ison $chan) {
- var %sa $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,10) / 10)
- var %da $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,10) / 10)
- if (%sa == %da) {
- msg $chan the Fight is a 13draw! Your Experience:9 %sa vs $2 $+ 's Experience:9 %da
- set %SA. [ $+ [ $address($nick,6) ] ] $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,30) / 10)
- set %SA. [ $+ [ $address($2,6) ] ] $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,30) / 10)
- ;**************************************Fight - by newklear 2018 (edited in 2019 by H}{H & nettocash)***************************************
- }
- }
- if (%sa > %da) {
- set %SA. [ $+ [ $address($nick,6) ] ] $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,30) / 10)
- set %SA. [ $+ [ $address($2,6) ] ] $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,70) / 10)
- 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
- 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) ] ]
- }
- }
- if (%sa < %da) {
- set %SA. [ $+ [ $address($nick,6) ] ] $calc(%SA. [ $+ [ $address($nick,6) ] ] + $r(1,60) / 10)
- set %SA. [ $+ [ $address($2,6) ] ] $calc(%SA. [ $+ [ $address($2,6) ] ] + $r(1,40) / 10)
- 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
- 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) ] ]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement