antiblock
Rodnia | Alpha & Omega
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
Sign in to follow this  
VMP.

[Quest]Cofre

3 posts in this topic

Boa noite,Aqui deixo uma quest de "cofre", percebem o que é pelo código...

------------------------------------------------Nome: Cofre--Data: 11 de Dezembro de 2012----------------------------------------------quest cofre begin	state start begin		when [cofre].use begin			local item_table =			{ 50821 , 50822 , 50823 , 50825 , 50826 , [etc] }			local Irandom = number(1,table.getn(item_table) )			if pc.get_empty_inventory_count() > 0 then				chat("Cofre: Recebeste um Item de ID.."..item_table[Irandom] )				local reward = item_table[Irandom]				pc.give_item2(reward, 10 )				item.remove()			else				chat("Não podes usar o cofre porque não tens espaço no inventário!" )				return			end		end	endend
Quando um utilizador utiliza certo item, recebe um item ao calhas da vossa lista..Para adicionarem mais itens, apenas têm de meter em local item_table.Cumprimentos,Moisés.

Share this post


Link to post
Share on other sites
antiblock
Cyphriun

Sem offtopic sff, chosepetras, muda o título sff...

Share this post


Link to post
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
Sign in to follow this