Jump to content
  • 1

[Request]Raising Shops Slots C++


DieMaQ

Question

12 answers to this question

Recommended Posts

  • 0

packet.h

SHOP_HOST_ITEM_MAX_NUM = 40,
to
SHOP_HOST_ITEM_MAX_NUM = 80,

src/Server/common/length.h

SHOP_HOST_ITEM_MAX_NUM = 40,
SHOP_PRICELIST_MAX_NUM = 40,
to 
SHOP_HOST_ITEM_MAX_NUM = 80,
SHOP_PRICELIST_MAX_NUM = 80,

src/Server/game/shop.cpp

m_pGrid = M2_NEW CGrid(5, 9);

to
m_pGrid = M2_NEW CGrid(10, 9);

shopdialog.py

import uiScriptLocale
 
window
= {
"name" : "ShopDialog",
 
"x" : SCREEN_WIDTH - 400,
"y" : 10,
 
"style" : ("movable", "float",),
 
"width" : 184 + 160,
"height" : 328,
 
"children" :
(
{
"name" : "board",
"type" : "board",
"style" : ("attach",),
 
"x" : 0,
"y" : 0,
 
"width" : 184 + 160,
"height" : 328,
 
"children" :
(
## Title
{
"name" : "TitleBar",
"type" : "titlebar",
"style" : ("attach",),
 
"x" : 8,
"y" : 8,
 
"width" : 169 + 160,
"color" : "gray",
 
"children" :
(
{ "name":"TitleName", "type":"text", "x":84+80, "y":4, "text":uiScriptLocale.SHOP_TITLE, "text_horizontal_align":"center" },
),
},
 
## Item Slot
{
"name" : "ItemSlot",
"type" : "grid_table",
 
"x" : 12,
"y" : 34,
 
"start_index" : 0,
"x_count" : 10,
"y_count" : 8,
"x_step" : 32,
"y_step" : 32,
 
"image" : "d:/ymir work/ui/public/Slot_Base.sub",
},
 
## Buy
{
"name" : "BuyButton",
"type" : "toggle_button",
 
"x" : 21,
"y" : 295,
 
"width" : 61,
"height" : 21,
 
"text" : uiScriptLocale.SHOP_BUY,
 
"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
},
 
## Sell
{
"name" : "SellButton",
"type" : "toggle_button",
 
"x" : 104 + 160,
"y" : 295,
 
"width" : 61,
"height" : 21,
 
"text" : uiScriptLocale.SHOP_SELL,
 
"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
},
 
## Close
{
"name" : "CloseButton",
"type" : "button",
 
"x" : 0,
"y" : 295,
 
"horizontal_align" : "center",
 
"text" : uiScriptLocale.PRIVATE_SHOP_CLOSE_BUTTON,
 
"default_image" : "d:/ymir work/ui/public/large_button_01.sub",
"over_image" : "d:/ymir work/ui/public/large_button_02.sub",
"down_image" : "d:/ymir work/ui/public/large_button_03.sub",
},
 
),
},
),
}

 

by @Endymion & .py by @Theodor

  • Love 3
Link to comment
  • 0

packet.h

SHOP_HOST_ITEM_MAX_NUM = 40,
to
SHOP_HOST_ITEM_MAX_NUM = 80,

src/Server/common/length.h

SHOP_HOST_ITEM_MAX_NUM = 40,
SHOP_PRICELIST_MAX_NUM = 40,
to 
SHOP_HOST_ITEM_MAX_NUM = 80,
SHOP_PRICELIST_MAX_NUM = 80,

src/Server/game/shop.cpp

m_pGrid = M2_NEW CGrid(5, 9);

to
m_pGrid = M2_NEW CGrid(10, 9);

shopdialog.py

import uiScriptLocale

 

window = {

"name" : "ShopDialog",

 

"x" : SCREEN_WIDTH - 400,

"y" : 10,

 

"style" : ("movable", "float",),

 

"width" : 184 + 160,

"height" : 328,

 

"children" :

(

{

"name" : "board",

"type" : "board",

"style" : ("attach",),

 

"x" : 0,

"y" : 0,

 

"width" : 184 + 160,

"height" : 328,

 

"children" :

(

## Title

{

"name" : "TitleBar",

"type" : "titlebar",

"style" : ("attach",),

 

"x" : 8,

"y" : 8,

 

"width" : 169 + 160,

"color" : "gray",

 

"children" :

(

{ "name":"TitleName", "type":"text", "x":84+80, "y":4, "text":uiScriptLocale.SHOP_TITLE, "text_horizontal_align":"center" },

),

},

 

## Item Slot

{

"name" : "ItemSlot",

"type" : "grid_table",

 

"x" : 12,

"y" : 34,

 

"start_index" : 0,

"x_count" : 10,

"y_count" : 8,

"x_step" : 32,

"y_step" : 32,

 

"image" : "d:/ymir work/ui/public/Slot_Base.sub",

},

 

## Buy

{

"name" : "BuyButton",

"type" : "toggle_button",

 

"x" : 21,

"y" : 295,

 

"width" : 61,

"height" : 21,

 

"text" : uiScriptLocale.SHOP_BUY,

 

"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",

"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",

"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",

},

 

## Sell

{

"name" : "SellButton",

"type" : "toggle_button",

 

"x" : 104 + 160,

"y" : 295,

 

"width" : 61,

"height" : 21,

 

"text" : uiScriptLocale.SHOP_SELL,

 

"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",

"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",

"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",

},

 

## Close

{

"name" : "CloseButton",

"type" : "button",

 

"x" : 0,

"y" : 295,

 

"horizontal_align" : "center",

 

"text" : uiScriptLocale.PRIVATE_SHOP_CLOSE_BUTTON,

 

"default_image" : "d:/ymir work/ui/public/large_button_01.sub",

"over_image" : "d:/ymir work/ui/public/large_button_02.sub",

"down_image" : "d:/ymir work/ui/public/large_button_03.sub",

},

 

),

},

),

}

 

by @Endymion & .py by @Theodor

Thanks A lot but there is no 

SHOP_HOST_ITEM_MAX_NUM = 40,
in packet.h
Link to comment
  • 0

I Get This Error

SYSERR: Feb 8 21:58:04.848197 :: Boot: shop table size error
SYSERR: Feb 8 21:58:04.848411 :: SpawnEventHelper: cannot get map base position 1
SYSERR: Feb 8 21:58:04.848419 :: SpawnEventHelper: cannot get map base position 3
SYSERR: Feb 8 21:58:04.848428 :: SpawnEventHelper: cannot get map base position 21
SYSERR: Feb 8 21:58:04.848435 :: SpawnEventHelper: cannot get map base position 23
SYSERR: Feb 8 21:58:04.848444 :: SpawnEventHelper: cannot get map base position 41
SYSERR: Feb 8 21:58:04.848451 :: SpawnEventHelper: cannot get map base position 43
SYSERR: Feb 8 21:58:05.112621 :: pid_deinit:
End of pid

Please Help

 
Link to comment
  • 0

 

I Get This Error

SYSERR: Feb 8 21:58:04.848197 :: Boot: shop table size error
SYSERR: Feb 8 21:58:04.848411 :: SpawnEventHelper: cannot get map base position 1
SYSERR: Feb 8 21:58:04.848419 :: SpawnEventHelper: cannot get map base position 3
SYSERR: Feb 8 21:58:04.848428 :: SpawnEventHelper: cannot get map base position 21
SYSERR: Feb 8 21:58:04.848435 :: SpawnEventHelper: cannot get map base position 23
SYSERR: Feb 8 21:58:04.848444 :: SpawnEventHelper: cannot get map base position 41
SYSERR: Feb 8 21:58:04.848451 :: SpawnEventHelper: cannot get map base position 43
SYSERR: Feb 8 21:58:05.112621 :: pid_deinit:
End of pid

Please Help

 

 

 

You don't compile DB. 

  • Love 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Read our Rules
  • Activity

    1. 2

      [Python] Code Translator 2 to 3

    2. 0

      bug gaya

    3. 5

      Fix Core Crash (unused serverside packet)

    4. 45

      Chest Drop View

    5. 0

      How to add Python 3.9 script?

    6. 15

      Metin2 Download Center - Specifications & Documentation

    7. 5

      Fix Core Crash (unused serverside packet)

    8. 45

      Chest Drop View

    9. 5

      Fix Core Crash (unused serverside packet)

  • Recently Browsing

    No registered users viewing this page.

×
×
  • 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.