Newbie Spellweaver
- Joined
- Jun 22, 2004
- Messages
- 8
- Reaction score
- 0
Here is the gamenao code for Saga Revised to save the character data every 2mins to ensure no data is lost by a crash, Thanks to me of course and Gamenao.. sorry i didn't upload sources we actually have A LOT of changes and additions and i don't think it would be cool for everyone to just leach them because we put a lot of effort into coding the Normal AI and Boss AI and the fixes..
Enjoy, Acidx & gamenao.com
Inside Character.CS add this Around LASTLP_TICK
inside the function "public Character(uint CharacterId)" add this line
inside "public bool OnRegenerateHP()" add this code
Inside Client-Core.cs Add the following function
So easy a caveman can do it
Enjoy, Acidx & gamenao.com
Inside Character.CS add this Around LASTLP_TICK
Code:
/// <summary>
/// Acidx - Defines the last time character saved tick
/// </summary>
internal int LASTSAVE_TICK = 0;
inside the function "public Character(uint CharacterId)" add this line
Code:
this.LASTSAVE_TICK = Environment.TickCount;
inside "public bool OnRegenerateHP()" add this code
Code:
//Acidx Save implementation
if (Environment.TickCount - this.LASTSAVE_TICK > 90000)
{
this.LASTSAVE_TICK = Environment.TickCount;
this.bNeedsSave = true;
this.client.SaveCharacter();
}
Inside Client-Core.cs Add the following function
Code:
/// <summary>
/// Acidx - Save all Character data on a character timer
/// </summary>
public void SaveCharacter()
{
if (this.character != null)
{
Console.Write("Now Saving character data for {0}", this.character.Name);
Console.WriteLine();
Singleton.Database.SaveCharacter(this.character);
}
}
So easy a caveman can do it

