City Of Mice
Peynirrey

TFM Lua kodları

Merhaba arkadaşlar, Bu konuda LUA Kodlarını paylaşacağız.

Lua nasıl kullanılır?
1-Öncelikle profilinizde 1000 peynir olmalı,Kabile evinde harita açma yetkinizin olması gerekmektedir.
2-Kabile evine gidin,Sohbet kısmına /lua yazın ve bu konudaki kodları oraya yapıştırın, Tamam tuşuna basın.
3-Gerekli açıklamalar NOT'larda yapılmıştır. İyi oyunlar


Yeni oyuncu gelince anında yeniden Doğma:

function eventNewPlayer(p)
tfm.exec.respawnPlayer(p)
end


Ölünce anında yeniden Doğma:

function eventPlayerDied(playerName)
tfm.exec.respawnPlayer(playerName)
end


Peyniri alıp deliğe girince anında yeniden Doğma:

function eventPlayerWon(playerName)
tfm.exec.respawnPlayer(playerName)
end


Peynir alanı Şaman yapmak:

function eventPlayerGetCheese(playerName)
tfm.exec.SetShaman(playerName)
end


Birinci girince Haritanın anında değişmesi:

function eventPlayerWon(playerName) 
tfm.exec.newGame()
end




- - - - - - - - - - - - - - - - - - - - - - - - - 

Peynir alınca otomatik Buz küpüne dönüşmek:

function eventPlayerGetCheese(playerName)
tfm.exec.killPlayer(playerName)

tfm.exec.addShamanObject(tfm.enum.shamanObject.iceCube,tfm.get.room.playerList[playerName]
.x,tfm.get.room.playerList[playerName].y)
end


Peynir alınca otomatik Ölmek:

function eventPlayerGetCheese(playerName)
tfm.exec.killPlayer(playerName)
end



- - - - - - - - - - - - - - - - - - - - - - - - - 


Tıkladığınız yere küçük kutu yaratmak:

for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse(name, true)
end

function eventMouse(name, x, y)
tfm.exec.addShamanObject(tfm.enum.shamanObject.littleBox, x, y, 0, 0, 0, false)
end


- - - - - - - - - - - - - - - - - - - - - - - - - 



Farenizin hangi koordinatlarda olduğunu gösterici:


NOT: F Tuşu ile çalışır.

for name,player in pairs(tfm.get.room.playerList) do
tfm.exec.bindKeyboard(name, 70, true, true)
end

function eventKeyboard(name, key, down, x, y)
if key == 70 then
print("Farenizin koordinatları: x = "..x.." and y = "..y.."!")
end
if key == 70 and down == true then
print("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ")
end
end


- - - - - - - - - - - - - - - - - - - - - - - - - 


Maptaki rastgele birinin Vampir olması:

players = {}
for name,player in pairs(tfm.get.room.playerList) do
table.insert(players,name)
end
tfm.exec.setVampirePlayer(players[math.random(#players)])
end


- - - - - - - - - - - - - - - - - - - - - - - - - 

!Help yazınca Bilgi kutucuğunun gelmesi:

NOT: Bilgi kutucuğunu siz ayarlıyorsunuz.

function eventChatCommand(playerName,command)
if command=="help" then
ui.addPopup(3,0,"
 yazıcağın yazı ",playerName,220,100,360);
end
end




- - - - - - - - - - - - - - - - - - - - - - - - - 


Farelere Meep verme kodu:

for name,player in pairs(tfm.get.room.playerList) do
tfm.exec.giveMeep(name)
end


- - - - - - - - - - - - - - - - - - - - - - - - - 


Haritanın bitmesine 3 saniye kalınca 3'den geriye sayması:

function eventLoop(time,remaining)
if remanining == 3 then
print("<ROSE> Sıradaki haritaya son 3 saniye")
end
end

function eventLoop(time,remaining)
if remanining == 2 then
print("<ROSE> Sıradaki haritaya son 2 saniye")
end
end

function eventLoop(time,remaining)
if remanining == 1 then
print("<ROSE> Sıradaki haritaya son 1 saniye")
end
end


- - - - - - - - - - - - - - - - - - - - - - - - - 


Fare olan kişinin öldükden sonra Şaman olarak başlaması:

function eventPlayerRespawn (player)
tfm.exec.setShaman (player)
end


- - - - - - - - - - - - - - - - - - - - - - - - - 


!peynir yazarak Peynir almak:

function eventChatCommand(name,command)
if command == "peynir" then 
tfm.exec.giveCheese(name)
end
end


- - - - - - - - - - - - - - - - - - - - - - - - - 


!soru yazarak Soru almak:

NOT: Sarı renkteki yazıyı değiştirerek, Soruyu değiştirebilirsiniz.


function eventChatCommand(playerName,command)
if command=="soru" then
ui.addTextArea(4,"Soruyu <J>iyi <N>düşününüz!",nil,634,30,160)
ui.addTextArea(3,"Soruyu <J>yanlış <N>bilenler elenecektir!",nil,323,30,300)
ui.addTextArea(40,"Soruyu <J>20 <N>saniye içinde cevaplayınız!",nil,10,30,300)
system.disableChatCommandDisplay("vote",true) 
ui.addPopup(5, 1,
" Transformicenin kurucusu tigrounettedir?",all,200,130,400)
end
end


Sorunun yanıtı Evet ise kodun altına Bunu ekleyin:


function eventPopupAnswer(popupId, playerName, reponse)
if (popupId == 5) then
if reponse=="yes" then
ui.addTextArea(1, "<VP>" .. playerName .." <N>Soruyu bildiniz!",nil, 10, 65, 785, 20)
end
if reponse=="no" then
tfm.exec.killPlayer(playerName)
ui.addTextArea(2, "<R>" .. playerName .." <N>elendin",nil, 10, 99, 785, 20)
end
end
end


Sorunun yanıtı Hayır ise kodun altına Bunu ekleyin:

function eventPopupAnswer(popupId, playerName, reponse)
if (popupId == 5) then
if reponse=="no" then
ui.addTextArea(1, "<VP>" .. playerName .." <N>Soruyu bildiniz!",nil, 10, 65, 785, 20)
end
if reponse=="yes" then
tfm.exec.killPlayer(playerName)
ui.addTextArea(2, "<R>" .. playerName .." <N>elendin",nil, 10, 99, 785, 20)
end
end
end


- - - - - - - - - - - - - - - - - - - - - - - - - 


Haritanın süresini ayarlamak:


tfm.exec.setGameTime(120)
NOT: 120'yi değiştirerek ayarlayın. Saniye cinsinden ayarlayın.9999 'dan yukarı çıkmayın.

- - - - - - - - - - - - - - - - - - - - - - - - - 


AFK ölümünü kapatmak:

tfm.exec.disableAfkDeath(true)

Şaman beceri sistemini kapatmak:

tfm.exec.disableAllShamanSkills(true)

- - - - - - - - - - - - - - - - - - - - - - - - - 


Uçmak:

NOT: Boşluk tuşu ile çalışır.

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


Puan vermek:

tfm.exec.setPlayerScore("Puan vereceğiniz kişi", Sayı)

Renli isim yapmak:

tfm.exec.setNameColor("Rengini değiştireceğiniz kişi", 0xRenk Kodu)
Fareyi vampir yapmak  tfm.exec.setVampirePlayer("Nick")






Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol