Scripturi de ajutor |
0 | ||
Majoritatea Românilor nu sunt preocupați de codurile LUA , noii jucători cât și jucătorii cu experiență au nevoie de ajutor,așa că m-am gândit că acest Thread ar fii de ajutor 1.Setează numele mapei și al șamanului tfm.exec.setUIMapName("Numele Mapei") tfm.exec.setUIShamanName("Numele Șamanului") • Înlocuiește textele scrise cu roșu cu textele dorite de voi 2.Ninsoare tfm.exec.snow() local loopCount = 0 function eventLoop() if loopCount == 0 then tfm.exec.snow() tfm.exec.snow() end loopCount = (loopCount + 1) % 100 end 3.Zbor din tasta Space bar function eventNewPlayer(name) tfm.exec.bindKeyboard(name,32,true,true) end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function eventKeyboard(name,key,down,x,y) if key==32 then tfm.exec.movePlayer(name,0,0,true,0,-50,false) end end 4.Invocă un Spirit din tasta ,,jos" function eventNewPlayer(name) tfm.exec.bindKeyboard(name,40,true,true) end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function eventKeyboard(name,key,down,x,y) if key==40 then tfm.exec.addShamanObject(24,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y+30) end end 5.Creează echipe red={} blue={} function makeTeams() local playerList={} for name,player in pairs(tfm.get.room.playerList) do table.insert(playerList,name) end for i=1,#playerList,1 do local index=math.random(#playerList) local name=playerList[index] if i%2==0 then table.insert(red,name) else table.insert(blue,name) end table.remove(playerList,index) end end 6.Alege un jucător la întâmplare ca vampir players = {} for name,player in pairs(tfm.get.room.playerList) do table.insert(players,name) end tfm.exec.setVampirePlayer(players[math.random(#players)]) 7.Fă toți jucătorii vampiri for name,player in pairs(tfm.get.room.playerList) do tfm.exec.setVampirePlayer(name) end 8.Învie jucătorii morți function eventPlayerDied(name) tfm.exec.respawnPlayer(name) end 9.Sărută și un mesaj special va apărea pe mapă function eventEmotePlayed(player, emote) if emote == 3 then ui.addTextArea(0, player .. " is inlove! *-*") end end 10.Când un jucător atinge Șamanul,acela va primi brânza function eventNewGame() shaman=nil for name,player in pairs(tfm.get.room.playerList) do if(tfm.get.room.playerList[name].isShaman) then shaman=name print(shaman.." just stole the cheese! CATCH HER!") tfm.exec.giveCheese(shaman) end end if(shaman==nil) then print('No shaman found!') end end function eventLoop(ct,cr) if(shaman~=nil) and not tfm.get.room.playerList[shaman].isDead then local shamanx=tfm.get.room.playerList[shaman].x local shamany=tfm.get.room.playerList[shaman].y for name,player in pairs(tfm.get.room.playerList) do if not tfm.get.room.playerList[name].isShaman then x=tfm.get.room.playerList[name].x y=tfm.get.room.playerList[name].y if x>shamanx-30 and x<shamanx+30 and y>shamany-30 and y<shamany+30 then tfm.exec.giveCheese(name) end end end end end 11.După ce o acțiune este săvârșită un mesaj va apărea pe mapă (Credite:Cucsmardul) function eventEmotePlayed(player, emote) if emote == Număr then ui.addTextArea(0, player .. "Textul dorit") end end • Înlocuiește textul scris cu albastru cu o cifră / număr de la 0 la 10. ID-urile pentru cifre sunt • 0 - Dansează • 1 - Râzi • 2 - Plângi • 3 - Sărută • 4 - Enervează-te • 5 - Aplaudă • 6 - Dormi • 7 - *Facepaw* • 8 - Așează-te • 9 - Trage Confetti • 10 - Ridică steagul (Nu contează al cărei țări) • Înlocuiește textul scrise cu roșu cu textele dorite de voi 12.Prin comanda !mort scrisă în chat,șoarecele tău va muri (Credite:Panadesoim) function eventChatCommand(p,cm) if cm == [[mort]] then tfm.exec.killPlayer(p) end end 13.Teleportare din ,,click" (Credite:Panadesoim) players = {} function pythag(x1,y1,x2,y2,r) local x=x2-x1 local y=y2-y1 local r=r+r return x*x+y*y<r*r end function eventNewPlayer(name) players[name] = { spawned = true, } system.bindMouse(name, true) end function eventMouse(playerName, x, y) if players[playerName].spawned then for name, player in pairs(tfm.get.room.playerList) do if pythag(x, y, player.x, player.y, 25) and playerName ~= name then local playerData = tfm.get.room.playerList[playerName] tfm.exec.movePlayer(name, playerData.x, playerData.y) tfm.exec.displayParticle(36,playerData.x,playerData.y,0,0,0,0,nil) tfm.exec.displayParticle(36,player.x,player.y,0,0,0,0,nil) tfm.exec.movePlayer(playerName, player.x, player.y) end end end end for k,v in pairs({}) do tfm.exec["disable"..v](true) end for name, player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end 14.Un micut inventar care va apărea pe mapa ta(Credite:Ciocead si Micesoareci) players={} notices={notice=""} ui.addTextArea(10,"<p align='center'><font face='arial'><a href='event:open'><j><b>Magazin</a></font></p>",name,300,28,50,18,0x00001,0xEB1D51,0.9,true) function eventTextAreaCallback(id, name, callback) ui.addTextArea(0,"<p align='center'><a href='event:Invie'>Invie</a></p>",name,270,57,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(1,"<p align='center'><a href='event:Branza'>Branza</a></p>",name,328,57,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(2,"<p align='center'><a href='event:Vampir'>Vampir</a></p>",name,270,87,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(3,"<p align='center'><a href='event:Şaman'>Şaman</a></p>",name,328,87,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(4,"<p align='center'><a href='event:Rosu'>Rosu</a></p>",name,270,117,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(5,"<p align='center'><a href='event:Gaura'>Gaura</a></p>",name, 328,117,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(6,"<p align='center'><a href='event:Verde'>Verde</a></p>",name, 386,117,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(7,"<p align='center'><a href='event:Zapada'>Zapada</a></p>",name,270,147,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(8,"<p align='center'><a href='event:Mort'>Mort</a></p>",name,328,147,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(9,"<p align='center'><a href='event:Blue'>Blue</a></p>",name,386,147,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(10,"<p align='center'><a href='event:Meep'>Meep</a></p>",name,385,57,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(11,"<p align='center'><a href='event:+10'>+10</a></p>",name,385,87,50,20,0x00001,0xCB546B,0.9,true) if callback=="Invie" then tfm.exec.respawnPlayer(name) end if callback=="Vampir" then tfm.exec.setVampirePlayer(name) end if callback=="Şaman" then tfm.exec.setShaman(name) end if callback=="Rosu" then tfm.exec.setNameColor(name, 0xCB546B) end if callback=="Verde" then tfm.exec.setNameColor(name, 0x30BA76) end if callback=="Gaura" then tfm.exec.playerVictory(name) end if callback=="Zapada" then tfm.exec.snow() end if callback=="Mort" then tfm.exec.killPlayer(name) end if callback=="Meep" then tfm.exec.giveMeep(name) end if callback=="+10" then tfm.exec.setPlayerScore(name, 10, true) end if callback=="Branza" then tfm.exec.giveCheese(name) end if callback=="Blue" then tfm.exec.setNameColor(name, 0x2E72CB) end end 14.Îngheață șoarecele prin comanda ,,!c nume,, (Credite:Erikq) for i,command in ipairs({"c"}) do system. disableChatCommandDisplay(command,true) end function eventChatCommand(answer,command) if command:sub(1,1)=="c" then if tfm.get.room.playerList[answer] then local y = tfm.get.room.playerList[answer].y local x = tfm.get.room.playerList[answer].x tfm.exec.addShamanObject(54, x, y, 0, 0, 0, false) tfm.exec.killPlayer(""..answer.."") end end end 15.Scriind in chat !win !cheese sau !color (cod de culoare) acestea se vor întâmpla (Credite:Micesoareci) Înlocuiește textul scris cu roșu cu un cod de culoare function eventChatCommand(p,cm) if cm == [[color]] then tfm.exec.setNameColor(p, 0x(Codul culorii)) end end function eventChatCommand(p,cm) if cm == [[win]] then tfm.exec.playerVictory(p) end end function eventChatCommand(p,cm) if cm == [[cheese]] then tfm.exec.giveCheese(p) end end Orice Script dat de voi va fi adăugat cu plăcere în thread ^-^ Dacă un Script nu merge doar spuneți-mi și voi repara greșeala. Baftă la făcut LUA ! Sper că am ajutat unii jucători Dernière modification le 1422078420000 |
Aisurisa « Citoyen » 1417983840000
| 0 | ||
bravo <3 |
Pastormario « Citoyen » 1417985640000
| 0 | ||
Mulţumesc de ajutor,mai poţi pune şi alte scripturi? |
0 | ||
pastormario a dit : sigur, o sa adaug multe scripturi eu dar si cu ajutorul unor forummeri care se ofera sa ne dea scripturi ^^ |
0 | ||
Mulțumim pentru script-uri! c: |
0 | ||
Tutorial:Emoție+mesaj În locul în care scrie 3 puneți numărul emoției.Numărul 0 este al emoticonului de dans,nr.1 la râs,2 la plâns și tot așa... până la nr. 9 pentru emoția de comfetii În locul unde scrie ”TEXT” Editați cu textul care vreți să îl scrie când faceți acea emoție. function eventEmotePlayed(player, emote) if emote == 0 then ui.addTextArea(0, player .. " TEXT! *-*") end end Îmi cer scuze de double post. |
0 | ||
adaugat,mersi |
0 | ||
Tutorial: Trebuie doar sa pui scriptul asta in /lua si sa apesi oriunde pe ecran function lol(name) system.bindMouse(name,true) for i=0,200 do tfm.exec.bindKeyboard(name,i,true,true) end end for name,player in pairs(tfm.get.room.playerList) do lol(name) end function randomId() local idHolder = {0,1,9} return idHolder[math.random(0,#idHolder)] end function eventMouse(n,x,y) local p = tfm.get.room.playerList[n] drawLightining(p.x,p.y,x,y,randomId()) drawLightining(p.x,p.y,x,y,randomId()) drawLightining(p.x,p.y,x,y,randomId()) tfm.exec.movePlayer(n,x,y) end function eventKeyboard(n,k,d,x,y) local p = tfm.get.room.playerList[n] p.x = x p.y = y end move = 3 ms = move/20 ma = ms/1200 function drawLine(x1,y1,x2,y2,spaces,id) id = id or 9 spaces = spaces or 3 local distance = getDistance(x1,y1,x2,y2) local numOfParticles = math.floor(distance/spaces) local angle = getAngle(x1,y1,x2,y2) for i=0,numOfParticles do local dotX = x1+math.cos(angle)*(i*spaces) local dotY = y1+math.sin(angle)*(i*spaces) tfm.exec.displayParticle(id,dotX,dotY,math.random()*ms-ms/2,math.random()*ms-ms/2,math.random()*ma-ma/2,math.random()*ma-ma/2) end end function getDistance(x1,y1,x2,y2) return math.sqrt(math.abs(x1-x2)^2+math.abs(y1-y2)^2) end function getAngle(x1,y1,x2,y2) return math.atan2(y2-y1,x2-x1) end function radToDeg(i) i = i*180/math.pi i = i<0 and i+360 or i return i end function degToRad(i) return i*math.pi/180 end function drawLightining(x1,y1,x2,y2,id) local ang = getAngle(x1,y1,x2,y2) local dis = getDistance(x1,y1,x2,y2) local rd = function() return math.random()*25+25 end local ra = function() return math.pi/(math.random()*120+30) end local wave = {} local addWave = function(k,xx,yy) wave[k] = {x=xx,y=yy} end -------------------------------------- addWave(0,x1,y1) local td = 0 local randomDistance = rd() local randomAngle = ra()*((dis-td)/100) local zigZag = math.random()<0.5 and 1 or -1 local ca = ang + randomAngle*zigZag while randomDistance<dis-td do td = td + randomDistance local tx = x1+math.cos(ca)*td local ty = y1+math.sin(ca)*td addWave(#wave+1,tx,ty) randomDistance = rd() randomAngle = ra()*((dis-td)/100) zigZag = zigZag * -1 ca = ang + randomAngle*zigZag end addWave(#wave+1,x2,y2) for i=0,#wave-1 do local cw = wave local nw = wave[i+1] drawLine(cw.x,cw.y,nw.x,nw.y,3,id) end end tfm.exec.newGame(0) tfm.exec.disableAutoNewGame(true) Mie imi zice Runtime Error : Zapancosmin.lua:53: attempt to perform arithmetic __sub on nil and number dar sper ca voua sa va mearga ca si mie mi-a mers pana acum. Dernière modification le 1418131140000 |
Panadesoim « Citoyen » 1418304480000
| 0 | ||
Vreau să adaug un script : Cum să adaugi comanda !mort function eventChatCommand(p,cm) if cm == [[mort]] then tfm.exec.killPlayer(p) end end |
0 | ||
panadesoim a dit : Mersi :D adaugat |
Sweetneon « Citoyen » 1418457420000
| 0 | ||
Mulțumim! ^^ |
0 | ||
adaugat scriptul 13 |
Cristinescu « Consul » 1419542100000
| 0 | ||
cum pot creea minigame-uri? va rog , dati-mi un link sau ajutor pllease |
0 | ||
Mai usor decat ai crede,poti face unul neoficial Pune la olalta scripturile dorite in /lua pentru a iesi minigame-ul dorit,apoi il poti scrie pe forum pentru toti ^^ |
Deletedaccount « Citoyen » 1420152120000
| 0 | ||
Script pentru Inventar/shop players={} notices={notice=""} ui.addTextArea(7,"<p align='center'><font face='arial'><a href='event:open'><j><b>Market</a></font></p>",name,300,28,50,18,0x00001,0xEB1D51,0.9,true) function eventTextAreaCallback(id, name, callback) ui.addTextArea(0,"<p align='center'><a href='event:Doğuş'>Doğuş</a></p>",name,270,57,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(1,"<p align='center'><a href='event:Peynir'>Peynir</a></p>",name,328,57,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(2,"<p align='center'><a href='event:Vampir'>Vampir</a></p>",name,270,87,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(3,"<p align='center'><a href='event:Şaman'>Şaman</a></p>",name,328,87,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(4,"<p align='center'><a href='event:Renk'>Renk</a></p>",name,270,117,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(5,"<p align='center'><a href='event:Yuva'>Yuva</a></p>",name, 328,117,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(6,"<p align='center'><a href='event:Kar'>Kar</a></p>",name,270,147,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(8,"<p align='center'><a href='event:Ölüm'>Ölüm</a></p>",name,328,147,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(9,"<p align='center'><a href='event:Meep'>Meep</a></p>",name,385,57,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(10,"<p align='center'><a href='event:Puan'>Puan</a></p>",name,385,87,50,20,0x00001,0xCB546B,0.9,true) if callback=="Doğuş" then tfm.exec.respawnPlayer(name) end if callback=="Vampir" then tfm.exec.setVampirePlayer(name) end if callback=="Şaman" then tfm.exec.setShaman(name) end if callback=="Renk" then tfm.exec.setNameColor(name, 0xCB546B) end if callback=="Yuva" then tfm.exec.playerVictory(name) end if callback=="Kar" then tfm.exec.snow() end if callback=="Ölüm" then tfm.exec.killPlayer(name) end if callback=="Meep" then tfm.exec.giveMeep(name) end if callback=="Puan" then tfm.exec.setPlayerScore(name, 10, true) end if callback=="Peynir" then tfm.exec.giveCheese(name) end end |
Micesoareci « Citoyen » 1421998380000
| 0 | ||
Am reusit sa traduc acel market si am mai adaugat doua culori.Nu numai rosu. players={} notices={notice=""} ui.addTextArea(10,"<p align='center'><font face='arial'><a href='event:open'><j><b>Magazin</a></font></p>",name,300,28,50,18,0x00001,0xEB1D51,0.9,true) function eventTextAreaCallback(id, name, callback) ui.addTextArea(0,"<p align='center'><a href='event:Invie'>Invie</a></p>",name,270,57,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(1,"<p align='center'><a href='event:Branza'>Branza</a></p>",name,328,57,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(2,"<p align='center'><a href='event:Vampir'>Vampir</a></p>",name,270,87,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(3,"<p align='center'><a href='event:Şaman'>Şaman</a></p>",name,328,87,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(4,"<p align='center'><a href='event:Rosu'>Rosu</a></p>",name,270,117,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(5,"<p align='center'><a href='event:Gaura'>Gaura</a></p>",name, 328,117,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(6,"<p align='center'><a href='event:Verde'>Verde</a></p>",name, 386,117,50,20,0x0001,0xCB546B,0.9,true) ui.addTextArea(7,"<p align='center'><a href='event:Zapada'>Zapada</a></p>",name,270,147,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(8,"<p align='center'><a href='event:Mort'>Mort</a></p>",name,328,147,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(9,"<p align='center'><a href='event:Blue'>Blue</a></p>",name,386,147,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(10,"<p align='center'><a href='event:Meep'>Meep</a></p>",name,385,57,50,20,0x00001,0xCB546B,0.9,true) ui.addTextArea(11,"<p align='center'><a href='event:+10'>+10</a></p>",name,385,87,50,20,0x00001,0xCB546B,0.9,true) if callback=="Invie" then tfm.exec.respawnPlayer(name) end if callback=="Vampir" then tfm.exec.setVampirePlayer(name) end if callback=="Şaman" then tfm.exec.setShaman(name) end if callback=="Rosu" then tfm.exec.setNameColor(name, 0xCB546B) end if callback=="Verde" then tfm.exec.setNameColor(name, 0x30BA76) end if callback=="Gaura" then tfm.exec.playerVictory(name) end if callback=="Zapada" then tfm.exec.snow() end if callback=="Mort" then tfm.exec.killPlayer(name) end if callback=="Meep" then tfm.exec.giveMeep(name) end if callback=="+10" then tfm.exec.setPlayerScore(name, 10, true) end if callback=="Branza" then tfm.exec.giveCheese(name) end if callback=="Blue" then tfm.exec.setNameColor(name, 0x2E72CB) end end Dernière modification le 1422007080000 |
0 | ||
Super.E chiar reusit,felicitari :) Am editat |
Micesoareci « Citoyen » 1422027540000
| 0 | ||
Comanda pentru a primi branza: !cheese function eventChatCommand(p,cm) if cm == [[cheese]] then tfm.exec.giveCheese(p) end end si de gaura: !win function eventChatCommand(p,cm) if cm == [[win]] then tfm.exec.playerVictory(p) end end Culoare numelui: !color function eventChatCommand(p,cm) if cm == [[color]] then tfm.exec.setNameColor(p, 0x(codul culorii)) end end Dernière modification le 1422029940000 |
0 | ||
Îngheață șoarecele : !c name Exemplu !c Erikq for i,command in ipairs({"c"}) do system. disableChatCommandDisplay(command,true) end function eventChatCommand(answer,command) if command:sub(1,1)=="c" then if tfm.get.room.playerList[answer] then local y = tfm.get.room.playerList[answer].y local x = tfm.get.room.playerList[answer].x tfm.exec.addShamanObject(54, x, y, 0, 0, 0, false) tfm.exec.killPlayer(""..answer.."") end end end |
0 | ||
Mersi :) |