Advertisement
Bolodefchoco_LUAXML

[Script] CShop

Oct 20th, 2015
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 25.13 KB | None | 0 0
  1. --Bolodefchoco
  2. --24/08/2015
  3.  
  4. A = {Bolodefchoco = true}
  5. T = {
  6.   en = {
  7.     msgCone = 'Sucess! You bought ',
  8.     fail = 'Error',
  9.     msgAcessOne = 'You are not Admin to use these commands.',
  10.     ask1UseO = 'Use Object?',
  11.     ask1UseP = 'Use Ground?',
  12.     shop = 'Shop',
  13.     msgShop = [[
  14.     <ROSE>!buy_o
  15.             <J> Caixa Pequena | Caixa Grande | Tábua Pequena
  16.              Tábua Grande | Bola | Trampolim | Bigorna
  17.              CN | SP | Balão | Maçã | Ovelha | Tábua de Gelo
  18.              Tábua de Chocolate | Nuvem | Bolha
  19.              Mini-Tabua  | Caixa de Acompanhamento
  20.              Runa Estável | Big Plank | Caixa Triângular
  21.              Tábua S
  22.     <ROSE>!buy_p
  23.             <J> Madeira | Gelo | Trampolim | Lava | Chocolate
  24.              Terra | Grama | Areia | Nuvem | Água | Pedra
  25.              Neve | Retângulo | Círculo (R,F,W,H)
  26.     <ROSE>!c_edit
  27.             <J> buy_o
  28.              buy_p
  29.                       <V>args[1]
  30.     <ROSE>!r_p | time | cheese | respawn
  31.     ]],
  32.     closeShop = 'Close',
  33.     msgAcessTwo = 'You are not Allowed to see the Admin Commands.',
  34.   };
  35.   br = {
  36.     msgCone = 'Sucesso! Você comprou ',
  37.     fail = 'Falha',
  38.     msgAcessOne = 'Você não é Admin para usar estes comandos.',
  39.     ask1UseO = 'Usar Objeto?',
  40.     ask1UseP = 'Usar Piso?',
  41.     shop = 'Shop',
  42.     msgShop = [[
  43.     <ROSE>!buy_o
  44.             <J> Caixa Pequena | Caixa Grande | Tábua Pequena
  45.              Tábua Grande | Bola | Trampolim | Bigorna
  46.              CN | SP | Balão | Maçã | Ovelha | Tábua de Gelo
  47.              Tábua de Chocolate | Nuvem | Bolha
  48.              Mini-Tabua  | Caixa de Acompanhamento
  49.              Runa Estável | Big Plank | Caixa Triângular
  50.              Tábua S
  51.     <ROSE>!buy_p
  52.             <J> Madeira | Gelo | Trampolim | Lava | Chocolate
  53.              Terra | Grama | Areia | Nuvem | Água | Pedra
  54.              Neve | Retângulo | Círculo (R,F,W,H)
  55.     <ROSE>!c_edit
  56.             <J> buy_o
  57.              buy_p
  58.                       <V>args[1]
  59.     <ROSE>!r_p | time | cheese | respawn
  60.     ]],
  61.     closeShop = 'Fechar',
  62.     msgAcessTwo = 'Você não tem permissão para ver os comandos de Admin.',
  63.   };
  64.   es = {
  65.     msgCone = 'Muy Bueno!!!! Compraste ',
  66.     fail = 'Error',
  67.     msgAcessOne = 'Tú no eres Admin para usar los comandos.',
  68.     ask1UseO = 'Usar Objeto?',
  69.     ask1UseP = 'Usar Piso?',
  70.     shop = 'Tienda',
  71.     msgShop = [[
  72.     <ROSE>!buy_o
  73.             <J> Caixa Pequena | Caixa Grande | Tábua Pequena
  74.              Tábua Grande | Bola | Trampolim | Bigorna
  75.              CN | SP | Balão | Maçã | Ovelha | Tábua de Gelo
  76.              Tábua de Chocolate | Nuvem | Bolha
  77.              Mini-Tabua  | Caixa de Acompanhamento
  78.              Runa Estável | Big Plank | Caixa Triângular
  79.              Tábua S
  80.     <ROSE>!buy_p
  81.             <J> Madeira | Gelo | Trampolim | Lava | Chocolate
  82.              Terra | Grama | Areia | Nuvem | Água | Pedra
  83.              Neve | Retângulo | Círculo (R,F,W,H)
  84.     <ROSE>!c_edit
  85.             <J> buy_o
  86.              buy_p
  87.                       <V>args[1]
  88.     <ROSE>!r_p | time | cheese | respawn
  89.     ]],
  90.     closeShop = 'Cerrar',
  91.     msgAcessTwo = 'Tú no tiene permición para ver los comandos de Admin.',
  92.   };
  93. }
  94. C = {
  95.   one = 'buy_o',
  96.   two = 'buy_p',
  97.   three = 'c_edit',
  98.   four = 'r_p',
  99.   five = 'time',
  100.   six = 'cheese',
  101.   seven = 'respawn',
  102. }
  103. function t(n,t)
  104.   for n in pairs (tfm.get.room.playerList) do
  105.     if T[tfm.get.room.playerList[n].community] then
  106.       return T[tfm.get.room.playerList[n].community][t]
  107.     else
  108.       return T.en[t]
  109.     end
  110.   end
  111. end
  112. oI = nil
  113. pI = nil
  114. pC = nil
  115. function eventNewPlayer(n)
  116.   for i in pairs (tfm.get.room.playerList) do
  117.     ui.addTextArea(0,"<B><J><font size='13'><a href='event:shop'>"..t(n,'shop').."</a>",n,10,30,x,y,0x324650,0x212F36,1,true)
  118.   end
  119. end
  120. table.foreach(tfm.get.room.playerList, eventNewPlayer)
  121. M = {"@5796644","@5744343","@5976435","@5932728","@5914630","@5859608","@5956038","@3342799","@5919786","@6165769","@5967356","@5961606","@2414326","@5428511","@5603373","@5819314","@5822948","@5836216","@5837098","@5849982","@5858167","@5859270","@5859666","@5960337","@5965394","@6001434","@6055231","@5246873","@5305732","@5653957","@5918528","@5918455","@5919777","@5932714","@3325102","@5991460","@5973944","@6027282","@6144108","@5993879","@6055119"}
  122. tfm.exec.disableAutoNewGame(true)
  123. function eventLoop(t,r)
  124.         if r<=0 then
  125.                 tfm.exec.newGame(M[math.random(#M)])
  126.         end
  127. end
  128. function eventChatCommand(n,c)
  129.   local args={}
  130.   for argument in c:gmatch("[^%s]+") do
  131.     table.insert(args,argument)
  132.   end
  133.   if string.lower(args[1])==C.one then
  134.     if A[n] then
  135.       args[2]=table.concat(args," ",2)
  136.       if string.lower(args[2])=='caixa pequena' then
  137.         oI = 1
  138.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  139.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  140.       elseif string.lower(args[2])=='caixa grande' then
  141.         oI = 2
  142.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  143.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  144.       elseif string.lower(args[2])=='tabua pequena' or string.lower(args[2])=='tábua pequena' then
  145.         oI = 3
  146.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  147.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  148.       elseif string.lower(args[2])=='tabua grande' or string.lower(args[2])=='tábua grande' then
  149.         oI = 4
  150.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  151.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  152.       elseif string.lower(args[2])=='bola' then
  153.         oI = 6
  154.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  155.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  156.       elseif string.lower(args[2])=='trampolim' then
  157.         oI = 7
  158.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  159.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  160.       elseif string.lower(args[2])=='bigorna' then
  161.         oI = 10
  162.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  163.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  164.       elseif string.lower(args[2])=='cn' or string.lower(args[2])=='cannon' then
  165.         oI = 17
  166.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  167.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  168.       elseif string.lower(args[2])=='sp' or string.lower(args[2])=='spirit' then
  169.         oI = 24
  170.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  171.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  172.       elseif string.lower(args[2])=='balão' or string.lower(args[2])=='balloon' then
  173.         oI = 28
  174.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  175.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  176.       elseif string.lower(args[2])=='runa' then
  177.         oI = 32
  178.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  179.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  180.       elseif string.lower(args[2])=='maçã' then
  181.         oI = 39
  182.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  183.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  184.       elseif string.lower(args[2])=='ovelha' then
  185.         oI = 40
  186.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  187.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  188.       elseif string.lower(args[2])=='tábua de gelo' or string.lower(args[2])=='tabua gelo' then
  189.         oI = 45
  190.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  191.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  192.       elseif string.lower(args[2])=='tábua de chocolate' or string.lower(args[2])=='tábua chocolate' or string.lower(args[2])=='choco tábua' then
  193.         oI = 46
  194.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  195.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  196.       elseif string.lower(args[2])=='nuvem' then
  197.         oI = 57
  198.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  199.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  200.       elseif string.lower(args[2])=='bolha' then
  201.         oI = 59
  202.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  203.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  204.       elseif string.lower(args[2])=='mini-tabua' or string.lower(args[2])=='mini tabua' then
  205.         oI = 60
  206.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  207.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  208.       elseif string.lower(args[2])=='caixa de acompanhamento' or string.lower(args[2])=='caixa coração' then
  209.         oI = 61
  210.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  211.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  212.       elseif string.lower(args[2])=='runa estável' or string.lower(args[2])=='runa estavel' then
  213.         oI = 62
  214.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  215.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  216.       elseif string.lower(args[2])=='tabua grandona' or string.lower(args[2])=='tabua super-grande' or string.lower(args[2])=='big plank' then
  217.         oI = 67
  218.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  219.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  220.       elseif string.lower(args[2])=='caixa triângular' or string.lower(args[2])=='caixa triangular' or string.lower(args[2])=='caixa illuminati' then
  221.         oI = 68
  222.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  223.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  224.       elseif string.lower(args[2])=='tábua s' or string.lower(args[2])=='tabua s' then
  225.         oI = 69
  226.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  227.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  228.       else
  229.         ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[2],n,4,26,w,true)
  230.       end
  231.     else
  232.       ui.addPopup(0,0,t(n,'msgAcessOne'),n,4,26,w,true)
  233.     end
  234.   elseif string.lower(args[1])==C.two then
  235.     if A[n] then
  236.       if args[2] then
  237.         if string.lower(args[2])=='madeira' then
  238.           pI = 0
  239.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0.2 ; Friction =  0.3; Width = 15 ; Height = 45 ; end
  240.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  241.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  242.         elseif string.lower(args[2])=='gelo' then
  243.           pI = 1
  244.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0.2  ; Friction = 0 ; Width = 15 ; Height = 45 ; end
  245.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  246.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  247.         elseif string.lower(args[2])=='trampolim' then
  248.           pI = 2
  249.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 1.2 ; Friction =  0 ; Width = 15 ; Height = 45 ; end
  250.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  251.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  252.         elseif string.lower(args[2])=='lava' then
  253.           pI = 3
  254.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 20 ; Friction = 0 ; Width = 15 ; Height = 45 ; end
  255.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  256.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  257.         elseif string.lower(args[2])=='chocolate' then
  258.           pI = 4
  259.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0.2 ; Friction = 20 ; Width = 15 ; Height = 45 ; end
  260.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  261.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  262.         elseif string.lower(args[2])=='terra' then
  263.           pI = 5
  264.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0.2  ; Friction = 0.3 ; Width = 15 ; Height = 45 ; end
  265.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  266.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  267.         elseif string.lower(args[2])=='grama' then
  268.           pI = 6
  269.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0.2 ; Friction = 0.3 ; Width = 15 ; Height = 45 ; end
  270.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  271.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  272.         elseif string.lower(args[2])=='areia' then
  273.           pI = 7
  274.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0.2 ; Friction = 0.1 ; Width = 15 ; Height = 45 ; end
  275.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  276.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  277.         elseif string.lower(args[2])=='nuvem' then
  278.           pI = 8
  279.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0.2 ; Friction = 0.3 ; Width = 15 ; Height = 45 ; end
  280.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  281.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  282.         elseif string.lower(args[2])=='água' or string.lower(args[2])=='agua' then
  283.           pI = 9
  284.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0 ; Friction = 0 ; Width = 15 ; Height = 45 ; end
  285.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  286.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  287.         elseif string.lower(args[2])=='pedra' then
  288.           pI = 10
  289.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0 ; Friction = 0.3 ; Width = 15 ; Height = 45 ; end
  290.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  291.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  292.         elseif string.lower(args[2])=='neve' then
  293.           pI = 11
  294.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0.1 ; Friction = 0.05 ; Width = 15 ; Height = 45 ; end
  295.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  296.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  297.         elseif string.lower(args[2])=='retângulo' or string.lower(args[2])=='retangulo' then
  298.           pI = 12
  299.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0.2  ; Friction = 0.3 ; Width = 15 ; Height = 45 ; end
  300.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  301.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  302.           if args[7] then
  303.             pC = args[7]
  304.           else
  305.             pC = 0
  306.           end
  307.         elseif string.lower(args[2])=='círculo' or string.lower(args[2])=='circulo' then
  308.           pI = 13
  309.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0.2 ; Friction = 0.3 ; Width = 15 ; Height = 45 ; end
  310.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  311.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  312.           if args[7] then
  313.             pC = args[7]
  314.           else
  315.             pC = 0
  316.           end
  317.         elseif string.lower(args[2])=='teia' or string.lower(args[2])=='web' then
  318.           pI = 15
  319.           if args[3] and args[4] and args[5] and args[6] then Restitution = args[3]; Friction = args[4]; Width = args[5]; Height = args[6] ; else Restitution = 0 ; Friction = 0 ; Width = 15 ; Height = 45 ; end
  320.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  321.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  322.         else
  323.           ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[2],n,4,26,w,true)
  324.         end
  325.       else
  326.         ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[1],n,4,26,w,true)
  327.       end
  328.     else
  329.       ui.addPopup(0,0,t(n,'msgAcessOne'),n,4,26,w,true)
  330.     end
  331.   elseif string.lower(args[1])==C.three then
  332.     if A[n] then
  333.       if args[2] then
  334.         if string.lower(args[2])==C.one then
  335.           C.one = string.lower(args[3])
  336.         elseif string.lower(args[2])==C.two then
  337.           C.two = string.lower(args[3])
  338.         elseif string.lower(args[2])==C.four then
  339.           C.four = string.lower(args[3])
  340.         elseif string.lower(args[2])==C.five then
  341.           C.five = string.lower(args[3])
  342.         elseif string.lower(args[2])==C.six then
  343.           C.six = string.lower(args[3])
  344.         elseif string.lower(args[2])==C.seven then
  345.           C.seven = string.lower(args[3])
  346.         else
  347.           ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[2],n,4,26,w,true)
  348.         end
  349.       else
  350.         ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[1],n,4,26,w,true)
  351.       end
  352.     else
  353.       ui.addPopup(0,0,t(n,'msgAcessOne'),n,4,26,w,true)
  354.     end
  355.   elseif string.lower(args[1])==C.four then
  356.     if A[n] then
  357.       tfm.exec.removePhysicObject(0)
  358.     else
  359.       ui.addPopup(0,0,t(n,'msgAcessOne'),n,4,26,w,true)
  360.     end
  361.   elseif string.lower(args[1])=='commands' then
  362.     if A[n] then
  363.       print(C.one.." , "..C.two.." , "..C.three.." , "..C.four.." , "..C.five.." , "..C.six.." , "..C.seven)
  364.     end
  365.   elseif string.lower(args[1])==C.five then
  366.     if A[n] and args[2] then
  367.       tfm.exec.setGameTime(args[2])
  368.     end
  369.   elseif string.lower(args[1])==C.six then
  370.     if A[n] and args[2] then
  371.       tfm.exec.giveCheese(args[2])
  372.     end
  373.   elseif string.lower(args[1])==C.seven then
  374.     if A[n] and args[2] then
  375.       tfm.exec.respawnPlayer(args[2])
  376.     end
  377.   end
  378. end
  379. function eventTextAreaCallback(i,n,c)
  380.   if (c=='useObject') then
  381.     ui.removeTextArea(1,n)
  382.     if tfm.get.room.playerList[n].isFacingRight then
  383.       tfm.exec.addShamanObject(oI,tfm.get.room.playerList[n].x+10,tfm.get.room.playerList[n].y-5)
  384.     else
  385.       tfm.exec.addShamanObject(oI,tfm.get.room.playerList[n].x-10,tfm.get.room.playerList[n].y-5)
  386.     end
  387.   elseif (c=='useGround') then
  388.     ui.removeTextArea(2,n)
  389.     if pI==8 then
  390.       if tfm.get.room.playerList[n].isFacingRight then
  391.         tfm.exec.addPhysicObject(0,tfm.get.room.playerList[n].x+20,tfm.get.room.playerList[n].y-10,{type=pI,restitution=Restitution,friction=Friction,width=Width,height=Height,miceCollision=false,groundCollision=false})
  392.       else
  393.         tfm.exec.addPhysicObject(0,tfm.get.room.playerList[n].x-20,tfm.get.room.playerList[n].y-10,{type=pI,restitution=Restitution,friction=Friction,width=Width,height=Height,miceCollision=false,groundCollision=false})
  394.       end
  395.     elseif pI==12 or pI==13 then
  396.       if tfm.get.room.playerList[n].isFacingRight then
  397.         tfm.exec.addPhysicObject(0,tfm.get.room.playerList[n].x+20,tfm.get.room.playerList[n].y-10,{type=pI,restitution=Restitution,color=pC,friction=Friction,width=Width,height=Height,miceCollision=true,groundCollision=false})
  398.       else
  399.         tfm.exec.addPhysicObject(0,tfm.get.room.playerList[n].x-20,tfm.get.room.playerList[n].y-10,{type=pI,restitution=Restitution,color=pC,friction=Friction,width=Width,height=Height,miceCollision=true,groundCollision=false})
  400.       end
  401.     else
  402.       if tfm.get.room.playerList[n].isFacingRight then
  403.         tfm.exec.addPhysicObject(0,tfm.get.room.playerList[n].x+20,tfm.get.room.playerList[n].y-10,{type=pI,restitution=Restitution,friction=Friction,width=Width,height=Height,miceCollision=true,groundCollision=false})
  404.       else
  405.         tfm.exec.addPhysicObject(0,tfm.get.room.playerList[n].x-20,tfm.get.room.playerList[n].y-10,{type=pI,restitution=Restitution,friction=Friction,width=Width,height=Height,miceCollision=true,groundCollision=false})
  406.       end
  407.     end
  408.   end
  409.   if (c=='shop') then
  410.     if A[n] then
  411.       ui.removeTextArea(0,n)
  412.       ui.addTextArea(0,"<font size='30'><B><p align='center'>"..t(n,'shop').."<font size='12'>\n\n"..t(n,'msgShop'),n,150,50,450,300,0x324650,0x212F36,0.95,true)
  413.       ui.addTextArea(3,"<VP><font size='13'><a href='event:closeshop'>"..t(n,'closeShop').."</a>",n,530,315,x,y,0x324650,0x141D22,0.95,true)
  414.     else
  415.       ui.removeTextArea(0,n)
  416.       ui.addTextArea(0,"<VP><font size='13'><a href='event:closeshop'>"..t(n,'msgAcessTwo').."</a>",n,200,200,x,y,0x324650,0x141D22,0.95,true)
  417.     end
  418.   elseif (c=='closeshop') then
  419.     ui.removeTextArea(0,n) ui.removeTextArea(3,n)
  420.     ui.addTextArea(0,"<B><J><font size='13'><a href='event:shop'>"..t(n,'shop').."</a>",n,10,30,x,y,0x324650,0x212F36,1,true)
  421.   end
  422. end
  423. --Disable CMDs in the Chat
  424. for index, c in ipairs({'commands'}) do
  425.   system.disableChatCommandDisplay(c,true)
  426. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement