kasko30 19 Posted August 20, 2017 Share Posted August 20, 2017 Hello guys . My question is how to make a box ingame open couple times before it dissapears from inventory just like fish box in official Also a way to show how many times left before the box dissapears and Thank you Link to comment Share on other sites More sharing options...
zeimpekis9 68 Posted August 20, 2017 Share Posted August 20, 2017 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 1 Link to comment Share on other sites More sharing options...
kasko30 19 Posted August 20, 2017 Author Share Posted August 20, 2017 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 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 More sharing options...
kasko30 19 Posted August 20, 2017 Author Share Posted August 20, 2017 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 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 More sharing options...
Sebypunct 24 Posted August 21, 2017 Share Posted August 21, 2017 same questions Link to comment Share on other sites More sharing options...
Premium Galet 510 Posted August 21, 2017 Premium Share Posted August 21, 2017 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 More sharing options...
Source 4 Posted August 22, 2017 Share Posted August 22, 2017 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 More sharing options...
Premium Necro 78 Posted August 22, 2017 Premium Share Posted August 22, 2017 There is a nice function called: "item.get_socket" and "item.set_socket" for quest. So you can make it this way, in source too. Same idea use also Compass... Link to comment Share on other sites More sharing options...
Premium Solution ragem0re 155 Posted August 22, 2017 Premium Solution Share Posted August 22, 2017 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 More sharing options...
kasko30 19 Posted August 22, 2017 Author Share Posted August 22, 2017 Thank you all i'll try it and see what happens Link to comment Share on other sites More sharing options...
Sebypunct 24 Posted August 26, 2017 Share Posted August 26, 2017 need src part Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now