26 lines
512 B
Plaintext
26 lines
512 B
Plaintext
#include "aps_include"
|
|
|
|
void main()
|
|
{
|
|
// HP Regen System
|
|
ExecuteScript("regen_mod_hb", OBJECT_SELF);
|
|
|
|
|
|
// Temporary fix to database idle shutdown - ping DB periodically
|
|
int iCount = GetLocalInt(OBJECT_SELF, "PING_COUNTDOWN");
|
|
|
|
if(iCount <= 0)
|
|
{
|
|
iCount = 300;
|
|
string sSQL = "SELECT * FROM pwdata";
|
|
SQLExecDirect(sSQL);
|
|
SQLFetch();
|
|
SQLGetData(1);
|
|
}
|
|
else
|
|
{
|
|
iCount--;
|
|
}
|
|
SetLocalInt(OBJECT_SELF, "PING_COUNTDOWN", iCount);
|
|
}
|