Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: GHL script


Veteran Member

Status: Offline
Posts: 54
Date:
GHL script
Permalink   
 


Edo afino gia opia clan thelei na to kanei use ena poli kalo kai aksiopisto script pou sindeei ta hostbots tis clan sas me kapio stealthbot tis clan sas kai spammarei ta games pou ginonte.      ta Hostbot mesa sto script einai paradeigma.                                                                                                                   'ghl
'3.0
'&Ghost Host List:Call:Keeps track of your ghost bots and display the new games they hosted.
'&games - dispaly current games(can be changed and disabled)
'&40691
'&Please read the configurations comments and configure the plugin for your needs.:Please report all bugs/errors found.:Please suggest all you think would be great for the plugin on the plugin home topic.:All ghost bots must be on the stealthbot's friend list or else this will not work.:Multiple commands only works with whisper format.
'Assisted by: None

'//
'//                                         Ghost Host List 3 . 0                                        
private const vinterval = 80                              'Timer interval(seconds) for whispers to be sent
private const vghost = "YmC-hb-|YmC-hb-|YmC-hb-|Ymc-hb-"                             'Ghost's username seperate with |
private const vghostcommand = "!getgames"                    'Command to whisper seperate with |
private const vghostformat = 0                                                '0 = FriendList - 1 = Wisper
private const vdisplayformat = 1                                                  '1 = Normal - 2 = Emote
private const vdisplay ="%game | SLOTS: %spots | MINUTES: %minutes | HOST:  %username"                                            'New game display
private const vdisplay2 = ""                                              'No new games
private const vtimerdisplay = 40                                           'Use timer to display new games
private const vtimerinterval =40                                                 'Time btw new game lists
private const vcommanddisplay = 1                                        'Use command to display new games
private const vcommandaccess = -1                                 'Access required to use display command
private const vcommand = "games"                                             'Command to display new games
private const vcommandspam = 5                         'Anti-Spam seconds before command can be used again
private const vdistance = 10
'//
'// Game [%game : %username : %used/%size : %minutes] is in the lobby and there are %used2/%size2 other games in progress.
'// %spots - Gives you the number of spots that is open in the game can be used in vdisplay.
'// %rb - How many registered bots in the plugin.
'// %rc - How many registered commands in the plugin.
'//
public ghlL, ghlA, ghlO, ghlB
ghlL = vdisplay2
ghlO = ""
ghlA = false
ghlB = false

sub ghl_event_load()
TimerInterval "ghl", "ghost", int(vinterval)
TimerInterval "ghl", "spam", int(vcommandspam)
TimerInterval "ghl", "list", int(vtimerinterval)
TimerInterval "ghl", "distance", int(vdistance)
TimerEnabled "ghl", "ghost", true
TimerEnabled "ghl", "spam", false
TimerEnabled "ghl", "distance", true
TimerEnabled "ghl", "list", false
'//if int(vtimerdisplay) = 1 then TimerEnabled "ghl", "list", true else TimerEnabled "ghl", "list", false
end sub

sub ghl_distance_timer()
TimerEnabled "ghl", "list", true
TimerEnabled "ghl", "distance", false
end sub

sub ghl_ghost_timer()
dim TempCount : TempCount = 0
for x = 0 to UBound(Split(vghost, "|"))
if GetPositionByName(Split(vghost, "|")(x)) > 0 then
TempCount = TempCount + 1
end if
next
ghlO = ghlL
ghlL = vdisplay2
ghlB = true
'if Int(UBound(Split(vghost, "|")) + 1) = Int(TempCount) then exit sub
if vghostformat = 0 then
AddQ "/f m " & vghostcommand
else
for x = 0 to UBound(Split(vghost, "|"))
dim TempStr
if x <= UBound(Split(vghostcommand, "|")) then
TempStr = Split(vghostcommand, "|")(x)
else
TempStr = vghostcommand
end if
dsp 3, TempStr, Split(vghost, "|")(x), vbGreen
next
end if
end sub

sub ghl_list_timer()
dim Games
if not ghlL = vdisplay2 then
Games = "Games: " & left(ghlL, len(ghlL) - 2)
else
Games = vdisplay2
end if
If ghlB and Not ghlO = vdisplay2 Then Games = "Games: " & left(ghlO, len(ghlO) - 2)
dsp vdisplayformat, Games, username, vbRed
end sub

sub ghl_spam_timer()
ghlA = false
TimerEnabled "ghl", "spam", false
end sub

sub ghl_event_whisperfromuser(username, flags, Message, Ping)
dim TempBoolean : TempBoolean = false
For x = LBound(Split(vghost, "|")) to UBound(Split(vghost, "|"))
if LCase(Username) = LCase(Split(vghost, "|")(x)) then
TempBoolean = true
exit for
end if
next
if not TempBoolean then exit sub
ghlB = false
if instr(lcase(message), "is in the lobby") then
dim TempString
TempSplit1 = Replace(message, "Game [", "")
TempSplit = Split(TempSplit1, "] is")(0)
Game = Split(TempSplit, " : ")(0)
Username = Split(TempSplit, " : ")(1)
Minutes = Split(TempSplit, " : ")(3)
TempSplit = Split(TempSplit, " : ")(2)
Used = Split(TempSplit, "/")(0)
Size = Split(TempSplit, "/")(1)
Spots = Int(Int(Size) - Int(Used))
TempSplit1 = split(message, " in the lobby and there are ")(1)
TempSplit = split(TempSplit1, " other games in progress.")(0)
Used2 = Split(TempSplit, "/")(0)
Size2 = Split(TempSplit, "/")(1)
TempString = vdisplay
TempString = replace(TempString, "%rb", UBound(Split(vghost, "|")))
TempString = replace(TempString, "%rc", UBound(Split(vghostcommand, "|")))
TempString = replace(TempString, "%game", Game)
TempString = replace(TempString, "%username", Username)
TempString = replace(TempString, "%used2", Used2)
TempString = replace(TempString, "%size2", Size2)
TempString = replace(TempString, "%used", Used)
TempString = replace(TempString, "%size", Size)
TempString = replace(TempString, "%minutes", Minutes)
TempString = replace(TempString, "%spots", Spots)
'if InStr(ghlO, Game) <= 0 then dsp vdisplayformat, "New Game: " & TempString, botvars.username, vbgreen
if ghlL = vdisplay2 then ghlL = TempString & ", " else ghlL = ghlL & TempString & ", "
end if
end sub

sub ghl_event_usertalk(username, flags, message, ping)
if ghlA then exit sub
if int(vcommanddisplay) = 0 then exit sub
getdbentry username, access, flags
if access < vcommandaccess then exit sub
if lcase(message) = lcase(BotVars.Trigger & vcommand) then
if vcommandspam > 0 then
ghlA = true
TimerEnabled "ghl", "spam", true
end if
dim Games
if not ghlL = vdisplay2 then
Games = "Games: " & left(ghlL, len(ghlL) - 2)
else
Games = vdisplay2
end if
If ghlB and Not ghlO = vdisplay2 Then Games = "Games: " & left(ghlO, len(ghlO) - 2)
dsp vdisplayformat, Games, username, vbRed
end if
end sub

__________________

HONDA...THE POWER OF DREAMS[HeLL_CurseD]---> Developer..Shaman YmC [MODERATOR]

Dota_Party

Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.

Tweet this page Post to Digg Post to Del.icio.us


Create your own FREE Forum
Report Abuse
Powered by ActiveBoard