Jump to content
×
×
  • Create New...
  • 0

Skillchest quest not working?


GGlock

Question

I made a simple skillchest quest but nothing happens when I try to open the chest.

I also added the quest to the quest_list.

 

Code:

quest fbtruhe begin 
    state start begin 
        when 50134.use begin 
	    chat("Du hast " ..item_name(item.vnum).. " geöffnet.") 
	    local b = {
    	    50401, 50402, 50403, 50403, 50404, 			-- Körper Lehre
	    50416, 50417, 50418, 50419, 50420, 			-- Mental Lehre
	    50431, 50432, 50433, 50434, 50435, 			-- Nah Lehre
	    50446, 50447, 50448, 50449, 50550, 			-- Fern Lehre
	    50461, 50462, 50463, 50464, 50465, 50466, 	-- Waffen Lehre
	    50476, 50477, 50478, 50479, 50480, 50481,	-- Magie Lehre
	    50491, 50492, 50493, 50494, 50495, 50496,	-- Drachen Lehre
	    50506, 50507, 50508, 50509, 50510, 50511}	-- Heil Lehre
	    local rb = number(1, table.getn(b))
	    pc.give_item2(b[rb], 1)
	    pc.remove_item(item.vnum)
        end 
    end
end

 

Would be really nice if someone could help me!

 

Thank you

Link to comment
Share on other sites

  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

4 answers to this question

Recommended Posts

  • 0
  • Premium
quest activate_item begin 
	state start begin 
		when 50134.use begin 
			local itemlist = {
				50401, 50402, 50403, 50403, 50404, 			-- Körper Lehre
				50416, 50417, 50418, 50419, 50420, 			-- Mental Lehre
				50431, 50432, 50433, 50434, 50435, 			-- Nah Lehre
				50446, 50447, 50448, 50449, 50550, 			-- Fern Lehre
				50461, 50462, 50463, 50464, 50465, 50466, 	-- Waffen Lehre
				50476, 50477, 50478, 50479, 50480, 50481,	-- Magie Lehre
				50491, 50492, 50493, 50494, 50495, 50496,	-- Drachen Lehre
				50506, 50507, 50508, 50509, 50510, 50511	-- Heil Lehre
			}
			pc.remove_item(item.get_vnum())
			pc.give_item2(table_get_random_item(itemlist), 1)
		end
	end
end

ITEM_TYPE = 18   in item_proto

Edited by WeedHex
Link to comment
Share on other sites

  • 0
34 minutes ago, WeedHex said:
quest activate_item begin 
	state start begin 
		when 50134.use begin 
			local itemlist = {
				50401, 50402, 50403, 50403, 50404, 			-- Körper Lehre
				50416, 50417, 50418, 50419, 50420, 			-- Mental Lehre
				50431, 50432, 50433, 50434, 50435, 			-- Nah Lehre
				50446, 50447, 50448, 50449, 50550, 			-- Fern Lehre
				50461, 50462, 50463, 50464, 50465, 50466, 	-- Waffen Lehre
				50476, 50477, 50478, 50479, 50480, 50481,	-- Magie Lehre
				50491, 50492, 50493, 50494, 50495, 50496,	-- Drachen Lehre
				50506, 50507, 50508, 50509, 50510, 50511	-- Heil Lehre
			}
			pc.remove_item(item.get_vnum())
			pc.give_item2(table_get_random_item(itemlist), 1)
		end
	end
end

ITEM_TYPE = 18   in item_proto

Thanks for your help but its still not working..

 

Its type 18 in item_proto and I also used your code.

  • Think 1
Link to comment
Share on other sites

  • 0
  • Premium
7 minutes ago, GGlock said:

Still looking for help

 

1- Put a chatpacket to see if the code is getting triggered, no?

2- The item type is wrong

3- when 50134.use begin  already declared

4-  The vnums in the array are wrong so you won't get the item.

5- You don't know how to install a quest ez.

 

dumb patrick star GIF by SpongeBob SquarePants

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.


  • Metin2 Dev Github
  • Activity

    1. 1

      Metin2 Privat Server selfmade

    2. 1

      Costumes

    3. 1

      Costumes

    4. 0

      game.core (Thank you in advance for your help.)

    5. 1

      [Help] Problem with the system I added

    6. 7

      Serversource build win32

    7. 1

      Extended blend system

    8. 7

      Serversource build win32

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.