Advertisement
bapereira

Livro com escrituras bobas (modificável)

Oct 15th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. --[[
  2. Project's author: Nettoork#0000
  3. ]]--
  4.  
  5. pagina1 = " Eu"
  6. pagina2 = " Sou"
  7. pagina3 = " Seu"
  8. pagina4 = " Vizinho"
  9. maxpag = 4 -- Limite de páginas
  10. pags={pagina1,pagina2,pagina3,pagina4}
  11. -- Script --
  12. pagcont = 1
  13. function openBook(playerName)
  14.  
  15. ui.addTextArea(1,"",playerName,290,100,250,250,0x603A1B,0x603A1B,1,true)
  16. ui.addTextArea(2,"",playerName,286,96,250,250,0xffffff,0xffffff,1,true)
  17. ui.addTextArea(3,"",playerName,282,92,250,250,0x77197A,0x603A1B,1,true)
  18. ui.addTextArea(4,"",playerName,480,190,50,50,0x603A1B,0x503117,1,true)
  19. ui.addTextArea(5,"<a href='event:abrir'> ",playerName,497,198,15,15,0x010101,0x010101,1,true)
  20. ui.addTextArea(6,"",playerName,503,216,3,14,0x010101,0x010101,1,true)
  21. ui.addTextArea(7,"<p align='center'><font size='35' face='Soopafresh'>Livro 1\n<p align='center'><font size='20' face='Verdana'>Aprendiz",playerName,340,140,0,0,0,0,1,true)
  22.  
  23. end
  24.  
  25. openBook(playerName)
  26.  
  27. function openedBook(playerName)
  28.  
  29. ui.addTextArea(8,'',playerName,290,100,250,250,0x603A1B,0x603A1B,1,true)
  30. ui.addTextArea(9,'',playerName,286,96,250,250,0xffffff,0xffffff,1,true)
  31. ui.addTextArea(10,"<font color='#010101' size='13'>"..pags[pagcont],playerName,296,96,240,220,0xffffff,0xffffff,0,true)
  32. ui.addTextArea(11,"<a href='event:fechar'> \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n",playerName,280,95,10,255,0x603A1B,0x603A1B,1,true)
  33. ui.addTextArea(12,"<font size='18' color='#010101'><p align='center'>"..pagcont.."/"..maxpag,playerName,300,318,240,0,1,1,0,true)
  34. ui.addTextArea(13,"<font size='30'><a href='event:passpage'>→",playerName,500,310,0,0,1,1,0,true)
  35. ui.addTextArea(14,"<font size='30'><a href='event:unpasspage'>←",playerName,300,310,0,0,1,1,0,true)
  36.  
  37. end
  38. function eventTextAreaCallback(id,playerName,link)
  39.  
  40. if link == "abrir" then
  41. openedBook(playerName)
  42. for i = 1,7 do
  43. ui.removeTextArea(i,playerName)
  44. end
  45.  
  46. end
  47. if link == "passpage" then
  48. if pagcont <= maxpag-1 then
  49. pagcont = pagcont + 1
  50. openedBook(playerName)
  51. end
  52. end
  53.  
  54. if link == "unpasspage" then
  55. if pagcont ~= 1 then
  56. pagcont = pagcont - 1
  57. openedBook(playerName)
  58. end
  59. end
  60.  
  61. if link == "fechar" then
  62. openBook(playerName)
  63. for i = 8,14 do
  64. ui.removeTextArea(i,playerName)
  65. end
  66. end
  67.  
  68. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement