IPB

Welcome Guest ( Log In | Register )

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 
Reply to this topicStart new topic
> auto-invite plug fails
hasleftthegame
post Sep 15 2009, 12:25 PM
Post #1


Rookie
*

Group: Members
Posts: 3
Joined: 26-June 07
Member No.: 25,401



I have searched the forums, and havent found anything to help me with this, so i apologize in advance if i missed it. I have been running a fairly rare auto-invite plug for several years, and suddenly(how else), it stopped working. it shows it trying to connect to battlenet to check stats, then nothing. I really love this plug, its very simple to use, only one command: .join. I think it is by T[x]as, here it is:

CODE
'ClanInvite
'1.1
defaultgateway="lordaeron"

Serverx = lcase(Serverx)
If Serverx <> "azeroth" and Serverx <> "kalimdor" and Serverx <> "northrend" and Serverx <> "lordaeron" then
addchat vbred, "Invalid server given, set to default."
Serverx = defaultGateway
End If

Sub ClanInvite_Event_UserTalk(Username, Flags, Message, Ping)

If left(Lcase(message), 9) = botvars.trigger&"join" and instr(Username, "@") Then
AddQ "Warcraft only for inviting."
else
If left(Lcase(message), 9) = botvars.trigger&"join" Then
Call Invite(username)
End if
End if

End Sub

Sub ClanInvite_Event_WhisperFromUser(Username, Flags, Message)

If left(Lcase(message), 9) = botvars.trigger&"join" and instr(Username, "@") Then
AddQ "Warcraft only for inviting."
else
If left(Lcase(message), 9) = botvars.trigger&"join" Then
Call Invite(username)
End if
End if

End Sub

Sub invite(name)

if inviting = True then
AddQ "The bot is busy wait a few seconds. Then try again."
Exit Sub
end if

inviting = True
AddQ "/me .." & "Connecting to Battle.Net, Please Wait..."
content=ScINet.OpenURL("http://www.battle.net/war3/ladder/W3XP-player-profile.aspx?Gateway=" & serverx & " &PlayerName=" & name)

if instr(content,"Error Encountered")>0 then
AddQ "/w " & user & " The Battle.Net web site is currently unavailable or an error has occured."
inviting = False
Exit Sub
end if

clan=mid(content,instr(Lcase(content),"clan name:"))
clan=mid(clan,1,instr(clan,"</b>")-1)
if instr(clan,"</a>")>0 then
clan=split(Split(clan,">")(3),"<")(0)
else
clan = "N/a"
end if

totalstats=mid(content,instr(Lcase(content),"total:")+11)
totalstats=mid(totalstats,1,instr(Lcase(totalstats),"<tr>")-1)
wins=split(Split(totalstats,">")(1),"<")(0)
losses=split(Split(totalstats,">")(3),"<")(0)
percent=split(Split(totalstats,">")(5),"<")(0)

if clan = "N/a" then
if ((int(wins)>=25) and (Left(percent,5)>=48)) then
AddQ "/w " & name & " Stats Accepted Sending Invite!"
Command "Botvars.username", "/invite " & Name, True
inviting=False
Exit Sub
else
AddQ "/me .." & "Stats Rejected..." & wins & " " & percent & "] - Requirements: 25 50%,50 49%,150 48%,200 47%,300+ 46%."
AddQ "/w " & name & " Ask a shaman if you think youre good enough."
inviting=false
Exit Sub
end if
else
AddQ "/me .." & name & " is in a clan already."
inviting = False
Exit Sub
end if
end sub
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Sep 15 2009, 01:13 PM
Post #2


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



This isn't rare, it's found on the forums here. Anyways, it fails because BNet changed something in their HTML which messes everything up. I've already re-made my invite plugin for 2.7 so it doesn't need to access websites anymore.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Chakra
post Sep 15 2009, 11:04 PM
Post #3


F˙hrer Chakra
**

Group: Members
Posts: 68
Joined: 16-December 06
From: Las Vegas
Member No.: 14,025



Are you sure it isn't just because battle.net made new prefixes? "www." is no longer used for WarCraft statistics. "classic." is used for Lordaeron/Azeroth/Northern, while "asialadders." is used for Kalimador.
Try changing "www." to "classic." in your plugin.

He said it couldn't even connect, which probably indicates the URL is invalid, which it is.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
The-Black-Ninja
post Sep 16 2009, 03:13 PM
Post #4


Pure Sex
********

Group: Moderators
Posts: 7,756
Joined: 13-August 06
Member No.: 7,372



I've known other people using that method as a fix and it still isn't working for them, so whatever. I'm not concerned about this because once 2.7 gets released, using the bnet website to receive ladder stats is going to be so archaic.


--------------------
IPB Image

-My Plugins :: Thanks Pyro :)
IPB ImageIPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th October 2019 - 05:39 AM
Skin by Andrea
Website Legal Information | Hosted by LunarPages