AnGelBot-Portal²

Normale Version: Scan Script v1.0 © by Firefox
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Beschreibung:

Dieses Script ermöglicht nach Begriffen wie "chanlusche" oder "Chanputzer" im Chan zu scannen!

Trigger:

!scan <Begriff> = Scannt nach <Begriff> im aktuellen Chan!
!scan stats = Zeigt die aktuellen Stats an!

Installation:

Script mit editor öffnen und einstellen!

Futures:

FloodProtection von 60 bzw. 30 Sekunden (im Script einstellbar)
Randomize

Script:

Code:
'###################################
'## Scan Script v1.0 © by Firefox ##
'###################################

'Bitte angeben in welchen Channnels das Script aktiv sein soll !(Mehrere mit " " trennen) (Für alle Einfach so: ActiveChannels = "")
Const ActiveChannels = "#Phoenix"

'Bitte angeben in wievielen Sekunden das Scannen wieder nutzbar ist !
Const FloodProtectionTimeScan = 60

'Bitte angeben in wievielen Sekunden die Stats wieder nutzbar sind !
Const FloodProtectionTimeStat = 30

'######################## Ab hier bitte nichts mehr ändern !######################

Const Version = "Scan Script v1.0 © by Firefox"
Const INI = "FileArea/INI/scan.ini"

Dim ScanFlood
Dim StatFlood

Sub Init()
Script Version
SpreadFlagMessage 0, "+m", "0***7,1 " & Version & " loaded..."
Hook "Chan_Msg"
ScanFlood = False
StatFlood = False
End Sub

Sub Chan_Msg(Chan, Nick, RegUser, Line)
If (Instr(" " + LCase(ActiveChannels) + " ", " " + LCase(Chan) + " ") > 0) or (ActiveChannels = "") Then
  Line = Strip(Line)
  If LCase(Param(Line, 1))= CommandPrefix&"scan" and LCase(Param(Line, 2))= "" Then
   SendLine "Privmsg " & Chan & " : 7Nach was soll ich denn Scannen,8 " & Nick & " 7?", 3
  ElseIf LCase(Param(Line, 1))= CommandPrefix&"scan" and Not LCase(Param(Line, 2))= "stats" Then
   If ScanFlood = False Then
    If IsOp(MyNick, Chan) Then
     user = MyNick
     While user = MyNick
     user = ChanUser(ChanNum(Chan), Int((ChanUserCount(ChanNum(Chan)) * Rnd) + 1), CU_Nick)
     Wend
     WriteINIString "Scans", "Anzahl", ReadINIString("Scans", "Anzahl", "0", INI)*1+1, INI
     SendLine "Privmsg " & Chan & " : 7Suche nach8 " & Param(Line,2) & " 7wird gestartet !", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++ 7,7++", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++ 7,7++ 7,7++ 8,8++ 8,8++",3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++ 7,7++ 7,7++ 8,8++ 8,8++ 8,8++ 9,9++", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++ 7,7++ 7,7++ 8,8++ 8,8++ 8,8++ 9,9++ 9,9++ 9,9++", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++ 7,7++ 7,7++ 8,8++ 8,8++ 8,8++ 9,9++ 9,9++ 9,9++", 3
     SendLine "Privmsg " & Chan & " : 8" & Param(Line,2) & " 7gefunden ! >>>8  7" & user & "<<<", 3
     SendLine "Privmsg " & Chan & " : 8" & Param(Line,2) & "7-Scanner © by8 " & MyNick & " 7!", 3
     ScanFlood = True
     TimedCommand "ScanFlood = False", FloodProtectionTimeScan
    Else
     SendLine "Privmsg " & Chan & " : 7Ich kann nur Scannen wenn ich OP-Status besitze !", 3
    End If
   Else
    SendLine "Privmsg " & Chan & " : 7Moment ! Ich muss erst wieder den Scanner berreitstellen !(8FloodProtection von " & FloodProtectionTimeScan & " Sekunden aktiv!7)", 3
   End If
  ElseIf LCase(Param(Line, 1))= CommandPrefix&"scan" and LCase(Param(Line, 2)) = "stats" Then
   If StatFlood = False Then
    Scans = ReadINIString("Scans", "Anzahl", "0", INI)
    SendLine "Privmsg " & Chan & " : 7Ich scannte bereits8 " & Scans & " 7Mal nach ziemlich verrückten Dingen *8gg7* !", 3
    StatFlood = True
    TimedCommand "StatFlood = False", FloodProtectionTimeStat
   Else
    SendLine "Privmsg " & Chan & " : 7Moment ! Ich muss erstmal in der Datenbank nachsehen ! (8FloodProtection von " & FloodProtectionTimeStat & " Sekunden aktiv!7)", 3
   End If
  End If
End If
End Sub

PS1: Der Bot benötigt OP im Channel um zu scannen!
PS2: Ich möchte mich noch einmal bei HAPM bedanken,weil er mir mit dem Randomize geholfen hat !
bei mir kommt immer der fehler hier:

[00:51] <Angelbot> *** Scripting error in 'scan.asc':
[00:51] <Angelbot> Error : 76 (Path not found)
[00:51] <Angelbot> Position: Line 42, Column 5
[00:51] <Angelbot> Excerpt : WriteINIString "Scans", "Anzahl", ReadINIString("Scans", "Anzahl", "0", INI)*1+1, INI
[00:51] <Angelbot> Command : Chan_msg "#killer", "K1773R", "K1773R", "!scan TEST"
[00:51] <Angelbot> *** End of error message
Erstell mal im Ordner "FileArea" bei deinem Bot nen Ordner names "INI" müsste dann funktionieren!
Ich würde gerne austellen das der Bot zu Scannen Op braucht nur ich bin im AnGeL Bot Scripten ein Noob. Kann mir vlt. wer sagen wie man das aus stellt?
Code:
'###################################
'## Scan Script v1.0 © by Firefox ##
'###################################

'Bitte angeben in welchen Channnels das Script aktiv sein soll !(Mehrere mit " " trennen) (Für alle Einfach so: ActiveChannels = "")
Const ActiveChannels = "#Phoenix"

'Bitte angeben in wievielen Sekunden das Scannen wieder nutzbar ist !
Const FloodProtectionTimeScan = 60

'Bitte angeben in wievielen Sekunden die Stats wieder nutzbar sind !
Const FloodProtectionTimeStat = 30

'######################## Ab hier bitte nichts mehr ändern !######################

Const Version = "Scan Script v1.0 © by Firefox"
Const INI = "FileArea/INI/scan.ini"

Dim ScanFlood
Dim StatFlood

Sub Init()
Script Version
SpreadFlagMessage 0, "+m", "0***7,1 " & Version & " loaded..."
Hook "Chan_Msg"
ScanFlood = False
StatFlood = False
End Sub

Sub Chan_Msg(Chan, Nick, RegUser, Line)
If (Instr(" " + LCase(ActiveChannels) + " ", " " + LCase(Chan) + " ") > 0) or (ActiveChannels = "") Then
  Line = Strip(Line)
  If LCase(Param(Line, 1))= CommandPrefix&"scan" and LCase(Param(Line, 2))= "" Then
   SendLine "Privmsg " & Chan & " : 7Nach was soll ich denn Scannen,8 " & Nick & " 7?", 3
  ElseIf LCase(Param(Line, 1))= CommandPrefix&"scan" and Not LCase(Param(Line, 2))= "stats" Then
   If ScanFlood = False Then
     user = MyNick
     While user = MyNick
     user = ChanUser(ChanNum(Chan), Int((ChanUserCount(ChanNum(Chan)) * Rnd) + 1), CU_Nick)
     Wend
     WriteINIString "Scans", "Anzahl", ReadINIString("Scans", "Anzahl", "0", INI)*1+1, INI
     SendLine "Privmsg " & Chan & " : 7Suche nach8 " & Param(Line,2) & " 7wird gestartet !", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++ 7,7++", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++ 7,7++ 7,7++ 8,8++ 8,8++",3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++ 7,7++ 7,7++ 8,8++ 8,8++ 8,8++ 9,9++", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++ 7,7++ 7,7++ 8,8++ 8,8++ 8,8++ 9,9++ 9,9++ 9,9++", 3
     SendLine "Privmsg " & Chan & " : 7scanning8... 4,4++ 4,4++ 4,4++ 7,7++ 7,7++ 7,7++ 8,8++ 8,8++ 8,8++ 9,9++ 9,9++ 9,9++", 3
     SendLine "Privmsg " & Chan & " : 8" & Param(Line,2) & " 7gefunden ! >>>8  7" & user & "<<<", 3
     SendLine "Privmsg " & Chan & " : 8" & Param(Line,2) & "7-Scanner © by8 " & MyNick & " 7!", 3
     ScanFlood = True
     TimedCommand "ScanFlood = False", FloodProtectionTimeScan
   Else
    SendLine "Privmsg " & Chan & " : 7Moment ! Ich muss erst wieder den Scanner berreitstellen !(8FloodProtection von " & FloodProtectionTimeScan & " Sekunden aktiv!7)", 3
   End If
  ElseIf LCase(Param(Line, 1))= CommandPrefix&"scan" and LCase(Param(Line, 2)) = "stats" Then
   If StatFlood = False Then
    Scans = ReadINIString("Scans", "Anzahl", "0", INI)
    SendLine "Privmsg " & Chan & " : 7Ich scannte bereits8 " & Scans & " 7Mal nach ziemlich verrückten Dingen *8gg7* !", 3
    StatFlood = True
    TimedCommand "StatFlood = False", FloodProtectionTimeStat
   Else
    SendLine "Privmsg " & Chan & " : 7Moment ! Ich muss erstmal in der Datenbank nachsehen ! (8FloodProtection von " & FloodProtectionTimeStat & " Sekunden aktiv!7)", 3
   End If
  End If
End If
End Sub
Danke^^
Referenz-URLs