Post by Warrior124 on Sept 1, 2003 23:04:13 GMT -5
Okay, I am hoping someone can help me here. There is a nicklist I created that works pretty well. However, the problem I am having with it is it doesn't work properly. In the nicklist.dll, it has this option called, "Normal" which works for both participants, and owners. The only way you can get IT to working right is to voice (+v) a person who is not an owner, then it will show the participant icon. Then, you can just use "Normal" as an owner icon. Here is the code I have for it...
Then, I found this other nicklist that works really well. It displays all the icons. However, there are two problems with this nicklist. One, is that it has just one color background, white. Another problem is that if you join multiple rooms, the nicklist dialog disappears from the other previous rooms, but shows in the last room you joined. Here is that code...
Both of these nicklists uses nicklist.dll. I have been frantically playing around with these two nicklists to find a solution to the problems I am having. I like the first nicklist better, because it can show up in multiple rooms, and can have a color background. However, the last nicklist can show all the icons. Can anyone show me what I am missing?
on *:join:*:{
dll $scriptdir\nicklist.dll Mark $comchan($me,1) > X-ForceTools
dll $scriptdir\nicklist.dll ShowHeader $comchan($me,1) false
dll $scriptdir\nicklist.dll SetTipColor $comchan($me,1) text $rgb(255,0,0)
dll $scriptdir\nicklist.dll SetTipColor $comchan($me,1) bkg $rgb(0,0,0)
dll $scriptdir\nicklist.dll SetFont $comchan($me,1) nicks 11 400 > Tahoma
dll $scriptdir\nicklist.dll SetFont $comchan($me,1) all 14 400 > Tahoma
dll $scriptdir\nicklist.dll SetFont $comchan($me,1) nicks 11 400 > Tahoma
dll $scriptdir\nicklist.dll SetColor $comchan($me,1) bkg $rgb(0,0,0)
dll $scriptdir\nicklist.dll SetColor $comchan($me,1) op $rgb(196,0,0)
dll $scriptdir\nicklist.dll SetColor $comchan($me,1) voice $rgb(196,150,0)
dll $scriptdir\nicklist.dll SetColor $comchan($me,1) normal $rgb(0,0,193)
dll $scriptdir\nicklist.dll SetColor $comchan($me,1) all $rgb(196,0,0)
dll $scriptdir\nicklist.dll SetIcon $comchan($me,1) normal >GoldHammer.bmp
dll $scriptdir\nicklist.dll SetIcon $comchan($me,1) voice > Participant.bmp
dll $scriptdir\nicklist.dll SetIcon $comchan($me,1) op > BrownHammer.bmp
}
Then, I found this other nicklist that works really well. It displays all the icons. However, there are two problems with this nicklist. One, is that it has just one color background, white. Another problem is that if you join multiple rooms, the nicklist dialog disappears from the other previous rooms, but shows in the last room you joined. Here is that code...
raw 821:*: { unset %away. [ $+ [ $nick ] ] $nick | if ($dialog(nick $+ $msn.get($cid,fullroom)) != $null) .timer 1 1 getnicks $msn.get($cid,fullroom) }
raw 822:*: { set %away. [ $+ [ $nick ] ] $nick | if ($dialog(nick $+ $msn.get($cid,fullroom)) != $null) .timer 1 1 getnicks $msn.get($cid,fullroom) }
dialog nick {
title ""
size 0 0 %nicksize
option pixels
list 1, 0 0 %nicksize, size
}
alias nicklist {
set # #
if $dialog(nick $+ #) {
dialog -c nick $+ $chr(37) $+ $right(#,-1) nick
set %nicksize $dll($nickdll,GetSize,$!chr(37) $!+ $right(#,-1))
dialog -m nick $+ $chr(37) $+ $right(#,-1) nick
}
else {
set %nicksize $dll($nickdll,GetSize,$!chr(37) $!+ $right(#,-1))
dialog -m nick $+ $chr(37) $+ $right(#,-1) nick
}
}
alias nickdll { return $shortfn($mircdirnicklist.dll) }
alias icon { return $shortfn($mircdirpics\ $+ $1 $+ ) }
alias mdx { return $shortfn($mircdirmdx.dll) }
alias mdx.view { return $shortfn($mircdirviews.mdx) }
alias mdx.bars { return $shortfn($mircdirbars.mdx) }
alias mdx.gen { return $shortfn($mircdirCTL_GEN.MDX) }
on 1:dialog:nick*:init:*: {
.enable #profileseter
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
dll $mdx SetDialog $dname style
dll $mdx SetControlMDX $dname 1 listview report showsel > $mdx.view
did -i $dname 1 1 headerdims $calc($gettok(%nicksize,1,32) - 6) $+ :1 0:2
did -i $dname 1 1 headertext + 0 $room($right($dname,-4)) $+ $chr(9) $+ + 0 Real Name
dll $nickdll Nicklist $dname $right($dname,-4)
did -i $dname 1 1 iconsize normal small
did -i $dname 1 1 seticon normal $icon(owner.ico)
did -i $dname 1 1 seticon normal $icon(host.ico)
did -i $dname 1 1 seticon normal $icon(spec.ico)
did -i $dname 1 1 seticon normal $icon(nopic.ico)
did -i $dname 1 1 seticon normal $icon(msn.ico)
did -i $dname 1 1 seticon normal $icon(boypic.ico)
did -i $dname 1 1 seticon normal $icon(girlpic.ico)
did -i $dname 1 1 seticon normal $icon(boywithpic.ico)
did -i $dname 1 1 seticon normal $icon(girlwithpic.ico)
did -i $dname 1 1 seticon normal $icon(cup.ico)
.timergetnicks 1 0 getnicks $msn.get($cid,fullroom)
.timergetnicksfix 1 5 getnicks $msn.get($cid,fullroom)
/dll TDialog.dll TDialog $dialog(nick).hwnd > [100]
$dll(TDialog.dll,TDialog,$dialog(nick).hwnd > [100])
.$getprofs
}
alias getnicks {
var %x = 1
who $1
did -r nick $+ $1 1
while (%x <= $nick($1,0)) {
did -a nick $+ $1 1 0 + $nickicon($nick($1,%x),$1) $msn.decode($nick($1,%x)) $+ $chr(9) $+ + 0 $nick($1,%x)
inc %x
}
}
alias nickicon {
if (%away. [ $+ [ $1 ] ] == $1) && ($1 != $me) return 10
elseif (' isin $1) return 5
elseif ($1 isowner $2) return 1
elseif ($1 isop $2) return 2
elseif ($1 !isvoice $2) return 3
elseif (%icon. [ $+ [ $1 ] ] == boy) return 6
elseif (%icon. [ $+ [ $1 ] ] == non) return 4
elseif (%icon. [ $+ [ $1 ] ] == girl) return 7
elseif (%icon. [ $+ [ $1 ] ] == girlpic) return 8
elseif (%icon. [ $+ [ $1 ] ] == boypic) return 9
else return 4
}
; raw *:*: { echo -a $+($1-,$chr(32),=,$chr(32),$numeric) }
; if ($4 == 1) regular profile
; elseif ($4 == 3) male
; elseif ($4 == 5) female
; elseif ($4 == 9) has a picture in his or her profile
; elseif ($4 == 11) picture, and says he is male
; elseif ($4 == 13) picture, and says she is female
; elseif ($4 == 0) profile
#profileseter off
raw 352:*: {
if ($left($7,1) == G) { set %away. [ $+ [ $6 ] ] $6 } | halt
}
raw 818:*:{
if ($4 == 3) { set %icon. [ $+ [ $2 ] ] boy }
elseif ($4 == 5) { set %icon. [ $+ [ $2 ] ] girl }
elseif ($4 == 0) { set %icon. [ $+ [ $2 ] ] non }
elseif ($4 == 13) { set %icon. [ $+ [ $2 ] ] girlpic }
elseif ($4 == 11) { set %icon. [ $+ [ $2 ] ] boypic | halt }
else { halt }
}
#profileseter end
alias getprofs {
set -u5 %hlater on
var %i 1
while (%i <= $nick(%chan,0)) {
prop $nick(%chan,%i) msnprofile
inc %i
}
.timerdis 1 5 .disable .disable #profileseter
}
on *:dialog:nick*:*click:1: {
tokenize 32 $did(nick $+ $right($dname,-4),1,1)
if ($1 == rclick) {
sline $right($dname,-4) $gettok($did(1).seltext,$numtok($did(1).seltext,32),32)
dll $nickdll Popup $right($dname,-4)
}
}
on *:join:#: {
if ($nick == $me) {
nicklist
}
elseif ($dialog(nick $+ #) != $null) .timer 1 3 getnicks # | .enable #profileseter | prop $nick msnprofile | .timerdis 1 4 .disable #profileseter
}
on *:part:#: { if ($dialog(nick $+ #) != $null) && ($nick != $me) .timer 1 1 getnicks # }
on *:kick:#: { if ($dialog(nick $+ #) != $null) .timer 1 1 getnicks # }
on *:op:#: { if ($dialog(nick $+ #) != $null) .timer 1 1 getnicks # }
on *:deop:#: { if ($dialog(nick $+ #) != $null) .timer 1 1 getnicks # }
on *:owner:#: { if ($dialog(nick $+ #) != $null) .timer 1 1 getnicks # }
on *:deowner:#: { if ($dialog(nick $+ #) != $null) .timer 1 1 getnicks # }
on *:voice:#: { if ($dialog(nick $+ #) != $null) .timer 1 1 getnicks # }
on *:devoice:#: { if ($dialog(nick $+ #) != $null) .timer 1 1 getnicks # }
on *:quit:#: { if ($dialog(nick $+ #) != $null) .timer 1 1 getnicks # }
on *:nick: { if ($dialog(nick $+ #) != $null) .timer 1 1 getnicks # }
alias room {
var %roomname = $1-
%roomname = $replace(%roomname,$chr(92) $+ $chr(99),$chr(44),$chr(92) $+ $chr(98),$chr(32))
%roomname = $remove(%roomname,$chr(37))
%roomname = $remove(%roomname,$chr(35))
%roomname = $upper($left(%roomname,1)) $+ $right(%roomname,-1)
var %num $numtok(%roomname,32), %toknum 1
while (%toknum <= %num) {
var %output = %output $upper($left($gettok(%roomname,%toknum,32),1)) $+ $lower($right($gettok(%roomname,%toknum,32),-1))
inc %toknum
}
return %output
}
Both of these nicklists uses nicklist.dll. I have been frantically playing around with these two nicklists to find a solution to the problems I am having. I like the first nicklist better, because it can show up in multiple rooms, and can have a color background. However, the last nicklist can show all the icons. Can anyone show me what I am missing?