Jump to content
Forgot your email address? ×
×
×
  • Create New...
  • 0

guildstorage 40k help


icaroquin

Question

Help me please!!!!

		function insert_item(cell,slot,tab)
			item.select_cell(cell)
			local attr = {{item.get_attr_type(0),item.attr_value(0)}, {item.get_attr_type(1),item.attr_value(1)}, {item.get_attr_type(2),item.attr_value(2)}, {item.get_attr_type(3),item.attr_value(3)},{item.get_attr_type(4),item.attr_value(4)},{item.get_attr_type(5),item.attr_value(5)},{item.get_attr_type(6),item.attr_value(6)}}
			local socket, itemVnum, itemCount = {item.get_socket(0), item.get_socket(1), item.get_socket(2),item.get_socket(3),item.get_socket(4),item.get_socket(5)}, item.get_vnum(), item.get_count()     
			if not guildstorage.item_can_store(itemVnum) then syschat'Dieses Item kann nicht gelagert werden.' return end
			guildstorage.add_log(pc.get_name(),'Item','einlagern',item_name(itemVnum)..' ('..itemCount..')')
			local guildstorage = io.open("/".."Guildstorage/"..pc.get_guild().."/storage.txt", "a+")
			if not pc.can_warp() then return end
			item.select(cell)
			if item.vnum == 0 then return end
			--if item.rem(item.get_count()) then
			item.remove()
			guildstorage:write(itemVnum.."#"..itemCount.."#"..(slot+120*tab).."#"..socket[1].."#"..socket[2].."#"..socket[3].."#"..socket[4].."#"..socket[5].."#"..socket[6].."#"..attr[1][1].."#"..attr[1][2].."#"..attr[2][1].."#"..attr[2][2].."#"..attr[3][1].."#"..attr[3][2].."#"..attr[4][1].."#"..attr[4][2].."#"..attr[5][1].."#"..attr[5][2].."#"..attr[6][1].."#"..attr[6][2].."#"..attr[7][1].."#"..attr[7][2].."n")
			guildstorage:flush()
			guildstorage:close()
			cmdchat('GUILDSTORAGE_ADDITEMSLOT '..slot..' '..tab..' '..itemVnum..' '..itemCount..' '..socket[1]..' '..socket[2]..' '..socket[3]..' '..socket[4]..' '..socket[5]..' '..socket[6]..' '..attr[1][1]..' '..attr[1][2]..' '..attr[2][1]..' '..attr[2][2]..' '..attr[3][1]..' '..attr[3][2]..' '..attr[4][1]..' '..attr[4][2]..' '..attr[5][1]..' '..attr[5][2]..' '..attr[6][1]..' '..attr[6][2]..' '..attr[7][1]..' '..attr[7][2])
			--else
				--syschat("Du hast das Item nicht mehr")
			--end
		end

works, but, he doubles stacked item...

 

--if item.rem(item.get_count()) then << no works.

help me '-'

Link to comment
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


  • Read our Rules
  • Activity

    1. 1

      [HELP] Costume bonusing with item not working

    2. 10

      Fix Taskbar Highlight Python

    3. 13

      Reduce server memory usage

    4. 87

      How To Enchant & Transform Costume

    5. 2

      Old m2 function

  • Recently Browsing

    • No registered users viewing this page.

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.