Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Elements Combination [1.5]

Status
Not open for further replies.
Joined
Jul 11, 2012
Messages
786
Reaction score
190
Hello everyone,
Since I've finished my last hard exam, I dunnu why, but I've decided to blow the source with new things...
Like you know mess up the source in weird ways, and not only for Gunz, also for other online games I like.
so, I was working on a couple of things today, and one of the things that I finished, it's a crazy idea I know, and too silly XD, but I would like to share it with you ;)
of course everyone knew from the title it's the element combination (put all elements in one)

Okay, so I could add 1 more element to the game, but I was too lazy and I only wanted to try this thing, so all I did was changing the lightning codes and combined all the other three elements with it, just like this:

Gunz/ZCharacterObject.cpp
search for: DrawEnchantSub(ZC_ENCHANT etype,rvector& pos)
edit the line with the
Code:
else if(etype==ZC_ENCHANT_LIGHTNING)
and make it like this
Code:
else if(etype==ZC_ENCHANT_LIGHTNING)
	{
		ZGetEffectManager()->AddTrackPoison( pos );
		ZGetEffectManager()->AddTrackCold( pos );
		ZGetEffectManager()->AddTrackFire( pos );
	}
Gunz/ZGameAction.cpp
search for: case ZC_ENCHANT_LIGHTNING
add under
Code:
ApplyLightningEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), pDesc->m_nDelay.Ref());
all these
Code:
ApplyPoisonEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), pDesc->m_nDelay.Ref());
ApplyFireEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), pDesc->m_nDelay.Ref());
ApplyColdEnchantDamage(pTarget, pDesc->m_nLimitSpeed.Ref(), pDesc->m_nDelay.Ref());

this should give you these results:
Tannous - Elements Combination [1.5] - RaGEZONE Forums

Tannous - Elements Combination [1.5] - RaGEZONE Forums

Tannous - Elements Combination [1.5] - RaGEZONE Forums

Tannous - Elements Combination [1.5] - RaGEZONE Forums

Now, if you want to make the combined element fatal (kill in only 1 massive), you have to increase the duration of the elements on the opponent, like this:
in ZGameAction.cpp (imma do the example on the fire element)
search for: ApplyFireEnchantDamage(ZObject* pTarget, ZObject* pOwner, int nDamage, int nDuration)
in this function edit the line
Code:
pMod->BeginDamage( pOwner, nDamage, nDuration * [COLOR="#FF0000"]0.001f[/COLOR]);
change the red value to this
Code:
[COLOR="#FF0000"]0.01f[/COLOR]
this will increase the duration for the fire element, perform this thing on all other elements and the combined element will be lethal XD..
to restrict the normal elements(not combined ones), and limit their duration, use conditions or make new function, or add parameter to the functions like this: (imma do it on fire enchant aswell here)
Gunz/ZGameAction.h
Code:
bool ApplyFireEnchantDamage(ZObject* pTarget, ZObject* pOwner, int nDamage, int nDuration);
add double q at the end, like this
Code:
bool ApplyFireEnchantDamage(ZObject* pTarget, ZObject* pOwner, int nDamage, int nDuration, [COLOR="#0000FF"]double q[/COLOR]);
do the same in ZGameAction.cpp
Code:
ApplyFireEnchantDamage(ZObject* pTarget, ZObject* pOwner, int nDamage, int nDuration,[COLOR="#0000FF"] double q[/COLOR])
in the function above(ApplyFireEnchantDamage in ZGameAction.cpp) edit this line
Code:
pMod->BeginDamage( pOwner, nDamage, nDuration * [COLOR="#0000FF"]0.001f[/COLOR]);
instead of 0.001f, put q
Code:
pMod->BeginDamage( pOwner, nDamage, nDuration * [COLOR="#0000FF"]q[/COLOR]);
Okay just remaind to send the value of the q parameter each time, so if your enchant is fire, we need the normal value, then send 0.001f. if it's that deadly element send it 0.01f or w/e you want XD
example: (imma do it on fire element)
ZGame.cpp (there is a spot here)
Code:
m_pGameAction->ApplyFireEnchantDamage(pTarget, pOwnerCharacter, pItemDesc->m_nItemPower.Ref(), nDuration, [COLOR="#0000FF"]0.001f[/COLOR]);
and the rest are in ZGameAction.cpp
here you send 0.001f
Code:
case ZC_ENCHANT_FIRE : [B]//because this is for fire[/B]
				ApplyFireEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), pDesc->m_nDelay.Ref(), [COLOR="#0000FF"]0.001f[/COLOR]);
				break;
for lightning, after combination (here you send 0.01f or less)
Code:
case ZC_ENCHANT_LIGHTNING : [B]//because this is for lightning and the combination[/B]
				ApplyFireEnchantDamage(pTarget, pOwnerCharacter, pDesc->m_nDamage.Ref(), pDesc->m_nDelay.Ref(), [COLOR="#0000FF"]0.01f[/COLOR]);
as you can see both are using fire function but each one the duration is something else, I'm just too lazy to do all the rest, all I wanted to do is to see the results of the combination, but they are easy tho !!
so, I guess that's it, give me your opinion...
Peace :thumbup1:
 
Last edited:
Skilled Illusionist
Joined
Dec 24, 2011
Messages
356
Reaction score
35
Better adding Effect on Weapon Range,Look more cool.
But good job.
 
Status
Not open for further replies.
Back
Top