SRL Archive - Help

Changing setup in script when already running?


ry0240

2011-08-10 22:06:40

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?

mormonman

2011-08-10 22:12:04

You have to stop and recompile.

ry0240

2011-08-10 22:14:02

From: mormonman
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

2011-08-10 22:26:49

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.

mormonman

2011-08-10 22:28:36

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

2011-08-11 05:15:37

to add artificial intelligence to your script would be revolutionary

Main

2011-08-11 05:23:25

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

2011-08-11 05:26:52

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

2011-08-11 07:09:35

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

2011-08-11 07:24:51

From: Coh3n
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

mormonman

2011-08-11 07:36:38

From: mormonman
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 ;)


From: Main Ftw
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

2011-08-11 10:49:11

From: Shuttleu
@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. ;)

From: grats
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. >.<