Cereri scripturi |
Dramacorn « Consul » 1440249840000
| 2 | ||
Este un script care daca scriu !help in chat apar instructiunile scriptului meu(eu sa pot sa le scriu instructiunile) |
0 | ||
translations={ EN={ help={ "Here is your help.", "What happens if the text on this second page is so insanely long, will it cut itself off to the next line? I hope so.", "Here's a third page, oh my god!", } } } players={} system.disableChatCommandDisplay("help") textarea=ui.addTextArea function ui.addTextArea(id,text,targetPlayer,x,y,width,height,backgroundColor,borderColor,backgroundAlpha,emboss) --if not backgroundColor then backgroundColor=0x324650 end --if not borderColor then borderColor=0x000001 end if emboss then textarea(6969+id,"",targetPlayer,x,y+1,width,height,0x000001,0x000001,backgroundAlpha) textarea(7979+id,"",targetPlayer,x,y-1,width,height,0x6A8FA2,0x6A8FA2,backgroundAlpha) end textarea(id,text,targetPlayer,x,y,width,height,backgroundColor,borderColor,backgroundAlpha) end function eventNewPlayer(name) players[name]={helpid=1} ui.addTextArea(0,"<p align='center'><a href='event:help'><b>?</b></a></p>",name,780,374,16,16,nil,0x324650,nil,true) end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function trans(mes) if translations[tfm.get.room.community] and translations[tfm.get.room.community][mes] then return translations[tfm.get.room.community][mes] else return translations.EN[mes] end end function eventChatCommand(name,command) if command=="help" then ui.addTextArea(1,trans("help")[players[name].helpid],name,250,50,300,300,nil,0x324650,nil,true) ui.addTextArea(2,"<p align='center'><a href='event:previous'><b><</b></a></p>",name,500,365,16,16,nil,0x324650,nil,true) ui.addTextArea(3,"<p align='center'><a href='event:next'><b>></b></a></p>",name,532,365,16,16,nil,0x324650,nil,true) ui.addTextArea(4,"<p align='center'><a href='event:close'><b>Close</b></a></p>",name,442,365,42,16,nil,0x324650,nil,true) ui.addTextArea(5,"<p align='center'>"..players[name].helpid.."/"..#trans("help").."</p>",name,250,365,42,16,nil,0x324650,nil,true) end end function eventTextAreaCallback(id,name,callback) if callback=="help" then eventChatCommand(name,callback) elseif callback=="close" then players[name].helpid=1 for id=1,5 do ui.removeTextArea(id,name) ui.removeTextArea(6969+id,name) ui.removeTextArea(7979+id,name) end elseif callback=="next" and players[name].helpid<#trans("help") then players[name].helpid=(players[name].helpid)+1 ui.updateTextArea(1,trans("help")[players[name].helpid],name) ui.updateTextArea(5,"<p align='center'>"..players[name].helpid.."/"..#trans("help").."</p>",name) elseif callback=="previous" and players[name].helpid>1 then players[name].helpid=players[name].helpid-1 ui.updateTextArea(1,trans("help")[players[name].helpid],name) ui.updateTextArea(5,"<p align='center'>"..players[name].helpid.."/"..#trans("help").."</p>",name) end end |
Alexefti « Citoyen » 1441379280000
| 0 | ||
Am nevoie de un script cu un shop la comanda !shop. Cand iei o branza sa ti se puna 1 punct, iar cu puncte sa deblochezi chestii de tras (ca ghiulelele la FFA) cu pe care sa le ai tot minigame-ul. Multumesc! Edit: Si un script in care dupa ce un soarece intra in gaura ceilalti mor. Dernière modification le 1441380300000 |
0 | ||
Alexefti a dit : shop={ {name="Chiftea Otravita",price=6,effect=function(name) tfm.exec.killPlayer(name) end}, {name="Branza gratissss",price=2,effect=function(name) tfm.exec.giveCheese(name) end}, {name="Sticla de divinitate",price=99,effect=function(name) tfm.exec.setShaman(name) end} } tfm.exec.disableAutoScore(true) function eventPlayerWon(name) tfm.exec.setPlayerScore(name,1,true) end function eventChatCommand(name,command) if command=="shop" then local str="" for id,item in pairs(shop) do str=str.."<a href='event:buy "..id.."'>["..item.price.."] "..item.name.."</a><br />" end ui.addTextArea(1, str, name, 300, 100, 200, 200, nil, nil, 1, true) ui.addTextArea(2, "<b><a href='event:exit'>X</a></b>", name, 485, 100, nil, nil, nil, nil, 0, true) end end function eventTextAreaCallback(id,name,callback) local arg={} for args in callback:gmatch("[^%s]+") do table.insert(arg,args:lower()) end local id=tonumber(arg[2]) if arg[1]=="buy" and id then if shop[id] and tfm.get.room.playerList[name].score>=shop[id].price then if shop[id].effect then shop[id].effect(name) end --Do what you want with the shop item. tfm.exec.setPlayerScore(name,-shop[id].price,true) print(name.." purchased "..shop[id].name) end elseif arg[1]=="exit" then ui.removeTextArea(1, name) ui.removeTextArea(2, name) end end --Poti edita efectul,pretul si numele,sunt exemple date de mine cele de mai sus Dernière modification le 1441380360000 |
Alexefti « Citoyen » 1441380420000
| 0 | ||
Efectul? In loc de ghiulea sa traga cu nicovala sau altceva. Edit: Si un script in care dupa ce un soarece intra in gaura ceilalti mor. |
0 | ||
Efectul=ce sa faca nu pot da acum linkuri,iti caut mai incolo |
Dramacorn « Consul » 1441440360000
| 3 | ||
am o intrebare la scriptul de facut 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) tfm.exec.setNameColor(name,0xFF0000) else table.insert(blue,name) tfm.exec.setNameColor(name,0x0000FF) end table.remove(playerList,index) end end makeTeams() cum pot adauga ca o echipa sa poate spawna ceva (ex:dovleci) si la cealalta alt ceva(ex:sageti) ajutati-ma va rog |
0 | ||
ca si culorile,adaugi dupa randul table.insert(blue,name) , respectiv red ce vrei sa faca |
Dramacorn « Consul » 1441449780000
| 2 | ||
nu merge,face ca amundoua sa arunce cu acelasi lucruri Dernière modification le 1441450140000 |
0 | ||
dramatotala a dit : am vazut problema la tine,scriptul merge,dar e codt gresit la o parte,o sa il corectez eu mai incolo |
Razvan_fulger « Citoyen » 1441806660000
| 0 | ||
salut. am nevoie de un script in care sa pun un mesaj si acela sa apara in chat de fiecare data cand intrii in casa tribului |
Dramacorn « Consul » 1441957500000
| 2 | ||
function eventNewPlayer(name) for i,key in ipairs({32,40,83}) do tfm.exec.bindKeyboard(name,key,true,true) end end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function eventKeyboard(name,key,down,x,y) if (key==32 or key==40 or key==83) and not tfm.get.room.playerList[name].isDead then tfm.exec.addShamanObject(17, x, y, tfm.get.room.playerList[name].isFacingRight and 90 or 270) end end acel script din spoiler face sa tragi cu cnn din tasta jos dar daca schimb ID-ul si apas tasta jos apare sub mine nu o pot arunca ca pe cnn ,ma ajutati sa fac sa mearga si cu alte ID-uri? |
Cristinescu « Consul » 1441958340000
| 0 | ||
Carnacior a dit : Numai cei din LUA Team pot folosi acea comandă :* |
Maskedlimits « Citoyen » 1441980240000
| 0 | ||
dramatotala a dit : function eventNewPlayer(name) for i,key in ipairs({32,40,83}) do tfm.exec.bindKeyboard(name,key,true,true) end end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function eventKeyboard(name,key,down,x,y) if (key==32 or key==40 or key==83) and not tfm.get.room.playerList[name].isDead then tfm.exec.addShamanObject(6, x, y, tfm.get.room.playerList[name].isFacingRight and 90 or 270, tfm.get.room.playerList[name].isFacingRight and 15 or -15, 0, false) end end |
Hurricane « Citoyen » 1441986720000
| 0 | ||
cine imi poate da acel script atunci cand apesi un buton sa-ti apara un text-area cu alte butoane, si in el sa existe scris, si tot asa pana la un anumit text area unde va trebui doar sa dai 'give up' A da si un script care atunci cand scriptu de mai sus e gata, sa-l omoare sau nu (random) pe un anumit jucator. Dau 1 A pentru cime imi spune astea / per. Daca nu exista , macar ceva aseamanator. pwwwp |
Jrjunioru « Citoyen » 1445709960000
| 0 | ||
Sall cred ca vara trecuta am jucat intr-un trib o mapa de spanzuratoarea cine poate sa imi dea script va rog |
0 | ||
jrjunioru a dit : http://pastebin.com/nyRGKPB0 |
Posesyon « Citoyen » 1450203660000
| 0 | ||
Comenzile din utility sa fie in script lua? va rog de exemplu !omo, etc |
0 | ||
posesyon a dit : acum,depinde la ce te referi,voi edita postarea cu cateva exemple,pentru a intelege mecanismul |
Cristinescu « Consul » 1450203840000
| 0 | ||
posesyon a dit : la ce îți trebuie dacă ai deja #utility? |