Jump to content

Party Flag


Recommended Posts

  • 2 months later...
  • 2 weeks later...
  • 2 weeks later...

 

 

It's working perfectly.

 

Design your table and put the "PARTY" flag at the 27th position.

 

 

Who is the logic? What is different  between 27th and 25th position?

 

Index of flag.if is 25 db will send to game for 25 th flag not Party flag witch is on the 27

 

 

Gruptayk that works, but it does not work...

Link to comment
Share on other sites

  • 2 months later...

Hi metin2dev i want to share skill party flag

 

This flag will give buff to all members from your party.

 

Sorry for my english

 

Open skill.h

 

Search:

SKILL_FLAG_FIRE = (1 << 26),

After this add:

SKILL_FLAG_PARTY = (1 << 27),

Now open char_skill.cpp

Search:

SKILL_RESIST_PENETRATE

And after add:

 

struct FPartyPIDCollector
{
std::vector <DWORD> vecPIDs;
FPartyPIDCollector()
{
}
void operator () (LPCHARACTER ch)
{
vecPIDs.push_back(ch->GetPlayerID());
}
};
Like in pictureUntitled.png
 
Now search:
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
pkVictim = this;
 
And after Add:
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && !GetParty())
pkVictim = this;
 
And again:
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
pkVictim = this;
 
After
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && !GetParty())
pkVictim = this;
 
 
Now search:
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
ComputeSkill(dwVnum, this);
 
And after:
 
else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && !GetParty())
ComputeSkill(dwVnum, this);
else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
{
FPartyPIDCollector f;
GetParty()->ForEachOnMapMember(f, GetMapIndex());
for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
{
LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
ComputeSkill(dwVnum, ch);
}
}
Open guild.cpp and search:
 
if ((pkSk->dwFlag & SKILL_FLAG_SELFONLY))
{
// 이미 걸려 있으므로 사용하지 않음.
if (ch->FindAffect(pkSk->dwVnum))
return;

victim = ch;
}
 
After add:
 
if ((pkSk->dwFlag & SKILL_FLAG_PARTY))
{
if (ch->FindAffect(pkSk->dwVnum))
return;

victim = ch;
}
 

Open navicat->player->skill_proto->design table

and at setFlag change the values with:

'ATTACK','USE_MELEE_DAMAGE','COMPUTE_ATTGRADE','SELFONLY','USE_MAGIC_DAMAGE','USE_HP_AS_COST','COMPUTE_MAGIC_DAMAGE','SPLASH','GIVE_PENALTY','USE_ARROW_DAMAGE','PENETRATE','IGNORE_TARGET_RATING','ATTACK_SLOW','ATTACK_STUN','HP_ABSORB','SP_ABSORB','ATTACK_FIRE_CONT','REMOVE_BAD_AFFECT','REMOVE_GOOD_AFFECT','CRUSH','ATTACK_POISON','TOGGLE','DISABLE_BY_POINT_UP','CRUSH_LONG','WIND','ELEC','FIRE','PARTY'

Hi,

else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && !GetParty())ComputeSkill(dwVnum, this);
else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
{
FPartyPIDCollector f;
GetParty()->ForEachOnMapMember(f, GetMapIndex());
for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
{
LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
ComputeSkill(dwVnum, ch);
}
}

Replace

 

Without looking up working party to issue

 

    if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && !GetParty())
        ComputeSkill(dwVnum, this);
    else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
    {
    FPartyPIDCollector f;
    GetParty()->ForEachOnMapMember(f, GetMapIndex());
    for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
    {
    LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
    ComputeSkill(dwVnum, ch);
    }
    }
Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 2 weeks later...

My files already came with it, but it dosnt work

 

	SKILL_FLAG_ATTACK			= (1 << 0),	// 공격 기술
	SKILL_FLAG_USE_MELEE_DAMAGE		= (1 << 1),	// 기본 밀리 타격치를 b 값으로 사용
	SKILL_FLAG_COMPUTE_ATTGRADE		= (1 << 2),	// 공격등급을 계산한다
	SKILL_FLAG_SELFONLY			= (1 << 3),	// 자신에게만 쓸 수 있음
	SKILL_FLAG_USE_MAGIC_DAMAGE		= (1 << 4),	// 기본 마법 타격치를 b 값으로 사용
	SKILL_FLAG_USE_HP_AS_COST		= (1 << 5),	// HP를 SP대신 쓴다
	SKILL_FLAG_COMPUTE_MAGIC_DAMAGE	= (1 << 6),
	SKILL_FLAG_SPLASH			= (1 << 7),
	SKILL_FLAG_GIVE_PENALTY		= (1 << 8),	// 쓰고나면 잠시동안(3초) 2배 데미지를 받는다.
	SKILL_FLAG_USE_ARROW_DAMAGE		= (1 << 9),	// 기본 화살 타격치를 b 값으로 사용
	SKILL_FLAG_PENETRATE		= (1 << 10),	// 방어무시
	SKILL_FLAG_IGNORE_TARGET_RATING	= (1 << 11),	// 상대 레이팅 무시
	SKILL_FLAG_SLOW			= (1 << 12),	// 슬로우 공격
	SKILL_FLAG_STUN			= (1 << 13),	// 스턴 공격
	SKILL_FLAG_HP_ABSORB		= (1 << 14),	// HP 흡수
	SKILL_FLAG_SP_ABSORB		= (1 << 15),	// SP 흡수
	SKILL_FLAG_FIRE_CONT		= (1 << 16),	// FIRE 지속 데미지
	SKILL_FLAG_REMOVE_BAD_AFFECT	= (1 << 17),	// 나쁜효과 제거
	SKILL_FLAG_REMOVE_GOOD_AFFECT	= (1 << 18),	// 나쁜효과 제거
	SKILL_FLAG_CRUSH			= (1 << 19),	// 상대방을 날림
	SKILL_FLAG_POISON			= (1 << 20),	// 독 공격
	SKILL_FLAG_TOGGLE			= (1 << 21),	// 토글
	SKILL_FLAG_DISABLE_BY_POINT_UP	= (1 << 22),	// 찍어서 올릴 수 없다.
	SKILL_FLAG_CRUSH_LONG		= (1 << 23),	// 상대방을 멀리 날림
	SKILL_FLAG_WIND		= (1 << 24),	// 바람 속성 
	SKILL_FLAG_ELEC		= (1 << 25),	// 전기 속성
	SKILL_FLAG_FIRE		= (1 << 26),	// 불 속성
	SKILL_FLAG_BLEEDING	= (1 << 27),
	SKILL_FLAG_PARTY	= (1 << 28),

 

 

'ATTACK','USE_MELEE_DAMAGE','COMPUTE_ATTGRADE','SELFONLY','USE_MAGIC_DAMAGE','USE_HP_AS_COST','COMPUTE_MAGIC_DAMAGE','SPLASH','GIVE_PENALTY','USE_ARROW_DAMAGE','PENETRATE','IGNORE_TARGET_RATING','ATTACK_SLOW','ATTACK_STUN','HP_ABSORB','SP_ABSORB','ATTACK_FIRE_CONT','REMOVE_BAD_AFFECT','REMOVE_GOOD_AFFECT','CRUSH','ATTACK_POISON','TOGGLE','DISABLE_BY_POINT_UP','CRUSH_LONG','WIND','ELEC','FIRE','PARTY','ATTACK_BLEEDING'

 

Edited by Shinigami
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 2 weeks later...
  • Premium

Hello.

After setting the buff as Party in the skill_proto:

When im in a party everyone inside skill range is buffed, but if the buffer isnt at any party, she cant buff people.

Could you tell me maybe what i did wrong pls?

 

char_skill.cpp

 

Spoiler

Clipboardimage2015-11-02032202.png
Clipboardimage2015-11-02032255.png
Clipboardimage2015-11-02032315.png
Clipboardimage2015-11-02032337.png

I think i solved my question, i will edit/reply later when i try it. 

  • Love 1
Link to comment
Share on other sites

  • Premium

Party flag working perfectly, thank you again.

To the people that want to use it to make the buff for the whole group, but also have they like they normally do (buff people of same kingdom without being at their party):

 

 

SKIP this part of the tutorial

 

Now search:
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
pkVictim = this;
 
And after Add:
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && !GetParty())
pkVictim = this;
 
And again:
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
pkVictim = this;
 
After
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && !GetParty())
pkVictim = this;

 

 

At this part, do what is bellow instead

 

Now search:
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
ComputeSkill(dwVnum, this);
 
And after:
 
else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && !GetParty())
ComputeSkill(dwVnum, this);
else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
{
FPartyPIDCollector f;
GetParty()->ForEachOnMapMember(f, GetMapIndex());
for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
{
LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
ComputeSkill(dwVnum, ch);
}
}

 

 

Do this instead:

 

Now search:
 
if (IS_SET(pkSk->dwFlag, SKILL_FLAG_SELFONLY))
ComputeSkill(dwVnum, this);
 
And after:
 
else if (IS_SET(pkSk->dwFlag, SKILL_FLAG_PARTY) && GetParty())
{
FPartyPIDCollector f;
GetParty()->ForEachOnMapMember(f, GetMapIndex());
for (std::vector <DWORD>::iterator it = f.vecPIDs.begin(); it != f.vecPIDs.end(); it++)
{
LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(*it);
ComputeSkill(dwVnum, ch);
}
}

 

  • Love 4
Link to comment
Share on other sites

  • Premium

If your in paty it buffs you and he other char?

If so, look at my reply above.

If it doesnt, recheck your code and make sure you have the PARTY flag at player.skill_proto in the 27th position (or anyother if you changed it).

Position must be the same in the player.skillother aswell as in skill.h. Look Dash post for more information.

Link to comment
Share on other sites

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.