Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Testador de IDs
- -- Escrito por Ninguem
- adm = {"Ninguem"}
- id = 0
- objeto = 0
- modo = "shaman"
- function isAdm(p)
- for v, i in pairs(adm) do
- if p == i then
- return true
- end
- end
- return false
- end
- function eventNewGame()
- ui.addTextArea(0, "<p align='center'><font size='40px'><a href='event:-1'>-1</a>\n<a href='event:-10'>-10</a>\n<a href='event:-100'>-100</a>\n<a href='event:-1000'>-1000</a>", nil, 5, 150, 150, 400, 0, 0, 0, true)
- ui.addTextArea(1, "<p align='center'><font size='40px'><a href='event:+1'>+1</a>\n<a href='event:+10'>+10</a>\n<a href='event:+100'>+100</a>\n<a href='event:+1000'>+1000</a>", nil, 645, 150, 150, 400, 0, 0, 0, true)
- ui.addTextArea(2, "<p align='center'><a href='event:replay'><font size='20px'>De novo", nil, 200, 350, 400, 50, 0, 0, 0, true)
- invocacao()
- end
- function invocacao()
- ui.addTextArea(3, "<p align='center'><font size='40px'>id: " .. id, nil, 0, 50, 800, 50, 0, 0, 0, true)
- tfm.exec.removeObject(objeto)
- tfm.exec.addShamanObject(26, 400, 500, 0, 0, 0, false)
- tfm.exec.addShamanObject(27, 400, 500, 0, 0, 0, false)
- tfm.exec.removePhysicObject(0)
- if modo == "shaman" then
- objeto = tfm.exec.addShamanObject(id, 400, 200, 0, 0, 0, false)
- elseif modo == "particula" then
- for i=1, 20 do
- tfm.exec.displayParticle(id, 400, 200, (math.random(30)-15)/5, (math.random(10)-5)/5, 0, 0)
- end
- elseif modo == "piso" then
- tfm.exec.addPhysicObject(0, 400, 200, {type=id, width=80, height=80, color=0})
- end
- end
- function eventTextAreaCallback(ta, p, link)
- if isAdm(p) then
- if link ~= "replay" then
- id = id + tonumber(link, 10)
- end
- invocacao()
- end
- end
- function eventChatCommand(p, cmd)
- if isAdm(p) then
- if cmd == "shaman" or cmd == "piso" or cmd == "particula" then
- modo = cmd
- else
- id = tonumber(cmd) or 0
- end
- invocacao()
- end
- end
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.newGame([[<C><P /><Z><S><S L="800" o="324650" H="50" X="400" Y="375" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S L="400" o="324650" H="150" X="400" Y="375" T="12" P="0,0,0.3,0.2,0,0,0,0" /></S><D><DS Y="453" X="398" /></D><O /></Z></C>]])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement