Jump to content

BOX opening


Go to solution Solved by ragem0re,

Recommended Posts

16 minutes ago, zeimpekis9 said:

It should be with a quest. I cant help but i can provide you with an other idea. Just in the first box place the same box vnum. When the players open the box they ll get an other. If somebody helps you i will use it too :P

yes i understand you it is good idea thank you but still i hope someone have what i need .

Link to comment
Share on other sites

1 hour ago, zeimpekis9 said:

It should be with a quest. I cant help but i can provide you with an other idea. Just in the first box place the same box vnum. When the players open the box they ll get an other. If somebody helps you i will use it too :P

another thing when i want to open the box it should give me one thing when i put another box in it's data i don't think it'll be good

Link to comment
Share on other sites

  • Premium

Hello,

You can base yourself upon the device that detects metin stones, I forget the name in english, but the French name is "Compas du Metin" : http://wiki.metin2.fr/index.php/Compas_du_Metin

You can see the number of use that remain on the item description, you can take this part and add it to a new item, like a box !

 

Have a nice day :)

Link to comment
Share on other sites

7 hours ago, Galet said:

Hello,

You can base yourself upon the device that detects metin stones, I forget the name in english, but the French name is "Compas du Metin" : http://wiki.metin2.fr/index.php/Compas_du_Metin

You can see the number of use that remain on the item description, you can take this part and add it to a new item, like a box !

 

Have a nice day :)

http://wiki.metin2.co.uk/index.php/Compass_for_Metin_Stones
Here's the English version

Link to comment
Share on other sites

  • Premium
  • Solution
Spoiler

quest new_christmas_gift_box begin
	state start begin
	
		function give_item_with_log(vnum, amount,item_id)
			if vnum == 1 then 
				pc.changegold(amount)
			else
				pc.give_item2(vnum,amount)
			end
			char_log(tonumber(item_id), "XMAS_BOX","reward vnum: "..vnum.." reward amount: "..amount);
		end
		
		function gift(item_id)
			local n = number (1,100)
			if n <= 4 then
				new_christmas_gift_box.give_item_with_log(25100,1,item_id)
			elseif n <= 8 then
				new_christmas_gift_box.give_item_with_log(71084,1,item_id)
			elseif n <= 12 then
				new_christmas_gift_box.give_item_with_log(71085,1,item_id)
			elseif n <= 16 then
				new_christmas_gift_box.give_item_with_log(71109,1,item_id)
			elseif n <= 21 then
				new_christmas_gift_box.give_item_with_log(25040,1,item_id)
			elseif n <= 26 then
				new_christmas_gift_box.give_item_with_log(71101,3,item_id)
			elseif n <= 31 then
				new_christmas_gift_box.give_item_with_log(71107,1,item_id)
			elseif n <= 40 then
				new_christmas_gift_box.give_item_with_log(50513,1,item_id)
			elseif n <= 50 then
				new_christmas_gift_box.give_item_with_log(1,100000,item_id)
			elseif n <= 61 then
				new_christmas_gift_box.give_item_with_log(1,50000,item_id)
			elseif n <= 73 then
				new_christmas_gift_box.give_item_with_log(1,30000,item_id)
			elseif n <= 86 then
				new_christmas_gift_box.give_item_with_log(1,20000,item_id)
			else
				new_christmas_gift_box.give_item_with_log(1,10000,item_id)
			end

		end

		-- Å©¸®½º¸¶½º ¼±¹° »óÀÚ : 71144
		when 71144.use begin
			local t = get_global_time() - item.get_socket(1)
			local n = item.get_socket (0)
			if t >= 1800 then
			--if t >= 60 then
				new_christmas_gift_box.gift(item.get_id())
				item.set_socket(1, get_global_time())
				if n == 9 then
					item.remove()
				else
					item.set_socket(0, n + 1)
				end
				syschat(string.format(gameforge.new_christmas_gift_box._010_say, 10, 9 - n))
			else
				syschat(string.format(gameforge.new_christmas_gift_box._020_say, 31 - t / 60))
			end
		end
	end
end

 

I think this is what you want

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.