Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: JaMi on February 14, 2003, 05:01 AM

Title: Ez Question
Post by: JaMi on February 14, 2003, 05:01 AM
im sure its a simple question to answer im just beyond tired of trying to figure it out lol,
      If Left(strText, 1) = msTrigger Then DoCommands strUser, strText, False if that works then why wont this?     If LCase(strText) = msTrigger & strAccount Then DoCommands strUser, strText, False strAccount = name logged on as of course btw
Title: Re: Ez Question
Post by: Coltz@School on February 14, 2003, 06:51 AM
your first code will take something like !HEre and will see if ! = your trigger

your second one will take something like !HEre and give you !here - the lowercase of the text
Title: Re: Ez Question
Post by: Noodlez on February 14, 2003, 07:34 AM
why would you be adding the trigger to an account?
Title: Re: Ez Question
Post by: JaMi on February 14, 2003, 07:42 AM
in case of bots with same trigger... `name (command)
Title: Re: Ez Question
Post by: Noodlez on February 14, 2003, 09:53 AM
of course that wont work if there are any command params, all your checking for is trigger & account.

If left(strtext,len(mstrigger) & len(straccount)) = mstrigger & straccount
and LOL. DoCommands, an ethbot function...
Title: Re: Ez Question
Post by: Camel on February 14, 2003, 10:32 AM
Quotein case of bots with same trigger... `name (command)
why not whisper it? trying to impress your friends? 8)
Title: Re: Ez Question
Post by: Spht on February 14, 2003, 11:19 AM
Quotewhy not whisper it? trying to impress your friends? 8)

Because it looks funnier. "Disclaimer, ban Camel" - commands can be issued by using trigger, or bot's name with a comma (in EternalBot).
Title: Re: Ez Question
Post by: UserLoser on February 14, 2003, 12:21 PM
In my case,
ShadowAssassins, say UserLoser wonders why he is banned from Botnet, or not able to connect...
Title: Re: Ez Question
Post by: Spht on February 14, 2003, 01:05 PM
QuoteIn my case,
ShadowAssassins, say UserLoser wonders why he is banned from Botnet, or not able to connect...

Right.
Title: Re: Ez Question
Post by: JaMi on February 14, 2003, 03:51 PM
why not whisper it? trying to impress your friends?  umm no, just to save a step in the process..... ChewBot has that option as well and i always used it that way... Well anyway thanx for all the "help" ?
Title: Re: Ez Question
Post by: Spht on February 14, 2003, 03:59 PM
QuoteWell anyway thanx for all the "help" ?

You weren't helped? If you weren't, I could spill out the answers for you.
Title: Re: Ez Question
Post by: JaMi on February 14, 2003, 05:26 PM
not that i saw.... i mean i now realize what was wrong with it, but not how to fix it, ill figure it out sooner or later i was just frustrated with trying for the moment
Title: Re: Ez Question
Post by: Spht on February 14, 2003, 06:03 PM
Example situation: If you're logged on account Jack and trigger is '!', you want to be able to do this: !Jack <command> (i.e., !Jack say Hello). Right?

If so, then try this (used your variables and function to be more convenient):

If LCase(Left(strText, Len(msTrigger) + Len(strAccount))) = LCase(msTrigger & strAccount) Then DoCommands strUser, Mid(strText, Len(msTrigger) + Len(strAccount) + 2), False
That is assuming your DoCommands() function takes exact command and contents with excluded trigger.
Title: Re: Ez Question
Post by: Etheran on February 21, 2003, 12:05 AM
Actually, that would be my DoCommands.. ;)