Hi all, i got this script and want to make it work for ptokax 0.330 I hope someone is able to help me.
thanks in advance
Dim sBotName
Dim bNotifyAdmins, sAdminList
Dim oTriggers, oWarnings, lNumWarn
Dim sWarnMsg, sFinalWarnMsg, sWarnKickMsg, sKickMsg, sDisMsg
Dim sKickMsgPub, sWarnMsgPub, sDisMsgPub, sAdminMsg
Sub Main()
Set oTriggers = CreateObject("Scripting.Dictionary")
Set oWarnings = CreateObject("Scripting.Dictionary")
'Set these basic parameters.
sBotName = "XXXX" ' <- name of the bot
bNotifyAdmins = True ' <- if the bot should notify admins
lNumWarn = 1 ' <- how many times to warn before kick
'Set the list of admins to send notifications to. Separate
'the nicks with a ':' (colon) character.
sAdminList = "XXXi:XXX:XXX"
'The messages sent at different actions.
sKickMsg = "You got kicked out for advertising in main/private chat, you got yourself banned now, and IP will be forwarded to organisation."
sWarnMsg = "Please keep the bad words for yourself."
sFinalWarnMsg = "Hey watch it, one more bad word and you're out!"
sWarnKickMsg = "You got kicked out $usr for advertising in main/private chat."
sDisMsg = "That got you disconnected!"
'Messages for the public announcements.
sKickMsgPub = "I just wanted to announce that i kicked out $usr for advertising in main/private chat."
sWarnMsgPub = "I just wanted to announce that i kicked out $usr."
sDisMsgPub = "I just wanted to announce that i disconnected $usr."
'Message for the admins.
sAdminMsg = "I just kicked out $usr/$ip ($type)"
'The list of triggers. First the word to trigger on, and then
'how the Bot should react: "kick", "dis" (disconnect) or "warn".
'If you write the words with surrounding spaces, the word has to
'appear by it self in a user's sentances. If you omit the spaces,
'the bot will trigger if the word is found as a part of any word.
oTriggers("ata.net") = "kick"
oTriggers("dns2go.com") = "kick"
oTriggers("no-ip.com") = "kick"
oTriggers("ata.no-ip.org") = "kick"
oTriggers(".net") = "kick"
oTriggers(".nu") = "kick"
oTriggers("a.no-ip.com") = "kick"
oTriggers("b.no-ip.org") = "kick"
oTriggers("c.no-ip.org") = "kick"
oTriggers("d.no-ip.org") = "kick"
oTriggers("f.no-ip.org") = "kick"
oTriggers("g.no-ip.org") = "kick"
oTriggers("h.no-ip.org") = "kick"
oTriggers("i.no-ip.org") = "kick"
oTriggers("j.no-ip.org") = "kick"
oTriggers("k.no-ip.org") = "kick"
oTriggers("l.no-ip.org") = "kick"
oTriggers("m.no-ip.org") = "kick"
oTriggers("n.no-ip.org") = "kick"
oTriggers("o.no-ip.org") = "kick"
oTriggers("p.no-ip.org") = "kick"
oTriggers("q.no-ip.org") = "kick"
oTriggers("r.no-ip.com") = "kick"
oTriggers("s.no-ip.org") = "kick"
oTriggers("t.no-ip.org") = "kick"
oTriggers("u.no-ip.org") = "kick"
oTriggers("v.no-ip.org") = "kick"
oTriggers("w.no-ip.org") = "kick"
oTriggers("x.no-ip.org") = "kick"
oTriggers("y.no-ip.org") = "kick"
oTriggers("z.no-ip.org") = "kick"
oTriggers(". n e t") = "kick"
oTriggers("d n s 2 g o") = "kick"
oTriggers("n o - i p") = "kick"
oTriggers(".dk") = "kick"
oTriggers("dcspam") = "kick"
oTriggers(".cx") = "kick"
oTriggers("myftp") ="kick"
oTriggers("d2g") ="kick"
oTriggers("dynip") ="kick"
oTriggers("mygamesite") ="kick"
oTriggers("myftpsite") ="kick"
oTriggers("no-ip") ="kick"
oTriggers("dns2go") ="kick"
oTriggers("serveftp") ="kick"
oTriggers("servehttp") ="kick"
oTriggers("myip") ="kick"
oTriggers("dear") = "kick"
oTriggers("D C s p a m") = "kick"
oTriggers("D C") = "kick"
oTriggers("s_p_a_m") = "kick"
oTriggers("s p a m") = "kick"
oTriggers("fil3") = "kick"
oTriggers("!IP") = "kick"
oTriggers("!pass") = "kick"
End Sub
Sub DataArival(curUser, sCurData)
Dim sTheText, lPos
Dim sTrigger, bKick, bWarn, bDis
Dim lOldWarns
Dim sUsrName, sUsrIP
If Not curUser.bOperator Then
If Left(sCurdata, 1) = "<" Or Left(sCurData, 4) = "$To:" Then
lPos = InStr(1, sCurData, ">")
sTheText = LCase(Mid(sCurData, lPos + 1)) & " "
For Each sTrigger In oTriggers.Keys
If InStr(1, sTheText, sTrigger) > 0 Then
If oTriggers(sTrigger) = "kick" Then
bKick = True
ElseIf oTriggers(sTrigger) = "warn" Then
bWarn = True
ElseIf oTriggers(sTrigger) = "dis" Then
bDis = True
End If
End If
Next
End If
sUsrName = CStr(curUser.sName)
sUsrIP = CStr(curUser.IP())
If bKick Then
curUser.PrivateMessage CStr(sBotName), CStr(sKickMsg)
frmHub.DoEventsForMe
Call NotifyAdmins(sUsrName, sUsrIP, "direct kick")
curUser.Kick
frmHub.DoEventsForMe
Call NotifyPublic(sUsrName, sKickMsgPub)
ElseIf bWarn Then
If oWarnings.Exists(sUsrName) Then
lOldWarns = CLng(oWarnings(sUsrName))
Else
lOldWarns = 0
End If
lOldWarns = lOldWarns + 1
If lOldWarns = lNumWarn Then
curUser.PrivateMessage CStr(sBotName), CStr(sFinalWarnMsg)
oWarnings(sUsrName) = CLng(lOldWarns)
ElseIf lOldWarns > lNumWarn Then
oWarnings.Remove(sUsrName)
curUser.PrivateMessage CStr(sBotName), CStr(sWarnKickMsg)
frmHub.DoEventsForMe
Call NotifyAdmins(sUsrName, sUsrIP, "warned")
curUser.Kick
frmHub.DoEventsForMe
Call NotifyPublic(sUsrName, sWarnMsgPub)
Else
curUser.PrivateMessage CStr(sBotName), CStr(sWarnMsg)
oWarnings(sUsrName) = CLng(lOldWarns)
End If
ElseIf bDis Then
curUser.PrivateMessage CStr(sBotName), CStr(sDisMsg)
frmHub.DoEventsForMe
Call NotifyAdmins(sUsrName, sUsrIP, "disconnect")
curUser.Disconnect
frmHub.DoEventsForMe
Call NotifyPublic(sUsrName, sDisMsgPub)
End If
End If
End Sub
Sub NotifyAdmins(sUserName, sUserIP, sType)
Dim aNicks, sNick
Dim sMsg
If bNotifyAdmins Then
sMsg = Replace(sAdminMsg, "$usr", sUserName)
sMsg = Replace(sMsg, "$ip", sUserIP)
sMsg = Replace(sMsg, "$type", sType)
aNicks = Split(sAdminList, ":")
For Each sNick In aNicks
If colUsers.Online(CStr(sNick)) Then
Set tmpUser = colUsers.ItemByName(CStr(sNick))
tmpUser.PrivateMessage CStr(sBotName), CStr(sMsg)
frmHub.DoEventsForMe
End If
Next
End If
End Sub
Sub NotifyPublic(sName, sMsg)
colUsers.SendChatToAll CStr(sBotName), Replace(sMsg, "$usr", sName)
End Sub
I hope it s not too muchwork hehe
hi m8
try the forums search option .. you'll fine quite a few anti advertising scripts around
there isn't too hard for you to do it yourself since only scripting betatesters have that version you have to be a scripter and therefor able to do it yourself...
Probably From Google..
thats where i got the Beta testers Private site from ....
i think is about time PPl stop complaining about hub owners using the betas..
its out there and a hell of a lot of people are using it so is there any chance of Giving support instead of the Cold shoulder..
In my opinion the leak of the beta is what has kept a lot of people here and before you start pointing fingers i was never on the beta team..
if it wasnt for the Beta i wouldnt be here .. i would have moste likely taken the logical step from NMDC to SDCH and carried on with VB scripting.
BUT running the Beta convinced me that Ptokax and LUA scripting was the way to move.
Lets all just Look forward to the NEW ptokax when it arrives and support the users of this forum whatever their using..
??????Hawk??????
hi mutor m8 ..
QuoteI dont know why it's the beta kept you interested.
because just from user count alone the beta doubled the ammount of users my hub could support compared with TD4
QuoteI also dont know which software companies may offer support for pirated copies of their programs. Is this any different. Its ok because so many have it?
Ok so we can expect NO support from the Creators of Ptokax.
but that shouldnt stop anyone else supporting a Scripting request.
Quotehave you seen any Px support in here? Or merely script support?
Yeh sure it Script support BUT i also see that anyone mentions their running one of the betas they get Jumped on .....
If it a script request then why not simply support the request whatever Client version its for..
Hi,
from what I have personally experienced, most people get it from friends.