[Help] How to resize items model in inventory?

Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    i myheart is online now
    True MemberRank
    Jun 2017 Join Date
    232Posts

    Re: [Help] How to resize items model in inventory?

    new fixes , now can work with all items and able to fix item position

    Code:
    BOOL GetModelScale(int ItemIndex, float * Scale, Vec3D * VecPos)
    {
        switch (ItemIndex)
        {
        case ITEM2(7, 150):
      (*Scale) = 0.0055f;
      return TRUE;
        case ITEM2(14, 351):
      VecPos->Y += 0.1f;
      break; //return FALSE
        }
    
        return FALSE;
    }
    
    __declspec(naked) void SetModelScale()
    {
        static DWORD Address1 = 0x005CE8ED;
        static DWORD Address2 = 0x005CD2DE;
    
        _asm
        {
      Lea Eax, Dword Ptr Ss:[Ebp-0x4C]
      Push Eax
      Lea Ecx, Dword Ptr Ss:[Ebp-0x2C]
      Push Ecx
      Mov Edx, Dword Ptr Ss : [Ebp + 0x8]
      Push Edx
      Call GetModelScale  
      Add Esp, 0xC
      Test Eax, Eax
      Je EXIT
      Jmp Address1
      EXIT:
      CMP DWORD PTR SS : [EBP + 0x8], 0x1293
      Jmp Address2
        }
    }
    
    SetCompleteHook(0xE9, 0x005CD2D7, &SetModelScale);
    Last edited by myheart; 2 Weeks Ago at 05:24 AM.
    'Love' never die's

  2. #17
    Member ptr0x is offline
    MemberRank
    Feb 2011 Join Date
    84Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by myheart View Post
    new fixes , now can work with all items and able to fix item position

    Code:
    BOOL GetModelScale(int ItemIndex, float * Scale, Vec3D * VecPos)
    {
        switch (ItemIndex)
        {
        case ITEM2(7, 150):
      (*Scale) = 0.0055f;
      return TRUE;
        case ITEM2(14, 351):
      VecPos->Y = VecPos->Y + 0.1f;
      break; //return FALSE
        }
    
        return FALSE;
    }
    
    __declspec(naked) void SetModelScale()
    {
        static DWORD Address1 = 0x005CE8ED;
        static DWORD Address2 = 0x005CD2DE;
    
        _asm
        {
      Lea Eax, Dword Ptr Ss:[Ebp-0x4C]
      Push Eax
      Lea Ecx, Dword Ptr Ss:[Ebp-0x2C]
      Push Ecx
      Mov Edx, Dword Ptr Ss : [Ebp + 0x8]
      Push Edx
      Call GetModelScale  
      Add Esp, 0xC
      Test Eax, Eax
      Je EXIT
      Jmp Address1
      EXIT:
      CMP DWORD PTR SS : [EBP + 0x8], 0x1293
      Jmp Address2
        }
    }
    
    SetCompleteHook(0xE9, 0x005CD2D7, &SetModelScale);
    @myheart one question: could you share the "ITEM2" macro? I thought the item id used in this function would be (cat * 512 + type) but it isn't.

    PS: I think a safer address to hook is this: 0x5CE8ED. Probably will have the same effect as yours but this is the landing address of the 'nested if' above it.

  3. #18
    i myheart is online now
    True MemberRank
    Jun 2017 Join Date
    232Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by ptr0x View Post
    @myheart one question: could you share the "ITEM2" macro? I thought the item id used in this function would be (cat * 512 + type) but it isn't.
    = cat * 512 + type + BaseIndex(s6: 1171)
    'Love' never die's

  4. #19
    #ChangeBrazil SmileYzn is offline
    True MemberRank
    Nov 2012 Join Date
    0x00401000Location
    714Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by myheart View Post


    try this: (Offset main 1.04.03)

    Code:
    BOOL GetModelScale(int ItemIndex, float * Scale)
    {
        switch (ItemIndex)
        {
        case 0x14B5:
      *Scale = 0.0032f;
      return TRUE;
        case ITEM2(7, 150):
      *Scale = 0.0155f;
      return TRUE;
        }
    
        return FALSE;
    }
    
    __declspec(naked) void SetModelScale()
    {
        static DWORD Address1 = 0x005CE8ED;
        static DWORD Address2 = 0x005CD42F;
    
        _asm
        {
      Lea Edx, Dword Ptr Ss:[Ebp-0x2C]
      Push Edx
      Mov Ecx, Dword Ptr Ss : [Ebp + 0x8]
      Push Ecx
      Call GetModelScale  
      Add Esp, 0x8
      Test Eax, Eax
      Je EXIT
      Jmp Address1
      EXIT:
      Jmp Address2
        }
    }
    
    SetCompleteHook(0xE9, 0x005CD41B, &SetModelScale);
    PHP Code:
    patch-ggp.muonline.webzen.net/1.04.03/up_list.zip 
    will not work for other parts than inventory, again i suggest you to see a function that i have posted, duo all calls to inventory model size is remated with this function, like in cashshop for example.

  5. #20
    i myheart is online now
    True MemberRank
    Jun 2017 Join Date
    232Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by SmileYzn View Post
    will not work for other parts than inventory, again i suggest you to see a function that i have posted, duo all calls to inventory model size is remated with this function, like in cashshop for example.
    you didn't even test it?it's a part of the pDrawItemModel.
    'Love' never die's

  6. #21
    #ChangeBrazil SmileYzn is offline
    True MemberRank
    Nov 2012 Join Date
    0x00401000Location
    714Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by myheart View Post
    you didn't even test it?it's a part of the pDrawItemModel.
    You made it static bro, there is the problem.
    Also just change Scale will buggy some items that deppends to change X Y Position according their size.

    .H
    Code:
    #pragma once
    
    // Draw Item Model Class
    #define pDrawItemModel						((void(__cdecl*)(float PosX,float PosY,float Width,float Height,int ItemID,int Level,int Excellent,int Ancient,int Floating)) 0x5D2280) // Floating related to size
    #define oDrawItemModelCall1					0x0077117C // Inventory and Personal Shop Call?
    #define oDrawItemModelCall2					0x0085CE0D // CashShop Call?
    
    class cDrawItemModel
    {
    public:
    	cDrawItemModel();
    
    	void		Load();
    	static void DrawItemModel(float PosX,float PosY,float Width,float Height,int ItemID,int a6,int a7,int Ancient,int Floating);
    };
    
    extern cDrawItemModel gDrawItemModel;
    .CPP
    Code:
    #include "stdafx.h"
    
    cDrawItemModel gDrawItemModel;
    
    cDrawItemModel::cDrawItemModel()
    {
    	/**/
    }
    
    void cDrawItemModel::Load()
    {
    	gToolKit.SetOp((LPVOID)(oDrawItemModelCall1),this->DrawItemModel,ASM::CALL);
    	gToolKit.SetOp((LPVOID)(oDrawItemModelCall2),this->DrawItemModel,ASM::CALL);
    }
    
    void cDrawItemModel::DrawItemModel(float PosX,float PosY,float Width,float Height,int ItemID,int Level,int Excellent,int Ancient,int Floating)
    {
    	if(ItemID == ItemId(8,15)) // Fix Storm Crow armor position
    	{
    		PosY -= 10.0f;
    	}
    
    	pDrawItemModel(PosX,PosY,Width,Height,ItemID,Level,Excellent,Ancient,Floating);
    }
    Code:
    http://patch-ggp.muonline.webzen.net/1.03.43/up_list.zip
    Anyway will do same thing

    Ps. Main 1.03.43

  7. #22
    i myheart is online now
    True MemberRank
    Jun 2017 Join Date
    232Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by SmileYzn View Post
    You made it static bro, there is the problem.
    Also just change Scale will buggy some items that deppends to change X Y Position according their size.
    you are wrong! i didn't changed item width, height.

    i changed Model Scale, it's difference thinks. (lpObj->m_Model.Scale) this is static

    - - - Updated - - -

    wz calculate scale size by window size not the item size.
    ex: scale = 1.0 it means model height = 480 and width = 640.
    Last edited by myheart; 2 Weeks Ago at 05:30 PM.
    'Love' never die's

  8. #23
    Member ptr0x is offline
    MemberRank
    Feb 2011 Join Date
    84Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by SmileYzn View Post
    will not work for other parts than inventory, again i suggest you to see a function that i have posted, duo all calls to inventory model size is remated with this function, like in cashshop for example.
    I specificly asked for how to change the size of items 3d models in inventory. @myheart 's answer fits precisely what I asked for.

  9. #24
    #ChangeBrazil SmileYzn is offline
    True MemberRank
    Nov 2012 Join Date
    0x00401000Location
    714Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by ptr0x View Post
    I specificly asked for how to change the size of items 3d models in inventory. @myheart 's answer fits precisely what I asked for.
    You will change slot size for items right?

  10. #25
    Member ptr0x is offline
    MemberRank
    Feb 2011 Join Date
    84Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by SmileYzn View Post
    You will change slot size for items right?
    Right.

  11. #26
    #ChangeBrazil SmileYzn is offline
    True MemberRank
    Nov 2012 Join Date
    0x00401000Location
    714Posts

    Re: [Help] How to resize items model in inventory?

    Quote Originally Posted by ptr0x View Post
    Right.
    Soo what you need only for inventory? Personal shop, vault and others lol ??



Page 2 of 2 FirstFirst 12

Advertisement