Reveance Posted March 24, 2017 Share Posted March 24, 2017 I was wondering if it's possible to control a Script class from within a custom script. Ive seen the scriptexecutor instance and it has the methods required but I don't see how I can get access to the users available scripts and even if that were the case I think the scriptexecutor will terminate the script that is currently running to start the new one, no? Quote Link to comment Share on other sites More sharing options...
Explv Posted March 24, 2017 Share Posted March 24, 2017 Why Quote Link to comment Share on other sites More sharing options...
Team Cape Posted March 24, 2017 Share Posted March 24, 2017 2 hours ago, Reveance said: I was wondering if it's possible to control a Script class from within a custom script. Ive seen the scriptexecutor instance and it has the methods required but I don't see how I can get access to the users available scripts and even if that were the case I think the scriptexecutor will terminate the script that is currently running to start the new one, no? dont believe its possible to put scripts together like that. just make it one script. Quote Link to comment Share on other sites More sharing options...
BrainDeadGenius Posted March 24, 2017 Share Posted March 24, 2017 If it's something where you actually need two different scripts to run, where you can't get one script to do everything, you might as well have your own account manager that listens for changes on a database to tell the account manager when to run X script or Y script. Quote Link to comment Share on other sites More sharing options...
Final Posted March 24, 2017 Share Posted March 24, 2017 In almost every case, you would never require this. You simply have to abstract it differently, easiest way to think about it is having separate 'modules' (essentially just contain logic) and enable and disable them using the same event you was planning on using. 1 Quote Link to comment Share on other sites More sharing options...
Reveance Posted March 24, 2017 Author Share Posted March 24, 2017 (edited) Yes I agree with everything said but everything said only applies to custom scripts...I've bought a couple of scripts and would like to run a script of my own aside of those that would monitor some game data and send it back to my server. It would also allow me to automate more stuff easily Edited March 24, 2017 by Reveance Quote Link to comment Share on other sites More sharing options...
Reveance Posted March 24, 2017 Author Share Posted March 24, 2017 2 hours ago, BrainDeadGenius said: If it's something where you actually need two different scripts to run, where you can't get one script to do everything, you might as well have your own account manager that listens for changes on a database to tell the account manager when to run X script or Y script. This would actually apply to my situation however how do I run Script X from within my custom script without stopping my own script? Or whats ur take on how to do this? Quote Link to comment Share on other sites More sharing options...
BrainDeadGenius Posted March 24, 2017 Share Posted March 24, 2017 Like I said, you could have your custom script send data to a web server and have the CLI use that database to determine what script to run? But you'd have to stop the script (with the CLI, and have the CLI start the next script). You can't run two scripts at once on an account. That's not going to be possible. Quote Link to comment Share on other sites More sharing options...
Reveance Posted March 25, 2017 Author Share Posted March 25, 2017 2 hours ago, BrainDeadGenius said: Like I said, you could have your custom script send data to a web server and have the CLI use that database to determine what script to run? But you'd have to stop the script (with the CLI, and have the CLI start the next script). You can't run two scripts at once on an account. That's not going to be possible. Alright, that's too bad, seems like what I want to do, e.g. send gamedata to my own server via a custom script while running an official script isn't exactly possible :p Quote Link to comment Share on other sites More sharing options...
BrainDeadGenius Posted March 25, 2017 Share Posted March 25, 2017 3 minutes ago, Reveance said: Alright, that's too bad, seems like what I want to do, e.g. send gamedata to my own server via a custom script while running an official script isn't exactly possible :p So have the script you bought send the data. There's no need to have 2 scripts to do that, and it's easy to implement. Quote Link to comment Share on other sites More sharing options...
Reveance Posted March 25, 2017 Author Share Posted March 25, 2017 (edited) 5 minutes ago, BrainDeadGenius said: So have the script you bought send the data. There's no need to have 2 scripts to do that, and it's easy to implement. I know it's not hard to implement...but it's a premium script in the store...not a private script unfortunately :P the main thing is that I'd want to be able to run said script and when it's done run another...a plus woud be to be able send game data to my server so I can implement some fail safes if something happens EDIT: for example, if login screen detected -> alert me Edited March 25, 2017 by Reveance Quote Link to comment Share on other sites More sharing options...
Explv Posted March 29, 2017 Share Posted March 29, 2017 On 25/03/2017 at 2:13 AM, Reveance said: I know it's not hard to implement...but it's a premium script in the store...not a private script unfortunately :P the main thing is that I'd want to be able to run said script and when it's done run another...a plus woud be to be able send game data to my server so I can implement some fail safes if something happens EDIT: for example, if login screen detected -> alert me I have implemented this functionality (running one script after another) in my OSBot manager. The link is in my signature Quote Link to comment Share on other sites More sharing options...
Reveance Posted March 29, 2017 Author Share Posted March 29, 2017 7 minutes ago, Explv said: I have implemented this functionality (running one script after another) in my OSBot manager. The link is in my signature Ah nice! You're doing this using CLI so how do you decide to run the next script when it's from the SDN? Anyways thanks, will be a great help for sure! Quote Link to comment Share on other sites More sharing options...
Explv Posted March 29, 2017 Share Posted March 29, 2017 15 minutes ago, Reveance said: Ah nice! You're doing this using CLI so how do you decide to run the next script when it's from the SDN? Anyways thanks, will be a great help for sure! It will only run the next script if the current one stops. It does this by detecting the stop message in the log 1 Quote Link to comment Share on other sites More sharing options...
Reveance Posted March 29, 2017 Author Share Posted March 29, 2017 11 minutes ago, Explv said: It will only run the next script if the current one stops. It does this by detecting the stop message in the log Hadn't even thought of that, very clever :D! Thanks mate Quote Link to comment Share on other sites More sharing options...