Jump to content
metin2dev
  • 0
Sign in to follow this  
Lua_Horus2

open Damage consonant vnum

Question

hello,

how can I change the damage depending on the item I use, for example if I have equipped an item with vnum 105, when using this item, my damage is always 10?

Thanks!!

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0
3 minuty temu, boaspessoal napisał:

Maybe:

char_battle -> CHARACTER::Damage

  Odkryj ukrytą treść


if (pAttacker)
{
	if(pAttacker->IsEquipUniqueItem(105))
	{
		dam = 10;
	}
}

 

 

but what if item isn't unique? 

Share this post


Link to post
Share on other sites
  • 0
35 minutes ago, Lua_Horus2 said:

And for item like sword?

Not tested:

Spoiler

if (pAttacker)
{
	LPITEM item = pAttacker->GetWear(WEAR_WEAPON);
	if (item == NULL)
		return;
	else if (item == 105)
		dam = 10;
}

 

 

Share this post


Link to post
Share on other sites
  • 0
20 godzin temu, boaspessoal napisał:

Not tested:

  Odkryj ukrytą treść


if (pAttacker)
{
	LPITEM item = pAttacker->GetWear(WEAR_WEAPON);
	if (item == NULL)
		return;
	else if (item == 105)
		dam = 10;
}

 

 

char_battle.cpp: In member function 'bool CHARACTER::Damage(CHARACTER*, int, EDamageType)':
char_battle.cpp:1971: error: ISO C++ forbids comparison between pointer and integer
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×