Tectoon

[TFM] Casamento

Apr 27th, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.54 KB | None | 0 0
  1. groom='Noivo'
  2. bride='Noiva'
  3.  
  4.  
  5. f=400
  6. e=350
  7. a=0
  8. t=0
  9. p=0
  10. finale=0
  11.  
  12. groomanswer=0
  13. brideanswer=0
  14. positiongroomlock=1
  15. positionbridelock=0
  16. bridewalking=0
  17. stop=5
  18.  
  19. tfm.exec.disableAutoShaman(true)
  20. tfm.exec.disableAutoTimeLeft(true)
  21. tfm.exec.disableAfkDeath(true)
  22. tfm.exec.disableAutoNewGame(true)
  23. tfm.exec.newGame('@5014080')
  24.  
  25. function eventNewGame()
  26.                 tfm.exec.movePlayer(groom,1350, 290,offset,0,0,offset)
  27.                 tfm.exec.killPlayer(bride)
  28. end
  29.  
  30. function eventNewPlayer(a)
  31. tfm.exec.respawnPlayer(a)
  32. end
  33.  
  34. function eventLoop(currentTime,timeRemaining)
  35. t=t+1
  36.                 if positiongroomlock==1 then
  37.                 tfm.exec.movePlayer(groom,1350, 290,offset,0,0,offset)
  38.                 end
  39.  
  40.                 if positionbridelock==1 then
  41.                 tfm.exec.movePlayer(bride,1350, 290,offset,0,0,offset)
  42.                 end
  43.  
  44.                 if t==60 then
  45.                 ui.addTextArea(1,"Uhm. Podemos começar",nil, 1350, 180,150,40, color,color,Alpha,false)
  46.                 end
  47.  
  48.                 if t==80 then
  49.                 ui.addTextArea(1,"Por favor, deem a noiva boas vindas!",nil, 1350, 180,150,40, color,color,Alpha,false)
  50.                 tfm.exec.respawnPlayer(bride)
  51.                 tfm.exec.movePlayer(bride,400, 350,offset,0,0,offset)
  52.                 bridewalking=1
  53.                 stop=0
  54.                 end
  55.  
  56.  
  57.                 if stop==0 then
  58.  
  59.                         if bridewalking==1 then
  60.                         tfm.exec.movePlayer(bride,f, 350,offset,0,0,offset)
  61.                         f=f+10
  62.                         end
  63.                
  64.                         if f > 1145 then
  65.                         e=e-3.5
  66.                         tfm.exec.movePlayer(bride,f, e,offset,0,0,offset)
  67.                         end
  68.        
  69.                         if f==1350 then
  70.                         stop=1
  71.                         bridewalking=0
  72.                         positionbridelock=1
  73.                         ui.addTextArea(1,"Ah lá está ela!",nil, 1350, 180,150,40, color,color,Alpha,false)
  74.                         t=1000
  75.                         end
  76.                 end
  77.                
  78.                 if t==1006 then
  79.                 ui.addTextArea(1,"Vamos começar a cerimônia.",nil, 1350, 180,150,40, color,color,Alpha,false)
  80.                 end
  81.                
  82.                 if t==1012 then
  83.                 ui.addTextArea(1,"Nós nos reunimos para testemunhar e celebrar",nil, 1350, 180,150,40, color,color,Alpha,false)
  84.                 end
  85.                
  86.                 if t==1018 then
  87.                 ui.addTextArea(1," a união de duas almas no companheirismo eterno.",nil, 1350, 180,150,40, color,color,Alpha,false)
  88.                 end
  89.  
  90.                 if t==1024 then
  91.                 ui.addTextArea(1,"Que eles possam seguir está jornada na prosperidade e pobreza",nil, 1350,180,150,40, color,color,Alpha,false)
  92.                 end
  93.  
  94.                 if t==1030 then
  95.                 ui.addTextArea(1," na alegria e na tristeza",nil, 1350, 180,150,40, color,color,Alpha,false)
  96.                 end
  97.  
  98.                 if t==1036 then
  99.                 ui.addTextArea(1,'Você noivo aceita se casar com sua noiva na saúde e na doença na riqueza e na pobreza até que a morte lhes separe?',nil, 1350, 160,150,70, color,color,Alpha,false)
  100.                 groomanswer=1
  101.                 end
  102.  
  103.                 if groomanswer==1 then
  104.                 ui.addTextArea(2,'<a href="event:groomanswer"><p align="center">Eu aceito. Agora e sempre.</p></a>',groom ,830,350,100,40,0x3c5064,0x3c5064,alpha)
  105.                 end
  106.  
  107.                 if groomanswer==2 then
  108.                 ui.addTextArea(3,"Eu aceito. Agora e sempre.",nil ,1300,200,100)
  109.                 t=2000
  110.                 groomanswer=3
  111.                 end
  112.  
  113.                 if t==2006 then
  114.                 ui.removeTextArea(3,nil)
  115.                 ui.addTextArea(1,'E você noiva,aceita seu noivo na saúde e na doença na riqueza e na pobreza até que a morte lhes separe?',nil, 1350, 160,150,70, color,color,Alpha,false)
  116.                 ui.addTextArea(2,'<a href="event:brideanswer"><p align="center">Eu aceito. Agora e sempre.</p></a>',bride ,830,350,100,40,0x3c5064,0x3c5064,alpha)
  117.                 end
  118.  
  119.                 if brideanswer==1 then
  120.                 ui.addTextArea(3,"Eu aceito. Agora e sempre.",nil ,1300,200,100)
  121.                 t=3000
  122.                 brideanswer=2
  123.                 end
  124.  
  125.                 if t==3006 then
  126.                 ui.removeTextArea(3,nil)
  127.                 ui.addTextArea(1,'Então parabéns... Eu vos declaro marido e mulher. Já pode beijar a noiva',nil, 1350, 180,150,50, color,color,Alpha,false)
  128.                 end
  129.  
  130.                 if t==3012 then
  131.                 ui.removeTextArea(3,nil)
  132.                 tfm.exec.movePlayer(groom,1380, 290,offset,0,0,offset)
  133.                 tfm.exec.movePlayer(bride,1320, 290,offset,0,0,offset)
  134.                 finale=1
  135.                 positiongroomlock=0
  136.                 positionbridelock=0
  137.                 end
  138.  
  139.                 if t==3020 then
  140.                 ui.addTextArea(1,"Agora vamos festejar!",nil, 1350, 180,150,40, color,color,Alpha,false)
  141.                 end
  142.                
  143. end
  144.  
  145. function eventTextAreaCallback(id, player, callback)
  146.         if callback=='groomanswer' then
  147.         ui.removeTextArea(2,groom)
  148.         ui.removeTextArea(1,nil)
  149.         groomanswer=2
  150.         end
  151.  
  152.         if callback=='brideanswer' then
  153.         ui.removeTextArea(2,bride)
  154.         ui.removeTextArea(1,nil)
  155.         brideanswer=1
  156.         end
  157. end
Add Comment
Please, Sign In to add comment