Apocalypse Code
This the commented most important part, but there mag cfg, login, admincommands, and lot of places you may gave to adjust....
//**************************************************************************************
// HBx server introduced only the skeletton off Apocalypse functions, and sometime not so good!
// I rewrote them, maybe not following the "official" pattern but it works!
// I also needed to add many new functions.
//**************************************************************************************
// SNOOPY: GlobalStartApocalypseMode
// Called by: by local command or GM command
// -> Notify all game servers to start apocalypse
// -> Used to force Open or Closed the initial Gates
//**************************************************************************************
void CGame::GlobalStartApocalypseMode(int iClientH, int iMode)
{ char * cp, cData[120];
DWORD * dwp, dwApocalypseGUID;
char cString[200];
ZeroMemory(cString, sizeof(cString));
if ((iClientH != 0) && (m_pClientList[iClientH]->m_iAdminUserLevel < 3)) {
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_ADMINUSERLEVELLOW, NULL, NULL, NULL, NULL);
return;
}
if ((m_bIsApocalypseMode == TRUE) && (iMode == 0)) return;
if (m_bIsHeldenianMode == TRUE) return;
if (m_bIsCrusadeMode == TRUE) return;
switch (iMode){
case 1: // Force open Gates
dwApocalypseGUID = 1;
if (iClientH !=0)
{ wsprintf(G_cTxt, "Admin Order(%s): /openapocalypsegate \tAdminIP(%s)"
, m_pClientList[iClientH]->m_cCharName
, m_pClientList[iClientH]->m_cIPaddress);
wsprintf(cString, "Apocalypse gate opening in progress.");
}else
{ wsprintf(G_cTxt, "Local command: openapocalypsegate");
};
break;
case 2: // Force close gates
dwApocalypseGUID = 2;
if (iClientH !=0)
{ wsprintf(G_cTxt, "Admin Order(%s): /closeapocalypsegate \tAdminIP(%s)"
, m_pClientList[iClientH]->m_cCharName
, m_pClientList[iClientH]->m_cIPaddress);
wsprintf(cString, "Apocalypse gate closing in progress.");
}else
{ wsprintf(G_cTxt, "Local command: closeapocalypsegate");
};
break;
case 0: // Start Apocalypse
dwApocalypseGUID = timeGetTime();
if (dwApocalypseGUID < 10) dwApocalypseGUID += 10;
if (iClientH !=0)
{ wsprintf(G_cTxt, "Admin Order(%s): /beginapocalypse \tAdminIP(%s)"
, m_pClientList[iClientH]->m_cCharName
, m_pClientList[iClientH]->m_cIPaddress);
wsprintf(cString, "Apocalypse starting in progress.");
}else
{ wsprintf(G_cTxt, "Local command: beginapocalypse");
};
break;
}
PutAdminLogFileList(G_cTxt);
PutLogEventFileList(G_cTxt);
PutLogList(G_cTxt);
if (iClientH !=0)
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cString);
}
ZeroMemory(cData, sizeof(cData));
cp = (char *)cData;
*cp = GSM_BEGINAPOCALYPSE;
cp++;
dwp = (DWORD *)cp;
*dwp = dwApocalypseGUID;
cp += 4;
bStockMsgToGateServer(cData, 5);
LocalStartApocalypse(dwApocalypseGUID); // Gate will no return order to this server
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// LocalStartApocalypse
// called by: started by Gate msg
// -> Notify players
// -> Opens the gates
// -> Prevent npc generation on "kill all to go out" maps
// -> Execute local Openning or closing gates by GM command
//**************************************************************************************
void CGame::LocalStartApocalypse(DWORD dwApocalypseGUID)
{ if (dwApocalypseGUID == 1)// Means want to open Gate
{ ForceOpen_ApocalypseGate();
return;
}
if (dwApocalypseGUID == 2)// Means want to open Gate
{ ForceClose_ApocalypseGate();
return;
}
register int i;
m_bIsApocalypseMode = TRUE;
if (dwApocalypseGUID != NULL)
{ _CreateApocalypseGUID(dwApocalypseGUID);
m_dwApocalypseGUID = dwApocalypseGUID;
m_dwApocalypseGateOpenTime = dwApocalypseGUID;
m_dwApocalypseGateCloseTime = dwApocalypseGUID +20*60*1000; // will close in 20 minutes
}
for (i = 1; i < DEF_MAXCLIENTS; i++)
{ if (m_pClientList != NULL)
{ SendNotifyMsg(NULL, i, DEF_NOTIFY_APOCGATESTARTMSG, NULL, NULL, NULL, NULL);
}
}
for (i = 0; i < DEF_MAXMAPS; i++)
{ if (m_pMapList != NULL)
{ if (m_pMapList->m_iApocalypseMobGenType != 0)
//1 for no respawn, 2 for Boss spawn when map empty
{ m_pMapList->m_iMaximumObjectDefault = m_pMapList->m_iMaximumObject;
m_pMapList->m_iMaximumObject = 0;
}
}
}
OpenCloseApocalypseGate();
wsprintf(G_cTxt,"(!)Apocalypse Mode ON.");
PutLogEventFileList(G_cTxt);
PutLogList(G_cTxt);
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// GlobalEndApocalypseMode:
// -> Notify all game servers
//**************************************************************************************
void CGame::GlobalEndApocalypseMode(int iClientH)
{ char * cp, cData[120];
if (m_bIsApocalypseMode == FALSE) return;
if (iClientH > 0)
{ wsprintf(G_cTxt, "Admin Order(%s): /endapocalypse \tAdminIP(%s)"
, m_pClientList[iClientH]->m_cCharName
, m_pClientList[iClientH]->m_cIPaddress);
char cString[200];
ZeroMemory(cString, sizeof(cString));
wsprintf(cString, "Apocalypse ending in progress.");
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cString);
}else
{ wsprintf(G_cTxt, "Automated: endapocalypse");
}
PutAdminLogFileList(G_cTxt);
PutLogEventFileList(G_cTxt);
PutLogList(G_cTxt);
ZeroMemory(cData, sizeof(cData));
cp = (char *)cData;
*cp = GSM_ENDAPOCALYPSE;
cp++;
bStockMsgToGateServer(cData, 5);
LocalEndApocalypse(); // Gate will not return order to this server
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// LocalEndApocalypse: started by Gate msg
// -> Notify players
// -> Close the gates
// -> Enable npc generation on all maps
//**************************************************************************************
void CGame::LocalEndApocalypse()
{ register int i;
m_bIsApocalypseMode = FALSE;
m_bIsApocalypseGateOpen = FALSE;
WORD dwTime = timeGetTime();
m_dwApocalypseGateCloseTime = dwTime -1;
m_dwApocalypseGateOpenTime = dwTime -100; // alreaddy closed
for (i = 1; i < DEF_MAXCLIENTS; i++)
{ if (m_pClientList != NULL)
{ SendNotifyMsg(NULL, i, DEF_NOTIFY_APOCGATEENDMSG, NULL, NULL, NULL, NULL);
if ( (m_pClientList->m_iAdminUserLevel == 0)
&& (m_pMapList[m_pClientList->m_cMapIndex]->m_bIsApocalypseMap == TRUE))
{ // forced recall
SendNotifyMsg(NULL, i, DEF_NOTIFY_TOBERECALLED, NULL, NULL, NULL, NULL);
RequestTeleportHandler(i, "0 ");
}
}
}
// restore normal spawn on apoc maps
for (i = 0; i < DEF_MAXMAPS; i++)
{ if (m_pMapList != NULL)
{ if (m_pMapList[i]->m_iApocalypseMobGenType != 0)
//1 for not respawn, 2 for Boss spawn.
{ m_pMapList[i]->m_iMaximumObject = m_pMapList[i]->m_iMaximumObjectDefault;
}
if (m_pMapList[i]->m_cDynamicGateType == 4 )
{ m_pMapList[i]->m_cDynamicGateType = 3;
}
if (m_pMapList[i]->m_cDynamicGateType == 2)
{ GenerateSlime(i); // to force the gate to close
}
Open_EmptyMap_Gate(i);
}
}
wsprintf(G_cTxt,"(!)Apocalypse Mode OFF.");
PutLogEventFileList(G_cTxt);
PutLogList(G_cTxt);
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// OpenCloseApocalypseGate
// Called by ::ForceOpen_ApocalypseGate, ::ForceClose_ApocalypseGate
// Called by ::LocalStartApocalypse
// Check if Gates's needs to be openned or closed
// then notify any change to all clients.on current server
// NB: Opens/closes only type 1 Gates
//**************************************************************************************
void CGame::OpenCloseApocalypseGate()
{ DWORD dwTime = timeGetTime();
BOOL bIsOpen = m_bIsApocalypseGateOpen;
if ( (dwTime >= m_dwApocalypseGateOpenTime)
&& (dwTime < m_dwApocalypseGateCloseTime))
{ m_bIsApocalypseGateOpen = TRUE;
}else
{ m_bIsApocalypseGateOpen = FALSE;
}
// If nothing has changed return...
if (bIsOpen == m_bIsApocalypseGateOpen) return;
if (m_bIsApocalypseGateOpen == TRUE)
{ wsprintf(G_cTxt,"(!)Apocalypse Gate opened.");
}else
{ wsprintf(G_cTxt,"(!)Apocalypse Gate closed.");
}
PutLogList(G_cTxt);
PutLogEventFileList(G_cTxt);
// Then notify all clients of change,
register int i;
for (i = 1; i < DEF_MAXCLIENTS; i++)
{ if (m_pClientList[i] != NULL)
{ Notify_ApocalypseGateState(i);
}
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// Notify_ApocalypseGateState
// Called by ::RequestInitDataHandler (when client log in)
// Called by ::RequestTeleportHandler (when client changes map on same server)
// Called by ::OpenCloseApocalypseGate (when Gate is openned or closed)
// Notify the client of Gate's state, needed to show in player's screen
//**************************************************************************************
void CGame::Notify_ApocalypseGateState(int iClientH)
{ if (iClientH <= 0) return;
if (m_pClientList[iClientH] <= 0) return;
if (m_pClientList[iClientH]->m_bIsInitComplete == FALSE) return;
int iMapIndex = m_pClientList[iClientH]->m_cMapIndex;
int gX, gY;
gX = (m_pMapList[iMapIndex]->m_sDynamicGateCoordRectX1 + m_pMapList[iMapIndex]->m_sDynamicGateCoordRectX2)/2;
gY = (m_pMapList[iMapIndex]->m_sDynamicGateCoordRectY1 + m_pMapList[iMapIndex]->m_sDynamicGateCoordRectY2)/2;
switch (m_pMapList[iMapIndex]->m_cDynamicGateType){
case 0: // No gate on current map
if(m_bIsApocalypseGateOpen == TRUE)
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEOPEN, 0, 0, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATESTARTMSG, NULL, NULL, NULL, NULL);
}else
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATECLOSE, 0, 0, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEENDMSG, NULL, NULL, NULL, NULL);
}
break;
case 1: // Initial Dynamic gates (toh, IB, D4...)
if(m_bIsApocalypseGateOpen == TRUE)
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEOPEN, gX, gY, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATESTARTMSG, NULL, NULL, NULL, NULL);
}else
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATECLOSE, gX, gY, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEENDMSG, NULL, NULL, NULL, NULL);
}
break;
case 2: // Empty maps Dynamic gates (inferniaA, inferniaB, procella...)
if (m_pMapList[iMapIndex]->m_iTotalAliveObject == 0)
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEOPEN, gX, gY, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATESTARTMSG, NULL, NULL, NULL, NULL);
}else
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATECLOSE, gX, gY , NULL, m_pClientList[iClientH]->m_cMapName);
}
break;
case 3: // Hide the n°3 gates ..
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATECLOSE, gX, gY, NULL, m_pClientList[iClientH]->m_cMapName);
break;
case 4: // Show the gate on abaddon map..when Abaddon spawning.
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEOPEN, gX, gY, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATESTARTMSG, NULL, NULL, NULL, NULL);
break;
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// Use_ApocalypseGate
// Called by ::CheckClientResponseTime()
// Test if client uses Dynamic Gate, then TP him
//**************************************************************************************
void CGame::Use_ApocalypseGate(int iClientH)
{ if (iClientH <= 0) return;
if (m_pClientList[iClientH] <= 0) return;
if (m_pClientList[iClientH]->m_bIsInitComplete == FALSE) return;
if (m_bIsApocalypseMode == FALSE) return;
int iMapIndex = m_pClientList[iClientH]->m_cMapIndex;
if (m_pMapList[iMapIndex]->m_cDynamicGateType == 0 ) return; // No Dynamic Gate on this map
if ( (m_pMapList[iMapIndex]->m_cDynamicGateType == 1 )
&& (m_bIsApocalypseGateOpen == FALSE))
return; // Dynamic Gate is closed
if ( (m_pMapList[iMapIndex]->m_cDynamicGateType == 2 )
&& (m_pMapList[iMapIndex]->m_iTotalAliveObject != 0))
return; // There are still creatures on the map
if (m_pMapList[iMapIndex]->m_cDynamicGateType == 3 )
return; // Type 3 will be changed to 4 at Abaddons spawning.
if ( (m_pClientList[iClientH]->m_sX >= m_pMapList[iMapIndex]->m_sDynamicGateCoordRectX1)
&& (m_pClientList[iClientH]->m_sX <= m_pMapList[iMapIndex]->m_sDynamicGateCoordRectX2)
&& (m_pClientList[iClientH]->m_sY >= m_pMapList[iMapIndex]->m_sDynamicGateCoordRectY1)
&& (m_pClientList[iClientH]->m_sY <= m_pMapList[iMapIndex]->m_sDynamicGateCoordRectY2))
{ RequestTeleportHandler(iClientH, "2 "
, m_pMapList[iMapIndex]->m_cDynamicGateCoordDestMap
, m_pMapList[iMapIndex]->m_sDynamicGateCoordTgtX
, m_pMapList[iMapIndex]->m_sDynamicGateCoordTgtY);
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// Open_EmptyMap_Gate
// Called by ::NpcKilledHandler when last npc killed on map
// Show just openned gates to the client
//**************************************************************************************
void CGame::Open_EmptyMap_Gate(int MapIndex)
{ if (m_pMapList[MapIndex]->m_cDynamicGateType < 2 ) return;
//if (m_pMapList[MapIndex]->m_cDynamicGateType == 3 ) return;
register int i;
for (i = 1; i < DEF_MAXCLIENTS; i++)
{ if (m_pClientList[i] == NULL) continue;
if (m_pClientList[i]->m_cMapIndex != MapIndex) continue;
Notify_ApocalypseGateState(i);
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// GenerateApocalypseBoss
// Called by ::NpcKilledHandler
// Creates the appropriate npc depending on map definition file
// then change the Dynamic Gate type from 3 to 4 (to open it)
//**************************************************************************************
void CGame::GenerateApocalypseBoss(int MapIndex)
{ if (m_pMapList[MapIndex]->m_iTotalAliveObject != 0) return;
char cName[21], cNpcName[21], cNpcWaypoint[11];
int x, i5;
int iNamingValue;
ZeroMemory(cNpcWaypoint, sizeof(cNpcWaypoint));
iNamingValue = m_pMapList[MapIndex]->iGetEmptyNamingValue();
if (iNamingValue == -1)
{}else
{ ZeroMemory(cNpcName, sizeof(cNpcName));
switch (m_pMapList[MapIndex]->m_iApocalypseBossMobNpcID) {
case 0: return; break;
case 49: strcpy(cNpcName, "Hellclaw");break;
case 50: strcpy(cNpcName, "Tigerworm");break;
case 66: strcpy(cNpcName, "Wyvern");break;
case 73: strcpy(cNpcName, "Fire-Wyvern");break;
case 81: strcpy(cNpcName, "Abaddon");break;
default: strcpy(cNpcName, "Demon");break;
}
ZeroMemory(cName, sizeof(cName));
wsprintf(cName, "XX%d", iNamingValue);
cName[0] = '_';
cName[1] = MapIndex+65;
if (bCreateNewNpc(cNpcName, cName, m_pMapList[MapIndex]->m_cName, 0, 0
, DEF_MOVETYPE_RANDOMAREA, NULL, NULL, cNpcWaypoint, &m_pMapList[MapIndex]->m_sApocalypseBossMobRect, NULL, -1, FALSE, FALSE, FALSE, TRUE) == FALSE)
{ m_pMapList[MapIndex]->SetNamingValueEmpty(iNamingValue);
}
else
{ wsprintf(G_cTxt, "(!) %s has spawned in %s"
, cNpcName
, m_pMapList[MapIndex]->m_cName);
PutLogList(G_cTxt);
PutLogFileList(G_cTxt);
PutLogEventFileList(G_cTxt);
}
// Search npc ID
for (i5 = 1; i5 < DEF_MAXNPCS; i5++)
{ if ((m_pNpcList[i5] != NULL) && (memcmp(m_pNpcList[i5]->m_cName, cName, 5) == 0) )
{ break;
}
}
// Show Spawns on minimap, and tell everybody on Apocalypse server.
for (x = 1; x < DEF_MAXCLIENTS; x++)
if ( (m_pClientList[x] != NULL)
&& (m_pClientList[x]->m_bIsInitComplete == TRUE))
{ if(memcmp(m_pMapList[MapIndex]->m_cName, m_pMapList[m_pClientList[x]->m_cMapIndex]->m_cName, strlen(m_pMapList[MapIndex]->m_cName)) == 0)
{ SendNotifyMsg(NULL, x, DEF_NOTIFY_SPAWNEVENT, m_pNpcList[i5]->m_sX, m_pNpcList[i5]->m_sY, m_pMapList[MapIndex]->m_iApocalypseBossMobNpcID, NULL, NULL, NULL);
}
// Tell everybody on this server if Abaddon has appeared
if (m_pMapList[MapIndex]->m_iApocalypseBossMobNpcID == 81)
{ char cInfoString[100];
ZeroMemory(cInfoString, sizeof(cInfoString));
wsprintf(cInfoString, "Abbadon has appeared ...");
SendNotifyMsg(NULL, x, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cInfoString);
}
}
// Prepare Abaddon's death, and Apocalypse end.
if (m_pMapList[MapIndex]->m_iApocalypseBossMobNpcID == 81)
{ // Abaddon should die by himself
DWORD dwTime = timeGetTime();
dwTime += 1000*60*5; // 5 minute
bRegisterDelayEvent(DEF_DELAYEVENTTYPE_KILL_ABADDON, 0, dwTime, i5
, DEF_OWNERTYPE_NPC, MapIndex, 0, 0, 0, 0, 0);
dwTime = timeGetTime();
dwTime += 1000*60*15; // 15 minutes
bRegisterDelayEvent(DEF_DELAYEVENTTYPE_END_APOCALYPSE, 0, dwTime, 0
, 0, MapIndex, 0, 0, 0, 0, 0);
}
// Finally open the Exit Gate if type 3 & not 2
if (m_pMapList[MapIndex]->m_cDynamicGateType == 3 )
{ m_pMapList[MapIndex]->m_cDynamicGateType = 4;
Open_EmptyMap_Gate(MapIndex);
}
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// GenerateSlime
// Generate a npc now to close the gate
//**************************************************************************************
void CGame::GenerateSlime(int MapIndex)
{
if (m_pMapList[MapIndex]->m_iTotalAliveObject != 0) return;
char cName[21], cNpcName[21], cNpcWaypoint[11];
int iNamingValue;
ZeroMemory(cNpcWaypoint, sizeof(cNpcWaypoint));
iNamingValue = m_pMapList[MapIndex]->iGetEmptyNamingValue();
if (iNamingValue == -1) {
}
else {
strcpy(cNpcName, "Slime");
ZeroMemory(cName, sizeof(cName));
wsprintf(cName, "XX%d", iNamingValue);
cName[0] = '_';
cName[1] = MapIndex+65;
if (bCreateNewNpc(cNpcName, cName, m_pMapList[MapIndex]->m_cName, 0, 0
, DEF_MOVETYPE_RANDOMAREA, NULL, NULL, cNpcWaypoint, &m_pMapList[MapIndex]->m_sApocalypseBossMobRect, NULL, NULL, FALSE, FALSE, FALSE, TRUE) == FALSE)
{ m_pMapList[MapIndex]->SetNamingValueEmpty(iNamingValue);
}
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// ForceOpen_ApocalypseGate
// Local execution off a global GM command to force open the gate
// Beware this will affect only current server
//**************************************************************************************
void CGame::ForceOpen_ApocalypseGate()
{ if (m_bIsApocalypseMode == FALSE) return;
DWORD dwTime = timeGetTime();
m_dwApocalypseGateOpenTime = dwTime;
m_dwApocalypseGateCloseTime = dwTime +15*60*1000; // will close in 15 minutes
OpenCloseApocalypseGate();
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// ForceClose_ApocalypseGate
// GM command to force open the gate
// Beware this will affect only current server
//**************************************************************************************
void CGame::ForceClose_ApocalypseGate()
{ if (m_bIsApocalypseMode == FALSE) return;
DWORD dwTime = timeGetTime();
m_dwApocalypseGateCloseTime = dwTime -1;
m_dwApocalypseGateOpenTime = dwTime -100; // alreaddy closed
OpenCloseApocalypseGate();
}
//**************************************************************************************
//**************************************************************************************
// HBx server introduced only the skeletton off Apocalypse functions, and sometime not so good!
// I rewrote them, maybe not following the "official" pattern but it works!
// I also needed to add many new functions.
//**************************************************************************************
// SNOOPY: GlobalStartApocalypseMode
// Called by: by local command or GM command
// -> Notify all game servers to start apocalypse
// -> Used to force Open or Closed the initial Gates
//**************************************************************************************
void CGame::GlobalStartApocalypseMode(int iClientH, int iMode)
{ char * cp, cData[120];
DWORD * dwp, dwApocalypseGUID;
char cString[200];
ZeroMemory(cString, sizeof(cString));
if ((iClientH != 0) && (m_pClientList[iClientH]->m_iAdminUserLevel < 3)) {
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_ADMINUSERLEVELLOW, NULL, NULL, NULL, NULL);
return;
}
if ((m_bIsApocalypseMode == TRUE) && (iMode == 0)) return;
if (m_bIsHeldenianMode == TRUE) return;
if (m_bIsCrusadeMode == TRUE) return;
switch (iMode){
case 1: // Force open Gates
dwApocalypseGUID = 1;
if (iClientH !=0)
{ wsprintf(G_cTxt, "Admin Order(%s): /openapocalypsegate \tAdminIP(%s)"
, m_pClientList[iClientH]->m_cCharName
, m_pClientList[iClientH]->m_cIPaddress);
wsprintf(cString, "Apocalypse gate opening in progress.");
}else
{ wsprintf(G_cTxt, "Local command: openapocalypsegate");
};
break;
case 2: // Force close gates
dwApocalypseGUID = 2;
if (iClientH !=0)
{ wsprintf(G_cTxt, "Admin Order(%s): /closeapocalypsegate \tAdminIP(%s)"
, m_pClientList[iClientH]->m_cCharName
, m_pClientList[iClientH]->m_cIPaddress);
wsprintf(cString, "Apocalypse gate closing in progress.");
}else
{ wsprintf(G_cTxt, "Local command: closeapocalypsegate");
};
break;
case 0: // Start Apocalypse
dwApocalypseGUID = timeGetTime();
if (dwApocalypseGUID < 10) dwApocalypseGUID += 10;
if (iClientH !=0)
{ wsprintf(G_cTxt, "Admin Order(%s): /beginapocalypse \tAdminIP(%s)"
, m_pClientList[iClientH]->m_cCharName
, m_pClientList[iClientH]->m_cIPaddress);
wsprintf(cString, "Apocalypse starting in progress.");
}else
{ wsprintf(G_cTxt, "Local command: beginapocalypse");
};
break;
}
PutAdminLogFileList(G_cTxt);
PutLogEventFileList(G_cTxt);
PutLogList(G_cTxt);
if (iClientH !=0)
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cString);
}
ZeroMemory(cData, sizeof(cData));
cp = (char *)cData;
*cp = GSM_BEGINAPOCALYPSE;
cp++;
dwp = (DWORD *)cp;
*dwp = dwApocalypseGUID;
cp += 4;
bStockMsgToGateServer(cData, 5);
LocalStartApocalypse(dwApocalypseGUID); // Gate will no return order to this server
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// LocalStartApocalypse
// called by: started by Gate msg
// -> Notify players
// -> Opens the gates
// -> Prevent npc generation on "kill all to go out" maps
// -> Execute local Openning or closing gates by GM command
//**************************************************************************************
void CGame::LocalStartApocalypse(DWORD dwApocalypseGUID)
{ if (dwApocalypseGUID == 1)// Means want to open Gate
{ ForceOpen_ApocalypseGate();
return;
}
if (dwApocalypseGUID == 2)// Means want to open Gate
{ ForceClose_ApocalypseGate();
return;
}
register int i;
m_bIsApocalypseMode = TRUE;
if (dwApocalypseGUID != NULL)
{ _CreateApocalypseGUID(dwApocalypseGUID);
m_dwApocalypseGUID = dwApocalypseGUID;
m_dwApocalypseGateOpenTime = dwApocalypseGUID;
m_dwApocalypseGateCloseTime = dwApocalypseGUID +20*60*1000; // will close in 20 minutes
}
for (i = 1; i < DEF_MAXCLIENTS; i++)
{ if (m_pClientList != NULL)
{ SendNotifyMsg(NULL, i, DEF_NOTIFY_APOCGATESTARTMSG, NULL, NULL, NULL, NULL);
}
}
for (i = 0; i < DEF_MAXMAPS; i++)
{ if (m_pMapList != NULL)
{ if (m_pMapList->m_iApocalypseMobGenType != 0)
//1 for no respawn, 2 for Boss spawn when map empty
{ m_pMapList->m_iMaximumObjectDefault = m_pMapList->m_iMaximumObject;
m_pMapList->m_iMaximumObject = 0;
}
}
}
OpenCloseApocalypseGate();
wsprintf(G_cTxt,"(!)Apocalypse Mode ON.");
PutLogEventFileList(G_cTxt);
PutLogList(G_cTxt);
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// GlobalEndApocalypseMode:
// -> Notify all game servers
//**************************************************************************************
void CGame::GlobalEndApocalypseMode(int iClientH)
{ char * cp, cData[120];
if (m_bIsApocalypseMode == FALSE) return;
if (iClientH > 0)
{ wsprintf(G_cTxt, "Admin Order(%s): /endapocalypse \tAdminIP(%s)"
, m_pClientList[iClientH]->m_cCharName
, m_pClientList[iClientH]->m_cIPaddress);
char cString[200];
ZeroMemory(cString, sizeof(cString));
wsprintf(cString, "Apocalypse ending in progress.");
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cString);
}else
{ wsprintf(G_cTxt, "Automated: endapocalypse");
}
PutAdminLogFileList(G_cTxt);
PutLogEventFileList(G_cTxt);
PutLogList(G_cTxt);
ZeroMemory(cData, sizeof(cData));
cp = (char *)cData;
*cp = GSM_ENDAPOCALYPSE;
cp++;
bStockMsgToGateServer(cData, 5);
LocalEndApocalypse(); // Gate will not return order to this server
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// LocalEndApocalypse: started by Gate msg
// -> Notify players
// -> Close the gates
// -> Enable npc generation on all maps
//**************************************************************************************
void CGame::LocalEndApocalypse()
{ register int i;
m_bIsApocalypseMode = FALSE;
m_bIsApocalypseGateOpen = FALSE;
WORD dwTime = timeGetTime();
m_dwApocalypseGateCloseTime = dwTime -1;
m_dwApocalypseGateOpenTime = dwTime -100; // alreaddy closed
for (i = 1; i < DEF_MAXCLIENTS; i++)
{ if (m_pClientList != NULL)
{ SendNotifyMsg(NULL, i, DEF_NOTIFY_APOCGATEENDMSG, NULL, NULL, NULL, NULL);
if ( (m_pClientList->m_iAdminUserLevel == 0)
&& (m_pMapList[m_pClientList->m_cMapIndex]->m_bIsApocalypseMap == TRUE))
{ // forced recall
SendNotifyMsg(NULL, i, DEF_NOTIFY_TOBERECALLED, NULL, NULL, NULL, NULL);
RequestTeleportHandler(i, "0 ");
}
}
}
// restore normal spawn on apoc maps
for (i = 0; i < DEF_MAXMAPS; i++)
{ if (m_pMapList != NULL)
{ if (m_pMapList[i]->m_iApocalypseMobGenType != 0)
//1 for not respawn, 2 for Boss spawn.
{ m_pMapList[i]->m_iMaximumObject = m_pMapList[i]->m_iMaximumObjectDefault;
}
if (m_pMapList[i]->m_cDynamicGateType == 4 )
{ m_pMapList[i]->m_cDynamicGateType = 3;
}
if (m_pMapList[i]->m_cDynamicGateType == 2)
{ GenerateSlime(i); // to force the gate to close
}
Open_EmptyMap_Gate(i);
}
}
wsprintf(G_cTxt,"(!)Apocalypse Mode OFF.");
PutLogEventFileList(G_cTxt);
PutLogList(G_cTxt);
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// OpenCloseApocalypseGate
// Called by ::ForceOpen_ApocalypseGate, ::ForceClose_ApocalypseGate
// Called by ::LocalStartApocalypse
// Check if Gates's needs to be openned or closed
// then notify any change to all clients.on current server
// NB: Opens/closes only type 1 Gates
//**************************************************************************************
void CGame::OpenCloseApocalypseGate()
{ DWORD dwTime = timeGetTime();
BOOL bIsOpen = m_bIsApocalypseGateOpen;
if ( (dwTime >= m_dwApocalypseGateOpenTime)
&& (dwTime < m_dwApocalypseGateCloseTime))
{ m_bIsApocalypseGateOpen = TRUE;
}else
{ m_bIsApocalypseGateOpen = FALSE;
}
// If nothing has changed return...
if (bIsOpen == m_bIsApocalypseGateOpen) return;
if (m_bIsApocalypseGateOpen == TRUE)
{ wsprintf(G_cTxt,"(!)Apocalypse Gate opened.");
}else
{ wsprintf(G_cTxt,"(!)Apocalypse Gate closed.");
}
PutLogList(G_cTxt);
PutLogEventFileList(G_cTxt);
// Then notify all clients of change,
register int i;
for (i = 1; i < DEF_MAXCLIENTS; i++)
{ if (m_pClientList[i] != NULL)
{ Notify_ApocalypseGateState(i);
}
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// Notify_ApocalypseGateState
// Called by ::RequestInitDataHandler (when client log in)
// Called by ::RequestTeleportHandler (when client changes map on same server)
// Called by ::OpenCloseApocalypseGate (when Gate is openned or closed)
// Notify the client of Gate's state, needed to show in player's screen
//**************************************************************************************
void CGame::Notify_ApocalypseGateState(int iClientH)
{ if (iClientH <= 0) return;
if (m_pClientList[iClientH] <= 0) return;
if (m_pClientList[iClientH]->m_bIsInitComplete == FALSE) return;
int iMapIndex = m_pClientList[iClientH]->m_cMapIndex;
int gX, gY;
gX = (m_pMapList[iMapIndex]->m_sDynamicGateCoordRectX1 + m_pMapList[iMapIndex]->m_sDynamicGateCoordRectX2)/2;
gY = (m_pMapList[iMapIndex]->m_sDynamicGateCoordRectY1 + m_pMapList[iMapIndex]->m_sDynamicGateCoordRectY2)/2;
switch (m_pMapList[iMapIndex]->m_cDynamicGateType){
case 0: // No gate on current map
if(m_bIsApocalypseGateOpen == TRUE)
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEOPEN, 0, 0, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATESTARTMSG, NULL, NULL, NULL, NULL);
}else
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATECLOSE, 0, 0, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEENDMSG, NULL, NULL, NULL, NULL);
}
break;
case 1: // Initial Dynamic gates (toh, IB, D4...)
if(m_bIsApocalypseGateOpen == TRUE)
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEOPEN, gX, gY, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATESTARTMSG, NULL, NULL, NULL, NULL);
}else
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATECLOSE, gX, gY, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEENDMSG, NULL, NULL, NULL, NULL);
}
break;
case 2: // Empty maps Dynamic gates (inferniaA, inferniaB, procella...)
if (m_pMapList[iMapIndex]->m_iTotalAliveObject == 0)
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEOPEN, gX, gY, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATESTARTMSG, NULL, NULL, NULL, NULL);
}else
{ SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATECLOSE, gX, gY , NULL, m_pClientList[iClientH]->m_cMapName);
}
break;
case 3: // Hide the n°3 gates ..
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATECLOSE, gX, gY, NULL, m_pClientList[iClientH]->m_cMapName);
break;
case 4: // Show the gate on abaddon map..when Abaddon spawning.
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATEOPEN, gX, gY, NULL, m_pClientList[iClientH]->m_cMapName);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_APOCGATESTARTMSG, NULL, NULL, NULL, NULL);
break;
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// Use_ApocalypseGate
// Called by ::CheckClientResponseTime()
// Test if client uses Dynamic Gate, then TP him
//**************************************************************************************
void CGame::Use_ApocalypseGate(int iClientH)
{ if (iClientH <= 0) return;
if (m_pClientList[iClientH] <= 0) return;
if (m_pClientList[iClientH]->m_bIsInitComplete == FALSE) return;
if (m_bIsApocalypseMode == FALSE) return;
int iMapIndex = m_pClientList[iClientH]->m_cMapIndex;
if (m_pMapList[iMapIndex]->m_cDynamicGateType == 0 ) return; // No Dynamic Gate on this map
if ( (m_pMapList[iMapIndex]->m_cDynamicGateType == 1 )
&& (m_bIsApocalypseGateOpen == FALSE))
return; // Dynamic Gate is closed
if ( (m_pMapList[iMapIndex]->m_cDynamicGateType == 2 )
&& (m_pMapList[iMapIndex]->m_iTotalAliveObject != 0))
return; // There are still creatures on the map
if (m_pMapList[iMapIndex]->m_cDynamicGateType == 3 )
return; // Type 3 will be changed to 4 at Abaddons spawning.
if ( (m_pClientList[iClientH]->m_sX >= m_pMapList[iMapIndex]->m_sDynamicGateCoordRectX1)
&& (m_pClientList[iClientH]->m_sX <= m_pMapList[iMapIndex]->m_sDynamicGateCoordRectX2)
&& (m_pClientList[iClientH]->m_sY >= m_pMapList[iMapIndex]->m_sDynamicGateCoordRectY1)
&& (m_pClientList[iClientH]->m_sY <= m_pMapList[iMapIndex]->m_sDynamicGateCoordRectY2))
{ RequestTeleportHandler(iClientH, "2 "
, m_pMapList[iMapIndex]->m_cDynamicGateCoordDestMap
, m_pMapList[iMapIndex]->m_sDynamicGateCoordTgtX
, m_pMapList[iMapIndex]->m_sDynamicGateCoordTgtY);
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// Open_EmptyMap_Gate
// Called by ::NpcKilledHandler when last npc killed on map
// Show just openned gates to the client
//**************************************************************************************
void CGame::Open_EmptyMap_Gate(int MapIndex)
{ if (m_pMapList[MapIndex]->m_cDynamicGateType < 2 ) return;
//if (m_pMapList[MapIndex]->m_cDynamicGateType == 3 ) return;
register int i;
for (i = 1; i < DEF_MAXCLIENTS; i++)
{ if (m_pClientList[i] == NULL) continue;
if (m_pClientList[i]->m_cMapIndex != MapIndex) continue;
Notify_ApocalypseGateState(i);
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// GenerateApocalypseBoss
// Called by ::NpcKilledHandler
// Creates the appropriate npc depending on map definition file
// then change the Dynamic Gate type from 3 to 4 (to open it)
//**************************************************************************************
void CGame::GenerateApocalypseBoss(int MapIndex)
{ if (m_pMapList[MapIndex]->m_iTotalAliveObject != 0) return;
char cName[21], cNpcName[21], cNpcWaypoint[11];
int x, i5;
int iNamingValue;
ZeroMemory(cNpcWaypoint, sizeof(cNpcWaypoint));
iNamingValue = m_pMapList[MapIndex]->iGetEmptyNamingValue();
if (iNamingValue == -1)
{}else
{ ZeroMemory(cNpcName, sizeof(cNpcName));
switch (m_pMapList[MapIndex]->m_iApocalypseBossMobNpcID) {
case 0: return; break;
case 49: strcpy(cNpcName, "Hellclaw");break;
case 50: strcpy(cNpcName, "Tigerworm");break;
case 66: strcpy(cNpcName, "Wyvern");break;
case 73: strcpy(cNpcName, "Fire-Wyvern");break;
case 81: strcpy(cNpcName, "Abaddon");break;
default: strcpy(cNpcName, "Demon");break;
}
ZeroMemory(cName, sizeof(cName));
wsprintf(cName, "XX%d", iNamingValue);
cName[0] = '_';
cName[1] = MapIndex+65;
if (bCreateNewNpc(cNpcName, cName, m_pMapList[MapIndex]->m_cName, 0, 0
, DEF_MOVETYPE_RANDOMAREA, NULL, NULL, cNpcWaypoint, &m_pMapList[MapIndex]->m_sApocalypseBossMobRect, NULL, -1, FALSE, FALSE, FALSE, TRUE) == FALSE)
{ m_pMapList[MapIndex]->SetNamingValueEmpty(iNamingValue);
}
else
{ wsprintf(G_cTxt, "(!) %s has spawned in %s"
, cNpcName
, m_pMapList[MapIndex]->m_cName);
PutLogList(G_cTxt);
PutLogFileList(G_cTxt);
PutLogEventFileList(G_cTxt);
}
// Search npc ID
for (i5 = 1; i5 < DEF_MAXNPCS; i5++)
{ if ((m_pNpcList[i5] != NULL) && (memcmp(m_pNpcList[i5]->m_cName, cName, 5) == 0) )
{ break;
}
}
// Show Spawns on minimap, and tell everybody on Apocalypse server.
for (x = 1; x < DEF_MAXCLIENTS; x++)
if ( (m_pClientList[x] != NULL)
&& (m_pClientList[x]->m_bIsInitComplete == TRUE))
{ if(memcmp(m_pMapList[MapIndex]->m_cName, m_pMapList[m_pClientList[x]->m_cMapIndex]->m_cName, strlen(m_pMapList[MapIndex]->m_cName)) == 0)
{ SendNotifyMsg(NULL, x, DEF_NOTIFY_SPAWNEVENT, m_pNpcList[i5]->m_sX, m_pNpcList[i5]->m_sY, m_pMapList[MapIndex]->m_iApocalypseBossMobNpcID, NULL, NULL, NULL);
}
// Tell everybody on this server if Abaddon has appeared
if (m_pMapList[MapIndex]->m_iApocalypseBossMobNpcID == 81)
{ char cInfoString[100];
ZeroMemory(cInfoString, sizeof(cInfoString));
wsprintf(cInfoString, "Abbadon has appeared ...");
SendNotifyMsg(NULL, x, DEF_NOTIFY_IPACCOUNTINFO, NULL, NULL, NULL, cInfoString);
}
}
// Prepare Abaddon's death, and Apocalypse end.
if (m_pMapList[MapIndex]->m_iApocalypseBossMobNpcID == 81)
{ // Abaddon should die by himself
DWORD dwTime = timeGetTime();
dwTime += 1000*60*5; // 5 minute
bRegisterDelayEvent(DEF_DELAYEVENTTYPE_KILL_ABADDON, 0, dwTime, i5
, DEF_OWNERTYPE_NPC, MapIndex, 0, 0, 0, 0, 0);
dwTime = timeGetTime();
dwTime += 1000*60*15; // 15 minutes
bRegisterDelayEvent(DEF_DELAYEVENTTYPE_END_APOCALYPSE, 0, dwTime, 0
, 0, MapIndex, 0, 0, 0, 0, 0);
}
// Finally open the Exit Gate if type 3 & not 2
if (m_pMapList[MapIndex]->m_cDynamicGateType == 3 )
{ m_pMapList[MapIndex]->m_cDynamicGateType = 4;
Open_EmptyMap_Gate(MapIndex);
}
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// GenerateSlime
// Generate a npc now to close the gate
//**************************************************************************************
void CGame::GenerateSlime(int MapIndex)
{
if (m_pMapList[MapIndex]->m_iTotalAliveObject != 0) return;
char cName[21], cNpcName[21], cNpcWaypoint[11];
int iNamingValue;
ZeroMemory(cNpcWaypoint, sizeof(cNpcWaypoint));
iNamingValue = m_pMapList[MapIndex]->iGetEmptyNamingValue();
if (iNamingValue == -1) {
}
else {
strcpy(cNpcName, "Slime");
ZeroMemory(cName, sizeof(cName));
wsprintf(cName, "XX%d", iNamingValue);
cName[0] = '_';
cName[1] = MapIndex+65;
if (bCreateNewNpc(cNpcName, cName, m_pMapList[MapIndex]->m_cName, 0, 0
, DEF_MOVETYPE_RANDOMAREA, NULL, NULL, cNpcWaypoint, &m_pMapList[MapIndex]->m_sApocalypseBossMobRect, NULL, NULL, FALSE, FALSE, FALSE, TRUE) == FALSE)
{ m_pMapList[MapIndex]->SetNamingValueEmpty(iNamingValue);
}
}
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// ForceOpen_ApocalypseGate
// Local execution off a global GM command to force open the gate
// Beware this will affect only current server
//**************************************************************************************
void CGame::ForceOpen_ApocalypseGate()
{ if (m_bIsApocalypseMode == FALSE) return;
DWORD dwTime = timeGetTime();
m_dwApocalypseGateOpenTime = dwTime;
m_dwApocalypseGateCloseTime = dwTime +15*60*1000; // will close in 15 minutes
OpenCloseApocalypseGate();
}
//**************************************************************************************
// SNOOPY: Revamped Apocalypse functions:
// ForceClose_ApocalypseGate
// GM command to force open the gate
// Beware this will affect only current server
//**************************************************************************************
void CGame::ForceClose_ApocalypseGate()
{ if (m_bIsApocalypseMode == FALSE) return;
DWORD dwTime = timeGetTime();
m_dwApocalypseGateCloseTime = dwTime -1;
m_dwApocalypseGateOpenTime = dwTime -100; // alreaddy closed
OpenCloseApocalypseGate();
}
//**************************************************************************************
_\_ _<br> / , \__/ . \ Admin of Equilibrium Project<br> II\ \___ . O<br> III \_/ \ _ / <a href='http://www.equiprojet.com' target='_blank'>http://www.equiprojet.com</a><br> II I¯I
Help :S
Code: Select all
C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(9717) : error C2660: 'GlobalStartApocalypseMode' : function does not take 3 parameters
C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(9724) : error C2660: 'GlobalEndApocalypseMode' : function does not take 0 parameters
C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(51815) : error C2664: 'bCreateNewNpc' : cannot convert parameter 10 from 'short *' to 'struct tagRECT *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(51889) : error C2664: 'bCreateNewNpc' : cannot convert parameter 10 from 'short *' to 'struct tagRECT *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(52082) : error C2660: 'GlobalStartApocalypseMode' : function does not take 0 parameters
C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(52102) : error C2660: 'GlobalEndApocalypseMode' : function does not take 0 parameters
Error executing cl.exe.
HGserver.exe - 6 error(s), 5 warning(s)
i really dont know much about source codes i just adjust some stuff
.. and mostly copy paste and rename some stuff ... but could somebody put that apocalypse code in 2.24b or c source and just upload the source so everyone could change what they want in it .. because if i copy pasted your apocalypse code and almost everything were done i got 102 errors
...
and dont upload exe with working apocalypse
.. no need for that 
Ty


and dont upload exe with working apocalypse


Ty
I'd need to put all my sources so!
Apocalypse functions are spread in many places, but I gave you the core.
If you know how to code, it'll gain you many days, but if you just clip&paste no hope! ther many functions (here) and many variables set in all the server...
Apocalypse functions are spread in many places, but I gave you the core.
If you know how to code, it'll gain you many days, but if you just clip&paste no hope! ther many functions (here) and many variables set in all the server...
_\_ _<br> / , \__/ . \ Admin of Equilibrium Project<br> II\ \___ . O<br> III \_/ \ _ / <a href='http://www.equiprojet.com' target='_blank'>http://www.equiprojet.com</a><br> II I¯I
lol that takes 10 secs to fix :ph34r:morbid wrote: Help :S
Code: Select all
C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(9717) : error C2660: 'GlobalStartApocalypseMode' : function does not take 3 parameters C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(9724) : error C2660: 'GlobalEndApocalypseMode' : function does not take 0 parameters C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(51815) : error C2664: 'bCreateNewNpc' : cannot convert parameter 10 from 'short *' to 'struct tagRECT *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(51889) : error C2664: 'bCreateNewNpc' : cannot convert parameter 10 from 'short *' to 'struct tagRECT *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(52082) : error C2660: 'GlobalStartApocalypseMode' : function does not take 0 parameters C:\Documents and Settings\M0rBiD\Desktop\2.24c\Game.cpp(52102) : error C2660: 'GlobalEndApocalypseMode' : function does not take 0 parameters Error executing cl.exe. HGserver.exe - 6 error(s), 5 warning(s)
<img src='http://ic1.deviantart.com/fs11/i/2006/1 ... leroth.gif' border='0' alt='user posted image' />
Code: Select all
Game.cpp(51536) : error C2065: 'm_bIsApocalypseGateOpen' : undeclared identifier
Game.cpp(51538) : error C2065: 'm_dwApocalypseGateCloseTime' : undeclared identifier
Game.cpp(51539) : error C2065: 'm_dwApocalypseGateOpenTime' : undeclared identifier
Game.cpp(51757) : error C2039: 'm_sApocalypseBossMobRect' : is not a member of 'CMap'
map.h(58) : see declaration of 'CMap'
Game.cpp(51797) : error C2065: 'DEF_DELAYEVENTTYPE_KILL_ABADDON' : undeclared identifier
Game.cpp(51801) : error C2065: 'DEF_DELAYEVENTTYPE_END_APOCALYPSE' : undeclared identifier
Game.cpp(51831) : error C2039: 'm_sApocalypseBossMobRect' : is not a member of 'CMap'
map.h(58) : see declaration of 'CMap'
HGserver.exe - 7 error(s)

basicly i know nothing about C++ but im learning, i fixed most of errors but these were out of my knoledge range :rolleyes: could anyone point me in right direction :rolleyes:
talk to my good friend google...............Datafly wrote:My errorsCode: Select all
Game.cpp(51536) : error C2065: 'm_bIsApocalypseGateOpen' : undeclared identifier Game.cpp(51538) : error C2065: 'm_dwApocalypseGateCloseTime' : undeclared identifier Game.cpp(51539) : error C2065: 'm_dwApocalypseGateOpenTime' : undeclared identifier Game.cpp(51757) : error C2039: 'm_sApocalypseBossMobRect' : is not a member of 'CMap' map.h(58) : see declaration of 'CMap' Game.cpp(51797) : error C2065: 'DEF_DELAYEVENTTYPE_KILL_ABADDON' : undeclared identifier Game.cpp(51801) : error C2065: 'DEF_DELAYEVENTTYPE_END_APOCALYPSE' : undeclared identifier Game.cpp(51831) : error C2039: 'm_sApocalypseBossMobRect' : is not a member of 'CMap' map.h(58) : see declaration of 'CMap' HGserver.exe - 7 error(s)
![]()
basicly i know nothing about C++ but im learning, i fixed most of errors but these were out of my knoledge range :rolleyes: could anyone point me in right direction :rolleyes:
<img src='http://www.prism.gatech.edu/~gtg818f/basesig.gif' border='0' alt='user posted image' /><br><img src='http://img228.imageshack.us/img228/439/steam1tf.gif' border='0' alt='user posted image' />
How can you consider yourself a friend of google? I pioneered the google fan club, what have you done?Ice-T wrote: talk to my good friend google...............
<3 google
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
i fking looked for help not that some retarded postcount collector would recommend on fixing helbreath hgserver source to use google. Fuck off if u have nothing useful to say.Ice-T wrote:talk to my good friend google...............Datafly wrote:My errorsCode: Select all
Game.cpp(51536) : error C2065: 'm_bIsApocalypseGateOpen' : undeclared identifier Game.cpp(51538) : error C2065: 'm_dwApocalypseGateCloseTime' : undeclared identifier Game.cpp(51539) : error C2065: 'm_dwApocalypseGateOpenTime' : undeclared identifier Game.cpp(51757) : error C2039: 'm_sApocalypseBossMobRect' : is not a member of 'CMap' map.h(58) : see declaration of 'CMap' Game.cpp(51797) : error C2065: 'DEF_DELAYEVENTTYPE_KILL_ABADDON' : undeclared identifier Game.cpp(51801) : error C2065: 'DEF_DELAYEVENTTYPE_END_APOCALYPSE' : undeclared identifier Game.cpp(51831) : error C2039: 'm_sApocalypseBossMobRect' : is not a member of 'CMap' map.h(58) : see declaration of 'CMap' HGserver.exe - 7 error(s)
![]()
basicly i know nothing about C++ but im learning, i fixed most of errors but these were out of my knoledge range :rolleyes: could anyone point me in right direction :rolleyes:
You are the retarted here. You can't even find a tutorial out of 1 000 000 000 of C++ tutorials around the net ( or maybe you aren't enough smart to understand them?).Datafly wrote:i fking looked for help not that some retarded postcount collector would recommend on fixing helbreath hgserver source to use google. Fuck off if u have nothing useful to say.Ice-T wrote:talk to my good friend google...............Datafly wrote:My errorsCode: Select all
Game.cpp(51536) : error C2065: 'm_bIsApocalypseGateOpen' : undeclared identifier Game.cpp(51538) : error C2065: 'm_dwApocalypseGateCloseTime' : undeclared identifier Game.cpp(51539) : error C2065: 'm_dwApocalypseGateOpenTime' : undeclared identifier Game.cpp(51757) : error C2039: 'm_sApocalypseBossMobRect' : is not a member of 'CMap' map.h(58) : see declaration of 'CMap' Game.cpp(51797) : error C2065: 'DEF_DELAYEVENTTYPE_KILL_ABADDON' : undeclared identifier Game.cpp(51801) : error C2065: 'DEF_DELAYEVENTTYPE_END_APOCALYPSE' : undeclared identifier Game.cpp(51831) : error C2039: 'm_sApocalypseBossMobRect' : is not a member of 'CMap' map.h(58) : see declaration of 'CMap' HGserver.exe - 7 error(s)
![]()
basicly i know nothing about C++ but im learning, i fixed most of errors but these were out of my knoledge range :rolleyes: could anyone point me in right direction :rolleyes:![]()
Use google you fuck

<img src='http://ic1.deviantart.com/fs11/i/2006/1 ... leroth.gif' border='0' alt='user posted image' />
Group braindamage?Cleroth wrote:You are the retarted here. You can't even find a tutorial out of 1 000 000 000 of C++ tutorials around the net ( or maybe you aren't enough smart to understand them?).Datafly wrote:i fking looked for help not that some retarded postcount collector would recommend on fixing helbreath hgserver source to use google. Fuck off if u have nothing useful to say.Ice-T wrote: talk to my good friend google...............![]()
Use google you fuck
![]()
I ask for help and i will be said go learn C++
why i even bother <_<
Learn english then learn C++
<img src='http://ic1.deviantart.com/fs11/i/2006/1 ... leroth.gif' border='0' alt='user posted image' />
well i thoguht google would give you a more clear and precise answer and you might even leaven sumthing about c++, but obiously i was wrong,
and as cleroth pointed out, it is you who is retared here
and sry dax </3 i r been sleepin with google long time
and as cleroth pointed out, it is you who is retared here
and sry dax </3 i r been sleepin with google long time

<img src='http://www.prism.gatech.edu/~gtg818f/basesig.gif' border='0' alt='user posted image' /><br><img src='http://img228.imageshack.us/img228/439/steam1tf.gif' border='0' alt='user posted image' />
-
- Loyal fan
- Posts: 391
- Joined: Sat Mar 26, 2005 12:41 am
i have few questions...
m_sApocalypseBossMobRect is it supos to = 0 in Cmap or??? is it supos = something els... Ill try 0 see what i get..
and m_bIsApocalypseGateOpen, m_iMaximumObjectDefault...
DEF_DELAYEVENTTYPE_END_APOCALYPSE, DEF_DELAYEVENTTYPE_KILL_ABADDON..
all undifined.. oviously.. any tips on that info?
m_sApocalypseBossMobRect is it supos to = 0 in Cmap or??? is it supos = something els... Ill try 0 see what i get..
and m_bIsApocalypseGateOpen, m_iMaximumObjectDefault...
DEF_DELAYEVENTTYPE_END_APOCALYPSE, DEF_DELAYEVENTTYPE_KILL_ABADDON..
all undifined.. oviously.. any tips on that info?
<img src='http://freewebs.com/trickro/70s.png' border='0' alt='user posted image' /><img src='http://freewebs.com/trickro/70s2.jpg' border='0' alt='user posted image' />