Jump to content
×
×
  • Create New...

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!

english_banner.gif

Link to comment
Share on other sites

  • Premium

What is your problem with this guy dude, I think it's a running gag haha

To be honnest, this system is in every game core since 2007, it's just some code to uncomment in uiparty.py to activate it. At least it worked out before

  • Love 1
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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.


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.