IPB

Welcome Guest ( Log In | Register )

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 
Reply to this topicStart new topic
> Help with a plugin, Scripting Oo
FoxInTheBox
post Sep 6 2009, 04:43 AM
Post #1


Foxxy
***

Group: Members
Posts: 271
Joined: 10-July 09
Member No.: 52,383



Can someone help me? To make it /w the flobot when it gives
You already have the maximum number of friends in your list."
And then make it /w flobot -a "the user who joined"
Thanks
CODE

'dfl
'1.1
'&Dynamic Friends List
'adds/removes WC3 clan members automatically to/from the bot's friends list
'requires that the members join the bot's channel after login and that they have added the bot to their friends list

'// ver 1.1 - PhiX
'// * The bot will check for offline friends every 5 minutes
Const dfl_flobot = "Name" '//The name of the 'overflow' bot
Const dfl_clan = "TaG"
Const dfl_checkDelay = 5 'minute(s)
Private Const dfl_Ignore = ""

Public dfl_exited, dfl_user, dfl_check

Sub dfl_Event_Load()
TimerInterval "dfl", "checkOffline", dfl_checkDelay * 60
TimerEnabled "dfl", "checkOffline", True
End Sub

Sub dfl_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)
dfl_uclan = GetInternalDataByUsername(Username, 0)
If LCase(dfl_uclan) = LCase(dfl_clan) Then Exit Sub

userArr = Split(dfl_Ignore, "|")
For Each user In userArr
If Lcase(Username) = LCase(user) Then Exit Sub
Next
AddQ "/f a " & Username
End Sub

Sub dfl_Event_WhisperFromUser(Username, Flags, Message)
If Match(Message, "Your friend * has exited Battle.net.", True) Then
dfl_exited = True
dfl_user = Username
AddQ "/where " & Username
End If
End Sub

Sub dfl_Event_ServerInfo(Message)
'// Check if the user really logged off (caused by "/where")
If dfl_exited And Match(Message, dfl_user & " is using *", True) Then dfl_exited = False

'// Check for offline users (caused by "/f l")
If Not dfl_check Then Exit Sub
If Message = "Your friends are:" Then AddQ "/time"
If Match(LCase(Message), "*:*, offline*", True) Then AddQ "/f r " & Left(Split(Message)(1), Len(Split(Message)(1)) - 1)
If Match(Message, "Battle.net time: *", True) Then dfl_check = False
End Sub

Sub dfl_Event_ServerError(Message)
'// More than 25 members online at once (caused by "/f a")
If Left(Message, 60) = "You already have the maximum number of friends in your list."


'// Check if the user really logged off (caused by "/where")
If dfl_exited And Message = "That user is not logged on." Then
dfl_exited = False
AddQ "/f r " & dfl_user
End If

'// No members online when checking for offline users (caused by "/f l")
If dfl_check And Left(Message, 40) = "You don't have any friends in your list." Then dfl_check = False
End Sub

Sub dfl_checkOffline_Timer()
AddChat vbCyan, "Checking for offline users ..."
dfl_check = True
AddQ "/f l"
End Sub


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 20th October 2019 - 04:43 PM
Skin by Andrea
Website Legal Information | Hosted by LunarPages