View Full Version : Changing setup in script when already running?
ry0240
08-11-2011, 02:06 AM
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?
You have to stop and recompile.
ry0240
08-11-2011, 02:14 AM
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 =(
Coh3n
08-11-2011, 02:26 AM
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.
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:
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 ;)
wantonman
08-11-2011, 09:15 AM
to add artificial intelligence to your script would be revolutionary
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.
Shuttleu
08-11-2011, 09:26 AM
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
TomTuff
08-11-2011, 11:09 AM
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!
grats
08-11-2011, 11:24 AM
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
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:
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 ;)
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.....
Coh3n
08-11-2011, 02:49 PM
@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
~shutThe 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. ;)
oh neat, that's like the old stats site.. you could reactivate your players via the web which was coolThe remote has been in MSI for probably a year now. >.<
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.