Unk3n0w7 1,321 Posted January 7, 2014 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 4 carlos9534, 保羅·蓋伊, Origin. and 1 other reacted to this Share this post Link to post Share on other sites
some1 4 Posted January 7, 2014 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