WLsj24

c++ [Release] Cheque system

54 posts in this topic

Hello! Sorry for my delay.I just want to tell you some minor things that i've noticed during compilnig.I don't want you think i'm acting smart in front of you or something childish like that.I just want to help you like you helped me.

In your github tutorial: ->>> PythonShop.h

	/*--------------------------------------------------*/
/*Search:
        void AddPrivateShopItemStock(TItemPos ItemPos, BYTE byDisplayPos, DWORD dwPrice);
	Replace with:
*/
#ifdef ENABLE_CHEQUE_SYSTEM
        void AddPrivateShopItemStock(TItemPos ItemPos, BYTE dwDisplayPos, DWORD dwPrice, DWORD);
#else
        void AddPrivateShopItemStock(TItemPos ItemPos, BYTE byDisplayPos, DWORD dwPrice);
#endif
/*--------------------------------------------------*/
/*Search:
    int GetPrivateShopItemPrice(TItemPos ItemPos);
	Replace with:  ->>>  Add After:
*/
#ifdef ENABLE_CHEQUE_SYSTEM
        int GetPrivateShopItemCheque(TItemPos ItemPos);
#endif
/*--------------------------------------------------*/
	

 

There 2nd step should be Add after.Otherwise it won't compile.It will return:

GetPrivateShopItemPrice isn't part of : class CPythonShop

Now i'm starting with server compiling proceess.I will come back with additionla informatios if it's neccessary.

  • Thanks 1

Share this post


Link to post
Share on other sites

Regarding Server source:

In your tutorial in db/ClientManagerPlayer.cpp following this step:

/*Search in:
void CClientManager::QUERY_PLAYER_LOAD(CPeer * peer, DWORD dwHandle, TPlayerLoadPacket * packet)

This:
                                                "horse_skill_point "

Add after:
*/
#ifdef ENABLE_CHEQUE_SYSTEM
                                                ", cheque "
#endif

 

The only place where i have found what you told us to find is this structure inside the void CClientManager::QUERY_PLAYER_LOAD(...):

snprintf(queryStr, sizeof(queryStr),
                "SELECT "
                "id,name,job,voice,dir,x,y,z,map_index,exit_x,exit_y,exit_map_index,hp,mp,stamina,random_hp,random_sp,playtime,"
                "gold,level,level_step,st,ht,dx,iq,exp,"
                "stat_point,skill_point,sub_skill_point,stat_reset_count,part_base,part_hair,"
                "skill_level,quickslot,skill_group,alignment,mobile,horse_level,horse_riding,horse_hp,horse_hp_droptime,horse_stamina,"
                "UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(last_play),horse_skill_point,cheque FROM player%s WHERE id=%d",
                GetTablePostfix(), packet->player_id);

I'm saying this because you might using a new layout of the same function or the implementation for offlineshop which i don't have.

 

 

The problem with Buying with Cheque still persists....I don't know what else to do.I've removed first tutorial then i took this one from scratch.Still can't buy with Cheque only or Cheque+Yang.

If i buy with Cheque only it tells me Insufficient Yang.
If i buy with Cheque + Yang it will take only Yang.

...........

Share this post


Link to post
Share on other sites

CH syslog:

Spoiler

Sep 16 00:47:02 :: OnClick OnlyRipper[vnum 30000 ServerUniqueID 25621, pid 2824] by Test001
Sep 16 00:47:02 :: reallocating buffer to 8192, current 1024
Sep 16 00:47:10 :: Shop::Buy : name Test001 pos 2
Sep 16 00:47:10 :: SHOP: BUY: name Test001 Costum Vanator Dragoni+9(x 1):30001389 price 1
Sep 16 00:47:10 :: SAVE: Test001 476052x953756
Sep 16 00:47:14 :: GLOBAL_TIME: Sep 16 00:47:14 time_gap 0
Sep 16 00:47:16 :: Shop::Buy : name Test001 pos 1
Sep 16 00:47:16 :: SHOP: BUY: name Test001 Sabie Inscriptionata +0(x 1):30001367 price 1
Sep 16 00:47:16 :: SAVE: Test001 476052x953756
Sep 16 00:47:20 :: Shop::Buy : name Test001 pos 0
Sep 16 00:47:25 :: SHOP: END: Test001
Sep 16 00:47:27 :: COMMAND: Test001: quit
SYSERR: Sep 16 00:47:27 :: locale_find: LOCALE_ERROR: "게임을 종료 합니다. 잠시만 기다리세요.";
Sep 16 00:47:30 :: COMMAND: OnlyRipper: close_shop
Sep 16 00:47:30 :: POLYMORPH: OnlyRipper race 0 
Sep 16 00:47:33 :: COMMAND: OnlyRipper: quit

CH syserr:

Spoiler

SYSERR: Sep 16 00:44:18 :: socket_connect: HOST localhost:11000, could not connect.
SYSERR: Sep 16 00:44:19 :: LoadPackageCryptInfo: [PackageCryptInfo] Failed to load package/cshybridcrypt_metin2_patch_sg1.dat
SYSERR: Sep 16 00:44:21 :: socket_connect: HOST localhost:11000, could not connect.
SYSERR: Sep 16 00:45:05 :: heart_idle: losing 39 seconds. (lag occured)

I've put 3 items:

1) 1 Won

2) 1 Won & 1 Yang

3) 1 Yang

I could buy only the last 2 of them.The first one didn't want to buy and told me Insufficient Yang.

In the syslog it will appear only the 2 and 3 item without marking the difference in Unit Type:

Sep 16 00:47:10 :: SHOP: BUY: name Test001 Costum Vanator Dragoni+9(x 1):30001389 price 1

Sep 16 00:47:16 :: SHOP: BUY: name Test001 Sabie Inscriptionata +0(x 1):30001367 price 1

I think my game is the problem.It can't make the difference.Even i've remade the entire tutorial....

Exchange with Won - OK

Exchange with Won & Yang - OK

Droping Won - OK

Droping Won from monsters - OK

Max limit 999 - OK

Max limit when trade - OK

 

Share this post


Link to post
Share on other sites

Hi again! Could you please attach these files files? I want to compare them,maybe it's something that's missing from my clean source.

uiprivateshopbuilder.py

uishop.py

-Client src

PythonShop.cpp

PythonShop.h

-Server src

shop.cpp

shop.h

shop_manager.cpp

shop_manager.h

The problem with buying with Won only or Yang and Won still persits....

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.