Jump to content
V3ct0r

How to increase temporary bag capacity

Recommended Posts

This is what looks like if you change the source:

 

Untitled.jpg

 

GameServer: Just 1 line needs to be changed: String2KitbagTmpData initializes the temp inventory. Originally it's set to 16, but I set to defMAX_KBITEM_NUM_PER_TYPE, which is the definite maximum amount of items any inventory can contain (including bank - it's the default value for banks!). Max inventory can't be haxed easily: 22 different places it appear + some allocations.

 

Client source requires no changes (only lua changes are necessary - as per guide).

Edited by deguix
  • Like 2

Share this post


Link to post
Share on other sites

image.png.ea3e51bf87177ead57fd5deac2539db4.png

 

 

frmTempBag = UI_CreateForm( "frmTempBag", FALSE, 200, 232, 0, 0, TRUE, FALSE )
UI_ShowForm( frmTempBag, FALSE )
UI_AddFormToTemplete( frmTempBag, FORM_MAIN )
UI_FormSetIsEscClose( frmTempBag, TRUE )
UI_SetIsDrag( frmTempBag,FALSE)
UI_SetFormStyle( frmTempBag,1)

UI_FormSetHotKey( frmTempBag, ALT_KEY, HOTKEY_D )

--加载背景图片
imgBakTop = UI_CreateCompent( frmTempBag, IMAGE_TYPE, "imgBakTop", 200, 232, 0, 0 )
UI_LoadImage( imgBakTop, "texture/ui/tempbag.tga", NORMAL, 198, 232, 0, 0 )

--Title
labTitle = UI_CreateCompent( frmTempBag, LABELEX_TYPE, "labTitle", 400, 150, 10, 5 )
UI_SetCaption( labTitle, "Temporary Bag")
UI_SetTextColor( labTitle, COLOR_BLACK )

UI_SetLabelExFont( labTitle, DEFAULT_FONT, TRUE, COLOR_WHITE )
--创建关闭按钮
btnClose = UI_CreateCompent( frmTempBag, BUTTON_TYPE, "btnClose", 14, 14, 178, 3 )
UI_LoadButtonImage( btnClose, "texture/ui/PublicC.tga", 14, 14, 116, 175, TRUE )
UI_SetButtonModalResult( btnClose, BUTTON_CLOSE )

--创建物品表格
grdTempBag = UI_CreateCompent( frmTempBag, GOODS_GRID_TYPE, "grdTempBag", 184, 305, 7, 36 ) 
UI_SetGridSpace( grdTempBag, 4, 4 )
UI_SetGridContent( grdTempBag, 4, 4 )
UI_SetGridUnitSize( grdTempBag, 32, 32 )
UI_SetMargin( grdTempBag, 21, 4, 0, 0 )

scrollid = UI_GetScroll( grdTempBag )
UI_SetSize( scrollid, 11, 1 )
UI_LoadImage( scrollid, "texture/ui/PublicC.tga", COMPENT_BACK, 11, 1, 194, 13 )

id = UI_GetScrollObj( scrollid, SCROLL_UP )
UI_LoadButtonImage( id, "texture/ui/PublicC.tga", 11, 9, 166, 0, TRUE )
UI_SetSize( id, 11, 9 )

 id = UI_GetScrollObj( scrollid, SCROLL_SCROLL )
UI_LoadImage( id, "texture/ui/PublicC.tga", COMPENT_BACK, 9, 43, 166, 10 )
UI_SetSize( id, 9, 43 )


id = UI_GetScrollObj( scrollid, SCROLL_DOWN )
UI_LoadButtonImage( id, "texture/ui/PublicC.tga", 11, 9, 166, 0, TRUE )
UI_SetSize( id, 11, 9 )

add the line to the client but I don't see the bar

Share this post


Link to post
Share on other sites

Hello @dragontechi!

 

Make sure that paths to textures are correct. Also check coordinates for textures, because my sample was for xDesign GUI, not for original one.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...