• Welcome to Valhalla Legends Archive.
 

CSB - Receiving W3 Statstring?

Started by phvckmeh, July 13, 2004, 04:26 PM

Previous topic - Next topic

phvckmeh

I use CSB and ive programmed a nice moderation bot for my channel. I was wondering how I could receive the string that says,
Bob, a level 18 nightelf with icon keeper of the grove icon in clan sK has joined the channel.

I thought it would be the userjoins(message) but that is vbnullstring when a  w3tft player joins


Any ideas? the reason i want this is so i can automattically ban certain clans

ChR0NiC

#1
Perhaps CSB was made before the release of W3XP?

Edit:
Perhaps do a select case on the products and if the product is W3XP parse it yourself.

Edit2:
IIRC, CSB gives you the parsed message and the original string as well just in case such an event happens.

phvckmeh

okay, but how do i receive that string? my bot is on starcraft and i think that since SC dosent display w3 win icons that the string wouldnt be sent to a sc client

ChR0NiC

#3
It's one of the variables in the UserJoins sub.


Private Sub CleanSlateBot1_UserJoins(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, SimulatedEvent As Boolean)


The one that displays the string is Message. That gives you the statstring IIRC!!

Edit: Nope I was wrong, Message is the already parsed statstring. I guess the only way to get the statstring I believe is in FlagsUpdate...

Sorry I am unsure how to get the statstring using CSB, I guess Cuphead didn't properly prepare his active X control for such an event.

phvckmeh

on the flags update MESSAGE, i found i could receive this if i unsquelched someone, there must be an easier way lol

MyndFyre

Quote from: phvckmeh on July 13, 2004, 04:37 PM
okay, but how do i receive that string? my bot is on starcraft and i think that since SC dosent display w3 win icons that the string wouldnt be sent to a sc client

Yes, it does.  That isn't the string received by the client; it looks more like:


[Product-ID-DWORD] 3W[Icon-Tier][Icon-Race] [Clan-Tag-DWORD]


Roughly, if you get my TFT statstring you get:

PX3W 3W2H AoA

It just so happens that AoA is the same backwards and forwards, so if you were to have the same statstring but in vL, you'd get:

PX3W 3W2H Lv  

The clan-tag is always left-aligned, so while it is a DWORD, the two right-side bytes are nulls.

Part of the problem you'll encounter is that you now have to keep track of the names of the icons.

I don't have ALL of the icons in my bot, but as I recall, the imagelist I use is 66 icons long.  That incorporates Starcraft Retail/Shareware/JStar into the Starcraft icon, Diablo Shareware/Retail into the Diablo icon, etc.  Then I have the standard WC3 and TFT icons, and all of the named/rank icons (21 for WC3, 31 for TFT).

I also have the names in my library.

Hope that helps you out, or at least points you in the right direction.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

ChR0NiC


MyndFyre

Quote from: ChR0NiC on July 13, 2004, 05:54 PM
Remember that he is using CSB

That's the statstring.  If you're right about the statstring coming through the Message variable in UserJoins, then he should be able to parse it.

Notes:

Icon tiers go from 1 to 5 (where tier 1 is ALWAYS the Orc Peon, opeo) in Warcraft III and 1 to 6 (where tier 1 is ALWAYS the Orc Peon) in Frozen Throne.

Race abbreviations for Warcraft III:
R = Random
H = Human
O = Orc
N = Night Elf
U = Undead

For Frozen Throne, they are the same but with the addition of:
D = Tournament

Hth
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

phvckmeh

thanks i understand all of that

now lets say i want (hypotheticcaly) to autoban clan PUSY

the only way ive found to even RECEIVE that statstring is to unsquelch (anyone) in the channel, then i receive that string for every single usr.

so when a user joins, i would send unsquelch then search each and every string for USYP and ban any users with that

im asking if there is an easier way to recive it rather than unsquelch

when i unsquelch i get it from flagsupdate(message)

Eric

#9
You receive the user's stat string (including their clan) on channel join/user events.

phvckmeh

Quote from: LoRd[nK] on July 13, 2004, 06:40 PM
You receive the user's stat string (including their clan) on channel join/user events.

i dont think so, the userjoins(message) is vbnullstring for w3 clients, for d2 chars its "Charactername has joined, a lvl x paladin etc"

ChR0NiC

Like I said, CSB doesn't support W3 statstrings.

phvckmeh

Quote from: ChR0NiC on July 13, 2004, 06:52 PM
Like I said, CSB doesn't support W3 statstrings.

but it does, i receive the statstring un parsed for everyone in the channel if i unsquelch myself via FlagsUpdate(message)

Eric

QuoteQuote from: LoRd[nK] on Today at 04:40:10pm
You receive the user's stat string (including their clan) on channel join/user events.

i dont think so, the userjoins(message) is vbnullstring for w3 clients, for d2 chars its "Charactername has joined, a lvl x paladin etc"
Because there's a bug in CSB, get over it.

phvckmeh

ok forget all the other stuff

what im asking is, is there an easier way to recieve the statstring rather than unsquelch everyone who joins the channel?