Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Bolodefchoco
- --Made in: 23/10/2016
- --Last update: 23/10/2016
- --[[ Notes:
- Does:
- Permite que o shaman conjure com as teclas direcionais
- ]]--
- sha = {}
- oldShaman = nil
- _time = 0
- tfm.exec.disableAutoTimeLeft()
- getShaman = function()
- for k,v in next,tfm.get.room.playerList do
- if v.isShaman then
- tfm.exec.killPlayer(k)
- return k
- end
- end
- end
- bind = function(shaman,bol)
- for k,v in next,{0,1,2,3} do
- system.bindKeyboard(shaman,v,true,bol)
- end
- system.bindMouse(shaman,bol)
- end
- eventNewGame = function()
- bind(oldShaman,false)
- local shaman = getShaman()
- bind(shaman,true)
- sha = {
- x = nil,
- y = nil,
- holding = 0,
- spawn = 50,
- count = 0,
- }
- oldShaman = shaman
- end
- eventMouse = function(n,x,y)
- if os.time() > sha.holding then
- sha.holding = os.time() + 1000
- sha.spawn = 50
- sha.count = 0
- sha.x = x
- sha.y = y
- tfm.exec.displayParticle(11,x,y,0,0,0,0,n)
- end
- end
- eventKeyboard = function(n,k)
- if k < 4 and sha.x then
- if sha.holding > os.time() then
- sha.holding = os.time() + 1200
- local i = _time > 60 and 10 or _time > 25 and 20 or 30
- if k%2 == 0 then
- sha.x = sha.x + (k==0 and -i or i)
- else
- sha.y = sha.y + (k==1 and -i or i)
- end
- sha.spawn = sha.spawn - 1
- sha.count = sha.count + 1
- tfm.exec.addConjuration(sha.x/10,sha.y/10,15000)
- ui.addTextArea(0,sha.count.."/50",getShaman(),5,30,nil,nil,1,1,0,true)
- if sha.spawn == 0 then
- sha.x = nil
- sha.y = nil
- sha.count = 0
- end
- else
- sha.spawn = 50
- sha.count = 0
- end
- end
- end
- eventLoop = function(t,time)
- _time = time/1000
- end
- tfm.exec.newGame(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement