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:
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
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.
Dif Act beaten Flag
Norm Act 0 128
Norm act 2 130
Norm Act 2 132
Norm Act 3 134
NM Act 2 142
Doesn't anyone have data on this byte?
Quote from: RealityRipple on February 25, 2006, 06:08 PMDoesn't anyone have data on this byte?
Yes, but we don't want to encourage people to use VB. Helping you would encourage that.
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 from: RealityRipple on February 25, 2006, 09:24 PM
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.
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.
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.
Quote from: Kp on February 25, 2006, 08:59 PM
Quote from: RealityRipple on February 25, 2006, 06:08 PMDoesn't anyone have data on this byte?
Yes, but we don't want to encourage people to use VB. Helping you would encourage that.
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 from: HeRo on February 25, 2006, 10:00 PM
Quote from: Kp on February 25, 2006, 08:59 PM
Quote from: RealityRipple on February 25, 2006, 06:08 PMDoesn't anyone have data on this byte?
Yes, but we don't want to encourage people to use VB. Helping you would encourage that.
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?
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.
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.
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.
So based on your findings, what's the pattern?