• Welcome to Valhalla Legends Archive.
 

Trouble :(

Started by QwertyMonster, February 07, 2005, 12:58 PM

Previous topic - Next topic

MyndFyre

Quote from: QwertyMonster on February 09, 2005, 12:02 PM
Hmm you said it stays the same, would i put


If Left(Strtext, 4) = "GAVEL" then
blah blah
Else
If Left(Strtext, 4) = "LEVAG" then
blah blah
Else
If Left(Strtext, 4) = "ICON_GAVEL" then
blah blah
End If
End If
End if


Are any of those right, or am i totally wrong? Because NONE of them work.

ROFL!  First of all, do you even program?  Do you know that the second parameter in the Left(string, integer) function is for "Length"?  How can ANYTHING of length 4 equal a string of length 5?

Second, bitwise flags are what Zak is talking about; use the binary nature of numbers in computing to store multiple true/false values.  To test if flag 1 is set, for example, you would:

If (value And 1) <> 0 Then
  ' Flag 1 is set.
End If
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

QwertyMonster

Yeah when relooking at my code i saw i put 4, but anway that was fixed after i just posted.

Hmm seem to be understand, ill do some testing.

QwertyMonster

Umm ok i nearly there, but what about Starcraft Spawn, is that in the flags aswell ?

UserLoser.

#18
Quote from: QwertyMonster on February 09, 2005, 02:30 PM
Umm ok i nearly there, but what about Starcraft Spawn, is that in the flags aswell ?

No, a user's product is the first part of the user's statstring which is viewable in chat channels

Edit: was thinking Starcraft Shareware, not Spawn.  But anyways, IIRC it's the fifth part of statstring which contains spawn boolean value

QwertyMonster

#19
Oh right. Ok, i kind of got it now.

But now i have another question.


How would i make my bot see a name for a command to trigger

Like this


If UCase(Username) = "QwertyMonster" then
blah blah


That would mean my name HAS to be QwertyMonster.

What would i put so it can be anything like QweRTYMonSteR, QwertMonster like that

I havent really used things like that much, help is thanks.

Soul Taker


QwertyMonster

Yeah, that was just an example, at first i did have "SouL TaKeR and SOUL TAKER" but then changed to evil_marine one cos it looked better, ok now its my name..

Joe[x86]

UCase will NEVER == something with a lowercase letter in it.

If (UCase(Username) = UCase("QuertyMonster") Then

That'll work though.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

tA-Kane

Quote from: UserLoser on February 09, 2005, 02:31 PM
Quote from: QwertyMonster on February 09, 2005, 02:30 PM
Umm ok i nearly there, but what about Starcraft Spawn, is that in the flags aswell ?

No, a user's product is the first part of the user's statstring which is viewable in chat channels
UserLoser is correct, however, the product is not where the "spawn" flag is specified. It's not in the user's flags, either. The spawn flag is in the statstring. I do not remember which one, though. Consult BnetDocs.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

QwertyMonster

Thanks u lot, nearly got it working now

QwertyMonster

Quote from: JoeTheOdd on February 09, 2005, 05:13 PM
UCase will NEVER == something with a lowercase letter in it.

If (UCase(Username) = UCase("QuertyMonster") Then

That'll work though.

It doesnt =[
Look, i have



If (UCase(Username)) = UCase("QwertyMonster") And UCase(Mid(strText, 1, 6)) = frmConfig.trigger.Text & "home " Then


A msgbox comes up as QwertyMonster -> QWERTYMONSTER, Not QwertyMonster, what do i put for it to read exactly what the name is?

Blaze

Quote from: QwertyMonster on February 11, 2005, 12:16 PM
If (UCase(Username)) = UCase("QwertyMonster") And UCase(Mid(strText, 1, 6)) = frmConfig.trigger.Text & "home " Then

The home isn't upper case, so it will never match.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

QwertyMonster

oh fk i didnt see that, nice spotting :D