Jump to content

SELFONLY Shaman buffs on map


Go to solution Solved by Sirio,

Recommended Posts

  • Premium
  • Solution

In char_skill.cpp, under:

bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaster)
{
	if (false == CanUseSkill(dwVnum))
		return false;

paste:

	int iArrayIndexSkill[] = {94, 95, 96, 109, 110, 111}; // skill index

	for (int iBuffSkill = 0; iBuffSkill < _countof(iArrayIndexSkill); iBuffSkill++)
	{
		if (iArrayIndexSkill[iBuffSkill] == dwVnum && pkVictim->GetMapIndex() == 26) // map index
		{
			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Say something."));
			pkVictim = this;
		} 
	}

 

Not my code, but i forgot who it is.

  • Love 1
Link to comment
Share on other sites

// Skill.h
// Search :  SKILL_FLAG_FIRE = (1 << 26),

SKILL_FLAG_SELFONLY_MAPINDEX_11 = (1  << 27),

// char_skill.cpp
// Search : Do this step x2 times
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
{
	pkVictim = this;
}	
// Add under :
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY_MAPINDEX_11) && && (pkVictim->GetMapIndex() == 11))
{
	pkVictim = this;
}

// char_skill.cpp
// Search :
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY) && (pkVictim->GetMapIndex() == 11))
{
	ComputeSkill(dwVnum, this);
}
	
// Add under :
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY_MAPINDEX_11) && (pkVictim->GetMapIndex() == 11))
{
	ComputeSkill(dwVnum, this);
}

Navicat -> player.skill_proto ->  design table ->

59f1cbe450c440bca60e1e205dbf71e9.png

setFlag colum ->

5b336444bb444e2fbf071ad813106fe9.png

after  ATTACK_FIRE add a new value named  SELFONLY_MAPINDEX_11

e39547cb229442318efbd279dbbc48a1.png

Save the changes :) And exit. Now go in skill_proto colum setFlag and set the flag. 

d4f0058400fe41b7a93386fe5b9d93cc.png

 

 

NOT TESTED

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

46 minut temu, Sirio napisał:

In char_skill.cpp, under:


bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaster)
{
	if (false == CanUseSkill(dwVnum))
		return false;

paste:


	int iArrayIndexSkill[] = {94, 95, 96, 109, 110, 111}; // skill index

	for (int iBuffSkill = 0; iBuffSkill < _countof(iArrayIndexSkill); iBuffSkill++)
	{
		if (iArrayIndexSkill[iBuffSkill] == dwVnum && pkVictim->GetMapIndex() == 26) // map index
		{
			ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Say something."));
			pkVictim = this;
		} 
	}

 

Not my code, but i forgot who it is.

Thank you! It works fine, but its a one little problem. When i buff myself on specify map LC_TEXT is showing. Is there a option to showing LC_TEXT only when im trying to buff other player?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.