egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

!rank help pls...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
hikaro
Halfop


Joined: 10 Mar 2004
Posts: 68

PostPosted: Wed Mar 31, 2004 3:28 pm    Post subject: !rank help pls... Reply with quote

i got trivia tcl and i got a little problem. when i type !rank the bot will give rank 1-5 when i type !rank 3 it will give rank 1 to 3 i want it the bot give only 1 nick... ex !rank 23 then the result will be $nick is in rank 23 with score ....
this is the part of the script.. pls help me out coz it just like flooding the channel when i type !rank 15 or something
Quote:

proc mx_spit_rank {how where length} {
global timerankreset
global userlist
global manjaconf
variable pos 1
variable prevscore 0
variable entries 0
variable lines ""

# anybody with a point?
foreach u [array names userlist] {
array set aa $userlist($u)
if {$aa(score) > 0} {
set entries 1
break
}
}

if {$entries == 0} {
lappend lines "Topscore list Kosong"
} else {
if {$length > $manjaconf(maxranklines)} {
set length $manjaconf(maxranklines)
}
lappend lines "6TopScore Scramble Game ver8.9"
set pos 1
set prevscore 0
foreach u [lsort -command mx_sortrank [array names userlist]] {
array set aa $userlist($u)
if {$aa(score) == 0} { break }
if {$pos > $length && $aa(score) != $prevscore} { break }

if {$aa(score) == $prevscore} {
set text "= "
} else {
set text [format "%2d " $pos]
}
set text [format "$text %12s :: %5d pts." $u $aa(score)]
if {$pos == 1} {
set text "$text"
}
lappend lines $text
set prevscore $aa(score)
incr pos
}
lappend lines "6Congrats!"
}
# spit lines
foreach line $lines {
if {$how == "NOTC"} {
mxirc_say $where $line
# mxirc_notc $where $line

} else {
mxirc_say $where $line
}
}

return 1
}
Pls help me with this code... thanks
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber