Premium Galet 510 Posted February 27, 2015 Premium Share Posted February 27, 2015 Ah indeed, I'll try, thanks sema Link to comment Share on other sites More sharing options...
Premium phayara 424 Posted February 27, 2015 Premium Share Posted February 27, 2015 http://pastebin.com/pb0GJ6Ap Try this ^^ For me the pet don't do dammage, but he can die. ^^ Please send me PetSystem.cpp, pastebin It makes the gap Link to comment Share on other sites More sharing options...
Premium phayara 424 Posted February 27, 2015 Premium Share Posted February 27, 2015 (edited) Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Adrian1428 31 Posted February 28, 2015 Share Posted February 28, 2015 (edited) This work. ^^ Thanks. And pet can have HP and die. Edit: One little problem. ^^ You solve this? Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
GASS 0 Posted February 28, 2015 Share Posted February 28, 2015 Someone can help me to add this addons on my server 2089m by skype? Link to comment Share on other sites More sharing options...
iRemain 17 Posted February 28, 2015 Share Posted February 28, 2015 Someone can help me to add this addons on my server 2089m by skype? works only for 40k source 1 Link to comment Share on other sites More sharing options...
bumxd 16 Posted March 13, 2015 Share Posted March 13, 2015 (edited) Corrected tabulation, code, include and english How-To [HowTo] Search in petsystem.h "void unmount();" and add this under : bool Attack(LPCHARACTER pkVictim = NULL); It's look like this : Then search "CPetActor* GetByVnum(DWORD vnum) const;" and add this under : void LaunchAttack(LPCHARACTER pkVictim = NULL); It's look like this : -> Save and then open PetSystem.cpp: Search the "bool CPetActor::Update(DWORD deltaTime)" function And replace it with this : bool CPetActor::Update(DWORD deltaTime) { bool bResult = false; if (m_pkOwner->IsDead() || (IsSummoned() && m_pkChar->IsDead()) || NULL == ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID()) || ITEM_MANAGER::instance().FindByVID(this->GetSummonItemVID())->GetOwner() != this->GetOwner() ) { this->Unsummon(); return true; } if (this->GetCharacter()->GetVictim()) { bResult = this->Attack(); } if (!bResult) { if (this->IsSummoned() && HasOption(EPetOption_Followable)) bResult = this->_UpdateFollowAI(); } return bResult; } Search the "void CPetActor::ClearBuff()" function And add this function under : bool CPetActor::Attack(LPCHARACTER pkVictim) { if (pkVictim) { if (!pkVictim->IsMonster() || pkVictim->IsDead()) return false; if (m_pkChar->GetVictim()) return false; } else { pkVictim = m_pkChar->GetVictim(); if (!pkVictim) return false; } m_pkChar->SetVictim(pkVictim); const PIXEL_POSITION& rkPetPos = m_pkChar->GetXYZ(); const PIXEL_POSITION& rkVictimPos = pkVictim->GetXYZ(); int iDistance = DISTANCE_APPROX(rkPetPos.x - rkVictimPos.x, rkPetPos.y - rkVictimPos.y); if (iDistance >= m_pkChar->GetMobAttackRange()) { m_pkChar->Follow(pkVictim, m_pkChar->GetMobAttackRange()); } else { if (get_dword_time() - m_pkChar->GetLastAttackTime() >= 3000) { if (m_pkChar->Attack(pkVictim)) { m_pkChar->SendMovePacket(FUNC_ATTACK, 0, rkPetPos.x, rkPetPos.y, 0, get_dword_time()); m_pkChar->SetLastAttacked(get_dword_time()); } } } return true; } It will look like this: Search "bool CPetSystem::Update(DWORD deltaTime)" And add this above: void CPetSystem::LaunchAttack(LPCHARACTER pkVictim) { if (!pkVictim) return; for (itertype(m_petActorMap) it = m_petActorMap.begin(); it != m_petActorMap.end(); ++it) { CPetActor* pkPetActor = it->second; if (pkPetActor->IsSummoned()) pkPetActor->Attack(pkVictim); } } It will look like this: Save and open "char_battle.cpp" : Add a the begining : #include "PetSystem.h" Then search this function : "bool CHARACTER::Attack(LPCHARACTER pkVictim, BYTE bType)" And especially this part: // only pc sets victim null. For npc, state machine will reset this. if (BATTLE_DEAD == iRet && IsPC()) SetVictim(NULL); Add this under: if (BATTLE_DEAD != iRet && IsPC()) { if (m_petSystem && m_petSystem->CountSummoned() > 0) m_petSystem->LaunchAttack(pkVictim); } It will look like this: Save and open "pvp.cpp" Then search this function : "bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim)" And add this under : if (pkChr->IsPet() && pkVictim->IsMonster()) { return true; } if (pkChr->IsMonster() && pkVictim->IsPet()) { return true; } Like this: Recompile, and done do this and give in mob proto damage minmax and pet don`t attck..stay and all Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
ImBacK 8 Posted March 16, 2015 Share Posted March 16, 2015 not work @@ Link to comment Share on other sites More sharing options...
newja 53 Posted March 16, 2015 Share Posted March 16, 2015 (edited) not work @@ Works. Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
insaneclimax 40 Posted March 16, 2015 Share Posted March 16, 2015 i found bug. When pet die the states givem from the pet stay on my states and acomulate ever time i call him. Sory for bad eng. Link to comment Share on other sites More sharing options...
sucopowa 7 Posted March 17, 2015 Share Posted March 17, 2015 is it posible to pack that modified soruce-places to an lib? (i imagine that it is, could someone shortly explain how that works? :x thanks :3 ) Link to comment Share on other sites More sharing options...
FaKirul 2 Posted March 25, 2015 Share Posted March 25, 2015 It is not complete. Pet does not have life. Monsters do not attack the petul. Your pet will not die. Pet does not revive. Link to comment Share on other sites More sharing options...
Dyshaxo 48 Posted March 31, 2015 Author Share Posted March 31, 2015 It is not complete. Pet does not have life. Monsters do not attack the petul. Your pet will not die. Pet does not revive. Pet does have life, monsters do attack the pet, pet can die, and if you re-use your pet-seal it will revive. Maybe you should implement it and take a look by yourself before creating statements. The video was made in a pre-stadium of the release. Link to comment Share on other sites More sharing options...
Management Karbust 4885 Posted March 31, 2015 Management Share Posted March 31, 2015 Isn't working with me... When I die, the pet disappear... It's from the quest or the code? My quest is the official from the leak... Link to comment Share on other sites More sharing options...
Premium .Avenue™ 782 Posted April 2, 2015 Premium Share Posted April 2, 2015 What did I wrong? my pet attacks me :| 1 Link to comment Share on other sites More sharing options...
Developer PACI 921 Posted April 2, 2015 Developer Share Posted April 2, 2015 What did I wrong? my pet attacks me :| thug.life.bro 3 when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
The Naid 119 Posted April 2, 2015 Share Posted April 2, 2015 What did I wrong? my pet attacks me :| You have add AGGR in mob_proto. xD Link to comment Share on other sites More sharing options...
Premium V0iĐ 114 Posted April 2, 2015 Premium Share Posted April 2, 2015 Illuminati, Illuminati everywhere! otherwise thank you the release, it's cool Link to comment Share on other sites More sharing options...
Management Karbust 4885 Posted April 2, 2015 Management Share Posted April 2, 2015 Isn't working with me... When I die, the pet disappear... It's from the quest or the code? My quest is the official from the leak... I changed quest and the pet still disappearing when I die, someone call tell me what is wrong? I already take off the system to see if was working before, but happends the same... Link to comment Share on other sites More sharing options...
Denis 1474 Posted April 2, 2015 Share Posted April 2, 2015 Isn't working with me... When I die, the pet disappear... It's from the quest or the code? My quest is the official from the leak... I changed quest and the pet still disappearing when I die, someone call tell me what is wrong? I already take off the system to see if was working before, but happends the same... Actually, the pet system is working with that way.If you want to remove that open PetSystem.cpp and remove this: m_pkOwner->IsDead() || 1 Link to comment Share on other sites More sharing options...
Management Karbust 4885 Posted April 2, 2015 Management Share Posted April 2, 2015 (edited) Isn't working with me... When I die, the pet disappear... It's from the quest or the code? My quest is the official from the leak... I changed quest and the pet still disappearing when I die, someone call tell me what is wrong? I already take off the system to see if was working before, but happends the same... Actually, the pet system is working with that way.If you want to remove that open PetSystem.cpp and remove this: m_pkOwner->IsDead() || Staying like this? Edited August 19, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Denis 1474 Posted April 2, 2015 Share Posted April 2, 2015 Yes. 1 Link to comment Share on other sites More sharing options...
Management Karbust 4885 Posted April 3, 2015 Management Share Posted April 3, 2015 Now when I die the pet follow the monster, but don't attack... And when I die, when I click on the pet don't appear the menu and when I use the item don't happends nothing, I need to restart in Town if I want to use again... Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted April 3, 2015 Former Staff Share Posted April 3, 2015 Now when I die the pet follow the monster, but don't attack... And when I die, when I click on the pet don't appear the menu and when I use the item don't happends nothing, I need to restart in Town if I want to use again... i'm not sure about this .... add this to the CPetActor::_UpdateFollowAI() bool if (m_pkOwner->IsDead()) { m_pkChar->SendMovePacket(FUNC_WAIT, 0, 0, 0, 0); } Link to comment Share on other sites More sharing options...
ImBacK 8 Posted April 17, 2015 Share Posted April 17, 2015 not working Link to comment Share on other sites More sharing options...
Recommended Posts