Jump to content

Teleport Skill for Party


Recommended Posts

  • Bot

SERVER PART:

input_main.cpp

void CInputMain::PartyUseSkill(LPCHARACTER ch, const char* c_pData)
{
	TPacketCGPartyUseSkill* p = (TPacketCGPartyUseSkill*) c_pData; 
	if (!ch->GetParty())
		return;

	if (ch->GetPlayerID() != ch->GetParty()->GetLeaderPID())
	{
		ch->ChatPacket(CHAT_TYPE_INFO, "<Group> Only the leader can use this function.");
		return;
	}

	switch (p->bySkillIndex)
	{
		case PARTY_SKILL_HEAL:
			ch->GetParty()->HealParty();
			break;
		case PARTY_SKILL_WARP:
			{
				if (ch->GetSkillLevel(SKILL_LEADERSHIP) >= 10) { //10 IS THE MIN LEVEL OF LEADERSHIP SKILL TO USE TELEPORT
					LPCHARACTER pch = CHARACTER_MANAGER::instance().Find(p->vid);
					if (pch) {
						ch->GetParty()->SummonToLeader(pch->GetPlayerID()); 
					}else{
						ch->ChatPacket(CHAT_TYPE_INFO, "<Teleport> The character is not online.");
					}
				}else{
					ch->ChatPacket(CHAT_TYPE_INFO, "<Teleport> You need upgrade your leadership skill to use this function.");
				}
			}
			break;
	}
}

party.cpp

void CParty::SummonToLeader(DWORD pid)
{
	LPCHARACTER l = GetLeaderCharacter();

	if (m_memberMap.find(pid) == m_memberMap.end())
	{
		l->ChatPacket(CHAT_TYPE_INFO, "<Teleport> The character is too far.");
		return;
	}

	LPCHARACTER ch = m_memberMap[pid].pCharacter;

	if (!ch)
	{
		l->ChatPacket(CHAT_TYPE_INFO, "<Teleport> The character was not found in your map.");
		return;
	}

	if (ch->IsDead())
	{
		l->ChatPacket(CHAT_TYPE_INFO, "<Teleport> I can't teleport the character if he is dead.");
		return;
	}

	ch->Show(l->GetMapIndex(), l->GetX(), l->GetY());
	ch->Stop();
}

CLIENT PART:

root -> uiparty.py

FIND THE __ShowStateButton and:

		## Warp
		if self.stateButtonDict.has_key(self.MEMBER_BUTTON_WARP):
			button = self.stateButtonDict[self.MEMBER_BUTTON_WARP]
			button.SetPosition(xPos, y)
			button.Show()
			xPos += 23

Thanks to marty sama that sell this for 50€. NOW IT'S COMPLETELY FREE!

  • Metin2 Dev 2

english_banner.gif

Link to comment
Share on other sites

  • Honorable Member
On 27/11/2017 at 8:58 PM, charparodar said:

Dude

You're too obsessed with marty... Are you in love with him and because he refused to be the love of your live you try to impress him? :wub:

In reality, he was called warxwar in italian boards in 2009. I helped him a lot through these years. I taught him python and other stuff. (but he forgot them)

Well, you can see the result now with this kind of thread ahah

  • Love 6
Link to comment
Share on other sites

  • Premium

Ah...warxwar..that explains a lot.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • 6 years later...

Ok...but there is a bug on this system.

You can teleport with this skill between maps even if there is a min level on that map. E.g. from exile cave (v3) you can be teleported to beta maps even if you are lower than level 90. I even implemented a quest for checking min lv in beta (90) and no use. They can still teleport there.

There is any solution?

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.