Join Clan PluG
Default settings:
Clan : 1mba
Minimum Wins : 30
Minimum Percent : 50 %
Minumum Level = 15
Game: TFT
GateWay : Northend
This plug Auto invite a player who type .Join in clan channel , if he pass the required stats.
If you wanna change the stats , modifi this:
private const MyClan = "1MBA"
private const MinLevel = 15
private const MinWinS = 30
private const MinPercent = 50
private const GameTyPe = "TFT"
Code:
'joinc
'1.0
'By DrOiD @ T[X]AS
'///// CONDITIONS ///////////
private const MyClan = "1MBA"
private const MinWinS = 30
private const MinPercent = 50
private const GameTyPe = "TFT"
private const MinLevel = 15
'>>>>>>> Sub Events <<<<<<<<<<
Sub joinc_event_UserTalk(Username, Flags, Message, Ping)
If Left(lcase(message),6) = botvars.trigger & "join" then
addq "/emote ** Wait... Analizing Acc... [ " & username & " ] **"
tag = LCase(GetInternalDataByUsername(Username, 0))
if ucase(tag) = ucase(MyClan) then
Addq " >.< YOU ARE IN CLAN " & myclan & " ! " & username & " !!"
exit sub
end if
if ucase(tag) <> "" then
Addq " >.< Leave the clan " & tag & " ! " & username & " !! If you wanna Join..."
exit sub
end if
if ScINet.stillExecuting then
addq username & " >>>> SorrY <<<< ^_^ I'M BuSy "
exit sub
end if
'Web Profile
if gametype = "ROC" then Content = scinet.openurl("http://www.battle.net/war3/ladder/wa...ame="&Username)
if gametype = "TFT" then Content = scinet.openurl("http://www.battle.net/war3/ladder/w3...ame="&Username)
'*** TesT if WeB is DowN ***
posErroR = instr(content, "Error Encountered")
if poserror > 0 then
Addq "/emote >> BatTLe.NeT Profile WeB is DoWN -> I cant TesT Your Acc << Ask to Shaman..."
exit sub
end if
'******* User StatS ******
pos1 = instr(content, "Total")
pos1 = instr(pos1,content,"rankingRow")
pos1 = instr(pos1, content, ">")+1
pos2 = instr(pos1, content, "<")
twins = mid(content, pos1, pos2-pos1)
pos1 = instr(pos1, content, "%")-15
pos1 = instr(pos1, content, ">")+1
pos2 = instr(pos1, content, "<")-2
tpercent = mid(content, pos1, pos2-pos1)
UserStat = GetInternalDataByUserName(Username, 5)
Levelx = Split(UserStat, " ")(2)
if cint(levelx) < MinLeveL then
addq "/emote ** " & username & " You need Level " & minlevel & " To enter clan " & myclan
exit sub
end if
'Wins Condition
if cint(twins) < MinWinS then
addq "/emote ** " & username & " You need " & minwins & " Wins To enter clan " & myclan
exit sub
end if
'Percent Condition
if cint(tpercent) < MinPercent then
addq "/emote ** " & username & " You need " & minpercent & " % To enter clan " & myclan
exit sub
end if
'All Conditions Passed -> Step : Invite to clan
addq "/emote Welcome to CLan " & myclan & " " & Username
addq Command(BotVars.Username, "/invite " & Username, True)
end if
end sub
The plug is not tested , but i think all is ok , Post here your comment when you test iT ;D