Posted by: riffruff
« on: December 10, 2008, 01:32:59 PM »Most other scripts don't create their own anti-flood. Why do you think yours needs to?
This would only return the ping of the USER who performed it. And besides, yours only matched the left four, which would conflict when someone says "Pingme" (Navy), whereas mine matches the left five on "Ping " (Red). Yours also does not have a bypass to prevent spamming/flooding out, whereas mine does (Green). Your is for the beta and has no way to separate the "Ping" from the "Username" of the person a USER wanted to ping (Indigo), whereas mine keeps the message INTACT and then uses the "/say /" command to process it (At least the one I am/was using) (Orange).Sigh -- I don't think you're understanding...
And what do you know, the ONLY thing we have in common with our scripts is this:
The Sub...End Sub Declaration and ONE End If.
PS: Vector told me it has to be 2.6 R3 compatible to wind up on his server of plugins.
AddQ "//" & Message
Sub NTPR_Event_Usertalk(Username, Flags, Message, Ping)
The Start of the Sub If LCase(Message) = LCase("Pingme") Then
NTPRVar01 = Ping
NTPRVar02 = Username
If GetSetting("NTPR", "Pingme") Then
SetSetting "NTPR", "Pingme", False, "", True
AddQ "/w " & NTPRVar02 & " Your ping is currently: " & NTPRVar01 & " ms."
TimerEnabled "NTPR", "PingmeReset", True
Else
Exit Sub
End If
The PINGME No Trigger Command ElseIf Left(LCase(Message), 5) = "ping " Then
If GetSetting("NTPR", "Ping") Then
SetSetting "NTPR", "Ping", False, "", True
If InStr(Lcase(GetBotVersion), "beta") Then
AddQ "//" & Message
TimerEnabled "NTPR", "PingReset", True
Else
AddQ "/say /" & Message
TimerEnabled "NTPR", "PingReset", True
End If
End If
End If
The PING No Trigger Command.End Sub
The Sub is ended.Sub Event_UserTalk(Username, Flags, Message, Ping)My Code (From 1.22)
if left(lcase(message), 4) = "ping" then
Command BotVars.Username, "//ping " & Username, True
end if
end sub
If Left(LCase(Message), 5) = "ping " Then
If GetSetting("NTPR", "Ping") Then
SetSetting "NTPR", "Ping", False, "", True
AddQ "/say /" & Message
TimerEnabled "NTPR", "PingReset", True
End If
End If
My question is why are you making them, when they can be accomplished by 3 lines. What are you wanting different?I don't understand why either...You kinda said the same thing as me in your first post in this topic
Because then all of them would be passed to the Command processor, which I don't want.Why? Your just making your own command processor...Why waste time making your own, when you can use a built in one that is more efficient?