Results 1 to 12 of 12

Thread: Changing setup in script when already running?

  1. #1
    Join Date
    Oct 2006
    Posts
    491
    Mentioned
    0 Post(s)
    Quoted
    41 Post(s)

    Default Changing setup in script when already running?

    Is it possible to change something in a script while it is already running? Like pause, change the amount of time before breaking and then continue or something along those lines? Or is that not possible and would have to stop and recompile the script after changing?

  2. #2
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    You have to stop and recompile.

  3. #3
    Join Date
    Oct 2006
    Posts
    491
    Mentioned
    0 Post(s)
    Quoted
    41 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    You have to stop and recompile.
    Damn okay, I'm a proggy whore, so I was hoping that I could change something and keep my proggy going. Oh well =(

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    It's possible through reading and writing to files. MSI does this with it's player remote. It allows you to pause the script, login to an inactive player, fix him, then reset him. Hopefully eventually all settings will be changeable during runtime.

  5. #5
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    A way to edit VARIABLES(not constants) during runtime would be to add a query to the script if you press a certain button

    pseudocode:
    Simba Code:
    if buttonisdown(f1) then
      if showquery('what variable would you like to change', vartochange) then
        case vartochange of
          'var1': if showquery('what would you like to change var1 to?', whattochangevarto) then
            var1 := whattochangevarto;
        end;

    EDIT: I know those aren't real functions

  6. #6
    Join Date
    Sep 2010
    Location
    Azeroth
    Posts
    395
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    to add artificial intelligence to your script would be revolutionary

  7. #7
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Depends on what do you want to change, you can pop up a form that will list a bunch of preset variables such as : player.integer[0]...etc and ask for change.

    Example:
    1: Script is running with smart.
    2: You press F2 and it asks you would you like to change player.integer[0]?
    3: Input the value.
    4: Script change it without stopping.

    Some people have made a smart talker with this, (Can't remember the script but it was a draynor yew cutter I believe). Where if they press F1, it asks the user what to talk.
    Oh Hai Dar

  8. #8
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    as Coh3n said about MSI

    i made a similar thing for MSI where you could change the players location during the runtime

    simply use something to write to a ini file, and then make the script check whether the contents have changed

    of course this would only work if one script was running at a time, hover if your smart enough you could have each instance of the script have its own ini file

    if the contents have changed the set the variables again

    actually now im thinking about it

    @Coh3n - do you think maybe we could get online somewhere and talk about the remote, i feel like its time to give it a overhaul and add some more features

    ~shut

  9. #9
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Have the script store all information to inis instead of variables, and you can edit the ini during runtime. I'm not sure how this would affect script speed though.

    However, I think OP was asking about changing how functions work during runtime - Nope!

  10. #10
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    It's possible through reading and writing to files. MSI does this with it's player remote. It allows you to pause the script, login to an inactive player, fix him, then reset him. Hopefully eventually all settings will be changeable during runtime.
    oh neat, that's like the old stats site.. you could reactivate your players via the web which was cool


    @OP you could set something up to read an ini file that you change to do different things
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  11. #11
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    A way to edit VARIABLES(not constants) during runtime would be to add a query to the script if you press a certain button

    pseudocode:
    Simba Code:
    if buttonisdown(f1) then
      if showquery('what variable would you like to change', vartochange) then
        case vartochange of
          'var1': if showquery('what would you like to change var1 to?', whattochangevarto) then
            var1 := whattochangevarto;
        end;

    EDIT: I know those aren't real functions
    Quote Originally Posted by Main Ftw View Post
    Depends on what do you want to change, you can pop up a form that will list a bunch of preset variables such as : player.integer[0]...etc and ask for change.

    Example:
    1: Script is running with smart.
    2: You press F2 and it asks you would you like to change player.integer[0]?
    3: Input the value.
    4: Script change it without stopping.

    Some people have made a smart talker with this, (Can't remember the script but it was a draynor yew cutter I believe). Where if they press F1, it asks the user what to talk.
    Uh...deja vu.....

  12. #12
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    @Coh3n - do you think maybe we could get online somewhere and talk about the remote, i feel like its time to give it a overhaul and add some more features

    ~shut
    The plan is to have the next MSI form work as the remote so we don't need an extra extension + form code, and EVERYTHING can be reset. The only issue is getting it to pop up during runtime. I have an idea that I'm 99% sure will work, but I'm not positive. We'll talk later.

    Quote Originally Posted by grats View Post
    oh neat, that's like the old stats site.. you could reactivate your players via the web which was cool
    The remote has been in MSI for probably a year now. >.<

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
  •