StealthBot.net: Help auto add - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Help auto add Auto add user

#1 User is offline   seraph Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: November-10 13

Posted November 10, 2013 - 08:38 PM

Help, I have stealthbot used for while, I downloaded a few scripts but the autoadd script I downloaded always says unknown command when a user joins, And does not auto add them to database.

Howerever when user leaves it will remove them from datat base, I just want to autoadd everyuser to database and have access 1

I think maybe this was made for older version of stealthbot but I don't know, anyhelp would be greate

'aa
'1.0

Const aa_clan = "SBs"            '// members of that clan will get (aa_access_members) access

Const aa_access = 20            '// amount of access non-members will get
Const aa_access_members = 40    '// amount of access members will get
Const aa_safe_access = 900        '// access needed for not being removed when leaving the channel
Const aa_safe_flags = "F"        '// flags needed for not being removed when leaving the channel

Sub aa_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatstring)
    
    GetDBEntry Username, myAccess, myFlags
    If myAccess >= aa_safe_access Or InStr(LCase(myFlags), LCase(aa_safe_flags)) Then Exit Sub
    
    clan = GetInternalDataByUsername(Username, 0)
    If LCase(clan) = LCase(aa_clan) Then
        Command BotVars.Username, "/add " & Username & " " & aa_access_members, True
    Else
        Command BotVars.Username, "/add " & Username & " " & aa_access, True
    End If    
    
End Sub

Sub Event_UserLeaves(Username, Flags)
    
    GetDBEntry Username, myAccess, myFlags
    If myAccess >= aa_safe_access Or InStr(LCase(myFlags), LCase(aa_safe_flags)) Then Exit Sub
    
    Command BotVars.Username, "/rem " & Username, True
    
End Sub


#2 User is offline   seraph Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: November-10 13

Posted November 11, 2013 - 01:53 AM

this seemed to work ok just to add everyone the bot has seen join and leave to database as level 1, this way I can see who has joined the channel after the bot filled up allseen, and let them use some commands like mail,seen,online. stuff likethat



'aa

Const aa_access = 1           '// amount of access non-members will get
Const aa_access_members = 1    '// amount of access members will get
Const aa_safe_access = 1        '// access needed for not being removed when leaving the channel
Const aa_safe_flags = ""        '// flags needed for not being removed when leaving the channel

Sub aa_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatstring)
    
    GetDBEntry Username, myAccess, myFlags
    If myAccess >= aa_safe_access Or InStr(LCase(myFlags), LCase(aa_safe_flags)) Then Exit Sub
    
    clan = GetInternalDataByUsername(Username, 0)
    If LCase(clan) = LCase(aa_clan) Then
        Command BotVars.Username, "/add " & Username & " " & aa_access_members, True
    Else
        Command BotVars.Username, "/add " & Username & " " & aa_access, True
    End If    
    
End Sub

Sub Event_UserLeaves(Username, Flags)
    
    GetDBEntry Username, myAccess, myFlags
    If myAccess >= aa_safe_access Or InStr(LCase(myFlags), LCase(aa_safe_flags)) Then Exit Sub
    
    Command BotVars.Username, "/add " & Username & " " & aa_access, True
    
End Sub


#3 User is offline   seraph Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: November-10 13

Posted November 11, 2013 - 03:34 AM

How would I make it show the users online after I did this, Only show the users online

#4 User is offline   seraph Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: November-10 13

Posted November 11, 2013 - 02:33 PM

fixed

Online Script, users join channel are given level 2 online status, users who leave are checked to see if they joined a game, channel, or logged off. if logged off users get level 1 offline status. Right now I am using the current stealthbot database rank system, would like to change that to db or another file, would like script to check " online " users once in while like users with level 2 get checked to see if online every 5 minutes and space out each check over like 30 seconds, to keep the online list populated and remove anyone who logged off. I have seen a couple scripts that would work good to use to help merge but I wanted to post to see if anyone had any ideas, was thinking of incorporating with one of the clan bot scripts but would like to start from scratch and use my own db so any help would be appreciated

'aa

Const aa_access2 = 1
Const aa_access = 2           '// amount of access non-members will get
Const aa_access_members = 2    '// amount of access members will get
Const aa_safe_access = 3        '// access needed for not being removed when leaving the channel
Const aa_safe_flags = "AR"        '// flags needed for not being removed when leaving the channel
Public uc_user                       '// global variable containing the username
Public uc_active                  '// global variable if the plugin is active

Public Const uc_access = 0           '// required access

Sub Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatstring, Banned)
    
    GetDBEntry Username, myAccess, myFlags
    If myAccess >= aa_safe_access Or InStr(LCase(myFlags), LCase(aa_safe_flags)) Then Exit Sub
    
    Command BotVars.Username, "/set " & Username & " " & aa_access, Trueuc
    
End Sub


Sub Event_UserLeaves(Username, Flags)

    GetDBEntry Username, myAccess, myFlags
            AddQ "/whois " & sexp & Username


End Sub    


Sub Event_ServerInfo(Message)
    If Match(LCase(Message), "* is using *", True) Then
        AddQ Split(Message)(0) & " is currently online!"
    Command BotVars.Username, "/set " & Split(Message)(0) & " " & aa_access, True
Else
Command BotVars.Username, "/set " & Split(Message)(0) & " " & aa_access2, True
    End If

End Sub

Sub Event_ServerError(Message)
    If Message = "That user is not logged on." Then
        AddQ Username & " Must have logged off!"
    End If
    
End Sub



#5 User is offline   seraph Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: November-10 13

Posted November 12, 2013 - 02:57 AM

I don't know how to edit post or I would put in first This is EDITED VERSION should work less lag, still has some bugs, am working threw them
'aa

Const aa_access2 = "O"
Const aa_access = "C"           '// amount of access non-members will get
Public uc_user                       '// global variable containing the username
Public uc_active                  '// global variable if the plugin is active

Public Const uc_access = 0           '// required access

Sub Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatstring, Banned)
    
    GetDBEntry Username, myFlags
    
    Command BotVars.Username, "/add " & Username & " " & aa_access, True
    
End Sub


Sub Event_UserLeaves(Username, Flags)

    GetDBEntry Username, myAccess, myFlags
            AddQ "/whois " & sexp & Username
uc_user = Username

End Sub    


Sub Event_ServerInfo(Message)
    If Match(LCase(Message), "* is using *", True) Then
        AddQ Split(Message)(0) & " is currently online!"
End If
    Command BotVars.Username, "/add " & Split(Message)(0) & " " & aa_access, True
If Match(LCase(Message), "* was last seen on *", True) Then
Command BotVars.Username, "/add " & uc_user & " " & aa_access2, True

    End If

End Sub

Sub Event_ServerError(Message)
    If Message = "That user is not logged on." Then
        AddQ uc_user & " Must have logged off!"
    End If
    
End Sub



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users