[RELEASE]Great Save!

06/11/2010 15:34 .Summer#1
This is for tanels source :)
Is just a autosave. Go to Program.cs.
Search for:
Code:
public static System.Timers.Timer DropEventTimer = null;
user it put:
Code:
public static System.Timers.Timer Thetimer;
Now search for:
Code:
                MyThread CompanionThread = new MyThread();
                CompanionThread.Execute += new Execute(CompanionThread_Execute);
                CompanionThread.Start(100);
Above it paste:
Code:
                Thetimer = new System.Timers.Timer();
                Thetimer.Interval = 150000;
                Thetimer.Elapsed += new ElapsedEventHandler(Thetimer_Elapsed);
                Thetimer.Start();
Now search for:
Code:
static void MobThread_Execute()
above it paste:
Code:
        public static void Thetimer_Elapsed(object sender, ElapsedEventArgs e)
        {
                Console.WriteLine("Database have been autosaved.");
                Database.SaveKOs();
                Console.WriteLine("KOs saved.");
                Database.SaveEmpire();
                Console.WriteLine("Empire saved.");
                Features.Guilds.SaveGuilds();
                Console.WriteLine("Guilds saved.");
                Features.SkillsClass.Save();
                Console.WriteLine("Skills saved.");
        }
Done! :)
06/11/2010 18:21 .Summer#2
Quote:
Originally Posted by µ~Xero~µ View Post
NO?! SHIT! SERIOUSLY?!?! a7a! kosmk and enta fen.
#reported for insult + request ban.
06/11/2010 19:14 -impulse-#3
Quote:
Originally Posted by .Summer View Post
#reported for insult + request ban.
I do not agree with you on this. He's 100% right.
06/11/2010 19:24 scottdavey#4
A thread for a timer... seriously...
06/11/2010 19:25 ~Master#5
Good one .
06/12/2010 01:04 Arcо#6
Why don't you just search for LastSave.
Then add all that in that method.
No need for an entirely new thread :facepalm:
06/12/2010 01:29 .Summer#7
Is just from the 5017 LOL.
but this is diffently better, then the one thats already there.

Quote:
Originally Posted by scottdavey View Post
A thread for a timer... seriously...
There is no threads LOL
06/12/2010 01:31 Arcо#8
Quote:
Originally Posted by .Summer View Post
Is just from the 5017 LOL.
but this is diffently better, then the one thats already there.


There is no threads LOL
How is it better?
Why make a new method when one is already made?
06/12/2010 01:33 .Summer#9
Quote:
Originally Posted by scottdavey View Post
A thread for a timer... seriously...
Quote:
Originally Posted by .Arco View Post
How is it better?
Why make a new method when one is already made?
The other causes alot not save :)
This just save more, wich makes it better.
06/12/2010 01:34 Arcо#10
Quote:
Originally Posted by .Summer View Post
The other causes alot not save :)
This just save more, wich makes it better.
How does it cause a lot not to save?
It saves every couple of seconds.
Just add the other save methods inside of it.
06/12/2010 01:52 .Summer#11
Quote:
Originally Posted by .Arco View Post
How does it cause a lot not to save?
It saves every couple of seconds.
Just add the other save methods inside of it.
this was all i found of saving xD
06/12/2010 01:54 Arcо#12
Well go to character.cs and search for LastSave.
You'll see where tanel added a timer to save characters every 8 seconds.
Just add the other save methods inside of there.
06/12/2010 03:08 .Summer#13
ah thx :D
06/12/2010 14:52 Adziunia#14
yeah coz i made nearly same timer for saving but it was useless coz theres already timer which saves the server every 8 sec
06/13/2010 02:44 t_dubble_uu#15
not bad of an idea. Im currently just saving on each client ping to insure minimal to no rollbacks or lose of data.