antiblock
Rodnia | Alpha & Omega
  • Chatbox

    You don't have permission to chat.
    Load More
Sign in to follow this  
Unk3n0w7

Sistema - Troca De Cupões

2 posts in this topic

when jack.chat."Cupões para Máscara" begin			local cupon = pc.count_item(30323)			local category = { "Disfarce", "Penteado", "Outros" }						local item_list = {						{			{ "Disfarce de Abóbora(M)", 41125, 40 },			{ "Disfarce de Abóbora(F)", 41126, 40 },			},						{			{ "Máscara para Guerreiro", 74020, 30 },			{ "Máscara para Ninja", 74270, 30 },			{ "Máscara para Sura", 74520, 30},			{ "Máscara para Shamã", 74870, 30},			},						{			{ "Ostra(10)", 27987, 5 },			{ "Ostra(50)", 27987, 25 }			}		}					local s = select(category)			if s == table.getn(category) then 			return 		end			local menu = {}			for i = 1, table.getn(item_list[s]) do				table.insert(menu, item_list[s][i][1]			end			say_title("Jack Cabeça de Abóbora:")			say("Aqui tens as categorias disponíveis.")			local t = select(menu)			if t == table.getn(menu) then 			return 		end			local item_vnum, item_count = list[s][t][2], list[s][t][3]			say_title("Jack Cabeça de Abóbora:")			say("Tens "..cupon.." cupões.")			say_item(""..item_name(item_vnum).."", item_vnum, "")			say_reward("O item custa "..item_cost..".")			if cupon < item_cost then			say_reward("Não tens cupões suficientes.")		end			if select("Comprar","Sair") == 2 then			return		end			say_title("Jack Cabeça de Abóbora:")			say("Compraste "..item_vnum.."!")			say("Volta sempre.")			pc.remove_item(30323, cupon - item_cost)			pc.give_item2(item_vnum)		end

Créditos : Sparkling

Share this post


Link to post
Share on other sites
antiblock
Elveron
if cupon < item_cost thensay_reward("Não tens cupões suficientes.")end

             V

if cupon < item_cost thensay_reward("Não tens cupões suficientes.")returnend

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