Jump to content

Recommended Posts

Does anyone have a 50k / 40k or newer source to compile ? 

Also, is there any possibility to make shops ( in game ones, when you transform in that table ) only in custom locations ?

For example, i want to disable the ability to create shops in map1 and let the players create them only in a specific map and area of it, made exactly with this purpose.

Another question: How can i implement grass for example in the client ? What should i add in property.epk ? I already made a map with 3D grass with World Editor Remix.

 

 

Thanks!

Edited by alphavladim
Link to comment
https://metin2.dev/topic/7708-source-custom-shops-location-ides-more/
Share on other sites

Shops in Special Maps:

Change item to Sell (in german "Bündel") to Type 18

Make a quest for it like

quest blablabla begin
    state start begin
        when 123456.use begin
            local allowedMaps = {1, 21, 41}
            for i = 1, table.getn(allowedMaps) do
                if allowedMaps[i] == pc.get_map_index() end
                    cmdchat("open_privateshop") -- <- Think Command is diffrent
                    return
                end
            end
        end
    end
end

 

  • Love 2

Thank you for your answer!

Is there any way to verify players coords ? For instance pc.get_player_location.y or something similar :D ?

Edit: Also, what IDE are you using for scripts making ? Is VS 2013 adequate ?

 

Thanks again.

Edited by alphavladim

Shops in Special Maps:

Change item to Sell (in german "Bündel") to Type 18

Make a quest for it like

quest blablabla begin
    state start begin
        when 123456.use begin
            local allowedMaps = {1, 21, 41}
            for i = 1, table.getn(allowedMaps) do
                if allowedMaps[i] == pc.get_map_index() end
                    cmdchat("open_privateshop") -- <- Think Command is diffrent
                    return
                end
            end
        end
    end
end

 

 

if allowedMaps[i] == pc.get_map_index() end
				if allowedMaps[i] != pc.get_map_index() then return
				else
					cmdchat("open_privateshop") -- <- Think Command is diffrent
				end

For security.

Edited by Shang
  • Love 2

Do you suggest any IDE for editing those scripts ? It would be handy to have some features like syntax prediction.

Is there any syntax to check / get player position ? (map coords). 

 

Thanks!

Edited by alphavladim
if allowedMaps[i] != pc.get_map_index() then return end
else
		cmdchat("open_privateshop") -- <- Think Command is diffrent
end

For security.

If you use this. It only chech the first index in array and then the return will be call. What means the quest w'll be canceld.. so it not work.

also you missed the highlited end...

 

As "IDE" i use notepad++ with lua highlight.

and vor local x and y you can use
 

pc.get_local_x()
pc.get_local_y()

 

Edited by Benhero
  • Love 1

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.