This code MIMICS Stealthbot's protect and Neglected Fury's Lockdown procedure. This is scripted because I felt like making a command better. NOTE: This script has its own preset trigger!
[div class='codetop']CODE[/div][div class='codemain' style='height:200px;white-space:pre;overflow:auto']'SBLD
'1.2
'&Stealth Bot Lockdown:ShadoW:Mimics Neglected Fury's Lockdown
'*?Lockdown [on/off]
'*
'* Users must be safelisted or have Access to enter channel.:Can be toggled using ?Lockdown On to turn it on, or ?Lockdown off to turn it off; ?Lockdown shows status:.
'*
'*Stealthbot Enhancement
'// Version History
'// Version 1.2
'// Added StealthBot 2.6r3 compatibility ~Vector
'// Version 1.1
'// Dedicated to Vector, Hero and Zone. Without you guys, I wouldn't be making Scripts.
'// Zone for introducing me to the VBScripting world and its community
'// Hero for being there when I needed to ask an annoying question about scripting
'// Vector for his help on advising me on how to make my scripts
'// Fixed "Smart" Ban so your bot doesn't Flood out
'// Added "Status Check"
'// Version 1.0
'// Mimiced Protect Command for Neglected Fury Users.
'// Triggers are hard coded.
Sub SBLD_Event_Load()
SetSetting "SBLD", "Lockdown", False, "", True
TimerEnabled "SBLD", "Reset", False
TimerInterval "SBLD", "Reset", 5
AddChat VBCyan, "SBLD Version 1.1 by Shadow is loaded."
End Sub
Sub SBLD_Event_UserTalk(Username, Flags, Message, Ping)
Call SBLD_Lockdown(Username, Access, Flags)
If LCase(Message) = LCase("?Lockdown on") Then
GetDBEntry Username, uAccess, uFlags
If uAccess >= 90 Then
SetSetting "SBLD", "Lockdown", True, "", True
AddQ "[SBLD] Lockdown Enabled"
Else
Exit Sub
End If
End If
If LCase(Message) = LCase("?Lockdown off") Then
GetDBEntry Username, uAccess, uFlags
If Access >= 90 Then
SetSetting "SBLD", "Lockdown", False, "", True
AddQ "[SBLD] Lockdown Disabled"
Else
Exit Sub
End If
End If
If LCase(Message) = LCase("?Lockdown") Then
GetDBEntry Username, uAccess, uFlags
If uAccess < 40 Then
Exit Sub
Else
If GetSetting("SBLD", "Lockdown") Then
AddQ "[SBLD] Lockdown is active."
Else
AddQ "[SBLD] Lockdown is inactive."
End If
End If
End If
End Sub
Sub SBLD_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatstring)
If IsSafelisted(Username) Then Exit Sub
If SBLDBan = 0 Then
Call SBLD_Lockdown(Username, Access, Flags)
End If
End Sub
Sub SBLD_Event_WhisperFromUser(Username, Flags, Message)
If IsSafelisted(Username) Then Exit Sub
If SBLDBan = 0 Then
Call SBLD_Lockdown(Username, Access, Flags)
End If
End Sub
Sub SBLD_Event_UserEmote(Username, Flags, Message)
If IsSafelisted(Username) Then Exit Sub
If SBLDBan = 0 Then
Call SBLD_Lockdown(Username, Access, Flags)
End If
End Sub
Sub SBLD_Lockdown(Username, Access, Flags)
If GetSetting("SBLD", "Lockdown") Then
GetDBEntry Username, Access, Flags
If IsSafelisted(Username) Then
Exit Sub
End If
If Access > 0 Then
Exit Sub
End If
SBLDBan = 1
If SBLDBan = 1 Then
Command BotVars.Username, "/ban " & Username & " [SBLD] Stealth Bot Lockdown Active", True
TimerEnabled "SBLD", "Reset", True
End If
Else
Exit Sub
End If
End Sub
Sub SBLD_Reset_Timer()
SBLDBan = 0
TimerEnabled "SBLD", "Reset", False
End Sub[/div]
Please read the dedication and then comment. And yes, I meant EVERY word of it.
Added StealthBot 2.6r3 compatibility. ~Vector
I do not use revision numbers, only the major and minor release versions. ~Shadow