Valhalla Legends Forums Archive | Battle.net Bot Development | [Resolved] Hex Translation

AuthorMessageTime
LockesRabb
Can someone look at the area outlined in red, and tell me what it means? This is the timer offset for SC's ingame text display function.

*Screenshot removed due to issue being resolved*

And can someone tell me why does 0F0F0F0F result in Starcraft displaying a message permanently (unless scrolled off, in which case Starcraft usually modifies the timer offset to reflect new messages)?

Basically, the point of this is, I'm trying to figure out in what form Starcraft uses the timer offset...
June 24, 2005, 2:18 AM
Soul Taker
Well I'm going to ignore the first question since you say 12 bytes are supposed to be used for a timer which, although could be possible, I think you're probably leaving something out.
The reason that editing a timer value to 0x0f0f0f0f would make it display semi-permanently is because Starcraft probably uses some system like GetTickCount() - TimerValue to determine how many miliseconds to display the message.  So passing any random value has a high chance of making the message stay there for a very long time.
June 24, 2005, 2:43 AM
LockesRabb
Ah, I see... But the problem is, the offset seems to have what seems to be gibberish, I can't see how Starcraft would figure out what the delay length should be based on that... Any idea on what format Starcraft uses to set up the Starcraft timer?
June 24, 2005, 2:52 AM
tA-Kane
Possibly a FILETIME struct?
June 24, 2005, 10:52 AM
LockesRabb
I figured out the format... it's in hex-- decimal converted to hex, that is. what it does is get the gettickcount function, then adds the delay in milliseconds to it. for example:

Delay = 4000

Delay = ((GetTickCount()) + Delay)

Then the next step is to write the hex code (dec into hex) into memory.

I did some checking at the msdn library, and rewrote the function a bit. Now I definitely know what's up. Thanks.
June 24, 2005, 11:04 AM

Search