Jump to content

Quest-based Pearl rate from clams


Rumor

Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

I had problems in my server with players filling their inventory and opening clams, so all the drops from the clams would fall on the floor and make people lag. This quest resolves that issue and allows you to set the chance of each drop from the clam, meaning you could make it drop whatever you like too.

 

Thanks to Nightwish for this one.

 

You need to set your clam "Type" in the database to "18".

--powered by nightwish 4 nirvana ;) --
quest clams begin
	state start begin
		when 27987.use begin
		if pc.get_empty_inventory_count() < 1 then
		chat("You don't have enough inventory space.")
		else
		pc.remove_item(27987,1)
		local rand = number(1,30)
                if rand == 1 then pc.give_item2(27992,1)
				elseif rand == 2 then pc.give_item2(27993,1)
				elseif rand == 3 then pc.give_item2(27994,1)
				elseif rand >= 4 then pc.give_item2(27990,1)
		

			end -- inventory check
		end -- when .use end
	end -- state "start" end
end -- Quest end
end
  • Metin2 Dev 2
  • Good 1
  • Love 5
Link to comment
Share on other sites

You don't need a inventory space checker because when you remove a 27987 you have space, and the quest can be shortly.

when 27987.use begin
pc.remove_item(item.get_vnum(),1)
local perlas,prob,item = {27992,27993,27994},number(1,30),0
if prob > 3 then item=27990 else item=perlas[prob] end
pc.give_item(item,1)
end
Kind regards.
Link to comment
Share on other sites

  • Former Staff

You don't need a inventory space checker because when you remove a 27987 you have space, and the quest can be shortly.

when 27987.use begin
pc.remove_item(item.get_vnum(),1)
local perlas,prob,item = {27992,27993,27994},number(1,30),0
if prob > 3 then item=27990 else item=perlas[prob] end
pc.give_item(item,1)
end
Kind regards.

 

This doesnt work if the clams are stackable. Then only in 1 of 200 cases there will be a free slot :D

Link to comment
Share on other sites

Nice to see my quest as one of the first topics here. Its a basic quest and I also used this for my starterset at rev 2089. I just made the the box non tradable and blocked the opportunity to lay it into savebox. So ppl cant trade/savebox or fill their inventory and let the items fall on the ground and pick that with other chars. But be careful with items which need more than 1 slot :)

King regards,

Nightwish

Link to comment
Share on other sites

  • 8 months later...
  • Active Member

When a player get more of clams with type 18 they need to stack them manually so would be easy if you make it type 23 and set from special_item_group.txt

Link to comment
Share on other sites

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.