This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Rank horizontal

Old posts that have not been replied to for several years.
Locked
d
dono

Rank horizontal

Post by dono »

Code: Select all

        if {$length > $quizconf(maxranklines)} {
            set length $quizconf(maxranklines)
#           lappend lines "Your requested too many lines, limiting to
$quizconf(maxranklines)."
        }
        lappend lines "^C4Highscore Current Top $length:"
        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 "^C4Rank started [mx_duration $timerankreset] ago."
    }
that is viewed :
--------
Highscore Current Top 10:
1 dono :: 26 pts.
2 Wild-Arms :: 3 pts.
Rank started 1 hour 23 minutes 21 seconds ago.
----------
but i want to make the score is horizontal like..
---------------
Top 10: 1.dono:26 pts. 2.Wild-Arms:3 pts.
--------

any idea ? thanks for the advance...
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Add all the needed info in to a variable and then spit in to the channel the variable. If you want more info we need to see the part where it sends info to the channel.
Once the game is over, the king and the pawn go back in the same box.
d
dono

maybe its not full code of part tcl

Post by dono »

i will paste more ...
------------------------
# build list
if {$entries == 0} {
lappend lines "0,2Highscore list is empty."
} else {
if {$length > $quizconf(maxranklines)} {
set length $quizconf(maxranklines)
# lappend lines "Your requested too many lines, limiting to
$quizconf(maxranklines)."
}
lappend lines "0,2Highscore Current Top $length:"
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 "0,2Rank started [mx_duration $timerankreset] ago."
}

# spit lines
foreach line $lines {
if {$how == "NOTC"} {
mxirc_say $where $line
# mxirc_notc $where $line

} else {
mxirc_say $where $line
}
}

return 1
}
--------------------------------

couz I dont get you.. i am newbies.. maybe u can try give me a snipet code ir cgane it.. thanks fo the advance
Locked