Jump to content

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

This should work:

when x.chat."Test" with pc.is_gm() begin
	local map = input()
	server_timer('give_items', 1, tonumber(map))
end

when give_items.server_timer begin
	local vnum,count = 27003,200
	pc.give_item2(vnum,count)
	clear_server_timer('give_items', get_server_timer_arg())
end
Link to comment
https://metin2.dev/topic/4737-pcgive_item-all-in-map/#findComment-29868
Share on other sites

 

This should work:

when x.chat."Test" with pc.is_gm() begin
	local map = input()
	server_timer('give_items', 1, tonumber(map))
end

when give_items.server_timer begin
	local vnum,count = 27003,200
	pc.give_item2(vnum,count)
	clear_server_timer('give_items', get_server_timer_arg())
end

= crash server. pc.give_item2 is not global function

  • Love 1
Link to comment
https://metin2.dev/topic/4737-pcgive_item-all-in-map/#findComment-29870
Share on other sites

  • Honorable Member

This should work:

when x.chat."Test" with pc.is_gm() begin
	local map = input()
	server_timer('give_items', 1, tonumber(map))
end

when give_items.server_timer begin
	local vnum,count = 27003,200
	pc.give_item2(vnum,count)
	clear_server_timer('give_items', get_server_timer_arg())
end

You can't use "pc" inside a server_time "scope".

Maybe an "enter" event could make a difference, otherwise it's simple to create such a thing via source.

Link to comment
https://metin2.dev/topic/4737-pcgive_item-all-in-map/#findComment-29876
Share on other sites

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.