Would like to setup...

Joined
Mar 26, 2012
Messages
1,459
Reaction score
130
I would like to setup an auto AFK system that would either place a shout next to the player or would say something in the normal chat to help keep the game client alive. I have searched for any kind of AFK system in ragezone without success due to the links being dead so I am seeking some help with this. Please if you have any idea of what I need to do or the coding for such an idea, it would be great. Thank you for taking the time to read this.
 


#define __PARTY_AFK
#define __AFK_STATE
 
I have added the coding from Virtuous but, am getting an error with the WorldServer.exe that is causing it to crash. I did debug with Visual Studio but, am unfamiliar with how to actually find the error so I am sharing the image from my server.



For the record, I searched out every afk string within the Virtuous source and copied it to mine. Then I compiled the source with no errors and everything runs. The only thing that happens is after logging in, selecting the server and after selecting my character, the WorldServer.exe crashes upon entering the game. There are no logs, just what I can gather from Visual Studio debugger but, this I am very unfamiliar with.
 
Last edited:
Ok here is a more finite look at the error that I am having. Any suggestions? Thank you.

template <class T> void CItemContainer<T>::Serialize( CAr & ar ) // 0-673 // 466-631
{
DWORD adwObjIndex[128];

unsigned char chSize = 0;

if( ar.IsStoring() )
{

ar.Write( m_apIndex, sizeof(DWORD) * m_dwItemMax );

u_long uOffset = ar.GetOffset();
ar << chSize;

for( u_char ch = 0; ch < m_dwItemMax; ch++ ) // 0-504
{
if( m_apItem[ch].IsEmpty() == FALSE )
{
ar << ch;
m_apItem[ch].Serialize( ar );
chSize++;
}
adwObjIndex[ch] = m_apItem[ch].m_dwObjIndex;
}

ar.Write( adwObjIndex, sizeof(DWORD) * m_dwItemMax );

int nBufSize;
LPBYTE lpBuf = ar.GetBuffer( &nBufSize );
*( lpBuf + uOffset ) = chSize;
}
else
{
ar.Read( m_apIndex, sizeof(DWORD) * m_dwItemMax );
// Clear
for( u_long i = 0; i < m_dwItemMax; i++ )
m_apItem.Empty();

ar >> chSize;

unsigned char ch;
for( int i = 0; i < chSize; i++ )<<<This seems to be the error.
{
ar >> ch;
m_apItem[ch].Serialize( ar );
}

ar.Read( adwObjIndex, sizeof(DWORD) * m_dwItemMax );
for( DWORD i = 0; i < m_dwItemMax; i++ )<<<This seems to be the error.
{
m_apItem.m_dwObjIndex = adwObjIndex;
}
}
}
I removed the int and DWORD from the coding to mimic that of Virtuous but, it causes more issues. So I am unsure as what to do in this circumstance.

Update - Redid the coding and now it works.
 
Last edited:
I love the way this is setup. Is there anyway that I can use this system to send a message or shout to the server every 3 minutes to help keep the client/server connection alive while away from the computer? Any ideas would be great. Thank you.
 
Last edited:
Back