Jump to content

Source | Custom shops location | IDEs | More


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

 

 

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.