Author Topic: Buddylist advanced  (Read 5457 times)

Zet-X

  • Guest
Buddylist advanced
« on: June 25, 2004, 06:56:27 AM »
I just call it advanced, but it's still

very simple. I just started with scripting, and I haven't taken a programming class yet, so don't call me lame. This script

displays a message box telling you when a buddy signs on and what server the buddy is on.

Quote
Sub

BUDDYLIST(Nickname,Status,Servernumber)  
MesBox "Your buddy on " & Servername(servernumber) & ", " &

nickname & " is now " & status & ".","BuddyList Advanced"  
End Sub

Zet-X

  • Guest
Buddylist Advanced 2
« Reply #1 on: June 30, 2004, 05:32:32 PM »
This is a new version of BuddyList

Advanced. Instead of always displaying the message in a message box, it displays it in the current window using the echo

cammand. If you are not in a channel or the console, it will display it in a message box.

Quote
Sub BUDDYLIST(Nickname,Status,Servernumber)    
Select case getidentifier("$currentwindowtype")
case "1"
sendcommand "/echo -s Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & ".", currentservernumber
case "2"
sendcommand "/echo " & getidentifier("$chan") & " Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & ".", currentservernumber
case else
MesBox "Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & ".","BuddyList Advanced"
end select
End Sub

It's a bit longer, but it's as short as

possible. As with the original buddylist advanced, it has been tested and it works 100%.
« Last Edit: August 03, 2005, 07:36:40 AM by Snerf »

Zet-X

  • Guest
Buddylist advanced 3
« Reply #2 on: July 19, 2004, 06:49:40 AM »
I thought I couldn't make it any better.

I was wrong. Those of you who used version 2 may have noticed that it opened a message box if you were in a query window.

This displays the message in the current window using the Echo command if the current window is the console, channel, or a

query. Otherwise, it will display a message box. If the current server is the server that your buddy signs onto and the

current window is the console, it will not display a message because the original message is displayed in that

window.

Quote
Sub BUDDYLIST(Nickname,Status,Servernumber)
a = getidentifier("$currentwindowtype")
if a > 1 and a < 4 then
sendcommand "/echo -a Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & ".", currentservernumber
elseif a = 1 then
if servernumber <> currentservernumber then
sendcommand "/echo -s Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & ".", currentservernumber
end if
else
MesBox "Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & ".","BuddyList Advanced"
end if
End Sub

Once again, I have tested this script and it does work.
« Last Edit: August 03, 2005, 07:37:22 AM by Snerf »

Zet-X

  • Guest
Buddylist Advanced 3.1
« Reply #3 on: July 22, 2004, 10:37:02 AM »
I am posting this because the last one

seemed to have a bit of trouble. But it could've just been my computer. Anyways, if the one above gives you trouble, just

use this one.

Quote
Sub BUDDYLIST(Nickname,Status,Servernumber)
a = getidentifier("$currentwindowtype")
if a > 1 and a < 4 then
echo "Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & "." , "-a", currentservernumber
elseif a = 1 then
if servernumber <> currentservernumber then
echo "Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & ".", "-a", currentservernumber
end if
else
MesBox "Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & ".","BuddyList Advanced"
end if
End Sub
« Last Edit: August 03, 2005, 07:37:50 AM by Snerf »

Zet-X

  • Guest
Buddylist advanced 3.2
« Reply #4 on: August 10, 2004, 11:30:49 AM »
Okay. Thanks to Snerf, I fixed the

problem in the previous version. Other than that, there are no changes.

I plan on getting the file uploaded so it can

be downloaded. But until then, use this.
Quote
Sub BUDDYLIST(Nickname,Status,Servernumber)
a = getidentifier("$currentwindowtype")
if int(a) > 1 and int(a) < 4 then
echo "Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & "." , "-a", currentservernumber
elseif int(a) = 1 then
if servernumber <> currentservernumber then
echo "Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & ".", "-a", currentservernumber
end if
else
MesBox "Your buddy on " & Servername(servernumber) & ", " & nickname & " is now " & status & ".","BuddyList Advanced"
end if
End Sub
« Last Edit: August 03, 2005, 07:38:22 AM by Snerf »