Guest User

Main FrameWork

a guest
Dec 7th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.35 KB | None | 0 0
  1. -- Main FrameWork :
  2. numbers=10
  3.  
  4.  
  5. function eventChatCommand(playerName, cmd)
  6. local Stats = [[<font color="#f564ae" size="23">]]..playerName..[[</font>]]
  7.         if cmd:sub(0,1) == "s" then
  8.             ui.addTextArea(1, [[<font color="#99999f" size="25">>]]..playerName..[[</font> : <font color="#00f98a" size="25">]]..cmd:sub(3)..[[</u></font>]], nil,150,y,nil,nil,nil,nil,0.5, true)
  9.         elseif cmd == "rpop" then
  10.             ui.removeTextArea(1)
  11.             ui.removeTextArea(2)
  12.             ui.removeTextArea(3)
  13.         elseif cmd:sub(0,1) == "t" then
  14.             ui.addTextArea(2, [[<font color="#99eec9" size="25">>]]..playerName..[[</font> : <font color="#bebb9f" size="25">]]..cmd:sub(3)..[[</u></font>]], nil,150,100,nil,nil,nil,nil,0.5, true)
  15.         elseif cmd:sub(0,1) == "a" then
  16.             ui.addTextArea(3, [[<font color="#6e3ea5" size="25">>]]..playerName..[[</font> : <font color="#993a3d" size="25">]]..cmd:sub(3)..[[</u></font>]], nil,150,150,nil,nil,nil,nil,0.5, true)
  17.         elseif cmd:sub(0,4) == "kill" then
  18.             tfm.exec.killPlayer(cmd:sub(6))
  19.         end
  20.         local ppX = tfm.get.room.playerList[playerName].x
  21.         local ppY = tfm.get.room.playerList[playerName].y
  22.         if cmd:sub(0,4) == "part" then
  23.                 if tfm.get.room.playerList[playerName].isFacingRight then
  24.                     tfm.exec.displayParticle(cmd:sub(6), ppX, ppY, 5, 0.05, 0, 0, nil)
  25.                     tfm.exec.displayParticle(cmd:sub(6), ppX, ppY+10, 5, 0.05, 0, 0, nil)
  26.                     tfm.exec.displayParticle(cmd:sub(6), ppX, ppY+20, 5, 0.05, 0, 0, nil)
  27.                     tfm.exec.displayParticle(cmd:sub(6), ppX, ppY+30, 5, 0.05, 0, 0, nil)
  28.                 else
  29.                     tfm.exec.displayParticle(cmd:sub(6), ppX, ppY, -5, 0.05, 0, 0, nil)
  30.                     tfm.exec.displayParticle(cmd:sub(6), ppX, ppY+10, -5, 0.05, 0, 0, nil)
  31.                     tfm.exec.displayParticle(cmd:sub(6), ppX, ppY+20, -5, 0.05, 0, 0, nil)
  32.                     tfm.exec.displayParticle(cmd:sub(6), ppX, ppY+30, -5, 0.05, 0, 0, nil)
  33.             end
  34.         end
  35. end
  36.  
  37.  
  38. system.disableChatCommandDisplay("s", true)
  39. system.disableChatCommandDisplay("a", true)
  40. system.disableChatCommandDisplay("kill", true)
  41. system.disableChatCommandDisplay("t", true)
  42. system.disableChatCommandDisplay("rpop", true)
  43. system.disableChatCommandDisplay("part", true)
  44.  
  45. -- do "!p word" for a popup at 50 y
  46. -- do "!t word" for a popup at 100 y
  47. -- do "!a word" for a popup at 100 y
  48.  
  49.  
  50. function eventLoop()
  51. for i=1,numbers do
  52.         tfm.exec.displayParticle(math.random(0,7), math.random(50,100), math.random(20, 250), 1, 0, 0, 0, nil)
  53. end
  54. end
Advertisement
Add Comment
Please, Sign In to add comment