Valhalla Legends Forums Archive | Battle.net Bot Development | [VB] Diablo 2 Character Statstring Hell

AuthorMessageTime
RealityRipple
Hia, I think this is my first post here, and I'd like a little help with something. I recently discovered my bot improprerly shows Diablo 2 Titles, such as Slayer, Champion, etc... Now, in the D2 Char statstrings, the 27th byte is the flags for what you've beaten. As far as I know, that's the only way to determine titles. Here's how it currently gets the information:

[code]
                Dim D2XDots As Integer
                Debug.Print (Asc(P(27)) And &H10) & " " & (Asc(P(27)) And &H18) & " " & (Asc(P(27)) And &H20)
                If Asc(P(27)) And &H10 Then D2XDots = D2XDots + 1
                If Asc(P(27)) And &H18 Then D2XDots = D2XDots + 1
                If Asc(P(27)) And &H20 Then D2XDots = D2XDots + 1
                Select Case D2XDots
                    Case 1
                        If hardcore Then
                            Call strcpy(statbuf, "Destroyer ")
                        Else
                            Call strcpy(statbuf, "Slayer ")
                        End If
                    Case 2
                        If hardcore Then
                            Call strcpy(statbuf, "Conquerer ")
                        Else
                            Call strcpy(statbuf, "Champion ")
                        End If
                    Case 3
                        If hardcore Then
                            Call strcpy(statbuf, "Guardian ")
                        Else
                            If Not female Then
                                Call strcpy(statbuf, "Patriarch ")
                            Else
                                Call strcpy(statbuf, "Matriarch ")
                            End If
                        End If
                End Select
[/code]

P is an array of all the statstring bytes. It works, MOSTLY. If you don't have a title, it shows no title. It shows Slayer correctly (so far)... However, I have a friend who's a Champion. The Debug gives "16 24 0"... which as far as i know, means he's a Patriarch. Am i reading the wrong thing? or did I do something else wrong? Also, he said he killed baal in NM, but he didn't have the quest, so he shows up as a Champion in chat.

Added other stuff:

I've noticed that the actual value of byte 27 seems to be related to the character's current Act. However, the data I have so far is minimal and scattered.

[code]
Dif Act beaten Flag

Norm Act 0 128
Norm act 2 130
Norm Act 2 132
Norm Act 3 134

NM Act 2 142
[/code]

Doesn't anyone have data on this byte?
February 26, 2006, 12:08 AM
Kp
[quote author=RealityRipple link=topic=14362.msg147067#msg147067 date=1140912513]Doesn't anyone have data on this byte?[/quote]

Yes, but we don't want to encourage people to use VB.  Helping you would encourage that.
February 26, 2006, 2:59 AM
RealityRipple
Well then give it to me in C, i can convert. And don't just give me a link to DarkMinion's statstring stuff, because I've tried it, and it gives the wrong titles.
February 26, 2006, 3:24 AM
Kp
[quote author=RealityRipple link=topic=14362.msg147087#msg147087 date=1140924255]
Well then give it to me in C, i can convert. And don't just give me a link to DarkMinion's statstring stuff, because I've tried it, and it gives the wrong titles.
[/quote]

You're missing the point.  Anything we give you is going to end up as VB.  It's been a while since I looked at DarkMinion's code, but I believe it's correct for D2 classic and has only one minor mistake for D2 expansion.
February 26, 2006, 3:29 AM
RealityRipple
It may be correct for classic, but expansion is way off. Plus, there seems to be a way to get Act information from the same byte. And what the hell is wrong with Visual Basic? It's as much a programming language as any other.
February 26, 2006, 3:34 AM
HeRo
[quote author=Kp link=topic=14362.msg147084#msg147084 date=1140922792]
[quote author=RealityRipple link=topic=14362.msg147067#msg147067 date=1140912513]Doesn't anyone have data on this byte?[/quote]

Yes, but we don't want to encourage people to use VB.  Helping you would encourage that.
[/quote]
Why is this? There are so many posts here related to visual basic that people have received helped with, is this a rule you made up yourself?
February 26, 2006, 4:00 AM
Kp
[quote author=HeRo link=topic=14362.msg147092#msg147092 date=1140926434]
[quote author=Kp link=topic=14362.msg147084#msg147084 date=1140922792]
[quote author=RealityRipple link=topic=14362.msg147067#msg147067 date=1140912513]Doesn't anyone have data on this byte?[/quote]

Yes, but we don't want to encourage people to use VB.  Helping you would encourage that.
[/quote]
Why is this? There are so many posts here related to visual basic that people have received helped with, is this a rule you made up yourself?
[/quote]

Yet none of them received help from me.  Apparently all of the posters active since RealityRipple began posting have declined to assist him.  I'd like to think at least some of them did it in recognition of Visual Basic.
February 26, 2006, 5:12 AM
RealityRipple
Haha, Hi again heRo. Wanna try helpin me out? I think I have it almost totally figured out. Only problem is one friend who's in act 5 hell displays as being in act 4 hell.
February 26, 2006, 5:34 AM
RealityRipple
Well, seeing as nobody wants to help me... here's my findings:
(Expansion [normal follows the same pattern, but with 4 acts so that act 1 in hell is 0x90])
Normal Level:
Act 1 = 0x80
Act 2 = 0x82
Act 3 = 0x84
Act 4 = 0x86
Act 5 = 0x88

Nightmare Level:
Act 1 = 0x8A
Act 2 = 0x8C
Act 3 = 0x8E
Act 4 = 0x90
Act 5 = 0x92

Hell Level:
Act 1 = 0x94
Act 2 = 0x96
Act 3 = 0x98
Act 4 = 0x9A
Act 5 = 0x9C

Beaten it all: 0x9E

However, people in act 5 hell seem to display as act 4 hell. I'm testing things to figure this out now... My guess is Blizzard goofed up the end of it or something... or saw no purpose in including it.
February 27, 2006, 11:18 PM
Kp
So based on your findings, what's the pattern?
February 27, 2006, 11:53 PM

Search