Results 1 to 11 of 11

Thread: Give commands to the script while its running

  1. #1
    Join Date
    Jan 2012
    Posts
    1,104
    Mentioned
    18 Post(s)
    Quoted
    211 Post(s)

    Default Give commands to the script while its running

    Hey everyone!

    Ok so, my problem is: I usually baby sit my bots, so if someone talks to me, I would answer them. Sadly, SMART wont let me type sometimes. I have to enable/disable it, and/or minimaze/maximaze it, and sometimes I manage to be able to type while SMART is enabled. Too difficult.

    Is there any way I could communicate with the script while its running? I mean I want to give commands for the script while its running. This would be good for lot of things, like: chatting, checking XPs when u want, looking at friend list.
    This would happen in a simple form window, with simple commands, or options, I dont know.
    I guess this is something like multi threading.
    Any solutions?

    Thanks in advance,
    hunt3rx3

  2. #2
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    You could make a new procedure to check for whatever you want it to do and you could call it after every other procedure?

    Its not exactly the best way to do things but it should be fine for what you are wanting to do.

  3. #3
    Join Date
    Nov 2011
    Posts
    1,268
    Mentioned
    17 Post(s)
    Quoted
    217 Post(s)

    Default

    Make it check for when a key is pressed, if key is down or something similar, do [call what you want it to do] and then it will continue with the script once it has done that
    GLH Tutorial ~ OpenGL Scripting
    http://villavu.com/forum/showthread.php?p=1292150

    GLH Scripts ~ Abyssal Scripts
    http://villavu.com/forum/showthread.php?p=1293187
    Current Projects:
    A) DemiseSlayer Pro (Released/100%).
    B) Demise Power Miner(Released/100%).
    C) Demise Pyramid Plunder(Planning Stage/0%).

  4. #4
    Join Date
    Jan 2012
    Posts
    1,104
    Mentioned
    18 Post(s)
    Quoted
    211 Post(s)

    Default

    Quote Originally Posted by DemiseScythe View Post
    Make it check for when a key is pressed, if key is down or something similar, do [call what you want it to do] and then it will continue with the script once it has done that
    This would be the best solution, but will smart detect when I press a key? Its just not typing it sometimes?
    This way I should turn off somehow typing (sometimes I can type while SMART is enabled). How to do that?

  5. #5
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    It don't think its smart who is detecting it but simba. You can try it anyway.
    Working on: Tithe Farmer

  6. #6
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    What kind of commands do you want to run? You can use the CallProc procedure to call whatever procedure you want.

    You can run a user defined hook (?) that checks if a key is down such as F5 and when it is, a form/input box will pop up and let you do whatever. I remember Zeph had something like this in his old script that when you pressed F5 a form popped up and you could do various things.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  7. #7
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Simba Code:
    repeat
        wait(100);
        if(IsKeyDown( 32)) then
          writeln('you pressed space');
      until(false);

    Edit:
    You know what I will create this.
    Last edited by masterBB; 02-20-2012 at 03:02 PM.
    Working on: Tithe Farmer

  8. #8
    Join Date
    Jan 2012
    Posts
    1,104
    Mentioned
    18 Post(s)
    Quoted
    211 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    Simba Code:
    repeat
        wait(100);
        if(IsKeyDown( 32)) then
          writeln('you pressed space');
      until(false);

    Edit:
    You know what I will create this.
    Ok this is cool, but how to prevent smart to type something accidently?

  9. #9
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    that should work fine if i understand properly as nothing will be typed into smart if you use f1-f12 but it might mess up the bot if it changes your game tabs

    you could also try looking to see if ctrl+a is pressed

  10. #10
    Join Date
    Jan 2012
    Posts
    1,104
    Mentioned
    18 Post(s)
    Quoted
    211 Post(s)

    Default

    Quote Originally Posted by CRU1Z1N View Post
    that should work fine if i understand properly as nothing will be typed into smart if you use f1-f12 but it might mess up the bot if it changes your game tabs

    you could also try looking to see if ctrl+a is pressed
    Yea that can mess the bot up. What ctrl+a does?


    OFFTOPIC:
    Why SMART keeps pressing tab key when enabling/disabling it? (tab is for answering PMs)
    Last time I disabled/enabled SMART, I got a random immediately! Jagex can easily detect us this way!! :S

  11. #11
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    I will not create this, the brilliant idea I had will make simba crash
    Working on: Tithe Farmer

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •