Help - Search - Members - Calendar
Full Version: [RESOLVED] Request: GHost Host Whisper
StealthBot.net > StealthBot > Scripting and Plugins > Script Creation Requests
Parrothead
A cool plugin for GHost would be similar to another one posted here somewhere, in which it posts the game the bot is in, but it's a little different.

First, The Stealthbot would get whispered everytime the hostbot joins a game because they're mutual friends, and will be displayed all games joined (this would require them to both be friends for the plugin to work, so flooding wouldn't be a big issue. Please do this if you make the plugin).

Then, everytime a user joins your channel with the right amount of access (a setting in the plugin), it would display something like the thing below.

/w (username) The (bots name) is currently hosting '(gamename)'.

The Stealthbot would copy the game name the hostbot joins.

Of course if the hostbot's in the channel, I'm pretty sure the Stealthbot could detect it somehow without using /whois (im bad in scripting, so I wouldn't know). If the host is in the channel, no greet will be shown.

This would require both bots to friend each other and for them to both be in the same channel. Also, the plugin would function very similar to the greet.

Example
QUOTE

[0v3r 9000 AM] -- Hostbot [-1ms] has joined the channel using Warcraft III: The Frozen Throne (Level: 0, icon tier Random, peon icon, in Clan *TAGHERE*)

[0v3r 9000 AM] -- Setting gametag to 'none'.

[0v3r 9001 AM] -- RandomUser [-1ms] has joined the channel using Warcraft III: The Frozen Throne (Level: 0, icon tier Random, peon icon, in Clan *TAGHERE*) ((ACCESS=9))

(Says nothing because bot isn't ingame)

[0v3r 9002 AM] -- <From Hostbot> Your friend Hostbot entered a Warcraft III The Frozen Throne game called xxDotA 5v5 -Demo Nubzxx.

[0v3r 9002 AM] -- Setting gametag to 'xxDotA 5v5 -Demo Nubzxx'.<br>

[0v3r 9003 AM] -- RandomUser [-1ms] has joined the channel using Warcraft III: The Frozen Throne (Level: 0, icon tier Random, peon icon, in Clan *TAGHERE*) ((ACCESS=9))

[0v3r 9003 AM] -- <To RandomUser> The Hostbot is currently hosting 'xxDotA 5v5 -Demo Nubzxx'.

[0v3r 9003 AM] -- RandomUser1337 [-1ms] has joined the channel using Warcraft III: The Frozen Throne (Level: 0, icon tier Random, peon icon, in Clan *TAGHERE*) ((ACCESS=0))

(Says nothing because the bot requires 9 access to whisper the user).
Fallen-God
Here:

CODE
'GSS
'1.0
'Ghost Status Script:Fallen-God

Private Const intAccess = 0
Private Const Ghostname = "Fallen-God[LcR]"

Public Botstatus, Gamename

Sub GSS_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)
   If LCase(Username) = LCase(Ghostname) Then
      AddChat VBGreen, "Detected Ghost joining channel. Greet disabled."
      Botstatus = 1
   Else
      GetDBEntry Username,Access,Flags
      If Access >= intAccess Then
         Select Case Botstatus
            Case 1
               Exit Sub
            Case 2
               Dsp 3, "Welcome " & Username & ". The hostbot is currently in game:  " & Gamename, Username, 0
         End Select
      Else
         Exit sub
      End If
   End If
End Sub

Sub GSS_Event_WhisperFromUser(Username, Flags, Message)
   If LCase(Username) = LCase(Ghostname)
      If Match(Message,"Your friend * entered a Warcraft III The Frozen Throne game called *",True) Then
         Botstatus = 2
         Gamename = Mid(Message,67+Len(Username),Len(Message)-1)
         AddChat VBGreen, "Detected Ghost joining game: " & Gamename
      If Match(Message,"Your friend * entered a Warcraft III The Frozen Throne game called *",True) Then
         Botstatus = 2
         Gamename = Mid(Message,67+Len(Username),Len(Message)-1)
         AddChat VBGreen, "Detected Ghost joining game: " & Gamename
   End If
End Sub
Call
search for GHL plugin just?
Parrothead
QUOTE
[2:30:03 PM] <From (HOST)> Your friend (HOST) entered a Warcraft III The Frozen Throne game called DotA 5v5 -APSO US/CA! #429.
[2:30:03 PM] WhisperFromUser Call Error On File> C:\Program Files\StealthBot\plugins\GHostSeen.txt
[2:30:03 PM] Error Number: 13 Description: Type mismatch

[2:32:45 PM] -- CMNC(Trivia) [-1ms] has joined the channel using Warcraft III: Reign of Chaos (Level: 0, icon tier Random, peon icon, in Clan CMNC)
[2:32:45 PM] UserJoins Call Error On File> C:\Program Files\StealthBot\plugins\GHostSeen.txt
[2:32:45 PM] Error Number: 13 Description: Type mismatch


I got that as soon as I turned it on.
Fallen-God
My bad.

CODE
'GSS
'1.0
'Ghost Status Script:Fallen-God

Private Const intAccess = 0
Private Const Ghostname = "Fallen-God[LcR]"

Public Botstatus, Gamename

Sub GSS_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)
   If LCase(Username) = LCase(Ghostname) Then
      AddChat VBGreen, "Detected Ghost joining channel. Greet disabled."
      Botstatus = 1
   Else
      GetDBEntry Username,Access,Flags
      If Access >= intAccess Then
         Select Case Botstatus
            Case 1
               Exit Sub
            Case 2
               Dsp 3, "Welcome " & Username & ". The hostbot is currently in game:  " & Gamename, Username, 0
         End Select
      Else
         Exit sub
      End If
   End If
End Sub

Sub GSS_Event_WhisperFromUser(Username, Flags, Message)
   If Match(Message,"Your friend * entered a Warcraft III The Frozen Throne game called *",True) AND LCase(Username) = LCase(Ghostname) Then
      Botstatus = 2
      Gamename = Mid(Message,67+Len(Username),Len(Message)-1)
      AddChat VBGreen, "Detected Ghost joining game:  " & Gamename
   End If
End Sub
Parrothead
It works now!! This is a very amazing Stealthbot plugin and doesn't flood at all.

Thanks a lot!
Spiritless
When loading this plugin with CRS plugin, i get this error when i load the script:
QUOTE

[5:59:23 PM] Load Call Error On File> C:\Program Files\StealthBot\Plugins\crsClanRankScript.plug
[5:59:23 PM] Error Number: 501 Description: Illegal assignment


When someone joins the channel, i get this:
QUOTE

[5:59:23 PM] UserJoins Call Error On File> C:\Program Files\StealthBot\Plugins\crsClanRankScript.plug
[5:59:23 PM] Error Number: 501 Description: Illegal assignment


If i delete the GSS plugin and reload script, everything works just fine.
The-Black-Ninja
The GSS and CRS have conflicting variables.
Spiritless
Can you make a version of GSS that has diffrent variables?
The-Black-Ninja
Try changing
CODE
Private Const intAccess = 0
To
CODE
Private Const gssintAccess = 0
Then do a find and replace to replace the intAccess with the gssintAccess throughout the GSS plugin. See if that helps.
Spiritless
Thanks again The-Black-Ninja! tongue.gif

I had an idea that it was conflicting variables but i had no idea which variables, or how to fix it. hehe. I learned something new today! yay!
The-Black-Ninja
I have marked this topic as resolved. If you did not receive a satisfactory response, please reply and provide as much detail as possible.
Fallen-God
Ahh I learnt something new as well.
So from now on I should start naming my variables things like gss_Tag or whatever to avoid these problems.
Cheers.
The-Black-Ninja
Actually, with 2.7, if you Private your variables, this problem won't happen, so don't sweat too much about it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.