Advertisement
Bolodefchoco_LUAXML

[Submission] Worst code

Oct 6th, 2018
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.75 KB | None | 0 0
  1. oI = nil
  2. function eventChatCommand(n,c)
  3.   local args={}
  4.   for argument in c:gmatch("[^%s]+") do
  5.     table.insert(args,argument)
  6.   end
  7.   if string.lower(args[1])==C.one then
  8.     if A[n] then
  9.       args[2]=table.concat(args," ",2)
  10.       if string.lower(args[2])=='caixa pequena' then
  11.         oI = 1
  12.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  13.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  14.       elseif string.lower(args[2])=='caixa grande' then
  15.         oI = 2
  16.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  17.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  18.       elseif string.lower(args[2])=='tabua pequena' or string.lower(args[2])=='tábua pequena' then
  19.         oI = 3
  20.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  21.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  22.       elseif string.lower(args[2])=='tabua grande' or string.lower(args[2])=='tábua grande' then
  23.         oI = 4
  24.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  25.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  26.       elseif string.lower(args[2])=='bola' then
  27.         oI = 6
  28.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  29.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  30.       elseif string.lower(args[2])=='trampolim' then
  31.         oI = 7
  32.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  33.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  34.       elseif string.lower(args[2])=='bigorna' then
  35.         oI = 10
  36.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  37.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  38.       elseif string.lower(args[2])=='cn' or string.lower(args[2])=='cannon' then
  39.         oI = 17
  40.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  41.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  42.       elseif string.lower(args[2])=='sp' or string.lower(args[2])=='spirit' then
  43.         oI = 24
  44.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  45.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  46.       elseif string.lower(args[2])=='balão' or string.lower(args[2])=='balloon' then
  47.         oI = 28
  48.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  49.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  50.       elseif string.lower(args[2])=='runa' then
  51.         oI = 32
  52.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  53.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  54.       elseif string.lower(args[2])=='maçã' then
  55.         oI = 39
  56.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  57.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  58.       elseif string.lower(args[2])=='ovelha' then
  59.         oI = 40
  60.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  61.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  62.       elseif string.lower(args[2])=='tábua de gelo' or string.lower(args[2])=='tabua gelo' then
  63.         oI = 45
  64.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  65.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  66.       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
  67.         oI = 46
  68.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  69.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  70.       elseif string.lower(args[2])=='nuvem' then
  71.         oI = 57
  72.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  73.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  74.       elseif string.lower(args[2])=='bolha' then
  75.         oI = 59
  76.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  77.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  78.       elseif string.lower(args[2])=='mini-tabua' or string.lower(args[2])=='mini tabua' then
  79.         oI = 60
  80.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  81.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  82.       elseif string.lower(args[2])=='caixa de acompanhamento' or string.lower(args[2])=='caixa coração' then
  83.         oI = 61
  84.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  85.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  86.       elseif string.lower(args[2])=='runa estável' or string.lower(args[2])=='runa estavel' then
  87.         oI = 62
  88.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  89.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  90.       elseif string.lower(args[2])=='tabua grandona' or string.lower(args[2])=='tabua super-grande' or string.lower(args[2])=='big plank' then
  91.         oI = 67
  92.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  93.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  94.       elseif string.lower(args[2])=='caixa triângular' or string.lower(args[2])=='caixa triangular' or string.lower(args[2])=='caixa illuminati' then
  95.         oI = 68
  96.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  97.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  98.       elseif string.lower(args[2])=='tábua s' or string.lower(args[2])=='tabua s' then
  99.         oI = 69
  100.         ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  101.         ui.addTextArea(1,"<a href='event:useObject'><J>"..t(n,'ask1UseO').."</a>",n,715,374,h,w,0x324650,0x212F36,0.8,true)
  102.       else
  103.         ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[2],n,4,26,w,true)
  104.       end
  105.     else
  106.       ui.addPopup(0,0,t(n,'msgAcessOne'),n,4,26,w,true)
  107.     end
  108.   elseif string.lower(args[1])==C.two then
  109.     if A[n] then
  110.       if args[2] then
  111.         if string.lower(args[2])=='madeira' then
  112.           pI = 0
  113.           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
  114.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  115.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  116.         elseif string.lower(args[2])=='gelo' then
  117.           pI = 1
  118.           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
  119.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  120.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  121.         elseif string.lower(args[2])=='trampolim' then
  122.           pI = 2
  123.           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
  124.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  125.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  126.         elseif string.lower(args[2])=='lava' then
  127.           pI = 3
  128.           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
  129.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  130.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  131.         elseif string.lower(args[2])=='chocolate' then
  132.           pI = 4
  133.           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
  134.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  135.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  136.         elseif string.lower(args[2])=='terra' then
  137.           pI = 5
  138.           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
  139.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  140.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  141.         elseif string.lower(args[2])=='grama' then
  142.           pI = 6
  143.           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
  144.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  145.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  146.         elseif string.lower(args[2])=='areia' then
  147.           pI = 7
  148.           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
  149.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  150.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  151.         elseif string.lower(args[2])=='nuvem' then
  152.           pI = 8
  153.           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
  154.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  155.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  156.         elseif string.lower(args[2])=='água' or string.lower(args[2])=='agua' then
  157.           pI = 9
  158.           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
  159.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  160.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  161.         elseif string.lower(args[2])=='pedra' then
  162.           pI = 10
  163.           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
  164.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  165.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  166.         elseif string.lower(args[2])=='neve' then
  167.           pI = 11
  168.           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
  169.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  170.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  171.         elseif string.lower(args[2])=='retângulo' or string.lower(args[2])=='retangulo' then
  172.           pI = 12
  173.           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
  174.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  175.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  176.           if args[7] then
  177.             pC = args[7]
  178.           else
  179.             pC = 0
  180.           end
  181.         elseif string.lower(args[2])=='círculo' or string.lower(args[2])=='circulo' then
  182.           pI = 13
  183.           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
  184.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  185.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  186.           if args[7] then
  187.             pC = args[7]
  188.           else
  189.             pC = 0
  190.           end
  191.         elseif string.lower(args[2])=='teia' or string.lower(args[2])=='web' then
  192.           pI = 15
  193.           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
  194.           ui.addPopup(0,0,t(n,'msgCone').."<font color='#BABD2F'>"..string.upper(args[2]),n,4,26,w,true)
  195.           ui.addTextArea(2,"<a href='event:useGround'><J>"..t(n,'ask1UseP').."</a>",n,715,344,h,w,0x324650,0x212F36,0.8,true)
  196.         else
  197.           ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[2],n,4,26,w,true)
  198.         end
  199.       else
  200.         ui.addPopup(0,0,t(n,'fail').." {<font color='#BABD2F'>"..args[1],n,4,26,w,true)
  201.       end
  202.     else
  203.       ui.addPopup(0,0,t(n,'msgAcessOne'),n,4,26,w,true)
  204.     end
  205.   elseif string.lower(args[1])==C.three then
  206.     if A[n] then
  207.       if args[2] then
  208.         if string.lower(args[2])==C.one then
  209.           C.one = string.lower(args[3])
  210.         elseif string.lower(args[2])==C.two then
  211.           C.two = string.lower(args[3])
  212.         elseif string.lower(args[2])==C.four then
  213.           C.four = string.lower(args[3])
  214.         elseif string.lower(args[2])==C.five then
  215.           C.five = string.lower(args[3])
  216.         elseif string.lower(args[2])==C.six then
  217.           C.six = string.lower(args[3])
  218.         elseif string.lower(args[2])==C.seven then
  219.           C.seven = string.lower(args[3])
  220.         end
  221.     end
  222. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement