- Joined
- Mar 26, 2012
- Messages
- 1,465
- Reaction score
- 131
I am trying to set this up so that it will repeat the text "You character is still AFK" anywhere from 1 minute to 3 minutes consistently. I can get it to repeat itself but, it is constantly and not allowing any breaks in between. My kidney failure is really screwing with me because it should be so simple to do but, I can't focus. My ultimate goal is to change this so that it will be a keep alive system in game because it is always disconnecting after leaving the client opened and not doing anything with for a while. It is quite frustrating. Can someone offer a hand with this? Thank you.
You must be registered to see links
CUser * pUser = ((CUser*)this);
int i = 1;<< This should represent minutes
if(IsAfk() && GetTickCount() - pUser->m_dwLastWalkTick >= MIN( i++ ))//Set timer based on each minute or 2 or etc...Right now it is popping up constantly instead of doing it only once a minute
{
g_UserMng.UpdateAfkState(pUser);
pUser->AddText("You character is still AFK.");
return;
}
if( GetTickCount() - pUser->m_dwLastWalkTick >= MIN( 1 ) ) //hier wird die Zeit eingestellt!
{
if(!IsAfk())
{
m_bAfk = TRUE;
g_UserMng.UpdateAfkState(pUser);
pUser->AddText("You will now be displayed as AFK.");
}
}