Jump to content
×
×
  • Create New...

Remote Shop System


Recommended Posts

  • Honorable Member

M2 Download Center

Download Here ( Internal )

Hidden Content

    Give reaction to this post to see the hidden content.
( GitHub )

 

 

  • Now you can open shops directly.
  • There is no need to adjust the coordinates when adding a new shop. Automatically adjusted according to the shop names.(remote_shop_names.txt)

 

  • For new shop:

  • Spoiler
    1. locale/xx/remote_shop_names.txt
    2. Add npc vnums to input_main.cpp (_arrShopNpcVnum

    npc vnum = player.shop(npc_vnum)

 

305225system.png

 

Special thanks to @Tatsumaru for taskbar Icons ❤️:

305225icon-1.png
305225icon-2.png

Edited by Mali61
  • Metin2 Dev 28
  • Love 31
  • Love 2
  • Good 12
  • Scream 1
  • Think 3
  • Dislove 1
Link to comment
Share on other sites

4 hours ago, DemOnJR said:

Working.

If someone have the button .sub i need it idk why the tga is not working for me, thanks.

  Hide contents

 

spacer.png

spacer.png

 

 



just rename tga files , change big letters to small like that

 

before : 

 

RemoteShop_Button_01.tga

 

after :

 

remoteshop_button_01.tga

 

( do that to all tga )

Link to comment
Share on other sites

10 hours ago, TryHard said:



just rename tga files , change big letters to small like that

 

before : 

 

RemoteShop_Button_01.tga

 

after :

 

remoteshop_button_01.tga

 

( do that to all tga )

Thanks ❤️

 

Oh No Reaction GIF

🙂

Link to comment
Share on other sites

  • 2 weeks later...
On 1/21/2021 at 7:38 PM, Mali61 said:

M2 Download Center

Download Here ( Internal )

Hidden Content

    Give reaction to this post to see the hidden content.
( GitHub )

 

 

  • Now you can open shops directly.
  • If the shop's npc is not on player's map, you cannot open that shop.
  • There is no need to adjust the coordinates when adding a new shop. Automatically adjusted according to the shop names.(remote_shop_names.txt)

 

  • For new shop:

  •   Reveal hidden contents
    1. locale/xx/remote_shop_names.txt
    2. Add npc vnums to input_main.cpp (_arrShopNpcVnum

    npc vnum = player.shop(npc_vnum)

 

305225system.png

 

Special thanks to @Tatsumaru for taskbar Icons ❤️:

305225icon-1.png
305225icon-2.png

 

Is it possible to change the code, so you can open the shops although the NPC is not on the current map? I think this would be the benefit of using this remote shop.

Edited by DevBlade
Link to comment
Share on other sites

1 hour ago, DevBlade said:

 

Is it possible to change the code, so you can open the shops although the NPC is not on the current map? I think this would be the benefit of using this remote shop.


no its not possible, you will need to modify the source structure, its simply not made for changes like that. You know? P2P (core to core communication) something like this exist for npc too.


Google for npcToNpc communication. You can learn a lot my friend

Edited by Kafa
  • Lmao 1
Link to comment
Share on other sites

2 hours ago, Kafa said:


no its not possible, you will need to modify the source structure, its simply not made for changes like that. You know? P2P (core to core communication) something like this exist for npc too.


Google for npcToNpc communication. You can learn a lot my friend

i saw some servers with similar system that opens shop from any map. Idk if is the same system or not

 

https://gyazo.com/199b16f14990f8817aec0e26c92833e9

Edited by ilovegreendays
gif add
  • Love 2
  • Love 1
Link to comment
Share on other sites

  • Honorable Member
9 hours ago, DevBlade said:

 

Is it possible to change the code, so you can open the shops although the NPC is not on the current map? I think this would be the benefit of using this remote shop.

#Updated

use shop.vnum

  • Love 2
Link to comment
Share on other sites

  • 3 months later...
  • 5 months later...

70, 75, 48, 107

 

Are there npc codes in mob_proto in these numbers 🙂

9001 9002 9003 these codes are not.

1    ????    9001
2    ?????    9009
3    ????    9003
4    ?????    9002

Link to comment
Share on other sites

Edit : Fixed. 

npc vnum = player.shop(npc_vnum) WRONGGGG

player.shop open (vnum) true

Example : 

1    ????    9001
2    ?????    9009
3    ????    9003
4    ?????    9002

9001 wrong
1 true

also

The market name is not written. Market name : None 🙂

spacer.png

Edited by EAkar
Link to comment
Share on other sites

  • Moon

The tutorial is complete, for those who have problems with this "pack_open" not defined

Search:
ShopData = pack_open(REMOTE_FILE_NAME, "r").readlines()

Change with:
ShopData = open(REMOTE_FILE_NAME, "r").readlines()

And if you have problem with buying items is from ENABLE_MULTISHOP, you have to adapt the system in localeinfo.py and uishop.py in function AskBuyItem.

 

70,75,48 is from your mysql player -> shop_item (Vnum where is opening the shop with items "doing what you want") 

Example:

Like in my case ->shop item : Vnum (3 is to open the window with weapons and where you find items)

In player -> shop you have (Shop vnum - (3), Name (bla bla), NPC - Npc vnum (9001) ) example

In remote_shop_names.txt you have to put them like how in input_main.cpp vnum it is. Example (3, )

Locale- 3 go first and name in remote_shop_names.txt -> Weapons

If we go for a new shop (Do same like weapons and go in input_main.cpp vnum in row 3, 4, 5) and in remote shop again do that

3 = Weapons

4 = Armors

5 = General.

SJ8Tn36.png - How Input_main.cpp how looks

How remote_shop_names looks.

NEgcgHn.png

Sorry for bad english and bad "explain", i just woke up. I hope you understood the idea.

10 hours ago, EAkar said:

70, 75, 48, 107

 

Are there npc codes in mob_proto in these numbers 🙂

9001 9002 9003 these codes are not.

1    ????    9001
2    ?????    9009
3    ????    9003
4    ?????    9002

8 hours ago, EAkar said:

Edit : Fixed. 

npc vnum = player.shop(npc_vnum) WRONGGGG

player.shop open (vnum) true

Example : 

1    ????    9001
2    ?????    9009
3    ????    9003
4    ?????    9002

9001 wrong
1 true

also

The market name is not written. Market name : None 🙂

spacer.png

"Market name is working" aswell, maybe u missed something from tutorial.

Edited by Vaynz
  • Good 1
Link to comment
Share on other sites

11 hours ago, Vaynz said:

The tutorial is complete, for those who have problems with this "pack_open" not defined

Search:
ShopData = pack_open(REMOTE_FILE_NAME, "r").readlines()

Change with:
ShopData = open(REMOTE_FILE_NAME, "r").readlines()

And if you have problem with buying items is from ENABLE_MULTISHOP, you have to adapt the system in localeinfo.py and uishop.py in function AskBuyItem.

 

70,75,48 is from your mysql player -> shop_item (Vnum where is opening the shop with items "doing what you want") 

Example:

Like in my case ->shop item : Vnum (3 is to open the window with weapons and where you find items)

In player -> shop you have (Shop vnum - (3), Name (bla bla), NPC - Npc vnum (9001) ) example

In remote_shop_names.txt you have to put them like how in input_main.cpp vnum it is. Example (3, )

Locale- 3 go first and name in remote_shop_names.txt -> Weapons

If we go for a new shop (Do same like weapons and go in input_main.cpp vnum in row 3, 4, 5) and in remote shop again do that

3 = Weapons

4 = Armors

5 = General.

SJ8Tn36.png - How Input_main.cpp how looks

How remote_shop_names looks.

NEgcgHn.png

Sorry for bad english and bad "explain", i just woke up. I hope you understood the idea.

"Market name is working" aswell, maybe u missed something from tutorial.

I installed the system without any problems. I guess it doesn't match.

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


  • Activity

    1. 0

      Looking for Someone to create the queries etc for armors and weapons

    2. 13

      Official Private Shop Search

    3. 944

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    4. 79

      GUI Teleport System

    5. 0

      inventory slot marking system cant compile

    6. 8

      Inventory Bug

    7. 63

      Metin2 Dev - Changelogs

  • Recently Browsing

    • No registered users viewing this page.

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.