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
> Friends-Object Script, Beta users only
Snap
post Apr 16 2009, 02:58 AM
Post #1


The following post is supplementry information
*****

Group: Global Moderators
Posts: 2,922
Joined: 29-January 06
From: Eugene Oregon
Member No.: 31



CCX Friends-Object plugin. Adds functions for CCX %friendson() %isonline(name) %gaming() %friendslist()

Wrote it for myself- figured someone else might want it too.
- You can make an 'online' command something like this:
/addcc online 10 Friends on: %friendson()

Cheers

CODE

'//2.7 / Beta StealthBot Script

' // store script data
Script("Name") = "CCXFO"
Script("Author") = "Snap"
Script("Major") = 1
Script("Minor") = 0
Script("Revision") = 0
'//Help
Script("Commands") = "No Commands"
Script("Description") = "CCX Friends-Object plugin. Adds functions for CCX %friendson() %isonline(name) %gaming() %friendslist()"

Sub Event_Load()
   CreateObj "Timer", "Delay"
   Delay.Interval = 3000
   Delay.Enabled = True
End Sub

Sub Delay_Timer()
   With Scripts("pluginsystem").ccx
      .RegisterFunction "IsOnline", "Scripts(""CCXFO"").IsOnline", 1, 1
      .RegisterFunction "FriendsOn", "Scripts(""CCXFO"").FriendsOn", 0, 1
      .RegisterFunction "Gaming", "Scripts(""CCXFO"").FriendsGaming", 0, 1
      .RegisterFunction "FriendsList", "Scripts(""CCXFO"").FriendsList", 0, 1
   End With
   Addchat VByellow, "CCXFO: Registred functions with CCX"
   Delay.Enabled = False
End Sub

Public Function FriendsOn()
   FriendsOn = ""
   For I = 1 to Friends.Count
      If Friends(I).IsOnline Then
         FriendsOn = FriendsOn & ", " & Friends(I).Name
      End If
   Next
   If FriendsOn <> "" Then FriendsOn = Mid(FriendsOn, 3)
End Function

Public Function FriendsGaming()
   FriendsGaming = ""
   For I = 1 to Friends.Count
      If Friends(I).IsInGame Then
         FriendsGaming = FriendsGaming & ", " & Friends(I).Name
      End If
   Next
   If FriendsGaming <> "" Then FriendsGaming = Mid(FriendsGaming, 3)
End Function

Public Function FriendsList()
   FriendsList = ""
   For I = 1 to Friends.Count
      FriendsList = FriendsList & ", " & Friends(I).Name
   Next
   If FriendsList <> "" Then FriendsList = Mid(FriendsList, 3)
End Function

Public Function IsOnline(Username)
   For I = 1 to Friends.Count
      If Friends(I).Name = Username Then
         IsOnline = True
         Exit Function
      End If
   Next
End Function


--------------------
~Life is all busy and stuff right now. - Car accident, lots of dr. appointments... Other stuff too. I still <3 StealthBot.net - - I'll be around.
Thinking about PMing me? Post it instead! CCX Forums | SnapNJacks Trivia Forums
IPB Image
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: 18th November 2019 - 10:36 PM
Skin by Andrea
Website Legal Information | Hosted by LunarPages