Heldenian For Hbx

All Helbreath Server Source Discussion here.
snoopy81
Loyal fan
Posts: 338
Joined: Mon Jul 12, 2004 7:13 pm

Post by snoopy81 »

The code is commented, of course thing have to be added elsewhere, but it would take me hours to hun every small difference.
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);	
	}	}	}
- prevent poison, para, illusions & invi spells on heldenian before war begin
- 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;
	}	}	}	}	}
- RequestTeleportHandler & RequestInitDataHandler
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;
- Slate don't work at heldenain time & maps (my code is irrevelent here...
- 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...
_\_ _<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
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

Thanks a lot snoopy81
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

Wow... 3.51 Client source + Heldenian released wihtin 3 days...

Great work Snoopy and thanks a lot !
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

did i ever tell you how much i love you :P
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Shadoelement
Regular
Posts: 32
Joined: Mon Mar 15, 2004 8:26 pm

Post by Shadoelement »

Wow, great work! The community, no doubt, loves you guys!
KLKS
Loyal fan
Posts: 218
Joined: Sun Feb 22, 2004 2:32 pm

Post by KLKS »

woot nice work, i'll add it into 3.02
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

snoppy snoopy :P lol hook us up with your map.h :P
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Psycho
Member
Posts: 116
Joined: Sat Jan 24, 2004 2:56 pm

Post by Psycho »

<3 Snoopy... thanks...so much



YoKo
<img src='http://img145.imageshack.us/img145/3999/firma1an0.jpg' border='0' alt='user posted image' />
KaoZureS
Regular
Posts: 38
Joined: Thu Feb 23, 2006 1:54 pm

Post by KaoZureS »

I love you Snoopy =)
<img src='http://personales.ciudad.com.ar/KaoZureS/firma.jpg' border='0' alt='user posted image' />
€M4NU€L
Outpost bitch
Posts: 517
Joined: Sat Nov 19, 2005 9:07 pm
Location: I watch gay porn
Contact:

Post by €M4NU€L »

Are you all gays or what ? All of you <3 Snoopy gay asses :P
<span style='color:blue'>Helbreath Thermal</span> <span style='color:green'>BETA</span> <span style='color:red'>Soon</span>:<br><br>www.youporngay.com<br><br><img src='http://img264.imageshack.us/img264/1041 ... piopk7.jpg' border='0' alt='user posted image' /><br><img src='http://img257.imageshack.us/img257/3762 ... eakxj1.jpg' border='0' alt='user posted image' /><br><img src='http://arthur.crepin.free.fr/images/use ... mpsons.png' border='0' alt='user posted image' /><br><img src='http://img329.imageshack.us/img329/5797/pesgamerrr3.gif' border='0' alt='user posted image' /><br><br><u><b>BLACK GAY LIST:</b></u><br><br><span style='color:red'>€M4NU€L</span>:<br>I look like a girl and he's always complaining someone.
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

Hello snoopy,

I been trying to add heldenian out of your cores functions...I manage to make some changes and stuff...but got a few question for now just wanting to know...

Whats the values for:
MSGID_RESPONSE_HELDENIAN_TP_LIST
MSGID_RESPONSE_CHARGED_TELEPORT

And as I saw...it's sending msg to client about Aresden/Elvines flags...well on original servers it's sends msg about the deaths, so I'm changing to that, maybe you knew it but wanted to use flags anyways :)
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

SNoopy coded heldenian client side too, take a look in his client sources and i think you'll find the correct values for these MSGIDs ;)

Not sure about that but give it a try !
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

diuuude wrote: SNoopy coded heldenian client side too, take a look in his client sources and i think you'll find the correct values for these MSGIDs ;)

Not sure about that but give it a try !
When I was at college, though of that.

Thanks a lot B)
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
snoopy81
Loyal fan
Posts: 338
Joined: Mon Jul 12, 2004 7:13 pm

Post by snoopy81 »

And as I saw...it's sending msg to client about Aresden/Elvines flags...well on original servers it's sends msg about the deaths, so I'm changing to that, maybe you knew it but wanted to use flags anyways
I didn't know, the "Death toll" is not easelly translated to french and may have 2 meannings.
The most obvious is nbe of deaths, but useseless itg
The second may bring you to think about Flags, and Flag nbe IS usefull, as it's the 2nd victory condition.

I had to choose, but both values are sent to client if I remember well...
_\_ _<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
snoopy81
Loyal fan
Posts: 338
Joined: Mon Jul 12, 2004 7:13 pm

Post by snoopy81 »

A portion of code I forgot, but thats important...
(I guess some people already implemented this their way)
Function:
int CGame::bCreateNewNpc(..)
Add/correct the following code

Code: Select all

  switch (m_pNpcList[i]->m_cActionLimit) {
  case 2: // fixed mechants
  case 3: // dummy
  case 5: // struct sade, crops
  	m_pNpcList[i]->m_cBehavior = DEF_BEHAVIOR_STOP;  	
  	switch (m_pNpcList[i]->m_sType) {
  	case 15: // ShopKeeper-W
  	case 19: // Gandlf
  	case 20: // Howard
  	case 24: // Tom
  	case 25: // William
  	case 26: // Kennedy
    m_pNpcList[i]->m_cDir      = 3 + iDice(1,3);
    break;
  	default:
    m_pNpcList[i]->m_cDir      = iDice(1,8);
    break;
  	}
  	break;
  case 8: // Heldenian gate
  	m_pNpcList[i]->m_cDir      = 3;
  	m_pNpcList[i]->m_cBehavior = DEF_BEHAVIOR_STOP;	
  	if (m_pNpcList[i]->m_cArea > 0)
  	{	for(short sx1 = (sX - 1); sx1 <= sX + 1; sx1++)
    for(short sy1 = (sY - 1); sy1 <= sY + 1; sy1++)
    {	m_pMapList[iMapIndex]->SetTempMoveAllowedFlag(sx1, sy1, FALSE);  
  	}	}
  	break;

  default: 
  	m_pNpcList[i]->m_cBehavior = DEF_BEHAVIOR_MOVE;
  	m_pNpcList[i]->m_cDir      = 5;
  	break;
  }
_\_ _<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
Post Reply