Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Development] Source Mu Main 1.03.35 [Season 5.1 - Season 5.2]

Joined
Aug 29, 2011
Messages
512
Reaction score
33
1 - Does anyone know where I can find the code in the source that creates the effect that when the item is in the inventory and you place the pose on it, it rotates

2 - And also does anyone know where I can find the code that creates the item drop effect from mobs?
 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
1 - Does anyone know where I can find the code in the source that creates the effect that when the item is in the inventory and you place the pose on it, it rotates
C++:
    if(1==Select)
    {
        ObjectSelect.Angle[1] = WorldTime*0.45f;
    }
2 - And also does anyone know where I can find the code that creates the item drop effect from mobs?

Start from network protocol when monster drops item, and find this animation effect.




Anyone MapFileDecrypt, OpenTerrainAttribute etc for ex700+ maps?
 
Last edited:
Joined
Aug 29, 2011
Messages
512
Reaction score
33
C++:
    if(1==Select)
    {
        ObjectSelect.Angle[1] = WorldTime*0.45f;
    }


Start from network protocol when monster drops item, and find this animation effect.




Anyone MapFileDecrypt, OpenTerrainAttribute etc for ex700+ maps?
unfortunately I couldn't find it in the source, could you tell me which .CPP they are in?
 
Joined
Aug 29, 2011
Messages
512
Reaction score
33
i find the code for the item drop

C++:
void CreateItem(ITEM_t *ip,BYTE *Item,vec3_t Position,int CreateFlag)
{
    int Type = ConvertItemType(Item);
    ITEM *n = &ip->Item;
    n->Type = Type;
    if(Type==ITEM_POTION+15)
    {
        n->Level      = (Item[1]<<16)+(Item[2]<<8)+(Item[4]);
          n->Durability = 0;
        n->Option1    = 0;
        if(CreateFlag)
            PlayBuffer(SOUND_DROP_GOLD01);
    }
    else
    {
        n->Level      = Item[1];
        n->Durability = Item[2];
        n->Option1    = Item[3];
        n->ExtOption  = Item[4];
        n->option_380 = false;
        BYTE b = ( ( (Item[5] & 0x08) << 4) >>7);
        n->option_380 = b;

        if(CreateFlag)
        {
            if(Type==ITEM_POTION+13 || Type==ITEM_POTION+14 ||  Type==ITEM_POTION+16 || Type==ITEM_WING+15 || Type==ITEM_POTION+22 || Type==ITEM_POTION+31)
                PlayBuffer(SOUND_JEWEL01,&ip->Object);
            else if(Type == ITEM_POTION+41)
                PlayBuffer(SOUND_JEWEL02,&ip->Object);
            else
                PlayBuffer(SOUND_DROP_ITEM01,&ip->Object);
        }
    }

    OBJECT *o = &ip->Object;
    o->Live              = true;
    o->Type              = MODEL_SWORD+Type;
    o->SubType        = 1;
    if ( Type == (int)( ITEM_POTION+11))
    {
        switch ( ( n->Level >> 3))
        {
        case 1:
            o->Type = MODEL_EVENT+4;
            break;
        case 2:
            o->Type = MODEL_EVENT+5;
            break;
        case 3:
            o->Type = MODEL_EVENT+6;
            break;
        case 5:
            o->Type = MODEL_EVENT+8;
            break;
        case 6:
            o->Type = MODEL_EVENT+9;
            break;
        case 8:
        case 9:
        case 10:
        case 11:
        case 12:
            o->Type = MODEL_EVENT+10;
            break;
        case 13:
            o->Type = MODEL_EVENT+6;
            break;
        case 14:
        case 15:
            o->Type = MODEL_EVENT+5;
        }
    }
    if ( Type >= ITEM_POTION+46 && Type <= ITEM_POTION+48)
    {
        o->Type = MODEL_ITEM+Type;
    }
    if ( Type >= ITEM_POTION+32 && Type <= ITEM_POTION+34)
    {
        if( (n->Level >> 3) == 1)
        {
            int Num = Type - (ITEM_POTION+32);
            o->Type = MODEL_EVENT+21+Num;
        }
    }
    else if ( Type==(int)(ITEM_POTION+21) )
    {
        switch ( (n->Level>>3) )
        {
        case 1:
        case 2:
            o->Type = MODEL_EVENT+11;
            break;
        }
    }
    else if ( Type==(int)(ITEM_HELPER+19) )
    {
        switch ( (n->Level>>3) )
        {
        case 0:
            o->Type = MODEL_STAFF+10;
            n->Level = 0;
            break;
        case 1:
            o->Type = MODEL_SWORD+19;
            n->Level = 0;
            break;
        case 2:
            o->Type = MODEL_BOW+18;
            n->Level = 0;
            break;
        }
    }
    else if ( Type==ITEM_POTION+23 )
    {
        switch( (n->Level>>3) )
        {
        case 1:
            o->Type = MODEL_EVENT+12;
            break;
            break;
        }
    }
    else if ( Type==ITEM_POTION+24 )
    {
        switch( (n->Level>>3) )
        {
        case 1:
            o->Type = MODEL_EVENT+13;
            break;
        }
    }
    else if ( Type == ITEM_HELPER+20 )
    {
        switch( (n->Level>>3) )
        {
        case 0:
            o->Type = MODEL_EVENT+15;
            break;
        case 1:
        case 2:
        case 3:
            o->Type = MODEL_EVENT+14;
            break;
        }
    }
    else if ( Type == (int)( ITEM_POTION+9))
    {
        switch ( ( n->Level >> 3))
        {
        case 1:
            o->Type = MODEL_EVENT+7;
            break;
        }
    }
    else if ( Type==ITEM_HELPER+14 && (n->Level>>3)==1 )
    {
        o->Type = MODEL_EVENT+16;
    }
    else if ( Type==ITEM_HELPER+11 && (n->Level>>3)==1 )
    {
        o->Type = MODEL_EVENT+18;
    }
    else if ( Type== ITEM_POTION+41 )
    {
        o->Type = MODEL_POTION+41;
    }
    else if ( Type== ITEM_POTION+42 )
    {
        o->Type = MODEL_POTION+42;
    }
    else if ( Type== ITEM_POTION+43 )
    {
        o->Type = MODEL_POTION+43;
    }
    else if ( Type== ITEM_POTION+44 )
    {
        o->Type = MODEL_POTION+44;
    }
    ItemObjectAttribute(o);
    Vector(-30.f,-30.f,-30.f,o->BoundingBoxMin);
    Vector( 30.f, 30.f, 30.f,o->BoundingBoxMax);
    VectorCopy(Position,o->Position);
    if(CreateFlag)
    {
        if ( o->Type == MODEL_EVENT+8 || o->Type == MODEL_EVENT+9)
        {
            short  scale = 55;
            vec3_t Angle;
            vec3_t light;
            Vector( 1.f, 1.f, 1.f, light );
            Vector( 0.f, 0.f, 0.f, Angle);
            vec3_t NewPosition;
            VectorCopy( Position, NewPosition);
            NewPosition[2] = RequestTerrainHeight( Position[0], Position[1] ) + 3;
            CreateEffect(MODEL_SKILL_FURY_STRIKE+6,NewPosition,Angle,light,0,o,scale);
            CreateEffect(MODEL_SKILL_FURY_STRIKE+4,NewPosition,Angle,light,0,o,scale);
            //CreateEffect(MODEL_SKILL_FURY_STRIKE+5,NewPosition,Angle,light,0,o,scale);

             o->Position[2] = RequestTerrainHeight(o->Position[0],o->Position[1]) + 3.f;
             o->Gravity     = 50.f;
        }
        else
        {
             o->Position[2] = RequestTerrainHeight(o->Position[0],o->Position[1]) + 180.f;
             o->Gravity     = 20.f;
        }
    }
    else
    {
         o->Position[2] = RequestTerrainHeight(o->Position[0],o->Position[1]);
    }

    ItemAngle(o);
}
 
Last edited:
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
o->Position[2] = RequestTerrainHeight(o->Position[0],o->Position[1]) + 3.f; o->Gravity = 50.f; } else { o->Position[2] = RequestTerrainHeight(o->Position[0],o->Position[1]) + 180.f; o->Gravity = 20.f;
So, you found important information like initial position that is TerrainHeight + 180 and gravity 20.f
 
Newbie Spellweaver
Joined
Mar 26, 2024
Messages
5
Reaction score
3
Customs:

- Display item informations on ground.

File: NewUINameWindow.cpp

Change:

Code:
        else if(SelectedItem != -1)
        {
            RenderItemName(SelectedItem,&Items[SelectedItem].Object,Items[SelectedItem].Item.Level,Items[SelectedItem].Item.Option1,Items[SelectedItem].Item.ExtOption,false);
        }

To :

Code:
        else if(SelectedItem != -1)
        {
            ItemConvert(&Items[SelectedItem].Item, Items[SelectedItem].Item.Level, Items[SelectedItem].Item.Option1, Items[SelectedItem].Item.ExtOption);
            RenderItemInfo(MouseX, MouseY, &Items[SelectedItem].Item, false);
        }

confirm work
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
confirm work
You can update with Zen Fix:

Code:
        else if(SelectedItem != -1)
        {
            if (Items[SelectedItem].Item.Type == ITEM_POTION + 15)
            {
                RenderItemName(SelectedItem, &Items[SelectedItem].Object, Items[SelectedItem].Item.Level, Items[SelectedItem].Item.Option1, Items[SelectedItem].Item.ExtOption, true);
            }
            else
            {
                ItemConvert(&Items[SelectedItem].Item, Items[SelectedItem].Item.Level, Items[SelectedItem].Item.Option1, Items[SelectedItem].Item.ExtOption);
                RenderItemInfo(MouseX, MouseY, &Items[SelectedItem].Item, false);
            }
        }
 
Newbie Spellweaver
Joined
Mar 26, 2024
Messages
5
Reaction score
3
{ if (Items[SelectedItem].Item.Type == ITEM_POTION + 15) { RenderItemName(SelectedItem, &Items[SelectedItem].Object, Items[SelectedItem].Item.Level, Items[SelectedItem].Item.Option1, Items[SelectedItem].Item.ExtOption, true); } else {

You can update with Zen Fix:

Code:
        else if(SelectedItem != -1)
        {
            if (Items[SelectedItem].Item.Type == ITEM_POTION + 15)
            {
                RenderItemName(SelectedItem, &Items[SelectedItem].Object, Items[SelectedItem].Item.Level, Items[SelectedItem].Item.Option1, Items[SelectedItem].Item.ExtOption, true);
            }
            else
            {
                ItemConvert(&Items[SelectedItem].Item, Items[SelectedItem].Item.Level, Items[SelectedItem].Item.Option1, Items[SelectedItem].Item.ExtOption);
                RenderItemInfo(MouseX, MouseY, &Items[SelectedItem].Item, false);
            }
        }
thanks you it is good
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
Using this source You can do everything guys. I waiting for new shares!

Screen(03_27-23_41)-0001 - [Development] Source Mu Main 1.03.35 [Season 5.1 - Season 5.2] - RaGEZONE Forums
Screen(03_27-23_40)-0000 - [Development] Source Mu Main 1.03.35 [Season 5.1 - Season 5.2] - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
I nearly done Master Level Tree:

Screen(03_29-14_28)-0000 - [Development] Source Mu Main 1.03.35 [Season 5.1 - Season 5.2] - RaGEZONE Forums
Screen(03_29-15_00)-0000 - [Development] Source Mu Main 1.03.35 [Season 5.1 - Season 5.2] - RaGEZONE Forums


Update:
Client side UI done 100%.
Client side fixing protocol 20%.
Server-side enabled.
 

Attachments

You must be registered for see attachments list
Last edited:
Joined
Oct 29, 2007
Messages
1,290
Reaction score
1,310
Hello, I share this little clock mode in the game.

Small demo:



on NewUIHeroPositionInfo.cpp file you must search this function: "bool CNewUIHeroPositionInfo::Render()" and change this line:
Code:
unicode::_sprintf( szText, "%s (%d , %d)",  GetMapName( World ), m_CurHeroPosition.x, m_CurHeroPosition.y);
by this code:
Code:
    time_t TimeLocal;
    struct tm LocalT;

    std::time(&TimeLocal);
    localtime_s(&LocalT,&TimeLocal);

    int Width = HERO_POSITION_INFO_BASEA_WINDOW_WIDTH + WidenX + HERO_POSITION_INFO_BASEC_WINDOW_WIDTH;

    if(CheckMouseIn((int)(m_Pos.x+10),(int)(m_Pos.y+3),Width,HERO_POSITION_INFO_BASE_WINDOW_HEIGHT))
    {
        unicode::_sprintf(szText," %2d:%02d:%02d",LocalT.tm_hour,LocalT.tm_min,LocalT.tm_sec);
    }
    else
    {
        unicode::_sprintf(szText,"%s (%d , %d)",GetMapName(World),m_CurHeroPosition.x,m_CurHeroPosition.y);
    }

Credits: Me (for code in main) and SmileYzn (for his idea in a dll).
 
Junior Spellweaver
Joined
Aug 1, 2011
Messages
126
Reaction score
90
unicode::_sprintf(szText,"%s (%d , %d)",GetMapName(World),m_CurHeroPosition.x,m_CurHeroPosition.y);

You dont need get time if mouse is not on position.
Version with full date and time + fixed for version with MapManager:

C++:
    int Width = HERO_POSITION_INFO_BASEA_WINDOW_WIDTH + WidenX + HERO_POSITION_INFO_BASEC_WINDOW_WIDTH;

    if (CheckMouseIn((int)(m_Pos.x + 10), (int)(m_Pos.y + 3), Width, HERO_POSITION_INFO_BASE_WINDOW_HEIGHT))
    {
        time_t TimeLocal;
        struct tm LocalT;

        std::time(&TimeLocal);
        localtime_s(&LocalT, &TimeLocal);
        unicode::_sprintf(szText, "[%4d-%02d-%02d] %02d:%02d:%02d",
            LocalT.tm_year + 1900,
            LocalT.tm_mon + 1,
            LocalT.tm_mday,
            LocalT.tm_hour,
            LocalT.tm_min,
            LocalT.tm_sec);
    }
    else
    {
        unicode::_sprintf(szText, "%s (%d , %d)", gMapManager.GetMapName(gMapManager.WorldActive), m_CurHeroPosition.x, m_CurHeroPosition.y);
    }

This place can also show something more if mouse is clicked right or left button.

C++:
        if (MouseLButtonPush && MouseRButtonPush)
        {
            unicode::_sprintf(szText, "Both buttons...");
        }
        else if (MouseLButtonPush)
        {
            unicode::_sprintf(szText, "Left click...");
        }
        else if (MouseRButtonPush)
        {
            unicode::_sprintf(szText, "Right click...");
        }
        else
        { 
            time_t TimeLocal;
            struct tm LocalT;

            std::time(&TimeLocal);
            localtime_s(&LocalT, &TimeLocal);
            unicode::_sprintf(szText, "[%4d-%02d-%02d] %02d:%02d:%02d",
                LocalT.tm_year + 1900,
                LocalT.tm_mon + 1,
                LocalT.tm_mday,
                LocalT.tm_hour,
                LocalT.tm_min,
                LocalT.tm_sec);
        }
 
Last edited:
Back
Top