Jump to content

Skillchest quest not working?


Recommended Posts

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

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

  • 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

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

  • 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

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.