Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Interface
- ui.addTextArea ( 1, "<p align='center'><font size='9'><a href='event:show1'><font color='#009D9D'><i>Cargo <b>«Sheeprise»</b></i>", n, 325, 135, 70, 30, 1, 1, 0, false)
- ui.addTextArea ( 2, "<p align='center'><font size='9'><a href='event:show2'><font color='#EE799F'><i>Medalha <b>The First Cake</b></i>", n, 430, 135, 70, 30, 1, 1, 0, false)
- ui.addTextArea ( 3, "<p align='center'><font size='9'><a href='event:show3'><font color='#cd950c'><i>3.000 Sheep Coins</i>", n, 325, 183, 70, 30, 1, 1, 0, false)
- ui.addTextArea ( 4, "<p align='center'><font size='9'><a href='event:show4'><font color='#cd950c'><i>10.000 Sheep Coins</i>", n, 430, 183, 70, 30, 1, 1, 0, false)
- ui.addTextArea ( 5, "<p align='center'><font size='9'><a href='event:show5'><font color='#5CACEE'><i>5 <b>línguas de sogra</b></i>", n, 325, 234, 70, 30, 1, 1, 0, false)
- ui.addTextArea ( 6, "<p align='center'><font size='9'><a href='event:show6'><font color='#E0AA36'><i>20 <b>queijos</b> de inventário</i>", n, 430, 234, 70, 30, 1, 1, 0, false)
- -- Informações: (primeiro valor é o nome do item, o segundo valor é o preço)
- itensInfo = {[1]={"Cargo <b>«Sheeprise»</b>", 50}, [2]={"Medalha <b>The First Cake</b>", 50},
- [3]={"<b>3.000</b> Sheep Coins", 30}, [4]={"<b>10.000</b> Sheep Coins", 90},
- [5]={"5 <b>Línguas de Sogra</b> (consumível)", 50}, [6]={"20 <b>queijos</b>", 80}}
- -- Função que mostra informações de um item (primeiro valor da função é o jogador, segundo valor é o ID do item (o valor que fica entre os [] na tabela de informações)
- -- info.pontos[n] é o valor de pontos que o jogador tem (você tem que alterar isso)
- function showItem (n, item)
- ui.addTextArea ( 4 + tfm.get.room.playerList[n].id, "<p align='center'><font color='#CD950C' size='9'>"..itensInfo[item][1], n, 300, 120, 200, 20, 0xFFFFFF, 0xCD950C, 0.9, true )
- ui.addTextArea ( 5 + tfm.get.room.playerList[n].id, "", n, 300, 140, 200, 140, 0xFFFFFF, 0xCD950C, 1, true )
- ui.addTextArea ( 6 + tfm.get.room.playerList[n].id, "<p align='center'><font color='#cd950c' size='10'><b>Nome: </b>"..itensInfo[item][1], n, 310, 150, 180, 20, 0xFFFFFF, 0xCD950C, 1, true )
- if itensInfo[item][2] <= info.pontos[n] then
- ui.addTextArea ( 7 + tfm.get.room.playerList[n].id, "<p align='center'><font color='#cd950c' size='10'><b>Preço: </b>"..itensInfo[item][2].." - <i>Saldo final: "..info.pontos[n] - itensInfo[item][2].."</i>", n, 310, 184, 180, 20, 0xFFFFFF, 0xCD950C, 1, true )
- ui.addTextArea ( 8 + tfm.get.room.playerList[n].id, "<p align='center'><font color='#cd950c'><a href='event:buy"..item.."'><b>Comprar</b>", n, 310, 218, 180, 20, 0xFFFFFF, 0xCD950C, 1, true )
- else
- ui.addTextArea ( 7 + tfm.get.room.playerList[n].id, "<p align='center'><font color='#cd950c' size='9'><b>Preço: </b>"..itensInfo[item][2].." - <i>Faltam: ".. itensInfo[item][2] - info.pontos[n].."</i>", n, 310, 184, 180, 20, 0xFFFFFF, 0xCD950C, 1, true )
- ui.addTextArea ( 8 + tfm.get.room.playerList[n].id, "<p align='center'><font color='#999999'><b>Comprar</b>", n, 310, 218, 180, 20, 0xFFFFFF, 0x999999, 1, true )
- end
- ui.addTextArea ( 9 + tfm.get.room.playerList[n].id, "<p align='center'><font color='#cd950c'><a href='event:fecharInfo'><b>Fechar</b>", n, 310, 252, 180, 20, 0xFFFFFF, 0xCD950C, 1, true )
- end
- -- Isso aqui vai no textAreaCallback (n = jogador que clicou no callback)
- if :sub(1,4) == "show" then
- mostrarItem(n, tonumber(c:sub(5,#c)))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement