Author Topic: PCmds Suggestions  (Read 2585 times)

Hero

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • View Profile
    • http://rev7.net
PCmds Suggestions
« Reply #15 on: December 10, 2008, 06:00:14 AM »
Your stuff looks a lot more complicated then what riffruff posted...
Hero
AKA: HeroAssasin and Mike
- - - - -  - - -
Visit Clan R77
- - - - -  - - -
Please do not PM me with random questions. That is what I made these forums for.

Noob ~Vector

ArticWolve

  • Global Moderators
  • Hero Member
  • *****
  • Posts: 636
    • View Profile
    • http://
PCmds Suggestions
« Reply #16 on: December 10, 2008, 07:40:24 AM »
Then allow me to explain it so you can understand:
 
Code: [Select]
Sub NTPR_Event_Usertalk(Username, Flags, Message, Ping)  The Start of the Sub
 
 
Code: [Select]
  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
  I am using Variables instead to name PING and USERNAME.
  I am using a Setting for a timer so the bot doesn't flood out.
 
Code: [Select]
  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.
  I look for "Ping ", and if that message IS "Ping " then it executes a Beta Version Check.
  If Beta, it uses "//", but if not. it uses "/say /" to send the command to battle net.
  Then enables a Timer to prevent the bot from flooding out as fast.
 
 
Code: [Select]
End Sub  The Sub is ended.
 
  Now can you follow my code?
 
  Riffruff's code:
 
 
Quote
Sub Event_UserTalk(Username, Flags, Message, Ping)
    if left(lcase(message), 4) = "ping" then
      Command BotVars.Username, "//ping " & Username, True
    end if
  end sub
 My Code (From 1.22)
   
Quote
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
 
  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).

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.
« Last Edit: December 10, 2008, 07:56:28 AM by Shadow »
Quote
Darker then the darkest shade of night...
    A Rebel at heart... A criminal by mind
    All in the eyes of the beholder... is the truth to life
    But Th---The Only---The One and Only True Master of Death is the Reaper itself
[/color]
[/color]
[div align=\'center\'][img]http://img261.imageshack.us/img261/9411/mydesktopce6.jpg\" border=\"0\" class=\"linked-sig-image\" /][img]http://www.danasoft.com/sig/238153.jpg\" border=\"0\" class=\"linked-sig-image\" /][/div]                     [div align=\'center\']    Click ME for my forums. You know you want to click ME. Come on CLICK ME DAMN IT! But don't click THIS!![/div]

Vector

  • Administrator
  • Hero Member
  • *****
  • Posts: 550
    • View Profile
    • http://clanmage.phost.ws
PCmds Suggestions
« Reply #17 on: December 10, 2008, 12:12:19 PM »
This won't work:

Code: [Select]
              AddQ "//" & Message
AddQ() sends text to battle.net WITHOUT going through the bot's internal command processor. It doesn't even work via scripting. Use Command() instead.
I am an Unofficial StealthBot Technician, an Unofficial StealthBot scripter, among other things. See my about page for more info.

Quote from: ArticWolve
Sorry I went down. Had internet problems with a cracker-jack-licensed driver hitting my internet pole (about 8 of them fell) and drooping my phone and electricity. Sorry ><

Rev77.net Plugins Manager

Proud host of Vector.no-ip.info | VectorJBLS.no-ip.org Status: [img]http://rev77.net/ServerCheck/check.asp?query=check&server=VectorJBLS.no-ip.org_status.png\" border=\"0\" class=\"linked-image\" /]

Shito-Ryu Karate-Do Genbu-Kai Rank: 8th Kyu (White belt, one stripe)

Rev77.Net Remote Support (Double-Click my name only if you were told to)

If the above link doesn't work, or if you use Vista, try this alternate link.

Noob ~Vector

riffruff

  • Sr. Members
  • Jr. Member
  • **
  • Posts: 94
    • View Profile
PCmds Suggestions
« Reply #18 on: December 10, 2008, 01:23:15 PM »
Quote from: Shadow
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).

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.
Sigh -- I don't think you're understanding...

First, as Vector said, yours won't work.  Second, it's not hard to add the ping for a user -- it adds what, 3 more lines?  Third, Stealthbot has a built in queue -- sorry, I'm not going to create another one.  Forth, for ping, if I wanted backwards compatibility, I wouldn't pass it to the CP, I would just do addq ping.
« Last Edit: December 10, 2008, 01:23:51 PM by riffruff »

ArticWolve

  • Global Moderators
  • Hero Member
  • *****
  • Posts: 636
    • View Profile
    • http://
PCmds Suggestions
« Reply #19 on: December 10, 2008, 01:31:35 PM »
you're talking about the Beta.... 2.6R3's Queue SUCKS.
Quote
Darker then the darkest shade of night...
    A Rebel at heart... A criminal by mind
    All in the eyes of the beholder... is the truth to life
    But Th---The Only---The One and Only True Master of Death is the Reaper itself
[/color]
[/color]
[div align=\'center\'][img]http://img261.imageshack.us/img261/9411/mydesktopce6.jpg\" border=\"0\" class=\"linked-sig-image\" /][img]http://www.danasoft.com/sig/238153.jpg\" border=\"0\" class=\"linked-sig-image\" /][/div]                     [div align=\'center\']    Click ME for my forums. You know you want to click ME. Come on CLICK ME DAMN IT! But don't click THIS!![/div]

riffruff

  • Sr. Members
  • Jr. Member
  • **
  • Posts: 94
    • View Profile
PCmds Suggestions
« Reply #20 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?
« Last Edit: December 10, 2008, 01:33:15 PM by riffruff »