Jump to content

Recommended Posts

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.

  • Love 1
Link to comment
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.

...........

Link to comment
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

 

Link to comment
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....

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 2 weeks later...
  • 2 weeks later...

0116 01:20:33141 :: Traceback (most recent call last):

0116 01:20:33141 ::   File "ui.py", line 1520, in OnUnselectItemSlot

0116 01:20:33141 ::   File "ui.py", line 88, in __call__

0116 01:20:33141 ::   File "ui.py", line 79, in __call__

0116 01:20:33141 ::   File "uiShop.py", line 362, in UnselectItemSlot

0116 01:20:33141 ::   File "uiShop.py", line 423, in AskBuyItem

0116 01:20:33141 ::   File "localeInfo.py", line 1002, in DO_YOU_BUY_ITEM_YANG_CHEQUE

0116 01:20:33141 :: TypeError
0116 01:20:33141 :: : 
0116 01:20:33141 :: not all arguments converted during string formatting
0116 01:20:33141 :: 
 

Link to comment
Share on other sites

  • 3 weeks later...
11.04.2019 00: 57'de WLsj24 şunları söyledi:

Sistemi kontrol edin ~ resmi gibi

Eğitim yeniden başladı ve github'a yüklendi

 Para birimi: Kazandı
    - Uzun
    999 uyumlu değil - 999 kazandı (resmi gibi)
    - OfflineShop bitti eklendi (harika)

İndir:

This is the hidden content, please

Saygılarımla.

Thanks

 

Doesn't go to the gift box without closing the market cheque

  • Metin2 Dev 1
Link to comment
Share on other sites

  • 2 months later...
13 hours ago, asterix2 said:

I checked and every function added. (wtf) i don't understand why not working.:O

in char.cpp inside void CHARACTER::PointsPacket()

you have to put

pack.points[POINT_CHEQUE]    = GetCheque();

AFTER

for (int i = POINT_ST; i < POINT_MAX_NUM; ++i)
	pack.points[i] = GetPoint(i);

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Hey guys I have a problem with this "system", this is the error that gives me solutions?

 

Quote

0602 18:18:30084 :: 
networkModule.py(line:200) SetSelectCharacterPhase
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
introSelect.py(line:30) <module>
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
interfaceModule.py(line:12) <module>
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
uiInventory.py(line:14) <module>
system.py(line:177) __hybrid_import
system.py(line:142) _process_result
uiPickMoney.py(line:6) <module>
uiPickMoney.py(line:70) PickMoneyDialog

networkModule.SetSelectCharacterPhase - <type 'exceptions.NameError'>:name 'app' is not defined

0602 18:18:30084 :: ============================================================================================================
0602 18:18:30084 :: Abort!!!!

 

Link to comment
Share on other sites

  • Contributor

"uiPickMoney.py(line:70) PickMoneyDialog

networkModule.SetSelectCharacterPhase - <type 'exceptions.NameError'>:name 'app' is not defined"

 

I help you to understand your problem. In your uiPickMoney.py(line:70) there is an 'app' what is not exist in that scope. Since app is a module, place "import app" to that py top section.

Edited by TMP4
Link to comment
Share on other sites

  • 1 month later...

Announcements



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