Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- luaMagic SCRIPT v.1.0.0
- -- Author: Boxofkrain#0000 | Last edit: 12.01.2019
- -- Atelier801 forum thread:
- -- WARTOŚCI DO EDYCJI
- rainbowColors = {"FF0000", "00FF00", "FFFF00", "2222FF", "FF00FF"} -- Kolory RGB użyte w funckji "Tęcza"
- blackScreenColor = "111111" -- Dokładny kolor RGB czarnego ekranu w funkcji "Czarny ekran"
- whiteScreenColor = "FFFFFF" -- Dokładny kolor RGB białego ekranu w funkcji "Biały ekran"
- snowTime = 60 -- Czas padania śniegu w sekundach w fukcji "Śnieg"
- flyPower = 55 -- Moc wypchnięcia w górę w funkcji "Latanie"
- speedNmPower = 70 -- Siła wypchnięcia na boki w funckji "Prędkość NM"
- autoSpeedPower = 90 -- Siła wypchnięcia na boki w funkcji "AutoPrędkość"
- explosionsPower = 15 -- Siła eksplozji w funkcji "Eksplozje"
- explosionsRange = 60 -- Zasięg eksplozji w funkcji "Eksplozje"
- explosionsMarginX = 40 -- Margines losowości miejsca wybuchów w osi X w funkcji "Eksplozje"
- explosionsMarginY = 40 -- Margines losowości miejsca wybuchów w osi Y w funkcji "Eksplozje"
- minGravityPower = 50 -- Siła ujemnej grawitacji w funkcji "- Grawitacja"
- controlKeys = {85, 72, 74, 75} -- ID klawiszy sterowania w funkcji "Sterowanie" (U, J, H, K)
- speedKeys = {77, 78} -- ID klawiszy prędkości w fukcji "Prędkość NM" (M, N)
- uiStartCom = "UI" -- Komenda otwierająca menu
- uiMenuColor = "222222" -- Kolor RGB menu
- uiMenuBorderColor = "222222" -- Kolor RGB ramki menu
- uiFontColor = "DBDBDB" -- Kolor RGB czcionki menu
- uiMenuTransparency = 0.7 -- Przezroczystość menu (alfa)
- messageWindowTime = 2200 -- Czas pokazywania okienka informacyjnego w milisekundach
- -----------
- -- VARIABLES
- menuTextVisual = "<font color='#" .. uiFontColor .. "'><font size='14'>Wizualne:</font>\n\n<a href='event:nameColor'>Kolor nazwy</a>\n<a href='event:rainbow'>Tęcza</a>\n<a href='event:blackScreen'>Czarny ekran</a>\n<a href='event:whiteScreen'>Biały ekran</a>\n<a href='event:particles'>Cząsteczki</a>\n<a href='event:snow'>Śnieg</a>\n<a href='event:mapName'>Nazwa mapy</a>\n<a href='event:shamanName'>Nazwa szamana</a>\n\n<p align='center'><a href='event:hideVisualMenu'>↑ Schowaj ↑</a></p>"
- menuTextMovement = "<font color='#" .. uiFontColor .. "'><font size='14'>Ruch:</font>\n\n<a href='event:fly'>Latanie</a>\n<a href='event:teleport'>Teleport</a>\n<a href='event:speedNM'>Prędkość (NM)</a>\n<a href='event:autoSpeed'>AutoPrędkość</a>\n<a href='event:lockMove'>Blokada ruchu</a>\n<a href='event:control'>Sterowanie</a>\n<a href='event:autoExplosions'>Eksplozje</a>\n<a href='event:minGravity'>- Grawitacja</a>\n\n<p align='center'><a href='event:hideMovementMenu'>↑ Schowaj ↑</a></p>"
- menuTextPlayer = "<font color='#" .. uiFontColor .. "'><font size='14'>Gracz:</font>\n\n<a href='event:giveCheese'>Serek</a>\n<a href='event:autowin'>Wygrana</a>\n<a href='event:ice'>Zamrożenie</a>\n<a href='event:shaman'>Szaman</a>\n<a href='event:respawn'>Ożywienie</a>\n<a href='event:disappear'>Zniknięcie</a>\n<a href='event:playEmote'>Czynność</a>\n<a href='event:cage'>Klatka</a>\n\n<p align='center'><a href='event:hidePlayerMenu'>↑ Schowaj ↑</a></p>"
- menuTextObjects = "<font color='#" .. uiFontColor .. "'><font size='14'>Obiekty:</font>\n\n<a href='event:newObject'>Nowy obiekt</a>\n<a href='event:newGround'>Nowy grunt</a>\n<a href='event:removeObject'>Usuń obiekt</a>\n<a href='event:removeGround'>Usuń grunt</a>\n\n\n\n\n\n<p align='center'><a href='event:hideObjectMenu'>↑ Schowaj ↑</a></p>"
- scriptVersion = "1.0.0"
- i = 1
- disappearPlayers = {}
- groundParameters1 = {type=10, width=15, height=60}
- groundParameters2 = {type=10, width=60, height=15}
- -- FUNCTIONS
- function showUi(menuNumber)
- if (menuNumber==0) then ui.addTextArea(0, menuTextVisual, adm, 5, 25, 100, 170, "0x" .. uiMenuColor, "0x" .. uiMenuBorderColor, uiMenuTransparency, true)
- elseif (menuNumber==1) then ui.addTextArea(1, menuTextMovement, adm, 120, 25, 100, 170, "0x" .. uiMenuColor, "0x" .. uiMenuBorderColor, uiMenuTransparency, true)
- elseif (menuNumber==2) then ui.addTextArea(2, menuTextPlayer, adm, 235, 25, 100, 170, "0x" .. uiMenuColor, "0x" .. uiMenuBorderColor, uiMenuTransparency, true)
- elseif (menuNumber==3) then ui.addTextArea(3, menuTextObjects, adm, 350, 25, 100, 170, "0x" .. uiMenuColor, "0x" .. uiMenuBorderColor, uiMenuTransparency, true)
- elseif (menuNumber==nil) then
- ui.addTextArea(0, menuTextVisual, adm, 5, 25, 100, 170, "0x" .. uiMenuColor, "0x" .. uiMenuBorderColor, uiMenuTransparency, true)
- ui.addTextArea(1, menuTextMovement, adm, 120, 25, 100, 170, "0x" .. uiMenuColor, "0x" .. uiMenuBorderColor, uiMenuTransparency, true)
- ui.addTextArea(2, menuTextPlayer, adm, 235, 25, 100, 170, "0x" .. uiMenuColor, "0x" .. uiMenuBorderColor, uiMenuTransparency, true)
- ui.addTextArea(3, menuTextObjects, adm, 350, 25, 100, 170, "0x" .. uiMenuColor, "0x" .. uiMenuBorderColor, uiMenuTransparency, true)
- end
- end
- function showMessage(text, err)
- if (err==true) then ui.addTextArea(5, "<R>" .. text .. "</R>", adm, 550, 365, 250, 35, 0x222222, 0x222222, 0.7, true)
- else ui.addTextArea(5, "<font color='#00cc00'>" .. text .. "</font>", adm, 550, 365, 250, 35, 0x222222, 0x222222, 0.7, true) end
- messageWindowActive = true
- end
- function bindKeys(keysArr, player)
- if (player=="*") then
- for n in next, tfm.get.room.playerList do
- for _,v in pairs(keysArr) do system.bindKeyboard(n, v, true) end
- end
- else for _,v in pairs(keysArr) do system.bindKeyboard(player, v, true) end end
- end
- function playerExists(player, pSelect)
- for n in next, tfm.get.room.playerList do
- if (pSelect==true and player=="*" or pSelect==true and player=="") then return true
- elseif (n==player) then
- return true
- end
- end
- return false
- end
- ------------
- function eventChatCommand(n,c)
- if (c:upper()==uiStartCom and adm==nil or c:upper()==uiStartCom and adm==n) then adm=n showUi() end
- end
- function eventTextAreaCallback(id, n, ev)
- if (adm==n and id==0) then
- if (ev=="nameColor") then ui.addPopup(1, 2, "[KOLOR NAZWY]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- elseif (ev=="rainbow") then
- if (actRainbow==nil) then ui.addPopup(2, 2, "[TĘCZA]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else actRainbow = nil ui.removeTextArea(4) showMessage("Tęcza wyłączona", true) end
- elseif (ev=="blackScreen") then
- if (blackScreen==nil) then ui.addPopup(3, 2, "[BLACKSCREEN]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else blackScreen = nil ui.removeTextArea(4) showMessage("Czarny ekran wyłączony", true) end
- elseif (ev=="whiteScreen") then
- if (whiteScreen==nil) then ui.addPopup(4, 2, "[WHITESCREEN]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else whiteScreen = nil ui.removeTextArea(4) showMessage("Biały ekran wyłączony", true) end
- elseif (ev=="particles") then
- if (actParticles==nil) then ui.addPopup(5, 2, "[CZĄSTECZKI]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else actParticles = nil showMessage("Cząsteczki wyłączone", true) end
- elseif (ev=="snow") then tfm.exec.snow(snowTime) showMessage("Śnieg aktywowany")
- elseif (ev=="mapName") then ui.addPopup(6, 2, "[NAZWA_MAPY]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- elseif (ev=="shamanName") then ui.addPopup(7, 2, "[NAZWA_SZAMANA]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- elseif (ev=="hideVisualMenu") then ui.addTextArea(0, "<p align='center'><a href='event:showVisualMenu'>↓ Wizualne ↓</a></p>", adm, 5, 25, 100, 20, 0x222222, 0x222222, 0.7, true)
- elseif (ev=="showVisualMenu") then showUi(0) end
- elseif (adm==n and id==1) then
- if (ev=="autoSpeed") then
- if (actAutoSpeed==nil) then ui.addPopup(8, 2, "[AUTO_PRĘDKOŚĆ]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else actAutoSpeed = nil showMessage("AutoPrędkość wyłączona", true) end
- elseif (ev=="fly") then
- if (actFly==nil) then ui.addPopup(9, 2, "[LATANIE]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else actFly = nil showMessage("Latanie wyłączone", true) end
- elseif (ev=="teleport") then
- if (actTp==nil) then ui.addPopup(10, 2, "[TELEPORT]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else actTp = nil showMessage("Teleport wyłączony", true) end
- elseif (ev=="speedNM") then
- if (actSpeedNM==nil) then ui.addPopup(11, 2, "[PRĘDKOŚĆ_NM]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else actSpeedNM = nil showMessage("Prędkość NM wyłączona", true) end
- elseif (ev=="lockMove") then
- if (actLockMove==nil) then ui.addPopup(12, 2, "[ZABLOKUJ_RUCH]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else actLockMove = nil showMessage("Blokada ruchu wyłączona", true) end
- elseif (ev=="control") then
- if (actControl==nil) then ui.addPopup(13, 2, "[ZDALNE_STEROWANIE]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else actControl = nil showMessage("Zdalne sterowanie wyłączone", true) end
- elseif (ev=="autoExplosions") then
- if (actAutoExplosions==nil) then ui.addPopup(15, 2, "[EKSPLOZJE]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else actAutoExplosions = nil showMessage("Eksplozje wyłączone", true) end
- elseif (ev=="minGravity") then
- if (actMinGravity==nil) then ui.addPopup(22, 2, "[-GRAWITACJA]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else actMinGravity = nil showMessage("- Grawitacja wyłączona", true) end
- elseif (ev=="hideMovementMenu") then ui.addTextArea(1, "<p align='center'><a href='event:showMovementMenu'>↓ Ruch ↓</a></p>", adm, 120, 25, 100, 20, 0x222222, 0x222222, 0.7, true)
- elseif (ev=="showMovementMenu") then showUi(1) end
- elseif (adm==n and id==2) then
- if (ev=="giveCheese") then ui.addPopup(16, 2, "[SEREK]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- elseif (ev=="autowin") then ui.addPopup(17, 2, "[WYGRANA]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- elseif (ev=="ice") then ui.addPopup(18, 2, "[ZAMROŻENIE]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- elseif (ev=="shaman") then ui.addPopup(19, 2, "[SZAMAN]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- elseif (ev=="respawn") then ui.addPopup(20, 2, "[OŻYWIENIE]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- elseif (ev=="cage") then
- if (actCage==nil) then ui.addPopup(21, 2, "[KLATKA]\nNazwa gracza", adm, 270, 150, 250, true)
- else actCage=nil for i=0,3 do tfm.exec.removePhysicObject(i) end showMessage("Klatka wyłączona", true)
- end
- elseif (ev=="disappear") then
- if (actDisappear==nil) then ui.addPopup(23, 2, "[ZNIKNIĘCIE]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- else
- actDisappear = nil
- if (disappearTarget~="*") then tfm.exec.killPlayer(disappearTarget) tfm.exec.respawnPlayer(disappearTarget)
- else for n in next, tfm.get.room.playerList do tfm.exec.killPlayer(n) tfm.exec.respawnPlayer(n) end end
- showMessage("Zniknięcie wyłączone", true)
- end
- elseif (ev=="playEmote") then ui.addPopup(24, 2, "[CZYNNOŚĆ]\nNazwa gracza / Wszyscy = *", adm, 270, 150, 250, true)
- elseif (ev=="hidePlayerMenu") then ui.addTextArea(2, "<p align='center'><a href='event:showPlayerMenu'>↓ Gracz ↓</a></p>", adm, 235, 25, 100, 20, 0x222222, 0x222222, 0.7, true)
- elseif (ev=="showPlayerMenu") then showUi(2) end
- elseif (adm==n and id==3) then
- if (ev=="newObject") then
- if (actObject==nil) then ui.addPopup(26, 2, "[OBIEKT]\nNumer obiektu", adm, 270, 150, 250, true)
- else actObject = nil showMessage("Spawn obiektów wyłączony", true) end
- elseif (ev=="hideObjectMenu") then ui.addTextArea(3, "<p align='center'><a href='event:showObjectMenu'>↓ Obiekty ↓</a></p>", adm, 350, 25, 100, 20, 0x222222, 0x222222, 0.7, true)
- elseif (ev=="showObjectMenu") then showUi(3) end
- end
- end
- function eventPopupAnswer(id, n, reply)
- if (adm==n) then
- if (id==1) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- nameColorTarget = reply
- ui.showColorPicker(2, adm, nil, "Kolor nazwy")
- end
- elseif (id==2) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- rainbowTarget = reply
- actRainbow = true
- if (reply=="*") then showMessage("Tęcza aktywowana dla wszystkich graczy")
- else showMessage("Tęcza aktywowana dla gracza " .. reply) end
- end
- elseif (id==3) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- blackScreen = true
- if (reply=="*") then
- for n in next, tfm.get.room.playerList do ui.addTextArea(4, "", n, -400, -200, 1600, 1200, "0x" .. blackScreenColor) end
- else ui.addTextArea(4, "", reply, -400, -200, 1600, 1200, "0x" .. blackScreenColor) end
- if (reply=="*") then showMessage("Czarny ekran aktywowany dla wszystkich graczy")
- else showMessage("Czarny ekran aktywowany dla gracza " .. reply) end
- end
- elseif (id==4) then
- if (not(playerExists(reply, true))) then playerError(reply)
- elseif (reply~="") then
- whiteScreen = true
- if (reply=="*") then
- for n in next, tfm.get.room.playerList do ui.addTextArea(4, "", n, -400, -200, 1600, 1200, "0x" .. whiteScreenColor) end
- else ui.addTextArea(4, "", reply, -400, -200, 1600, 1200, "0x" .. whiteScreenColor) end
- if (reply=="*") then showMessage("Biały ekran aktywowany dla wszystkich graczy")
- else showMessage("Biały ekran aktywowany dla gracza " .. reply) end
- end
- elseif (id==5) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- actParticles = true
- particlesTarget = reply
- if (reply=="*") then showMessage("Cząsteczki aktywowane dla wszystkich graczy")
- else showMessage("Cząsteczki aktywowane dla gracza " .. reply) end
- end
- elseif (id==6) then
- ui.setMapName(reply)
- showMessage("Nazwa mapy zmieniona na " .. reply)
- elseif (id==7) then
- ui.setShamanName(reply)
- showMessage("Nazwa szamana zmieniona na " .. reply)
- elseif (id==8) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- autoSpeedTarget = reply
- actAutoSpeed = true
- if (reply=="*") then showMessage("AutoPrędkość aktywowana dla wszystkich graczy")
- else showMessage("AutoPrędkość aktywowana dla gracza " .. reply) end
- end
- elseif (id==9) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- actFly = true
- flyTarget = reply
- if (reply=="*") then bindKeys({32}, "*") showMessage("Latanie aktywowane dla wszystkich graczy")
- else bindKeys({32}, reply) showMessage("Latanie aktywowane dla gracza " .. reply) end
- end
- elseif (id==10) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- actTp = true
- tpTarget = reply
- if (reply=="*") then
- for n in next, tfm.get.room.playerList do system.bindMouse(n, true) end
- showMessage("Teleport aktywowany dla wszystkich graczy")
- else
- system.bindMouse(reply, true)
- showMessage("Teleport aktywowany dla gracza " .. reply)
- end
- end
- elseif (id==11) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- actSpeedNM = true
- speedNMTarget = reply
- bindKeys(speedKeys, speedNMTarget)
- if (reply=="*") then showMessage("Prędkość NM aktywowana dla wszystkich graczy")
- else showMessage("Prędkość NM aktywowana dla gracza " .. reply) end
- end
- elseif (id==12) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- actLockMove = true
- lockMoveTarget = reply
- if (reply=="*") then showMessage("Blokada ruchu aktywowana dla wszystkich graczy")
- else showMessage("Blokada ruchu aktywowana dla gracza " .. reply) end
- end
- elseif (id==13) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- ui.addPopup(14, 2, "[ZDALNE_STEROWANIE]\nSiła", adm, 270, 150, 250, true)
- actControl = true
- controlTarget = reply
- end
- elseif (id==14) then
- controlPower=reply
- bindKeys(controlKeys, adm)
- if (controlTagret=="*") then showMessage("Sterowanie aktywowane dla wszystkich graczy (siła: " .. reply .. ")")
- else showMessage("Sterowanie aktywowane dla gracza " .. reply .. " (siła: " .. controlPower ..")") end
- elseif (id==15) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- autoExplosionsTarget = reply
- actAutoExplosions = true
- if (reply=="*") then showMessage("Eksplozje aktywowane dla wszystkich graczy")
- else showMessage("Eksplozje aktywowane dla gracza " .. reply) end
- end
- elseif (id==16) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- if (reply~="*") then
- tfm.exec.giveCheese(reply)
- showMessage("Serek wręczony graczowi " .. reply)
- else
- for n in next, tfm.get.room.playerList do tfm.exec.giveCheese(n) end
- showMessage("Serek wręczony wszystkim graczom")
- end
- end
- elseif (id==17) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- if (reply~="*") then
- tfm.exec.giveCheese(reply)
- tfm.exec.playerVictory(reply)
- showMessage("Wygrana wręczona graczowi " .. reply)
- else
- for n in next, tfm.get.room.playerList do
- tfm.exec.giveCheese(n)
- tfm.exec.playerVictory(n)
- end
- showMessage("Wygrana wręczona wszystkim graczom")
- end
- end
- elseif (id==18) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- if (reply~="*") then
- currentFreezeX = tfm.get.room.playerList[reply].x
- currentFreezeY = tfm.get.room.playerList[reply].y
- tfm.exec.addShamanObject(54, currentFreezeX, currentFreezeY)
- tfm.exec.killPlayer(reply)
- showMessage("Zamrożono gracza " .. reply)
- else
- currentFreezeX = {}
- currentFreezeY = {}
- for n in next, tfm.get.room.playerList do
- currentFreezeX[n] = tfm.get.room.playerList[n].x
- currentFreezeY[n] = tfm.get.room.playerList[n].y
- tfm.exec.addShamanObject(54, currentFreezeX[n], currentFreezeY[n])
- tfm.exec.killPlayer(n)
- end
- showMessage("Zamrożono wszystkich graczy")
- end
- end
- elseif (id==19) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- if (reply~="*") then
- tfm.exec.setShaman(reply)
- showMessage("Szaman wręczony graczowi " .. reply)
- else
- for n in next, tfm.get.room.playerList do tfm.exec.setShaman(n) end
- showMessage("Szaman wręczony wszystkim graczom")
- end
- end
- elseif (id==20) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- if (reply~="*") then
- tfm.exec.respawnPlayer(reply)
- showMessage("Ożywiono gracza " .. reply)
- else
- for n in next, tfm.get.room.playerList do tfm.exec.respawnPlayer(n) end
- showMessage("Ożywiono wszystkich graczy")
- end
- end
- elseif (id==21) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="" and reply~="*") then
- actCage = true
- currentCageX = tfm.get.room.playerList[reply].x
- currentCageY = tfm.get.room.playerList[reply].y
- tfm.exec.addPhysicObject(0, currentCageX-25, currentCageY, groundParameters1)
- tfm.exec.addPhysicObject(1, currentCageX, currentCageY-25, groundParameters2)
- tfm.exec.addPhysicObject(2, currentCageX+25, currentCageY, groundParameters1)
- tfm.exec.addPhysicObject(3, currentCageX, currentCageY+25, groundParameters2)
- showMessage("Klatka aktywowana dla gracza " .. reply)
- end
- elseif (id==22) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- actMinGravity = true
- minGravityTarget = reply
- if (reply=="*") then showMessage("- Grawitacja aktywowana dla wszystkich graczy")
- else showMessage("- Grawitacja aktywowana dla gracza " .. reply) end
- end
- elseif (id==23) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- actDisappear = true
- disappearTarget = reply
- if (reply=="*") then showMessage("Zniknięcie aktywowane dla wszystkich graczy")
- else showMessage("Zniknięcie aktywowane dla gracza " .. reply) end
- end
- elseif (id==24) then
- if (not(playerExists(reply, true))) then showMessage("Gracz " .. reply .. " nie istnieje", true)
- elseif (reply~="") then
- playEmoteTarget = reply
- ui.addPopup(25, 2, "[CZYNNOŚĆ]\nNumer czynności (0-16)", adm, 270, 150, 250, true)
- end
- elseif (id==25) then
- if (tonumber(reply) > 0 and tonumber(reply) < 16) then
- if (playEmoteTarget~="*") then
- tfm.exec.playEmote(playEmoteTarget, reply)
- showMessage("Emotka (" .. reply .. ") aktywowana dla gracza " .. playEmoteTarget)
- else
- for n in next, tfm.get.room.playerList do tfm.exec.playEmote(n, reply) end
- showMessage("Emotka (" .. reply .. ") aktywowana dla wszystkich graczy")
- end
- else showMessage("Podany numer jest niepoprawny (0 - 16)", true) end
- elseif (id==26) then
- if (reply~="") then
- actObject = true
- objectId = reply
- system.bindMouse(adm, true)
- showMessage("Obiekt (" .. reply .. ") gotowy do użycia (użyj myszki by zespawnować)")
- end
- end
- end
- end
- function eventNewPlayer(n)
- if (actFly==true and flyTarget=="*") then
- for n in next, tfm.get.room.playerList do system.bindKeyboard(n, 32, true) end
- end
- if (disappearPlayers[n]) then tfm.exec.killPlayer(n) end
- end
- function eventMouse(n, x, y)
- if (n==tpTarget and actTp==true or tpTarget=="*" and actTp==true) then tfm.exec.movePlayer(n, x, y, false, 1, 1) end
- if (n==adm and actObject==true) then tfm.exec.addShamanObject(objectId, x, y) end
- end
- function eventKeyboard(n, key)
- if (key==32 and n==flyTarget and actFly==true or key==32 and flyTarget=="*" and actFly==true) then tfm.exec.movePlayer(n, 0, 0, true, 0, -flyPower, true) end
- if (key==speedKeys[1] and n==speedNMTarget and actSpeedNM==true or key==speedKeys[1] and speedNMTarget=="*" and actSpeedNM==true) then tfm.exec.movePlayer(n, 0, 0, true, speedNmPower, 0, true) end
- if (key==speedKeys[2] and n==speedNMTarget and actSpeedNM==true or key==speedKeys[2] and speedNMTarget=="*" and actSpeedNM==true) then tfm.exec.movePlayer(n, 0, 0, true, -speedNmPower, 0, true) end
- if (n==adm) then
- if (controlTarget~="*") then
- if (key==controlKeys[1] and actControl==true) then tfm.exec.movePlayer(controlTarget, 0, 0, true, 0, -controlPower)
- elseif (key==controlKeys[2] and actControl==true) then tfm.exec.movePlayer(controlTarget, 0, 0, true, -controlPower)
- elseif (key==controlKeys[3] and actControl==true) then tfm.exec.movePlayer(controlTarget, 0, 0, true, 0, controlPower)
- elseif (key==controlKeys[4] and actControl==true) then tfm.exec.movePlayer(controlTarget, 0, 0, true, controlPower, 0) end
- else
- for n in next, tfm.get.room.playerList do
- if (key==controlKeys[1] and actControl==true) then tfm.exec.movePlayer(n, 0, 0, true, 0, -controlPower)
- elseif (key==controlKeys[2] and actControl==true) then tfm.exec.movePlayer(n, 0, 0, true, -controlPower)
- elseif (key==controlKeys[3] and actControl==true) then tfm.exec.movePlayer(n, 0, 0, true, 0, controlPower)
- elseif (key==controlKeys[4] and actControl==true) then tfm.exec.movePlayer(n, 0, 0, true, controlPower, 0) end
- end
- end
- end
- end
- function eventColorPicked(id, n, color)
- if (id==2) then
- if (nameColorTarget=="*") then
- for n in next, tfm.get.room.playerList do tfm.exec.setNameColor(n, color) end
- else tfm.exec.setNameColor(nameColorTarget, color) end
- showMessage("Kolor nazwy zmienony pomyślnie")
- end
- end
- function eventLoop()
- if (actRainbow==true) then
- if (rainbowTarget=="*") then
- for n in next, tfm.get.room.playerList do ui.addTextArea(4, "", n, -400, -200, 1600, 1200, "0x" .. rainbowColors[i]) end
- else ui.addTextArea(4, "", rainbowTarget, -400, -200, 1600, 1200, "0x" .. rainbowColors[i])
- end
- i=i+1
- if (i > #rainbowColors) then i=1 end
- end
- if (actParticles==true) then
- if (particlesTarget=="*") then tfm.exec.displayParticle(math.random(0,42), math.random(50,750), math.random(50,350), nil, nil, nil, nil)
- else tfm.exec.displayParticle(math.random(0,42), math.random(50,750), math.random(50,350), nil, nil, nil, nil, particlesTarget) end
- end
- if (actAutoSpeed==true) then
- if (autoSpeedTarget=="*") then
- for n in next, tfm.get.room.playerList do
- if (tfm.get.room.playerList[n].movingRight==true) then
- tfm.exec.movePlayer(n, 0, 0, true, autoSpeedPower)
- elseif (tfm.get.room.playerList[n].movingLeft==true) then
- tfm.exec.movePlayer(n, 0, 0, true, -autoSpeedPower)
- end
- end
- else
- if (tfm.get.room.playerList[autoSpeedTarget].movingRight==true) then
- tfm.exec.movePlayer(autoSpeedTarget, 0, 0, true, 100)
- elseif (tfm.get.room.playerList[autoSpeedTarget].movingLeft==true) then
- tfm.exec.movePlayer(autoSpeedTarget, 0, 0, true, -100)
- end
- end
- end
- if (actLockMove==true) then
- if (lockMoveTarget~="*") then
- if (currentLockMoveX==nil and currentLockMoveY==nil) then
- currentLockMoveX = tfm.get.room.playerList[lockMoveTarget].x
- currentLockMoveY = tfm.get.room.playerList[lockMoveTarget].y
- end
- tfm.exec.movePlayer(lockMoveTarget, currentLockMoveX, currentLockMoveY, false, 1, 1)
- else
- if (currentLockMoveX==nil and currentLockMoveY==nil) then
- currentLockMoveX = {}
- currentLockMoveY = {}
- for n in next, tfm.get.room.playerList do
- currentLockMoveX[n] = tfm.get.room.playerList[n].x
- currentLockMoveY[n] = tfm.get.room.playerList[n].y
- end
- end
- for n in next, tfm.get.room.playerList do tfm.exec.movePlayer(n, currentLockMoveX[n], currentLockMoveY[n], false, 1, 1) end
- end
- else currentLockMoveX=nil currentLockMoveY=nil end
- if (actAutoExplosions==true) then
- if (autoExplosionsTarget~="*" and tfm.get.room.playerList[autoExplosionsTarget].isDead==false) then
- currentAutoExplosionsX = tfm.get.room.playerList[autoExplosionsTarget].x
- currentAutoExplosionsY = tfm.get.room.playerList[autoExplosionsTarget].y
- randomMarginX = math.random(-explosionsMarginX, explosionsMarginX)
- randomMarginY = math.random(-explosionsMarginY, explosionsMarginY)
- tfm.exec.explosion(currentAutoExplosionsX + randomMarginX, currentAutoExplosionsY + randomMarginY, explosionsPower, explosionsRange, true)
- tfm.exec.displayParticle(10, currentAutoExplosionsX + randomMarginX, currentAutoExplosionsY + randomMarginY)
- else
- currentAutoExplosionsX = {}
- currentAutoExplosionsY = {}
- randomMarginX = {}
- randomMarginY = {}
- for n in next, tfm.get.room.playerList do
- if (tfm.get.room.playerList[n].isDead==false) then
- currentAutoExplosionsX[n] = tfm.get.room.playerList[n].x
- currentAutoExplosionsY[n] = tfm.get.room.playerList[n].y
- randomMarginX[n] = math.random(-explosionsMarginX, explosionsMarginX)
- randomMarginY[n] = math.random(-explosionsMarginY, explosionsMarginY)
- tfm.exec.explosion(currentAutoExplosionsX[n] + randomMarginX[n], currentAutoExplosionsY[n] + randomMarginY[n], explosionsPower, explosionsRange, true)
- tfm.exec.displayParticle(10, currentAutoExplosionsX[n] + randomMarginX[n], currentAutoExplosionsY[n] + randomMarginY[n])
- end
- end
- end
- end
- if (actMinGravity==true) then
- if (minGravityTarget~="*") then tfm.exec.movePlayer(minGravityTarget, 0, 0, true, 0, -minGravityPower)
- else for n in next, tfm.get.room.playerList do tfm.exec.movePlayer(n, 0, 0, true, 0, -minGravityPower) end end
- end
- if (actDisappear==true) then
- if (disappearTarget~="*") then tfm.exec.movePlayer(disappearTarget, 400, -600, nil, nil, 1)
- else for n in next, tfm.get.room.playerList do tfm.exec.movePlayer(n, 400, -600, nil, nil, 1) end end
- end
- if (messageWindowActive==true) then
- if (messageWindowStart==nil) then messageWindowStart = os.time() end
- if (os.time() > messageWindowStart + messageWindowTime) then
- ui.removeTextArea(5)
- messageWindowActive = nil
- messageWindowStart = nil
- end
- end
- end
- system.disableChatCommandDisplay()
- print("<font color='#00bb00'>Skrypt został wczytany poprawnie!\nUżyj komendy !ui aby pokazać menu</font>")
- -- لقد فقدت بضع ثوانٍ من حياتك لترجمة هذا النقش
- -- by Boxofkrain#0000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement