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
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.
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
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.
on the flags update MESSAGE, i found i could receive this if i unsquelched someone, there must be an easier way lol
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.
Remember that he is using CSB
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
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)
You receive the user's stat string (including their clan) on channel join/user events.
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"
Like I said, CSB doesn't support W3 statstrings.
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)
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.
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?
also, where can i download the warcraft 3 tft icons in bmp or similar format? (for use with my bot) ive searched around and no luck
Quote from: phvckmeh on July 13, 2004, 07:13 PM
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?
Not possible, with CSB sorry.
Quote from: phvckmeh on July 13, 2004, 09:00 PM
also, where can i download the warcraft 3 tft icons in bmp or similar format? (for use with my bot) ive searched around and no luck
Here (http://www.battle.net/war3/ladder/w3xp-ladder-info-laddericons.aspx?Gateway=Lordaeron)
what size do i need to shrink em too, or is there a zip with this already done?
Quote from: phvckmeh on July 13, 2004, 09:19 PM
what size do i need to shrink em too, or is there a zip with this already done?
My god man, do you want the whole bot handed to you on a silver platter?
Take some time out of your busy schedule and make them whatever size you want. I made mine IIRC 32x21.
[edit] I suppose you could download my bot and look in the Program Files\ArmaBot Alpha 4\images folder.
[edit 2] I guess I didn't change the size. :O But the imagelist specifies 32x21, or 32x19. The icons you're looking for are in "official-static," "reign-of-chaos-static", and "frozen-throne-static." The others are for a menu and for my profile display (the animated ones).
why the fuck would i waste my time edting 20+ bitmaps when its possible somene else already did it?
Because that's the pussy way of doing it.
Quote from: ChR0NiC on July 13, 2004, 09:57 PM
Because that's the pussy way of doing it.
then i guess i am what i eat
Doesn't CSB support obtaining the raw, unprocessed packets from b.net in some way?
Quote from: Adron on July 14, 2004, 02:35 AM
Doesn't CSB support obtaining the raw, unprocessed packets from b.net in some way?
i checked any the only thing i found was unhandledpacket()
i tried it and it didnt trigger at all :P
just realized something weird, i receive it for w3 ROC users, but not TFT users...
no1 knows?
Parse it yourself.
i already wrote the code for thr parsing, but i dont accutaly receive it!
Yes we know, simply CSB was not designed to display the raw packets unparsed, unless you receive it in flags update. Just the way it is, not sure but maybe it was updated in this version though. You can get it here (http://cold-chaos.net/stealth/dep/cleanslatebot2.ocx)
Quote from: ChR0NiC on July 25, 2004, 11:38 PM
Yes we know, simply CSB was not designed to display the raw packets unparsed, unless you receive it in flags update. Just the way it is, not sure but maybe it was updated in this version though. You can get it here (http://cold-chaos.net/stealth/dep/cleanslatebot2.ocx)
okay, then isnt it weird that i receive it for EVERY OTHER game? sc/d2/war3 just not TFT??
You obviously don't understand that, CSB was made BEFORE Frozen Throne was. Therefore he didn't add SUPPORT FOR IT !!
Quote from: ChR0NiC on July 26, 2004, 04:07 PM
You obviously don't understand that, CSB was made BEFORE Frozen Throne was. Therefore he didn't add SUPPORT FOR IT !!
well now that you said it, i understand
Did you try CSB2 that I suggested?
Quote from: ChR0NiC on July 25, 2004, 11:38 PM
Yes we know, simply CSB was not designed to display the raw packets unparsed, unless you receive it in flags update. Just the way it is, not sure but maybe it was updated in this version though. You can get it here (http://cold-chaos.net/stealth/dep/cleanslatebot2.ocx)[/u]
I believe it has all sorts of new support, although I never really looked into this version, much like the other version. But I'm sure you can figure this one out, it couldn't be all that different, I believe Cuphead added W3 logon in this version.
i have been using CSB2, the war3 logon errors with CSB, it was discussed earlier.
Quote from: phvckmeh on July 26, 2004, 11:57 PM
i have been using CSB2, the war3 logon errors with CSB, it was discussed earlier.
You could use my bot API and VB .NET. :-P It's almost like CSB, just more powerful.