When functions are called by somewhere else, it's either obvious or writen in description.
You should add or fix:
- GM commands
- Summon control
- Chat as in crusade (not seen opponent red chat on Held maps)
- End of npckilledhandler:
Code: Select all
if ( (m_bIsHeldenianMode == TRUE) && (m_cHeldenianType == 1)
&& (m_pMapList[m_pNpcList[iNpcH]->m_cMapIndex]->m_bIsHeldenianMap == TRUE) )
{ if ((m_pNpcList[iNpcH]->m_sType == 87) || (m_pNpcList[iNpcH]->m_sType == 89))
{ if (m_pNpcList[iNpcH]->m_cSide == 1)
{ m_iHeldenianAresdenLeftTower--;
if (m_cHeldenianFirstDestroyedTowerWinner == 0) m_cHeldenianFirstDestroyedTowerWinner = 2;
wsprintf(G_cTxt, "Aresden Tower Broken, Left TOWER %d", m_iHeldenianAresdenLeftTower);
PutLogList(G_cTxt);
UpdateHeldenianStatus(-1);
if (m_iHeldenianAresdenLeftTower == 0) HeldenianVictoryNow(2);
}else if (m_pNpcList[iNpcH]->m_cSide == 2)
{ m_iHeldenianElvineLeftTower--;
if (m_cHeldenianFirstDestroyedTowerWinner == 0) m_cHeldenianFirstDestroyedTowerWinner = 1;
wsprintf(G_cTxt, "Elvine Tower Broken, Left TOWER %d", m_iHeldenianElvineLeftTower);
PutLogList(G_cTxt);
UpdateHeldenianStatus(-1);
if (m_iHeldenianElvineLeftTower == 0) HeldenianVictoryNow(1);
} } }
- RequestTeleportHandler!
Code: Select all
// Heldenian: TP to GodH go to appropriate place...
if ((m_bIsHeldenianMode == TRUE) && (bRet == TRUE) && (cMapName == NULL))
{ if (memcmp(m_pMapList[m_pClientList[iClientH]->m_cMapIndex]->m_cLocationName, "HRampart", 8) == 0)
{ if (m_pClientList[iClientH]->m_iAdminUserLevel == 0)
{ if (memcmp(cDestMapName, "GodH", 4) == 0)
{ if (m_pClientList[iClientH]->m_cSide == m_sLastHeldenianWinner)
{ iDestX = 54;
iDestY = 67;
cDir = 4;
}else
{ iDestX = 192 + iDice(1,20);
iDestY = 166 + iDice(1,10);
cDir = 7;
} } } } }
You must copy and fix crusade construction/GUID code to match Heldenian. Posting my code is pointless here as it's huglly modifyed.
- ApplyPKPenalty: Must send & lock to Jail when Heldenian on Held maps.
- increased XP pour EK at Heldenian
- ApplyCombatKilledPenalty crusade OR Heldenian here.
- npcbehaviour stop:
Code: Select all
case 89: // AGC (Ancient Grand Cannon) will turn as detectors
if ( (m_bIsHeldenianMode == TRUE)
&& (m_bHeldenianWarInitiated == FALSE))
{ if (m_pNpcList[iNpcH]->m_sBehaviorTurnCount >= 3)
{ m_pNpcList[iNpcH]->m_sBehaviorTurnCount = 0;
bFlag = _bNpcBehavior_Detector(iNpcH);
if (bFlag == TRUE)
{ SendEventToNearClient_TypeA(iNpcH, DEF_OWNERTYPE_NPC, MSGID_EVENT_MOTION, DEF_OBJECTATTACK, m_pNpcList[iNpcH]->m_sX, m_pNpcList[iNpcH]->m_sY, 1);
} } }
break;
- Heldenians scroll must be defined as DEF_ITEMTYPE_USE_PERM
- Summon spells/potion don't work at Heldenian time, and HelScroll work only when war is begun.
- NB my Held. scrolls are individual objects (can't be used by someone else) and use is limited to current Heldenian. My Held Flags are individual (can be used only the char who buy it) but can be kept for later use. There is some coding to do in UseItemHandler, but again this function has been changed alot in my sources, so my code is useless.
- Attacks or Damage spell or SPdown: dont damage before war begins.
- You may add Price change for winner side.
- If you server has coded TPlist, add Heldenian BTfield & ML TP for winners.
- Mutual exclusions in starting crusade, apocalypse, Heldenian.
- And finally, main functions:
in joined file (was too long I supose, because ont possible to post here
My server sources have been greatlly modifyed from original, so some parts of my code are useless for you, and you'll need to rebuild them to fit your sources.
NB: __bReadMapCrusadeInfo function
Used to change some map settings during crusade or Heldenian. Here the 1st use is to remove creatures spawning you can do it your way...