Jump to content

pc.give_item all in map


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

= crash server. pc.give_item2 is not global function

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