Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Bolodefchoco
- --24/08/2015
- A = {Bolodefchoco = true}
- T = {
- en = {
- msgCone = 'Sucess! You bought ',
- fail = 'Error',
- msgAcessOne = 'You are not Admin to use these commands.',
- ask1UseO = 'Use Object?',
- ask1UseP = 'Use Ground?',
- shop = 'Shop',
- msgShop = [[
- <ROSE>!buy_o
- <J> Caixa Pequena | Caixa Grande | Tábua Pequena
- Tábua Grande | Bola | Trampolim | Bigorna
- CN | SP | Balão | Maçã | Ovelha | Tábua de Gelo
- Tábua de Chocolate | Nuvem | Bolha
- Mini-Tabua | Caixa de Acompanhamento
- Runa Estável | Big Plank | Caixa Triângular
- Tábua S
- <ROSE>!buy_p
- <J> Madeira | Gelo | Trampolim | Lava | Chocolate
- Terra | Grama | Areia | Nuvem | Água | Pedra
- Neve | Retângulo | Círculo (R,F,W,H)
- <ROSE>!c_edit
- <J> buy_o
- buy_p
- <V>args[1]
- <ROSE>!r_p | time | cheese | respawn
- ]],
- closeShop = 'Close',
- msgAcessTwo = 'You are not Allowed to see the Admin Commands.',
- };
- br = {
- msgCone = 'Sucesso! Você comprou ',
- fail = 'Falha',
- msgAcessOne = 'Você não é Admin para usar estes comandos.',
- ask1UseO = 'Usar Objeto?',
- ask1UseP = 'Usar Piso?',
- shop = 'Shop',
- msgShop = [[
- <ROSE>!buy_o
- <J> Caixa Pequena | Caixa Grande | Tábua Pequena
- Tábua Grande | Bola | Trampolim | Bigorna
- CN | SP | Balão | Maçã | Ovelha | Tábua de Gelo
- Tábua de Chocolate | Nuvem | Bolha
- Mini-Tabua | Caixa de Acompanhamento
- Runa Estável | Big Plank | Caixa Triângular
- Tábua S
- <ROSE>!buy_p
- <J> Madeira | Gelo | Trampolim | Lava | Chocolate
- Terra | Grama | Areia | Nuvem | Água | Pedra
- Neve | Retângulo | Círculo (R,F,W,H)
- <ROSE>!c_edit
- <J> buy_o
- buy_p
- <V>args[1]
- <ROSE>!r_p | time | cheese | respawn
- ]],
- closeShop = 'Fechar',
- msgAcessTwo = 'Você não tem permissão para ver os comandos de Admin.',
- };
- es = {
- msgCone = 'Muy Bueno!!!! Compraste ',
- fail = 'Error',
- msgAcessOne = 'Tú no eres Admin para usar los comandos.',
- ask1UseO = 'Usar Objeto?',
- ask1UseP = 'Usar Piso?',
- shop = 'Tienda',
- msgShop = [[
- <ROSE>!buy_o
- <J> Caixa Pequena | Caixa Grande | Tábua Pequena
- Tábua Grande | Bola | Trampolim | Bigorna
- CN | SP | Balão | Maçã | Ovelha | Tábua de Gelo
- Tábua de Chocolate | Nuvem | Bolha
- Mini-Tabua | Caixa de Acompanhamento
- Runa Estável | Big Plank | Caixa Triângular
- Tábua S
- <ROSE>!buy_p
- <J> Madeira | Gelo | Trampolim | Lava | Chocolate
- Terra | Grama | Areia | Nuvem | Água | Pedra
- Neve | Retângulo | Círculo (R,F,W,H)
- <ROSE>!c_edit
- <J> buy_o
- buy_p
- <V>args[1]
- <ROSE>!r_p | time | cheese | respawn
- ]],
- closeShop = 'Cerrar',
- msgAcessTwo = 'Tú no tiene permición para ver los comandos de Admin.',
- };
- }
- C = {
- one = 'buy_o',
- two = 'buy_p',
- three = 'c_edit',
- four = 'r_p',
- five = 'time',
- six = 'cheese',
- seven = 'respawn',
- }
- function t(n,t)
- for n in pairs (tfm.get.room.playerList) do
- if T[tfm.get.room.playerList[n].community] then
- return T[tfm.get.room.playerList[n].community][t]
- else
- return T.en[t]
- end
- end
- end
- oI = nil
- pI = nil
- pC = nil
- function eventNewPlayer(n)
- for i in pairs (tfm.get.room.playerList) do
- 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)
- end
- end
- table.foreach(tfm.get.room.playerList, eventNewPlayer)
- 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"}
- tfm.exec.disableAutoNewGame(true)
- function eventLoop(t,r)
- if r<=0 then
- tfm.exec.newGame(M[math.random(#M)])
- end
- end
- function eventChatCommand(n,c)
- local args={}
- for argument in c:gmatch("[^%s]+") do
- table.insert(args,argument)
- end
- if string.lower(args[1])==C.one then
- if A[n] then
- args[2]=table.concat(args," ",2)
- if string.lower(args[2])=='caixa pequena' then
- oI = 1
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='caixa grande' then
- oI = 2
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='tabua pequena' or string.lower(args[2])=='tábua pequena' then
- oI = 3
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='tabua grande' or string.lower(args[2])=='tábua grande' then
- oI = 4
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='bola' then
- oI = 6
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='trampolim' then
- oI = 7
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='bigorna' then
- oI = 10
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='cn' or string.lower(args[2])=='cannon' then
- oI = 17
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='sp' or string.lower(args[2])=='spirit' then
- oI = 24
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='balão' or string.lower(args[2])=='balloon' then
- oI = 28
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='runa' then
- oI = 32
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='maçã' then
- oI = 39
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='ovelha' then
- oI = 40
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='tábua de gelo' or string.lower(args[2])=='tabua gelo' then
- oI = 45
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- 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
- oI = 46
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='nuvem' then
- oI = 57
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='bolha' then
- oI = 59
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='mini-tabua' or string.lower(args[2])=='mini tabua' then
- oI = 60
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='caixa de acompanhamento' or string.lower(args[2])=='caixa coração' then
- oI = 61
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='runa estável' or string.lower(args[2])=='runa estavel' then
- oI = 62
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='tabua grandona' or string.lower(args[2])=='tabua super-grande' or string.lower(args[2])=='big plank' then
- oI = 67
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='caixa triângular' or string.lower(args[2])=='caixa triangular' or string.lower(args[2])=='caixa illuminati' then
- oI = 68
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='tábua s' or string.lower(args[2])=='tabua s' then
- oI = 69
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
- else
- ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[2],n,4,26,w,true)
- end
- else
- ui.addPopup(0,0,t(n,'msgAcessOne'),n,4,26,w,true)
- end
- elseif string.lower(args[1])==C.two then
- if A[n] then
- if args[2] then
- if string.lower(args[2])=='madeira' then
- pI = 0
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='gelo' then
- pI = 1
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='trampolim' then
- pI = 2
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='lava' then
- pI = 3
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='chocolate' then
- pI = 4
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='terra' then
- pI = 5
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='grama' then
- pI = 6
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='areia' then
- pI = 7
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='nuvem' then
- pI = 8
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='água' or string.lower(args[2])=='agua' then
- pI = 9
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='pedra' then
- pI = 10
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='neve' then
- pI = 11
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- elseif string.lower(args[2])=='retângulo' or string.lower(args[2])=='retangulo' then
- pI = 12
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- if args[7] then
- pC = args[7]
- else
- pC = 0
- end
- elseif string.lower(args[2])=='círculo' or string.lower(args[2])=='circulo' then
- pI = 13
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- if args[7] then
- pC = args[7]
- else
- pC = 0
- end
- elseif string.lower(args[2])=='teia' or string.lower(args[2])=='web' then
- pI = 15
- 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
- ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
- ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
- else
- ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[2],n,4,26,w,true)
- end
- else
- ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[1],n,4,26,w,true)
- end
- else
- ui.addPopup(0,0,t(n,'msgAcessOne'),n,4,26,w,true)
- end
- elseif string.lower(args[1])==C.three then
- if A[n] then
- if args[2] then
- if string.lower(args[2])==C.one then
- C.one = string.lower(args[3])
- elseif string.lower(args[2])==C.two then
- C.two = string.lower(args[3])
- elseif string.lower(args[2])==C.four then
- C.four = string.lower(args[3])
- elseif string.lower(args[2])==C.five then
- C.five = string.lower(args[3])
- elseif string.lower(args[2])==C.six then
- C.six = string.lower(args[3])
- elseif string.lower(args[2])==C.seven then
- C.seven = string.lower(args[3])
- else
- ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[2],n,4,26,w,true)
- end
- else
- ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[1],n,4,26,w,true)
- end
- else
- ui.addPopup(0,0,t(n,'msgAcessOne'),n,4,26,w,true)
- end
- elseif string.lower(args[1])==C.four then
- if A[n] then
- tfm.exec.removePhysicObject(0)
- else
- ui.addPopup(0,0,t(n,'msgAcessOne'),n,4,26,w,true)
- end
- elseif string.lower(args[1])=='commands' then
- if A[n] then
- print(C.one.." , "..C.two.." , "..C.three.." , "..C.four.." , "..C.five.." , "..C.six.." , "..C.seven)
- end
- elseif string.lower(args[1])==C.five then
- if A[n] and args[2] then
- tfm.exec.setGameTime(args[2])
- end
- elseif string.lower(args[1])==C.six then
- if A[n] and args[2] then
- tfm.exec.giveCheese(args[2])
- end
- elseif string.lower(args[1])==C.seven then
- if A[n] and args[2] then
- tfm.exec.respawnPlayer(args[2])
- end
- end
- end
- function eventTextAreaCallback(i,n,c)
- if (c=='useObject') then
- ui.removeTextArea(1,n)
- if tfm.get.room.playerList[n].isFacingRight then
- tfm.exec.addShamanObject(oI,tfm.get.room.playerList[n].x+10,tfm.get.room.playerList[n].y-5)
- else
- tfm.exec.addShamanObject(oI,tfm.get.room.playerList[n].x-10,tfm.get.room.playerList[n].y-5)
- end
- elseif (c=='useGround') then
- ui.removeTextArea(2,n)
- if pI==8 then
- if tfm.get.room.playerList[n].isFacingRight then
- 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})
- else
- 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})
- end
- elseif pI==12 or pI==13 then
- if tfm.get.room.playerList[n].isFacingRight then
- 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})
- else
- 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})
- end
- else
- if tfm.get.room.playerList[n].isFacingRight then
- 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})
- else
- 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})
- end
- end
- end
- if (c=='shop') then
- if A[n] then
- ui.removeTextArea(0,n)
- 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)
- 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)
- else
- ui.removeTextArea(0,n)
- 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)
- end
- elseif (c=='closeshop') then
- ui.removeTextArea(0,n) ui.removeTextArea(3,n)
- 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)
- end
- end
- --Disable CMDs in the Chat
- for index, c in ipairs({'commands'}) do
- system.disableChatCommandDisplay(c,true)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement