StealthBot.net: General scripting trouble - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

General scripting trouble

#1 User is offline   laffo16 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 10
  • Joined: February-23 10

Posted March 07, 2010 - 11:18 PM

Having alot of trouble trying to put a script together, and really need to understand some of the basics a little better.

1) when i call, Command.Respond "". i see it doesnt execute until after the sub it resides in has finished?.
is their anyway to flush the response after the command.respond has been called.

1a) i am trying to query bnet, then read the response bnet gives via the logs. open to suggestions on how to do this.
running a loop to check the logs after Command.Respond "" wont work, because it doesnt flush until the sub ends.

2) with regards to looping, can i exit 2 sets of loops with a single call like. Exit Do 2 (doesnt seem to work).

3)what does this function do?
AddQ ""

i'll probably be posting quite a few small problems i have so i'll just keep them all to this thread.

-- Update 1

ok, so now im experimenting with timers, and its partially working out. in regards to Q1/Q1a, first i send the query to bnet then i set a timer. Call CreateObj("LongTimer", "myTimer")

the query is sent and the timer obj will wait for the text logs to update with bnets response. the problem i have now is how do i get the script to respond or send text message in the channel from within the "myTimer" function, as command.response doesnt work here.

... ok im such a dumbass, AddQ "" is your standard message command.

This post has been edited by laffo16: March 07, 2010 - 11:31 PM


#2 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted March 07, 2010 - 11:57 PM

View Postlaffo16, on 07 March 2010 - 06:18 PM, said:

1) when i call, Command.Respond "". i see it doesnt execute until after the sub it resides in has finished?.
is their anyway to flush the response after the command.respond has been called.

Command.ClearResponse

[/quote]1a) i am trying to query bnet, then read the response bnet gives via the logs. open to suggestions on how to do this.
running a loop to check the logs after Command.Respond "" wont work, because it doesnt flush until the sub ends.[/quote]I don't know what you're trying to do here. What are you trying to find?

Quote

2) with regards to looping, can i exit 2 sets of loops with a single call like. Exit Do 2 (doesnt seem to work).
You can use nested loops with an exit bool:
boolExit = False
Do Until whatever
   Do Until whatever
      If whatever is found Then
         boolExit = True
         Exit Do
      End If
   Loop
   If boolExit Then Exit Do
Loop


Quote

3)what does this function do?
AddQ ""

Makes the bot send a message to the chat.

Quote

ok, so now im experimenting with timers, and its partially working out. in regards to Q1/Q1a, first i send the query to bnet then i set a timer. Call CreateObj("LongTimer", "myTimer")

the query is sent and the timer obj will wait for the text logs to update with bnets response. the problem i have now is how do i get the script to respond or send text message in the channel from within the "myTimer" function, as command.response doesnt work here.
Command objects only refer to to commands being issued from the bot. You can't use them for anything else, so I'm not really sure what you're trying to accomplish within your timer because AddQ works.

#3 User is offline   laffo16 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 10
  • Joined: February-23 10

Posted March 08, 2010 - 12:33 AM

thanks for the reply ninja, ye im just tripping over my own feet at the moment trying to figure things out backwards is never a wise thing to do (ive got some experiance with Autoit, but VBScript seems tricky to me). pls keep the thread open if thats ok for any further Q's i might have, but for the most part i seemed to be making a little progress now.

do you know where i can find more information about the "Command" parameter which is passed to many functions.
i see its an object and has some extensions like Command.Name, Command.IsValid, Command.HasAccess.

This post has been edited by laffo16: March 08, 2010 - 12:37 AM


#4 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted March 08, 2010 - 12:41 AM

Did you try the wiki?

http://www.stealthbo..._script_objects

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users