Jump to content

Warrior124

Members
  • Posts

    993
  • Joined

  • Last visited

Everything posted by Warrior124

  1. Looks good, Haggis.
  2. So in other words you are on two separate networks, and you want a logger that will echo the active window the last 5 people who joined your room on the other network?
  3. I've edited the following addon to include information on its functions. Click Here
  4. The code has been modified to include an explaination of what was added. Click here
  5. That's true, lol. I'll try it like that.
  6. Yes, with some people it is beneficial, but if you tell people straight off how to do it then most of the times they don't look over the code. Haggis is doing a terrific job by looking over the code to learn. If I ever give out any code that someone doesn't understand they can always ask me how to do it, and I'll definitely help out that way, too. However, I find the best way to learn is actually to dig in, and see what does what. That is how I learned, lol.
  7. Actually, I did test it on Buzzen using 2 different accounts. One whispering to the other, and it worked. P.S.: I am using the vIRC Buzzen connection addon to connect to Buzzen.
  8. The following code will make it for multiple rooms... dialog nicklist { title "Nick" size -1 -1 86 314 option dbu list 1, 10 20 75 293, size extsel hsbar vsbar text "Room name", 2, 3 2 80 8 text "Chatters:", 3, 3 10 43 8 text "num", 4, 54 11 29 8, right button "", 5, 1 21 8 283 } menu channel { Nicklist: .Turn Nicklist On: { ;This will turn the nicklist on for each channel you use it in. if ($dialog(nicklist $+ $active)) dialog -c nicklist $+ $active nicklist dialog -m nicklist $+ $active nicklist ;The codes above will determine if the nicklist for a channel is already running. If it is it will close, and reactivate it. } .Turn Nicklist off: dialog -c nicklist $+ $active nicklist } on *:dialog:nicklist*:init:*: { dll dll\mdx.dll MarkDialog $dname dll dll\mdx.dll SetMircVersion $version dll dll\mdx.dll SetDialog $dname style dll dll\mdx.dll SetFont $dname 1 12 50 verdana dll dll\mdx.dll SetColor $dname 1 text $rgb (0,0,139) dll dll\mdx.dll SetControlMDX $dname 1 ListView report showsel noheader smallicon hottrack single > dll\views.mdx dll dll\mdx.dll SetControlMDX $dname 5 scrollbar vertical > dll\ctl_gen.mdx ;The code above transforms the button above into a vertical scrollbar. did -i $dname 1 1 headerdims $calc($gettok($dll(dll\nicklist.dll,GetSize,$active),1,38) - 6) $+ :1 0:2 dll dll\nicklist.dll Nicklist $dname $active ;The code above attaches your custom nicklist to the one in mIRC. did -ra $dname 5 1 0 114 15 2 1 did -i $dname 1 1 iconsize normal small did -i $dname 1 1 seticon normal c:\mirc\icons\owner.ico did -i $dname 1 1 seticon normal c:\mirc\icons\host.ico did -i $dname 1 1 seticon normal c:\mirc\icons\no.ico did -i $dname 1 1 seticon normal c:\mirc\icons\voice.ico did -i $dname 1 1 seticon normal c:\mirc\icons\tick.ico listnicks } on *:dialog:nicklist*:*:*: { if ($devent == sclick) { if ($did == 1) echo -a $did(1).seltext if ($did == 5) relistnicks } elseif ($devent == close) .timerresize. $+ $remove($dialog(nicklist*),nicklist) off } on *:join:#: listnicks on *:part:#: listnicks on *:kick:#: listnicks alias listnicks { did -ra nicklist $+ $active 4 $nick($active,0) did -ra nicklist $+ $active 2 $active var %x = 1 did -r nicklist $+ $active 1 while ($nick($active,%x)) { did -az nicklist $+ $active 1 0 + $nickicon($nick($active,%x)) $nick($active,%x) inc %x } .timerresize. $+ $active -m 0 1 resize $active ;This code resizes the nicklist if it needs to. Otherwise, it won't do anything. } ;This code is used for scrolling with the scrollbar. It deletes the top names from the list while scrolling down, and readds them when scrolling up. It calculates the position of the scrollbar to determine which nicknames to add, and which to delete. Therefore giving it a scrolling perspective. alias relistnicks { .remove nicklist.txt var %x = $gettok($calc($did(nicklist $+ $active,1).lines * $gettok($did(nicklist $+ $active,5).text,1,32) / 100),1,$asc(.)) did -r nicklist $+ $active 1 while ($nick($active,%x)) { write -l $+ %x nicklist.txt 0 + $nickicon($nick($active,%x)) $nick($active,%x) inc %x } loadbuf -ro nicklist $+ $active 1 nicklist.txt .timerresize. $+ $chan -m 0 1 resize $active } alias nickicon { if ($left($nick($active,$1).pnick,1) == ~) return 1 if ($left($nick($active,$1).pnick,1) == &) || ($left($nick($active,$1).pnick,1) == @) return 2 if ($left($nick($active,$1).pnick,1) == +) return 4 if ($left($nick($active,$1).pnick,1) == %) return 2 else return 3 } ;The following alias checks to see if the nicklist needs to be resized for whatever reason. If the nicklist isn't the size of mIRC's nicklist it will resize to compensate. alias resize { var %achan $1- if ($dialog(nicklist $+ %achan)) { if ($dialog(nicklist $+ %achan).w $dialog(nicklist $+ %achan).h > $dll(dll\nicklist.dll,GetSize,%achan)) || ($dialog(nicklist $+ %achan).w $dialog(nicklist $+ %achan).h < $dll(dll\nicklist.dll,GetSize,%achan)) { dll dll\mdx.dll SetDialog nicklist $+ %achan coords 0 0 $dll(dll\nicklist.dll,GetSize,%achan) dll dll\mdx.dll MoveControl nicklist $+ %achan 1 * * $gettok($dll(dll\nicklist.dll,GetSize,%achan),1,32) 2000 if ($dialog(nicklist $+ %achan)) { did -i nicklist $+ %achan 1 1 headerdims $calc($gettok($dll(dll\nicklist.dll,GetSize,%achan),1,38) - 6) $+ :1 0:2 } listnicks } } }
  9. Just tested it on Buzzen, and it does work. Here is something else I was working on that you can use too if you wish. It is a combination of the previous code along with a message center addon for when you are away. on *:TEXT:*:?: { ;This code will set the incoming text for future use. set %wtext. [ $+ [ $nick ] ] $nick $+ : $1- if (!%awaymsg) { ;%awaymsg is used to determine if the code utilizes the Message Center (Used when you are away), or if you're not away it will use the whisper access instead. if (!%wnick. [ $+ [ $nick ] ]) { .msg $nick Waiting for $me to accept whisper, please wait... .closemsg $nick dialog -md waccept. $+ $nick waccept } } else { .msg $nick I'm away right now. Your message has been copied, and will be read when I return. Thank you. write $nofile($mircexe) $+ messages.txt $date(mm/dd/yyyy) $time(hh:nn:ss) %wtext. [ $+ [ $nick ] ] .closemsg $nick } } on *:close:?: if (%wnick. [ $+ [ $nick ] ]) unset %wnick. [ $+ [ $nick ] ] dialog MSGS { title "Message Center:" size -1 -1 341 252 option dbu list 1, 2 12 89 225, size text "Messages From:", 2, 2 2 88 8, center text "Read Message From:", 3, 94 2 244 8, center list 4, 94 12 244 225, size button "Close:", 5, -1 240 343 12 } ;The following is used for your Message Center. on *:dialog:msgs:*:*: { if ($devent == init) { :If on init this code will gather a list of names who sent you messages. var %l = 1 while (%l <= $lines($nofile($mircexe) $+ messages.txt)) { if (!$didwm($dname,1,$left($gettok($read($nofile($mircexe) $+ messages.txt,%l),3,32),-1))) did -a $dname 1 $left($gettok($read($nofile($mircexe) $+ messages.txt,%l),3,32),-1) inc %l } } ;When you click on each name it will show you a list of messages that person sent you. if ($devent == sclick) { if ($did == 1) { did -r $dname 4 did -ra $dname 2 Messages From: $did(1).seltext did -ra $dname 3 Read Message From: $did(1).seltext var %s = 1 while (%s <= $lines($nofile($mircexe) $+ messages.txt)) { if ($left($gettok($read($nofile($mircexe) $+ messages.txt,%s),3,32),-1) == $did(1).seltext) did -a $dname 4 $chr(40) $+ $gettok($read($nofile($mircexe) $+ messages.txt,%s),1-2,32) $+ $chr(41) $gettok($read($nofile($mircexe) $+ messages.txt,%s),4-,32) inc %s } } elseif ($did == 5) dialog -c $dname $dname } ;When you close the Message Center it will ask you if you want to delete all messages. If you click OK it will delete all messages that was sent you. if ($devent == close) { if ($input(Do you want to delete your messages?,y,Message Center:) == $true) .remove $nofile($mircexe) $+ messages.txt } } ;The following dialog is used just like an $input event. It will ask you if you want to accept an incoming whisper from someone. If you don't want to just click the No button. It will send a message to the person saying their whisper to you has been denied. Otherwise if you accept the whisper it will open the whisper window, and echo what was said. It will also let the person know you have accepted their whisper, and to continue. dialog waccept { title "Whisper From: " size -1 -1 134 45 option dbu button "Yes", 1, 28 31 37 12 button "No", 2, 68 31 37 12 text "", 3, 1 1 131 28 } ;The following lets your script know whether to use the Message Center when you're away, or not. raw *:*: { if ($network != Buzzen) { if ($numeric == 306) set %awaymsg $true if ($numeric == 305) { unset %awaymsg if ($exists($nofile($mircexe) $+ messages.txt)) dialog -md msgs msgs } } else { if ($numeric == 822) set %awaymsg $true if ($numeric == 821) { unset %awaymsg if ($exists($nofile($mircexe) $+ messages.txt)) dialog -md msgs msgs } } } ;The following code is used just like an $input event. It will ask you if you want to accept an incoming whisper from someone. If you don't want to just click the No button. It will send a message to the person saying their whisper to you has been denied. Otherwise if you accept the whisper it will open the whisper window, and echo what was said. It will also let the person know you have accepted their whisper, and to continue. on *:dialog:waccept*:*:*: { tokenize 32 $gettok($dname,2,$asc(.)) if ($devent == init) { dialog -t $dname Whisper from $1- $+ ? did -ra $dname 3 Do you want to accept incoming whisper from $1- $+ ? } if ($devent == sclick) { if ($did == 1) { set %wnick. [ $+ [ $1- ] ] $1- query %wnick. [ $+ [ $1- ] ] .msg %wnick. [ $+ [ $1- ] ] Your whisper has been accepted, please continue. echo %wnick. [ $+ [ $1- ] ] %wtext. [ $+ [ $1- ] ] dialog -c $dname waccept } if ($did == 2) { .msg $1- Access to whisper has been denied. closemsg $1- dialog -c $dname waccept } } }
  10. Fanfare, this should work for Buzzen, and yes I knew it was for Buzzen, because it is a Buzzen thread. However, unless Buzzen has drastically changed coding, this should work there.
  11. I haven't tried it for Buzzen, yet. I did test it out yesterday, though. I got an error saying the $input doesn't work in an event. I'll see what else I can come up with. Edit: Haven't tried the following code on Buzzen, but I've tested this on Koach.com, and it works. Here is the new code... on *:TEXT:*:?: { set %wtext. [ $+ [ $nick ] ] = $nick $+ : $1- if (!%wnick. [ $+ [ $nick ] ]) { .msg $nick Waiting for $me to accept whisper. Please wait... .closemsg $nick dialog -md waccept. $+ $nick waccept } } on *:close:?: if (%wnick. [ $+ [ $nick ] ]) unset %wnick. [ $+ [ $nick ] ] dialog waccept { title "Whisper From: " size -1 -1 134 45 option dbu button "Yes", 1, 28 31 37 12 button "No", 2, 68 31 37 12 text "", 3, 1 1 131 28 } on *:dialog:waccept*:*:*: { tokenize 32 $gettok($dname,2,$asc(.)) if ($devent == init) { dialog -t $dname Whisper from $1- $+ ? did -ra $dname 3 Do you want to accept incoming whisper from $1- $+ ? } if ($devent == sclick) { if ($did == 1) { set %wnick. [ $+ [ $1- ] ] $1- query %wnick. [ $+ [ $1- ] ] .msg %wnick. [ $+ [ $1- ] ] Your whisper has been accepted, please continue. echo %wnick. [ $+ [ $1- ] ] %wtext. [ $+ [ $1- ] ] dialog -c $dname waccept } if ($did == 2) { .msg $1- Access to whisper has been denied. closemsg $1- dialog -c $dname waccept } } }
  12. Haven't tried this, yet. However, here is something I came up with... on *:TEXT:*:?: { var %wtext. [ $+ [ $nick ] ] = $nick $+ : $1- .msg $nick Waiting for $me to accept whisper. Please wait... if (!%wnick. [ $+ [ $nick ] ]) { if ($input(Do you want to accept incoming whisper from $nick $+ ?,n,Incoming Whisper from $nick $+ .) == $true) { set %wnick. [ $+ [ $nick ] ] $nick echo %wnick. [ $+ [ $nick ] ] %wtext. [ $+ [ $nick ] ] } else { .msg $nick Access to whisper has been denied. closemsg $nick } } else echo %wnick. [ $+ [ $nick ] ] %wtext. [ $+ [ $nick ] ] } on *:close:?: if (%wnick. [ $+ [ $nick ] ]) unset %wnick. [ $+ [ $nick ] ]
  13. No problem, mate. Thanks for clearing that up. To answer your question, yes there is. However, it is almost inaccessible for some reason when using the style version from mdx. The border hides most of the scrollbar.
  14. You forget, David. I too am experienced with scripting, myself, and to me it makes some sense to put it there. For one thing it keeps a person from having to move the mouse a little more to get to the scrollbar. Not everyone has a digital mouse, and has to rely on on old mouse using a ball, lol. So, something like this makes perfect sense to use. Also, if you place an mdx scrollbar on the right hand side you will also need to configure it to stay put when the nicklist is stretched. I can do that. However, I won't unless Haggis wants me to. As far as it being silly it may be unique, but please watch what you say about a persons work. You don't have to use it if you don't want, but don't insult someones work just because you don't like it.
  15. The scrollbar is on the left side of the nicklist.
  16. I've added some code to this, as well as added a left hand vertical scroll bar so you can scroll the nicklist. Here is the code. dialog nicklist { title "Nick" size -1 -1 86 314 option dbu list 1, 10 20 75 293, size extsel hsbar vsbar text "Room name", 2, 3 2 80 8 text "Chatters:", 3, 3 10 43 8 text "num", 4, 54 11 29 8, right button "", 5, 1 21 8 283 } menu channel { Nicklist: { if ($dialog(nicklist)) dialog -c nicklist nicklist dialog -m nicklist nicklist } } on *:dialog:nicklist:init:*: { dll dll\mdx.dll MarkDialog $dname dll dll\mdx.dll SetMircVersion $version dll dll\mdx.dll SetDialog $dname style dll dll\mdx.dll SetFont $dname 1 12 50 verdana dll dll\mdx.dll SetColor $dname 1 text $rgb (0,0,139) dll dll\mdx.dll SetControlMDX $dname 1 ListView report showsel noheader smallicon hottrack single > dll\views.mdx dll dll\mdx.dll SetControlMDX $dname 5 scrollbar vertical > dll\ctl_gen.mdx did -i $dname 1 1 headerdims $calc($gettok($dll(dll\nicklist.dll,GetSize,$active),1,38) - 6) $+ :1 0:2 dll dll\nicklist.dll Nicklist $dname $active did -ra $dname 5 1 0 114 15 2 1 did -i $dname 1 1 iconsize normal small did -i $dname 1 1 seticon normal c:\mirc\icons\owner.ico did -i $dname 1 1 seticon normal c:\mirc\icons\host.ico did -i $dname 1 1 seticon normal c:\mirc\icons\no.ico did -i $dname 1 1 seticon normal c:\mirc\icons\voice.ico did -i $dname 1 1 seticon normal c:\mirc\icons\tick.ico listnicks } on *:dialog:nicklist:sclick:*: { if ($did == 1) echo -a $did(1).seltext if ($did == 5) relistnicks } on *:join:#: listnicks on *:part:#: listnicks on *:kick:#: listnicks alias listnicks { did -ra nicklist 4 $nick($active,0) did -ra nicklist 2 $active var %x = 1 did -r nicklist 1 while ($nick($active,%x)) { did -az nicklist 1 0 + $nickicon($nick($active,%x)) $nick($active,%x) inc %x } .timerresize -m 0 1 resize $active } alias relistnicks { .remove nicklist.txt var %x = $gettok($calc($did(nicklist,1).lines * $gettok($did(nicklist,5).text,1,32) / 100),1,$asc(.)) did -r nicklist 1 while ($nick($active,%x)) { write -l $+ %x nicklist.txt 0 + $nickicon($nick($active,%x)) $nick($active,%x) inc %x } loadbuf -ro nicklist 1 nicklist.txt .timerresize -m 0 1 resize $active } alias nickicon { if ($left($nick($active,$1).pnick,1) == ~) return 1 if ($left($nick($active,$1).pnick,1) == &) || ($left($nick($active,$1).pnick,1) == @) return 2 if ($left($nick($active,$1).pnick,1) == +) return 4 if ($left($nick($active,$1).pnick,1) == %) return 2 else return 3 } alias resize { var %achan $1- if ($dialog(nicklist).w $dialog(nicklist).h > $dll(dll\nicklist.dll,GetSize,%achan)) || ($dialog(nicklist).w $dialog(nicklist).h < $dll(dll\nicklist.dll,GetSize,%achan)) { dll dll\mdx.dll SetDialog nicklist coords 0 0 $dll(dll\nicklist.dll,GetSize,%achan) dll dll\mdx.dll MoveControl nicklist 1 * * $gettok($dll(dll\nicklist.dll,GetSize,%achan),1,32) 2000 if ($dialog(nicklist)) { did -i nicklist 1 1 headerdims $calc($gettok($dll(dll\nicklist.dll,GetSize,%achan),1,38) - 6) $+ :1 0:2 } listnicks } }
  17. When you make the nicklist wider it does that for some reason. As of yet I don't know how to fix that, but I'll work on it, though.
  18. No problem. So far it only works for one channel, but you can make it to work for others as err0r suggested, or making it to where it would close, and then reopen on active.
  19. Ahh, I see what happened. Replace the init part of the code with this... on *:dialog:nicklist:init:*: { dll dll\mdx.dll MarkDialog $dname dll dll\mdx.dll SetMircVersion $version dll dll\mdx.dll SetDialog $dname style dll dll\mdx.dll SetFont $dname 1 12 50 verdana dll dll\mdx.dll SetColor $dname 1 text $rgb (0,0,139) dll dll\mdx.dll SetControlMDX $dname 1 ListView report showsel noheader smallicon hottrack single > dll\views.mdx did -i $dname 1 1 headerdims $calc($gettok($dll(dll\nicklist.dll,GetSize,$active),1,38) - 6) $+ :1 0:2 dll dll\nicklist.dll Nicklist $dname $active did -i $dname 1 1 iconsize normal small did -i $dname 1 1 seticon normal c:\mirc\icons\owner.ico did -i $dname 1 1 seticon normal c:\mirc\icons\host.ico did -i $dname 1 1 seticon normal c:\mirc\icons\no.ico did -i $dname 1 1 seticon normal c:\mirc\icons\voice.ico did -i $dname 1 1 seticon normal c:\mirc\icons\tick.ico listnicks } It should look like this now...
  20. Yes, when you use rebar.dll you will need your regular mirc nicklist hidden, because rebar does not dock to the nicklist. In order to dock to the nicklist you will need nicklist.dll to accomplish that. Here is the edited version for you... dialog nicklist { title "Nick" size -1 -1 86 314 option dbu list 1, 2 20 83 293, size hsbar vsbar text "Room name", 2, 3 2 80 8 text "Chatters:", 3, 3 10 43 8 text "num", 4, 54 11 29 8, right } menu channel { Nicklist: /dialog -m nicklist nicklist } on *:dialog:nicklist:init:*: { dll dll\mdx.dll SetMircVersion $version dll dll\mdx.dll MarkDialog $dname dll dll\mdx.dll SetFont $dname 1 12 50 verdana dll dll\mdx.dll SetColor $dname 1 text $rgb (0,0,139) dll dll\mdx.dll SetControlMDX $dname 1 ListView noheader smallicon hottrack single > dll\views.mdx did -i $dname 1 1 headerdims $calc($gettok($dll(dll\nicklist.dll,GetSize,$active),1,38) - 6) $+ :1 0:2 dll dll\nicklist.dll Nicklist $dname $active did -i $dname 1 1 iconsize normal small did -i $dname 1 1 seticon normal c:\mirc\icons\owner.ico did -i $dname 1 1 seticon normal c:\mirc\icons\host.ico did -i $dname 1 1 seticon normal c:\mirc\icons\no.ico did -i $dname 1 1 seticon normal c:\mirc\icons\voice.ico did -i $dname 1 1 seticon normal c:\mirc\icons\tick.ico listnicks } on *:dialog:nicklist:sclick:1: { echo -a $did(1).seltext } on *:join:#: listnicks on *:part:#: listnicks on *:kick:#: listnicks alias listnicks { did -ra nicklist 4 $nick($active,0) did -ra nicklist 2 $active var %x = 1 did -r nicklist 1 while ($nick($active,%x)) { did -a nicklist 1 0 + $nickicon($nick($active,%x)) $nick($active,%x) inc %x } .timerresize -m 0 1 resize $active } alias nickicon { if ($left($nick($active,$1).pnick,1) == ~) return 1 if ($left($nick($active,$1).pnick,1) == &) || ($left($nick($active,$1).pnick,1) == @) return 2 if ($left($nick($active,$1).pnick,1) == +) return 4 if ($left($nick($active,$1).pnick,1) == %) return 2 else return 3 } alias resize { var %achan $1- if ($dialog(nicklist).w $dialog(nicklist).h > $dll(dll\nicklist.dll,GetSize,%achan)) || ($dialog(nicklist).w $dialog(nicklist).h < $dll(dll\nicklist.dll,GetSize,%achan)) { dll dll\mdx.dll SetDialog nicklist coords 0 0 $dll(dll\nicklist.dll,GetSize,%achan) dll dll\mdx.dll MoveControl nicklist 1 * * $dll(dll\nicklist.dll,GetSize,%achan) if ($dialog(nicklist)) { did -i nicklist 1 1 headerdims $calc($gettok($dll(dll\nicklist.dll,GetSize,%achan),1,38) - 6) $+ :1 0:2 } listnicks } }
  21. They say scripting is like riding a bike. You never forget. I beg to differ, lol.
  22. Looks great, Haggis. Are you planning on releasing it when you get done?
  23. Great work, indeed!!!! :rate: :rate:
×
×
  • Create New...