Legend
-
Posts
150 -
Joined
-
Last visited
-
Days Won
5 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Legend
-
-
1 hour ago, Fr3zy94 said:
Nice idea but:
1. When you puch, the dance stops but the weapon isn't shown.
2. If you have Costum Weapon, the game is shown only the normal weapon.
because is working with time.
-
-
You can make it also to read it from the backwards like arabic language.
-
There is also a fix about the /in command.
-
Hey,
Today i will show you how you can fix easy the invisibility effect bug and the AFFECT_EUNHYEONG = sealth ninja skill from 17.5 Official update.
InstanceBase.cpp (Is hiding the ninja from the minimap)
SpoilerSearch for:
SpoilerBOOL CInstanceBase::IsInvisibility()
{
if (IsAffect(AFFECT_INVISIBILITY))
return true;return false;
}
Replace with:
SpoilerBOOL CInstanceBase::IsInvisibility()
{
if (IsAffect(AFFECT_INVISIBILITY) || IsAffect(AFFECT_EUNHYEONG))
return true;return false;
}Search for:
Spoilervoid CInstanceBase::Render()
{Inside the function search for:
m_GraphicThingInstance.Render();
Add bellow:
-
CPythonCharacterManager & rkChrMgr = CPythonCharacterManager::Instance();
-
-
for (auto ptr = rkChrMgr.CharacterInstanceBegin(); ptr != rkChrMgr.CharacterInstanceEnd(); ++ptr)
-
{
-
CInstanceBase * pkInstEach = *ptr;
-
-
if (pkInstEach)
-
{
-
if (pkInstEach->IsAffect(AFFECT_EUNHYEONG) || pkInstEach->IsAffect(AFFECT_INVISIBILITY))
-
{
-
if (CPythonPlayer::Instance().IsMainCharacterIndex(pkInstEach->GetVirtualID()))
-
continue;
-
-
pkInstEach->m_GraphicThingInstance.HideAllAttachingEffect();
-
}
-
}
-
}
InstanceBaseEffect.cpp
Search for:
Spoilervoid CInstanceBase::__SetAffect(UINT eAffect, bool isVisible)
{Inside the function search:
case AFFECT_INVISIBILITY:
if (isVisible)
{
m_GraphicThingInstance.ClearAttachingEffect();
__EffectContainer_Destroy();
DetachTextTail();
}
else
{
m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f);
AttachTextTail();
RefreshTextTail();
}
return;
break;}
Replace with:
Spoilercase AFFECT_INVISIBILITY:
if (isVisible)
{
// m_GraphicThingInstance.ClearAttachingEffect();
// __EffectContainer_Destroy();
// DetachTextTail();
m_GraphicThingInstance.HideAllAttachingEffect();
}
else
{
m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f);
m_GraphicThingInstance.ShowAllAttachingEffect();// AttachTextTail();
// RefreshTextTail();
}
return;
break;- 2
- 18
-
-
Thanks for the share, but there is a bug with the system if you have party and you disconnect from both characters after when you login and one of the two characters are offline shows him online.
-
2 minutes ago, ReFresh said:
void CHARACTER::AutoGiveItem(LPITEM item, bool longOwnerShip) { if (NULL == item) { sys_err ("NULL point."); return; } if (item->GetOwner()) { sys_err ("item %d 's owner exists!",item->GetID()); return; } int cell; if (item->IsDragonSoul()) { cell = GetEmptyDragonSoulInventory(item); } else { cell = GetEmptyInventory (item->GetSize()); } if (cell != -1) { if (item->IsDragonSoul()) item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, cell)); else item->AddToCharacter(this, TItemPos(INVENTORY, cell)); LogManager::instance().ItemLog(this, item, "SYSTEM", item->GetName()); if (item->GetType() == ITEM_USE && item->GetSubType() == USE_POTION) { TQuickslot * pSlot; if (GetQuickslot(0, &pSlot) && pSlot->type == QUICKSLOT_TYPE_NONE) { TQuickslot slot; slot.type = QUICKSLOT_TYPE_ITEM; slot.pos = cell; SetQuickslot(0, slot); } } } else { item->AddToGround (GetMapIndex(), GetXYZ()); item->StartDestroyEvent(); if (longOwnerShip) item->SetOwnership (this, 300); else item->SetOwnership (this, 60); LogManager::instance().ItemLog(this, item, "SYSTEM_DROP", item->GetName()); } } LPITEM CHARACTER::AutoGiveItem(DWORD dwItemVnum, BYTE bCount, int iRarePct, bool bMsg) { TItemTable * p = ITEM_MANAGER::instance().GetTable(dwItemVnum); if (!p) return NULL; DBManager::instance().SendMoneyLog(MONEY_LOG_DROP, dwItemVnum, bCount); if (p->dwFlags & ITEM_FLAG_STACKABLE && p->bType != ITEM_BLEND) { for (int i = 0; i < INVENTORY_MAX_NUM; ++i) { LPITEM item = GetInventoryItem(i); if (!item) continue; if (item->GetVnum() == dwItemVnum && FN_check_item_socket(item)) { if (IS_SET(p->dwFlags, ITEM_FLAG_MAKECOUNT)) { if (bCount < p->alValues[1]) bCount = p->alValues[1]; } BYTE bCount2 = MIN(200 - item->GetCount(), bCount); bCount -= bCount2; item->SetCount(item->GetCount() + bCount2); if (bCount == 0) { if (bMsg) ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ľĆŔĚĹŰ Čąµć: %s"), item->GetName()); return item; } } } } LPITEM item = ITEM_MANAGER::instance().CreateItem(dwItemVnum, bCount, 0, true); if (!item) { sys_err("cannot create item by vnum %u (name: %s)", dwItemVnum, GetName()); return NULL; } if (item->GetType() == ITEM_BLEND) { for (int i=0; i < INVENTORY_MAX_NUM; i++) { LPITEM inv_item = GetInventoryItem(i); if (inv_item == NULL) continue; if (inv_item->GetType() == ITEM_BLEND) { if (inv_item->GetVnum() == item->GetVnum()) { if (inv_item->GetSocket(0) == item->GetSocket(0) && inv_item->GetSocket(1) == item->GetSocket(1) && inv_item->GetSocket(2) == item->GetSocket(2) && inv_item->GetCount() < ITEM_MAX_COUNT) { inv_item->SetCount(inv_item->GetCount() + item->GetCount()); return inv_item; } } } } } int iEmptyCell; if (item->IsDragonSoul()) { iEmptyCell = GetEmptyDragonSoulInventory(item); } else iEmptyCell = GetEmptyInventory(item->GetSize()); if (iEmptyCell != -1) { if (bMsg) ChatPacket(CHAT_TYPE_INFO, LC_TEXT("ľĆŔĚĹŰ Čąµć: %s"), item->GetName()); if (item->IsDragonSoul()) item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell)); else item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell)); LogManager::instance().ItemLog(this, item, "SYSTEM", item->GetName()); if (item->GetType() == ITEM_USE && item->GetSubType() == USE_POTION) { TQuickslot * pSlot; if (GetQuickslot(0, &pSlot) && pSlot->type == QUICKSLOT_TYPE_NONE) { TQuickslot slot; slot.type = QUICKSLOT_TYPE_ITEM; slot.pos = iEmptyCell; SetQuickslot(0, slot); } } } else { item->AddToGround(GetMapIndex(), GetXYZ()); item->StartDestroyEvent(); // ľČĆĽ µĺ¶ř flag°ˇ °É·ÁŔÖ´Â ľĆŔĚĹŰŔÇ °ćżě, // ŔÎşĄżˇ şó °ř°ŁŔĚ ľřľîĽ ľîÂż Ľö ľřŔĚ ¶łľîĆ®¸®°Ô µÇ¸é, // ownershipŔ» ľĆŔĚĹŰŔĚ »ç¶óÁú ¶§±îÁö(300ĂĘ) ŔŻÁöÇŃ´Ů. if (IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_DROP)) item->SetOwnership(this, 300); else item->SetOwnership(this, 60); LogManager::instance().ItemLog(this, item, "SYSTEM_DROP", item->GetName()); } sys_log(0, "7: %d %d", dwItemVnum, bCount); return item; }
The text phrase is not coming from the autogiveitem function as i can see. please find from where is comes and let me know.
-
Just now, ReFresh said:
@Legend In which file it is?
char_item.cpp
-
1 minute ago, ReFresh said:
@Legend I need to remove text phrase not the item. When I'm buying items from shops I'm getting these phrases because of autogiveitem:
Can you share your ::autogiveitem function?
-
14 minutes ago, ReFresh said:
@Legend Thanks gonna to try it and can you tell me how can I delete: You recieved bla bla ... when I buy something from normal npc shop?
// Remove: You have received blabla. text.
SpoilerReplace::
item = ch->AutoGiveItem(item->GetVnum(), item->GetCount());
With:
item = ch->AutoGiveItem(item->GetVnum(), item->GetCount(), -1, false);
- 1
-
16 minutes ago, ReFresh said:
@Legend Any solution for this must exist because one server have it without the: You recieved.. bla bla
And still need do a stacking items when I buy them from private shop.
shopEx.cpp
You have received blabla:Spoiler// Search for:
LogManager::instance().ItemLog(ch, item, "BUY", item->GetName());
// Add under:
ch->ChatPacket(CHAT_TYPE_INFO, "You have bought: %s for %u yang.", item->GetName(), dwPrice);
Auto Stack (privateshop):
SpoilerFile: shopEx.cpp
Search:
if (item->IsDragonSoul())
item->AddToCharacter(ch, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyPos));
else
item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));Replace with this.
// if (item->IsDragonSoul())
// item->AddToCharacter(ch, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyPos));
// else
// item->AddToCharacter(ch, TItemPos(INVENTORY, iEmptyPos));
// AutoGiveItem ( Stack )
item = ch->AutoGiveItem(item->GetVnum(), item->GetCount());
// End -
1 hour ago, ReFresh said:
@Endymion nice, it works but it writing in chat which item I bought, like when you pick up some item, it's so annoying can you remove it? I mean: You recieved red potion... etc.
And it works only when you buying items from npc shop not working when I create shop with player.
Add the autogiveitem in the shopex.cpp too.
-
- 1
-
I already finish that system, is very nice you can add a table which the player when use the mount for first time to select a bonus like 20% against monsters, 10% critical attack etc and you can see that bonus on the seal [tooltip], also a name like horse for the new mount which you can see on the seal [Name].
-
7 minutes ago, daradevil124 said:
Thanks, i will test.
https://metin2.download/picture/77BDf3N9AB8Rf6R97u2o2AA9xLKVefM9/.png
do i something wrong?, cause its not work.
Download:
download the file and follow the tutorial.
- 4
- 3
- 3
-
On 3/14/2017 at 11:50 PM, Tasho said:
Thanks for release, but why you create a new bool for what? to look like more tutorial code? need only 3 lines.
const TPixelPosition& c_rkPPosCur = NEW_GetCurPixelPositionRef(); if (CPythonBackground::Instance().isAttrOn(c_rkPPosCur.x, c_rkPPosCur.y, CTerrainImpl::ATTRIBUTE_BANPK)) return FALSE;
Also the check is already exist, just need to copy-paste check from:
bool CInstanceBase::IsInSafe() // InstanceBase.cpp
Original idea is from: Rubinum2.
I create a new bool because in my source i use more code from that what i share here.
I had coded this before a long time ago and i share it now, the idea is not coming from Rubinum2 but they have released a video and show this idea to the community before me.
- 1
-
7 minutes ago, Places said:
The page you are trying to access is not available for your account.
Try to use the other download method.
-
Today i release a code which you can walk through safezone without block
Client Source:
GameLib
ActorInstance.h
// Search for: BOOL TestPhysicsBlendingCollision(CActorInstance & rVictim); // Add under: // #ifdef ENABLE_SAFEZONE_STOP_COLLISION BOOL IsInSafe(CActorInstance & ptr); // #endif
ActorInstanceCollisionDetection.cpp
// Search for: BOOL CActorInstance::TestActorCollision(CActorInstance & rVictim) // Add before: // #ifdef ENABLE_SAFEZONE_STOP_COLLISION #include "../UserInterface/PythonBackground.h" BOOL CActorInstance::IsInSafe(CActorInstance & ptr) { const TPixelPosition& c_rkPPosCur = ptr.NEW_GetCurPixelPositionRef(); if (CPythonBackground::Instance().isAttrOn(c_rkPPosCur.x, c_rkPPosCur.y, (1 << 2))) return true; return false; } // #endif // On CActorInstance::TestActorCollision // Search for: if (rVictim.IsDead()) return false; // Add under: // #ifdef ENABLE_SAFEZONE_STOP_COLLISION if (IsInSafe(rVictim)) return false; // #endif
Enjoy.
- 12
- 2
- 19
-
First you have to remove the time from the item, because until you pick up the next item the time is running. (if the items doesn't have the same time can't be stackable).
-
Post your item_proto here.
-
-
It is time to forget the past and celebrate a new beginning.
Happy New Year guys!
- 4
-
input_main.cpp
SpoilerSearch for:
CSafebox * pkSafebox = ch->GetSafebox();
LPITEM pkItem = ch->GetItem(p->ItemPos);Add under:
if (ITEM_WEAPON == pkItem->GetType() && pkItem->IsEquipped())
{
return;
}I didn't test but that should works, I made it only for ITEM_WEAPON.
- 1
-
Hey,
Post your item_proto
Hide Weapon when you Use Emotions
in Programming & Scripts
Posted · Edited by Metin2 Dev
Core X - External 2 Internal
You dont' have replace the file , change the time motions like what i did in the file that is shared.