Valhalla Legends Forums Archive | General Discussion | Battle.net Bot w/...

AuthorMessageTime
StormGage
I would be interested in having a bot which prints timestamps that measure to the miliseconds. For instance: [hour:minute:seconds:miliseconds]. I would be interested in using one of these bots for various reasons. Does anyone know of such a bot?
January 21, 2004, 2:54 AM
Stealth
You could probably adapt Grok's code here:

https://davnit.net/bnet/vL/phpbbs/index.php?board=31;action=display;threadid=4255
January 21, 2004, 3:14 AM
StormGage
I'm not familiar with VB, so It'd just be easier for me to have the bot with it allready implemented. But I'll see what use I can make of that code.
January 21, 2004, 3:19 AM
Stealth
[quote author=StormGage link=board=2;threadid=4824;start=0#msg40443 date=1074655151]
I'm not familiar with VB, so It'd just be easier for me to have the bot with it allready implemented. But I'll see what use I can make of that code.
[/quote]

Sorry, I misread your question. Forward that link on to your bot developer of choice.
January 21, 2004, 4:08 AM
StormGage
You perhaps? :-p
January 21, 2004, 4:12 AM
Spht
[quote author=GoSS link=board=2;threadid=4824;start=0#msg40489 date=1074702174]
Shouldn't this post be in the BotDev forum?
[/quote]

No. He's asking for a bot which has a certain feature.
January 21, 2004, 4:25 PM
UserLoser.
I have one, supports all clients (uses BNLS) - Doesn't have much features yet but it's being worked on.. I'll upload it when I get home since I installed a new server on my system and it's not currently there
January 21, 2004, 4:31 PM
hismajesty
I have one as well yet, it's unreleased. I also encountered a problem that UserLoser pointed out to me. It logs milliseconds larger than the maximum millisecond number. >:(
January 21, 2004, 8:19 PM
Kp
[quote author=hismajesty link=board=2;threadid=4824;start=0#msg40522 date=1074716393]
I have one as well yet, it's unreleased. I also encountered a problem that UserLoser pointed out to me. It logs milliseconds larger than the maximum millisecond number. >:([/quote]

Nice trick. If you want some help fixing it, spawn a new thread about that (preferably either in botdev or in a language specific forum, as you feel appropriate) and I'm sure someone will take a look.
January 21, 2004, 9:08 PM
UserLoser.
[quote author=hismajesty link=board=2;threadid=4824;start=0#msg40522 date=1074716393]
I have one as well yet, it's unreleased. I also encountered a problem that UserLoser pointed out to me. It logs milliseconds larger than the maximum millisecond number. >:(
[/quote]

[code]
void TimeStamp(char *buf, bool bMSTime)
{
   SYSTEMTIME st;
   GetLocalTime(&st);
   if (bMSTime)
      sprintf(buf, "[%02i:%02i:%02i.%03i] ", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);
   else
      sprintf(buf, "[%02i:%02i:%02i] ", st.wHour, st.wMinute, st.wSecond);
}
[/code]
January 21, 2004, 9:25 PM
Kp
[quote author=UserLoser. link=board=2;threadid=4824;start=0#msg40536 date=1074720354]
[code]
void TimeStamp(char *buf, bool bMSTime)
{
SYSTEMTIME st;
GetLocalTime(&st);
if (bMSTime)
sprintf(buf, "[%02i:%02i:%02i.%03i] ", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);
else
sprintf(buf, "[%02i:%02i:%02i] ", st.wHour, st.wMinute, st.wSecond);
}
[/code]
[/quote]
A quick optimization:
[code]
sprintf(buf, bMSTime ? "[%02i:%02i:%02i.%03i] " : "[%02i:%02i:%02i] ", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);[/code]
This cuts down on code size by only having one way to call sprintf. The ternary operator ?: picks a format string appropriate to the request, rather than an if/else construction which picks an entire function call. When bMSTime is false, the fourth field st.wMilliseconds is silently ignored by sprintf, since the non-ms format string only specifies three fields.
January 21, 2004, 9:42 PM
Adron
[quote author=Kp link=board=2;threadid=4824;start=0#msg40539 date=1074721343]
This cuts down on code size by only having one way to call sprintf. The ternary operator ?: picks a format string appropriate to the request, rather than an if/else construction which picks an entire function call. When bMSTime is false, the fourth field st.wMilliseconds is silently ignored by sprintf, since the non-ms format string only specifies three fields.
[/quote]

It would also prevent the compile-time checking of printf format arguments done by some modern compilers?
January 23, 2004, 9:01 PM
Kp
[quote author=Adron link=board=2;threadid=4824;start=0#msg40816 date=1074891678]It would also prevent the compile-time checking of printf format arguments done by some modern compilers?[/quote]

Sure. That's why I only make such changes when I'm going back through looking for easy enhancements, after I've already built everything and gotten any associated warnings. :)
January 23, 2004, 9:28 PM
DarkMinion
I am of the opinion that someone should stab you in the face.
January 27, 2004, 12:39 PM
Kp
[quote author=DarkMinion link=board=2;threadid=4824;start=0#msg41306 date=1075207178]
I am of the opinion that someone should stab you in the face.[/quote]

Stab who? You should indicate the poster to whom you are referring.
January 27, 2004, 5:56 PM
kamakazie
[quote author=DarkMinion link=board=2;threadid=4824;start=0#msg41306 date=1075207178]
I am of the opinion that someone should stab you in the face.
[/quote]

I am of the opinion that someone copies magus.

http://boards.gamers.com/messages/message_view-topic.asp?name=sayter&id=zwdel

:)
January 27, 2004, 11:29 PM
Chopz
I assume he's talking to you(Kp) Ban him from the forums... He's threatening you. ;) Hehe, you shouldn't make those opinions DarkMinion... it's not very good repect... :-\
LoL
February 1, 2004, 1:49 AM

Search