DarkZone Posted March 10, 2018 Share Posted March 10, 2018 Do anyone know why i try to make on to reset a open chest it doesn't work but it work's when i use it as a player switch? Link to comment Share on other sites More sharing options...
1 Peaverin Posted March 10, 2018 Share Posted March 10, 2018 One solution with the event system would be as follows:  Let's say you have 2 chests that you want to reset each week. Suppose the switches are "Chest1" and "Chest2". Create a player variable. I'll call it "Reset Chests". First it is set to 0.  Now let's say a week passes and you want to reset all those switches for every player. Create a Common Event. Trigger: "Autorun". Execution condition: player variable "Reset Chests" does not equal to 1. In this event you set "chest1", "chest2" to false. Also, you set the "Reset Chests" variable to 1, so the reset won't happen again for that player. Let's say one more week passes, what do you do now? Easy, you just go to the same common event and change the execution condition to player variable "Reset Chests" does not equal to 2. Then, instead of setting that same variable to 1, you set it to 2. The only problem here is that you still have to manually change those two values each week, although it's a lot easier than manually changing the switches from the database (unless you have a script that automatically does that).  jcsnider 1 Link to comment Share on other sites More sharing options...
0 Khaikaa Posted March 10, 2018 Share Posted March 10, 2018 show the mechanisms Link to comment Share on other sites More sharing options...
0 DarkZone Posted March 10, 2018 Author Share Posted March 10, 2018 Here is the global switch and variable. Link to comment Share on other sites More sharing options...
0 jcsnider Posted March 10, 2018 Share Posted March 10, 2018 Global switches and variables are for the entire server and at e same value for everyone!  If you want every player to open your chest once you have to use player switches and variables. Link to comment Share on other sites More sharing options...
0 DarkZone Posted March 10, 2018 Author Share Posted March 10, 2018 I have it set so they can open it once but once a week or once a month i want to be able to reset all of them for everyone using one event And rite now it only reset for a single player who use's the player switch event Link to comment Share on other sites More sharing options...
0 jcsnider Posted March 10, 2018 Share Posted March 10, 2018 Sadly that is not possible at this time. The only solution in that case would be to manually open the database and reset the switch for all players once a week. Link to comment Share on other sites More sharing options...
0 gallighanmaker Posted March 10, 2018 Share Posted March 10, 2018 @NewWun i can make a script for do that if you request. Link to comment Share on other sites More sharing options...
0 DarkZone Posted March 10, 2018 Author Share Posted March 10, 2018 If it isn't to much trouble for you that would be nice XD Link to comment Share on other sites More sharing options...
0 gallighanmaker Posted March 11, 2018 Share Posted March 11, 2018 @NewWun  Hello mate, i make a script for do that, here is the download link: CustomScript_IntersectEngine.zip  Instructions:  There is two main files: CSharpConnector.exe and config.ini  [CONFIG] ;your database path DatabasePath=C:\Engine 2D\Intersect Engine\Intersect Engine Beta 4.8.1\Intersect Engine Beta 4.8.1\Server\resources\intersect.db  ;delete all player switches change value to 1 DeletePlayerSwitch=0  ;delete all player variables change value to 1 DeletePlayerVariable=0  ;delete all server switches change value to 1 DeleteServerSwitch=0  ;delete all server variables change value to 1DeleteServerVariable=0  Observation My script creates a backup file before executing the commands in folder where it is running exe file in a bkp sub directory.  Conclusion  After choosing what to delete in the configuration file, just run CSharpConnector.exe  If you want to run the script on a specific date or specific time, I recomend you to use windows scheduler itself, it does that for you, that is, just schedule it with your own routines.  Any questions just let me know, I hope I have helped you.    Agoraphobic and DarkZone 2 Link to comment Share on other sites More sharing options...
0 DarkZone Posted March 11, 2018 Author Share Posted March 11, 2018 It works but the player options deletes them from the editor And the server options causes the server to crash when i login Link to comment Share on other sites More sharing options...
Question
DarkZone
Do anyone know why i try to make on to reset a open chest it doesn't work but it work's when i use it as a player switch?
Link to comment
Share on other sites
10 answers to this question
Recommended Posts