Jump to content

Micha aka xCPx

Inactive Member
  • Posts

    62
  • Joined

  • Last visited

  • Days Won

    4
  • Feedback

    0%

Posts posted by Micha aka xCPx

  1. Quite nice,, that you use nearly my exact script, i released 2015 on Epvp.

    simply search for [RLS] Ingame Channel Switcher like WOM2 

    and compare :D

    But @LordZiege:  you need to check this first in the clientside-script ( i think the check was in my py scripts for the original switcher)

  2. 2 hours ago, terrorr said:

    Of course I was read "boy" .... Maybe you have some problem about it? Or maybe you wanna jump on my dick, aaa "boy"? I just give him my opinion from this log which he added, and that was for free. For you log isn't full, but for me that one have to be repair. But you are "developer" so... Merry Christmas Micha.

    I didnt want to be nasty, in my normal language its like you call people sometimes :o
    I am sorry, if you think i was ugly to you :o
    I just wanted you to have a look at the end of the logs, there isnt a shutdown etc, so basically, there are 2 possibilties:

    1. he didnt provided the whole file ( because only 1096 lines on gamefile, what is not that much for a running server  and also there isnt any huge Error that would cause a down)

    2. He posted the wrong games syserr

    3. he has huge problems with Offlineshop ( sometimes doesnt show errors then, but crashes)
     

    • Love 1
  3. 12 hours ago, terrorr said:

    It's just simple mysql problem with query to your base.

     

    Table : 'what' , 'playtime' , loginlog2

    Also repair your sectre in maps :)

    Also : Data too long for column 'command'

     

    Repair this one and say if fixed.

     

    Nothing intresting in log...

    Sorry Boy, but did you read to the End of what he has pasted? The Log File isnt complete, so actually we dont even see what Error does shutdown the core.

    • Love 1
  4. Actually its quite small now.
    i got about 6 milion email adresses from metin2 players all over the world ( the played 2010)  but now only about 500 of them are still playing.

    So i think metin2 will have a total of maybe 100 000 player worldwide.

  5. Hey guys,

    actually i am working on my own kind of MMORPG in UE4.
    Until now i did quite well, and much things are allready working.
    But since i am quite not a richman, i would need some help for getting Textures / Designs / Servers and so on.

    Thats why i ask you for becoming a Sponsor of it.

    Of course Sponsors do get a Procentual / fixxed Money after game goes towards Stores / Online.
    Also you could bring your own Ideas and so create a more than just amazing Game with me (:
    You can (of course) have a look at how it looks ingame. Dev Client is provided.
    kind regards,
    Micha

    Skype: look at my Profile ( Board Rules) or write me as PN

    tc6Vc.jpg

    • Love 3
  6. Here you got some bugfixes from me.


    Stack Potts etc directly in Belt Inventory, before putting them to Inventory

    Spoiler

    char_item.cpp:


    search:

    if (item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK))
    {
        BYTE bCount = item->GetCount();

    add after:
        for (WORD i = BELT_INVENTORY_SLOT_START; i < BELT_INVENTORY_SLOT_END; ++i)
            {
                LPITEM item2 = pc->GetInventoryItem(i);

                if(!item2)
                    continue;
                if (item2->GetVnum() == item->GetVnum())
                {
                    int j;

                    for (j = 0; j < ITEM_SOCKET_MAX_NUM; ++j)
                        if (item2->GetSocket(j) != item->GetSocket(j))
                            break;

                    if (j != ITEM_SOCKET_MAX_NUM)
                        continue;

                    BYTE bCount2 = MIN(200 - item2->GetCount(), bCount);
                    bCount -= bCount2;

                    item2->SetCount(item2->GetCount() + bCount2);

                    if (bCount == 0)
                    {
                        ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s"), item2->GetName());
                        M2_DESTROY_ITEM(item);
                        if (item2->GetType() == ITEM_QUEST)
                            quest::CQuestManager::instance().PickupItem (GetPlayerID(), item2);
                        return true;
                    }
                }
            }

            item->SetCount(bCount);

    Stack items you drop for Other guys in your party:

    Spoiler

     

    char_item.cpp:

    search:
    LPCHARACTER owner = funcFindOwnership.owner;

                int iEmptyCell;

    add after:
    //FIX_DROP_PARTY
                if (owner)
                {
                    if (item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK))
                    {
                        BYTE bCount = item->GetCount();
                        for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
                        {
                            LPITEM item2 = owner->GetInventoryItem(i);

                            if (!item2)
                                continue;
                            if (item2->GetVnum() == item->GetVnum())
                            {
                                int j;

                                for (j = 0; j < ITEM_SOCKET_MAX_NUM; ++j)
                                if (item2->GetSocket(j) != item->GetSocket(j))
                                    break;

                                if (j != ITEM_SOCKET_MAX_NUM)
                                    continue;

                                BYTE bCount2 = MIN(200 - item2->GetCount(), bCount);
                                bCount -= bCount2;

                                item2->SetCount(item2->GetCount() + bCount2);

                                if (bCount == 0)
                                {
                                    owner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s ´ÔÀ¸·ÎºÎÅÍ %s"), GetName(), item2->GetName());
                                    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ Àü´Þ: %s ´Ô¿¡°Ô %s"), owner->GetName(), item2->GetName());
                                    M2_DESTROY_ITEM(item);
                                    if (item2->GetType() == ITEM_QUEST)
                                        quest::CQuestManager::instance().PickupItem(owner->GetPlayerID(), item2);
                                    return true;
                                }
                            }
                        }
                        item->SetCount(bCount);

                    }

                }
                //END FIX_DROP_PARTY

     



    Fix for the Drops Pet makes if they kill an Monster

     

    Spoiler

     

    service.h:
        add:
            #define __FIX_PET_ATTACK


    char.h:
        search:
            #ifdef __PET_SYSTEM__
                private:
                    bool m_bIsPet;
                public:
                    void SetPet() { m_bIsPet = true; }
                    bool IsPet() { return m_bIsPet; }
            #endif
        add below:
            #ifdef __FIX_PET_ATTACK
                private:
                    LPCHARACTER m_Owner;
                public:
                    void SetOwner(LPCHARACTER owner) { m_Owner = owner; }
                    LPCHARACTER GetOwner() { return m_Owner; }
            #endif
    char.cpp:
        search:
            #ifdef PET_SYSTEM
             m_petSystem = 0;
             m_bIsPet = false;
            #endif
        add below:
            #ifdef __FIX_PET_ATTACK
            m_Owner = NULL;
            #endif
    PetSystem.cpp:
        in:
            DWORD CPetActor::Summon(const char* petName, LPITEM pSummonItem, bool bSpawnFar)
        search:
            if (0 != m_pkChar)
            {
                m_pkChar->Show (m_pkOwner->GetMapIndex(), x, y);
                m_dwVID = m_pkChar->GetVID();

                return m_dwVID;
            }
        replace it with:
            if (0 != m_pkChar)
            {
            #ifdef __FIX_PET_ATTACK
                    m_pkChar->SetOwner(m_pkOwner);
                    m_pkChar->SetPet();
            #endif
                m_pkChar->Show (m_pkOwner->GetMapIndex(), x, y);
                m_dwVID = m_pkChar->GetVID();

                return m_dwVID;
            }
            

        search:
            m_pkChar->SetEmpire(m_pkOwner->GetEmpire());
        add below:
            #ifdef __FIX_PET_ATTACK
                    m_pkChar->SetOwner(m_pkOwner);
            #endif

    item.cpp:
        in:
            void CItem::SetOwnership(LPCHARACTER ch, int iSec)


        add at the beginning of the function:
            #ifdef __FIX_PET_ATTACK
                if(ch)
                {
                    if (ch->IsPet())
                    {
                        LPCHARACTER owner = ch->GetOwner();
                        if(owner)
                            ch = owner;
                    }
                }
            #endif

     


    Pets run towards your dropped items and pick them up for you:

     

     

    Spoiler

     

    service.h:
            add:
                    #define __PET_PICKUP
    PetSystem.h:
            search:
                    void            SetSummonItem (LPITEM pItem);
            add below:
                    #ifdef __PET_PICKUP
                            void            PickUpItems(int range);
                            void            BringItem();
                            void            SetPickup(bool is_pickup) { m_is_pickup = is_pickup; }
                            bool            IsPickup(){ return m_is_pickup; }
                            void            SetPickupItem(LPITEM item) { m_pickup_item = item; }
                            LPITEM            GetPickupItem(){ return m_pickup_item; }
                    #endif
            search:
                LPCHARACTER        m_pkOwner;
            add below:
                #ifdef __PET_PICKUP
                bool            m_is_pickup;
                LPITEM            m_pickup_item;
                #endif


    char.h:
            search:
                    bool            PickupItem(DWORD vid);
            add below:
                    #ifdef __PET_PICKUP
                            bool            PickupItemByPet(DWORD vid);
                            
                    #endif


    char_item.cpp:
            search:
                bool CHARACTER::PickupItem(DWORD dwVID)

            add above:
                #ifdef __PET_PICKUP
                bool CHARACTER::PickupItemByPet(DWORD dwVID)
                {
                    LPITEM item = ITEM_MANAGER::instance().FindByVID(dwVID);
                    if (IsObserverMode())
                        return false;
                    if (!item || !item->GetSectree())
                        return false;
                    if (item->IsOwnership(this))
                    {
                        if (item->GetType() == ITEM_ELK)
                        {
                            GiveGold(item->GetCount());
                            item->RemoveFromGround();

                            M2_DESTROY_ITEM(item);
                            Save();
                        }
                        else
                        {
                            if (item->IsStackable() && !IS_SET(item->GetAntiFlag(), ITEM_ANTIFLAG_STACK))
                            {
                                BYTE bCount = item->GetCount();

                                for (int i = 0; i < INVENTORY_MAX_NUM; ++i)
                                {
                                    LPITEM item2 = GetInventoryItem(i);

                                    if (!item2)
                                        continue;

                                    if (item2->GetVnum() == item->GetVnum())
                                    {
                                        int j;

                                        for (j = 0; j < ITEM_SOCKET_MAX_NUM; ++j)
                                        if (item2->GetSocket(j) != item->GetSocket(j))
                                            break;

                                        if (j != ITEM_SOCKET_MAX_NUM)
                                            continue;

                                        BYTE bCount2 = MIN(200 - item2->GetCount(), bCount);
                                        bCount -= bCount2;

                                        item2->SetCount(item2->GetCount() + bCount2);

                                        if (bCount == 0)
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s"), item2->GetName());
                                            M2_DESTROY_ITEM(item);
                                            if (item2->GetType() == ITEM_QUEST)
                                                quest::CQuestManager::instance().PickupItem(GetPlayerID(), item2);
                                            return true;
                                        }
                                    }
                                }

                                item->SetCount(bCount);
                            }

                            int iEmptyCell;
                            if (item->IsDragonSoul())
                            {
                                if ((iEmptyCell = GetEmptyDragonSoulInventory(item)) == -1)
                                {
                                    sys_log(0, "No empty ds inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                                    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                                    return false;
                                }
                            }
                            else
                            {
                                if ((iEmptyCell = GetEmptyInventory(item->GetSize())) == -1)
                                {
                                    sys_log(0, "No empty inventory pid %u size %ud itemid %u", GetPlayerID(), item->GetSize(), item->GetID());
                                    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¼ÒÁöÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀÌ ³Ê¹« ¸¹½À´Ï´Ù."));
                                    return false;
                                }
                            }

                            item->RemoveFromGround();

                            if (item->IsDragonSoul())
                                item->AddToCharacter(this, TItemPos(DRAGON_SOUL_INVENTORY, iEmptyCell));
                            else
                                item->AddToCharacter(this, TItemPos(INVENTORY, iEmptyCell));

                            char szHint[32 + 1];
                            snprintf(szHint, sizeof(szHint), "%s %u %u", item->GetName(), item->GetCount(), item->GetOriginalVnum());
                            LogManager::instance().ItemLog(this, item, "GET", szHint);
                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("¾ÆÀÌÅÛ È¹µæ: %s"), item->GetName());

                            if (item->GetType() == ITEM_QUEST)
                                quest::CQuestManager::instance().PickupItem(GetPlayerID(), item);
                        }
                        //Motion(MOTION_PICKUP);
                        return true;
                    }

                    return false;
                }
                #endif
    PetSystem.cpp:
            search:
                    bool CPetActor::Follow(float fMinDistance)
            add above:
                    #ifdef __PET_PICKUP
                    struct PetPickUpItemStruct
                    {
                        CPetActor * pet;
                        int range;
                        PetPickUpItemStruct(CPetActor * p, int r){

                            pet = p;
                            range = r;
                        }
                        void operator()(LPENTITY pEnt)
                        {
                            if (!pet->GetOwner() || !pet->GetCharacter())
                                return;
                            if (pet->IsPickup())
                                return;
                            if (pEnt->IsType(ENTITY_ITEM) == true)
                            {
                                
                                LPITEM item = (LPITEM)pEnt;
                                LPCHARACTER player = pet->GetOwner();
                                if (!item->GetSectree() || !item->IsOwnership(player))
                                    return;

                                int iDist = DISTANCE_APPROX(item->GetX() - player->GetX(), player->GetY() - player->GetY());

                                if (iDist > range)
                                    return;
                                pet->SetPickup(true);
                                pet->SetPickupItem(item);
                            }

                        }
                    };
                    void CPetActor::PickUpItems(int range){
                        if (IsPickup())
                            return;
                        long map = m_pkChar->GetMapIndex();
                        PIXEL_POSITION m = m_pkChar->GetXYZ();
                        LPSECTREE tree = SECTREE_MANAGER::instance().Get(map, m.x, m.y);
                        if (!tree)
                        {
                            sys_err("cannot find sectree by %dx%d", m.x, m.y);
                            return;
                        }
                        PetPickUpItemStruct f(this, range);
                        tree->ForEachAround(f);
                    }

                    void CPetActor::BringItem(){
                        if (!IsPickup())
                            return;
                        LPITEM item = GetPickupItem();
                        if (!m_pkOwner || !m_pkChar || !item || !item->GetSectree())
                            return;
                        
                        float fMinDistance = 20.0;
                        float fPetX = m_pkChar->GetX();
                        float fPetY = m_pkChar->GetY();

                        float itemX = item->GetX();
                        float itemY = item->GetY();

                        float fDist = DISTANCE_SQRT(itemX - fPetX, itemY - fPetY);
                        if (fDist <= 250.0)
                        {
                            SetPickup(false);
                            m_pkOwner->PickupItemByPet(item->GetVID());
                            SetPickupItem(NULL);
                            m_pkChar->SendMovePacket(FUNC_WAIT, 0, 0, 0, 0, 0);
                            return;
                        }
                        m_pkChar->SetRotationToXY(itemX, itemY);
                        float fx, fy;

                        float fDistToGo = fDist - fMinDistance;
                        GetDeltaByDegree(m_pkChar->GetRotation(), fDistToGo, &fx, &fy);

                        if (!m_pkChar->Goto((int)(fPetX + fx + 0.5f), (int)(fPetY + fy + 0.5f)))
                            return;

                        m_pkChar->SendMovePacket(FUNC_WAIT, 0, 0, 0, 0, 0);
                    }
                    #endif

        search:
            if (this->IsSummoned() && HasOption(EPetOption_Followable))

        add above:
                #ifdef __PET_PICKUP
                    if (this->IsSummoned()){
                        this->BringItem();
                        this->PickUpItems(900); // 900 = RANGE
                    }    
                #endif
        search:
            this->SetSummonItem(NULL);
        add below:
            #ifdef __PET_PICKUP
                    this->SetPickupItem(NULL);
                    this->SetPickup(false);
            #endif

        search:
            m_dwSummonItemVID = 0;
            m_dwSummonItemVnum = 0;
        add below:
            #ifdef __PET_PICKUP
                    this->SetPickupItem(NULL);
                    this->SetPickup(false);
            #endif

     

     

     

     

     

    • Love 16
  7. On 6.5.2016 at 10:12 PM, Nickas said:

    i tested.not working

    First of all:

    Nice that you asked to release my Code here.

    Second:

    the compiling of this version sometimes failes ( gcc issue)


    so to make it work right:

    change:
    LPCHARACTER m_Owner = NULL;

     

    to:
    LPCHARACTER m_Owner;

    • Love 1
  8. M2 Download Center

    This is the hidden content, please
    ( Internal )

    Hey.


    i wanted to give you something, so i simply wrote the code for it:
     

    Target Sys:

    Spoiler

     

    Server:


    char_battle.cpp:
    search for:

    
    
    void CHARACTER::SendDamagePacket(LPCHARACTER pAttacker, int Damage, BYTE DamageFlag)

    after:

    
    
    damageInfo.header = HEADER_GC_DAMAGE_INFO;
    damageInfo.dwVID = (DWORD)GetVID();
    damageInfo.flag = DamageFlag;
    damageInfo.damage = Damage;           

    add:

    
    
    PacketAround(&damageInfo, sizeof(TPacketGCDamageInfo));
    return;


    client:


    PythonNetworkStreamPhaseGame.cpp:
    search for:

    
    
    bool CPythonNetworkStream::RecvDamageInfoPacket()

     replace:

    
    
    bool bTarget = (pInstTarget==m_pInstTarget);

    with:

    
    
    bool bTarget = true;

    Enjoy!

     

     

    • Metin2 Dev 70
    • kekw 2
    • Cry 1
    • Smile Tear 1
    • Confused 1
    • Good 17
    • Love 6
    • Love 47
×
×
  • 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.