×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Lua Kodları Tartışma & Yardımlaşma Başlığı
« ‹ 326 / 388 › »
Lua Kodları Tartışma & Yardımlaşma Başlığı
Zekabatu
« Citoyen »
1430118780000
    • Zekabatu#0000
    • Profil
    • Derniers messages
#6501
  0
arkadaşlar fareleri önünde duvar varmış gibi itme ve ışık hızında uçurma kodu ne
Xxacemicadix
« Citoyen »
1430143440000
    • Xxacemicadix#0000
    • Profil
    • Derniers messages
    • Tribu
#6502
  0
arkadaşlar markete ruh eklicem onun kodu ne spiritmi yazcam ne yazmam lazım tam olarak yazarmısınız
Agorttbot
« Citoyen »
1430144940000
    • Agorttbot#0000
    • Profil
    • Derniers messages
#6503
  0
Xxacemicadix a dit :
arkadaşlar markete ruh eklicem onun kodu ne spiritmi yazcam ne yazmam lazım tam olarak yazarmısınız

İşe yarar bilgiler konusundan bulabilirsin.Sadece ruhun ID'sini yazman yeterli.

Ediz a dit :
Şaman Obje IDleri
tfm.enum.shamanObject şaman obje listesini verse de Module API ilebütün yaratabileceğiniz bütün eşyaları vermiyor. Burada tfm.exec.addShamanObject ile yaratabileceğiniz obje listesini bulabilirsiniz. Tam bir liste için bu sayfayı ziyaret edin.
a dit :
0 - Ok
1 - Küçük kutu
2 - Büyük kutu
3 - Kısa kalas
4 - Uzun kalas
6 - Top
7 - Trambolin
10 - Örs
17 - Gülle (Yukarı)
18 - Gülle (Aşağı)
19 - Gülle (Sağa)
20 - Gülle (Sola)
23 - Bomba
24 - Ruh
26 - Mavi Portal
27 - Turuncu Portal
28 - Balon
32 - Gizemli işaret
34 - Kartopu
35 - Sevgililer günü oku
39 - Elma
40 - Kuzu
54 - Donmuş Fare

Xxacemicadix
« Citoyen »
1430146560000
    • Xxacemicadix#0000
    • Profil
    • Derniers messages
    • Tribu
#6504
  0
peki nasıl yazıcam ruhmu yoksa 24 mü ?
Neonstrayzer
« Citoyen »
1430146800000
    • Neonstrayzer#0000
    • Profil
    • Derniers messages
    • Tribu
#6505
  0
Xxacemicadix a dit :
peki nasıl yazıcam ruhmu yoksa 24 mü ?

Ruh patlatma şu; tfm.exec.addShamanObject(24,x,y) --x ve y kısmını kendin ayarlarsın.
Eğer markete ekleyeceksen onu bir ID olarak kullan 24 yap
Xxacemicadix
« Citoyen »
1430146860000
    • Xxacemicadix#0000
    • Profil
    • Derniers messages
    • Tribu
#6506
  0
neonstrayzer a dit :
Xxacemicadix a dit :
peki nasıl yazıcam ruhmu yoksa 24 mü ?

Ruh patlatma şu; tfm.exec.addShamanObject(24,x,y) --x ve y kısmını kendin ayarlarsın.
Eğer markete ekleyeceksen onu bir ID olarak kullan 24 yap

Teşekkür ederim

x={cheese=function(n) tfm.exec.giveCheese(n) end,
meep=function(n) tfm.exec.giveMeep(n) end,
fly=function(n) p[n].fly=true end,
24=function(n) p[n].24=true end}
p={}
shop=[[<BV><p align='center'><B><TI>Shop</TI></B></p>
<B><J>Meep (75 peynir)<N><a href='event:buy meep 75'>
[Satın Al]</a></B>
<B><J>Uçma (500 peynir)<N><a href='event:buy fly 500'>
[Satın Al] </a><B>
<B><J>Peynir (25 peynir)<N><a href='event:buy cheese 25'>
[Satın Al]</a></B>
<B><J>Ruh (100 peynir)<N><a href='event:buy 24 100'>
[Satın Al]</a></B>]]

function eventNewPlayer(n)
tfm.exec.bindKeyboard(n,32,true)
p[n]={coin=500,fly=false}
end

for n in pairs (tfm.get.room.playerList) do
eventNewPlayer(n)
end

function eventPlayerWon(n)
p[n].coin=p[n].coin+10
ui.updateTextArea(2,"<TI><B><N>Peyniriniz: <BV>"..p[n].coin,n)
end

function eventChatCommand(n,cmd)
if cmd:lower()=="market" then
o={x=5,y=27,w=300,h=150}
ui.addTextArea(0,shop,n,o.x,o.y,o.w,o.h,1,1,0.8,true)
ui.addTextArea(1,"<TI><B><R><a href='event:close'>[Kapat]",n,o.x+o.w-70,o.y+o.h-25,nil,nil,1,1,0,true)
ui.addTextArea(2,"<TI><B>Peyniriniz: <BV>"..p[n].coin,n,o.x,o.y+o.h-25,nil,nil,1,1,0,true)
end
end

function eventKeyboard(n,k,d,x,y)
if k==32 and p[n].fly then
tfm.exec.movePlayer(n,0,0,true,0,-50,false)
end
end

function eventTextAreaCallback(id,n,cb)
args={}
for arg in cb:gmatch("%S+") do
table.insert(args,arg)
end
if cb=="close" then
ui.removeTextArea(0,n)
ui.removeTextArea(1,n)
ui.removeTextArea(2,n)
end
if args[1]=="buy" and p[n].coin >= tonumber(args[3]) then
p[n].coin=p[n].coin-args[3]
ui.updateTextArea(2,"<TI><B><N>Peyniriniz: <BV>"..p[n].coin,n)
if args[2]=="cheese" then
x.cheese(n)
elseif args[2]=="meep" then
x.meep(n)
elseif args[2]=="fly" then
x.fly(n)
elseif args[2]=="24" then
x.24(n)
end
end
end

arkadaşlar markete ruh eklemeye çalıştım olmuyor yardım edermisiniz ruhun kodu 24 değilmiydi nerede hata yaptım

Dernière modification le 1430150160000
Xxacemicadix
1430149860000
    • Xxacemicadix#0000
    • Profil
    • Derniers messages
    • Tribu
#6507
[Modéré par Visne, raison : Çift gönderi]
Zekabatu
« Citoyen »
1430197860000
    • Zekabatu#0000
    • Profil
    • Derniers messages
#6508
  0
Zekabatu a dit :
arkadaşlar fareleri önünde duvar varmış gibi itme ve ışık hızında uçurma kodu ne

arkadaşlar kodu bilen lütfen sölesin
Muco
« Censeur »
1430229660000
    • Muco#2311
    • Profil
    • Derniers messages
    • Tribu
#6509
  0
zekabatu a dit :
arkadaşlar fareleri önünde duvar varmış gibi itme ve ışık hızında uçurma kodu ne

1. dediğini anlamadım ama

Işık Hızında Uçma
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,-500,false)
end
end
Xxacemicadix
« Citoyen »
1430246760000
    • Xxacemicadix#0000
    • Profil
    • Derniers messages
    • Tribu
#6510
  0
x={cheese=function(n) tfm.exec.giveCheese(n) end,
meep=function(n) tfm.exec.giveMeep(n) end,
fly=function(n) p[n].fly=true end,
24=function(n) p[n].24=true end}
p={}
shop=[[<BV><p align='center'><B><TI>Shop</TI></B></p>
<B><J>Meep (75 peynir)<N><a href='event:buy meep 75'>
[Satın Al]</a></B>
<B><J>Uçma (500 peynir)<N><a href='event:buy fly 500'>
[Satın Al] </a><B>
<B><J>Peynir (25 peynir)<N><a href='event:buy cheese 25'>
[Satın Al]</a></B>
<B><J>Ruh (100 peynir)<N><a href='event:buy 24 100'>
[Satın Al]</a></B>]]

function eventNewPlayer(n)
tfm.exec.bindKeyboard(n,32,true)
p[n]={coin=500,fly=false}
end

for n in pairs (tfm.get.room.playerList) do
eventNewPlayer(n)
end

function eventPlayerWon(n)
p[n].coin=p[n].coin+10
ui.updateTextArea(2,"<TI><B><N>Peyniriniz: <BV>"..p[n].coin,n)
end

function eventChatCommand(n,cmd)
if cmd:lower()=="market" then
o={x=5,y=27,w=300,h=150}
ui.addTextArea(0,shop,n,o.x,o.y,o.w,o.h,1,1,0.8,true)
ui.addTextArea(1,"<TI><B><R><a href='event:close'>[Kapat]",n,o.x+o.w-70,o.y+o.h-25,nil,nil,1,1,0,true)
ui.addTextArea(2,"<TI><B>Peyniriniz: <BV>"..p[n].coin,n,o.x,o.y+o.h-25,nil,nil,1,1,0,true)
end
end

function eventKeyboard(n,k,d,x,y)
if k==32 and p[n].fly then
tfm.exec.movePlayer(n,0,0,true,0,-50,false)
end
end

function eventTextAreaCallback(id,n,cb)
args={}
for arg in cb:gmatch("%S+") do
table.insert(args,arg)
end
if cb=="close" then
ui.removeTextArea(0,n)
ui.removeTextArea(1,n)
ui.removeTextArea(2,n)
end
if args[1]=="buy" and p[n].coin >= tonumber(args[3]) then
p[n].coin=p[n].coin-args[3]
ui.updateTextArea(2,"<TI><B><N>Peyniriniz: <BV>"..p[n].coin,n)
if args[2]=="cheese" then
x.cheese(n)
elseif args[2]=="meep" then
x.meep(n)
elseif args[2]=="fly" then
x.fly(n)
elseif args[2]=="24" then
x.24(n)
end
end
end
arkadaşlar ruhun kodu 24 değilmiydi nerde hatta yaptım markete ruh eklemeye calısıyorum
Neonstrayzer
« Citoyen »
1430248980000
    • Neonstrayzer#0000
    • Profil
    • Derniers messages
    • Tribu
#6511
  0
Xxacemicadix a dit :
x={cheese=function(n) tfm.exec.giveCheese(n) end,
meep=function(n) tfm.exec.giveMeep(n) end,
fly=function(n) p[n].fly=true end,
24=function(n) p[n].24=true end}
p={}
shop=[[<BV><p align='center'><B><TI>Shop</TI></B></p>
<B><J>Meep (75 peynir)<N><a href='event:buy meep 75'>
[Satın Al]</a></B>
<B><J>Uçma (500 peynir)<N><a href='event:buy fly 500'>
[Satın Al] </a><B>
<B><J>Peynir (25 peynir)<N><a href='event:buy cheese 25'>
[Satın Al]</a></B>
<B><J>Ruh (100 peynir)<N><a href='event:buy 24 100'>
[Satın Al]</a></B>]]

function eventNewPlayer(n)
tfm.exec.bindKeyboard(n,32,true)
p[n]={coin=500,fly=false}
end

for n in pairs (tfm.get.room.playerList) do
eventNewPlayer(n)
end

function eventPlayerWon(n)
p[n].coin=p[n].coin+10
ui.updateTextArea(2,"<TI><B><N>Peyniriniz: <BV>"..p[n].coin,n)
end

function eventChatCommand(n,cmd)
if cmd:lower()=="market" then
o={x=5,y=27,w=300,h=150}
ui.addTextArea(0,shop,n,o.x,o.y,o.w,o.h,1,1,0.8,true)
ui.addTextArea(1,"<TI><B><R><a href='event:close'>[Kapat]",n,o.x+o.w-70,o.y+o.h-25,nil,nil,1,1,0,true)
ui.addTextArea(2,"<TI><B>Peyniriniz: <BV>"..p[n].coin,n,o.x,o.y+o.h-25,nil,nil,1,1,0,true)
end
end

function eventKeyboard(n,k,d,x,y)
if k==32 and p[n].fly then
tfm.exec.movePlayer(n,0,0,true,0,-50,false)
end
end

function eventTextAreaCallback(id,n,cb)
args={}
for arg in cb:gmatch("%S+") do
table.insert(args,arg)
end
if cb=="close" then
ui.removeTextArea(0,n)
ui.removeTextArea(1,n)
ui.removeTextArea(2,n)
end
if args[1]=="buy" and p[n].coin >= tonumber(args[3]) then
p[n].coin=p[n].coin-args[3]
ui.updateTextArea(2,"<TI><B><N>Peyniriniz: <BV>"..p[n].coin,n)
if args[2]=="cheese" then
x.cheese(n)
elseif args[2]=="meep" then
x.meep(n)
elseif args[2]=="fly" then
x.fly(n)
elseif args[2]=="24" then
x.24(n)
end
end
end
arkadaşlar ruhun kodu 24 değilmiydi nerde hatta yaptım markete ruh eklemeye calısıyorum

Bir tabloya sayıyı değer olarak atmak için [sayı] şeklinde kullanmalısın. Yani a={1=true} yapman hatalı olur. a={[1]=true} yapman doğru olur. Ama sayılara gerek yok. Direkt olarak a={true} yazarsan print(a[1]) yapınca gene aynı değeri alırsın. Ama burada sen 24'ü bir fonksiyon yapmışsın. Onu [24] yap ve p[n].24=true kısmında p[n][24]=true kullan. Onun dışında x.24(n) yerine de x[24](n) kullan.
Kodun düzelmiş hali burada
x={cheese=function(n) tfm.exec.giveCheese(n) end,
meep=function(n) tfm.exec.giveMeep(n) end,
fly=function(n) p[n].fly=true end,
[24]=function(n) p[n][24]=true end}
p={}
shop=[[<BV><p align='center'><B><TI>Shop</TI></B></p>
<B><J>Meep (75 peynir)<N><a href='event:buy meep 75'>
[Satın Al]</a></B>
<B><J>Uçma (500 peynir)<N><a href='event:buy fly 500'>
[Satın Al] </a><B>
<B><J>Peynir (25 peynir)<N><a href='event:buy cheese 25'>
[Satın Al]</a></B>
<B><J>Ruh (100 peynir)<N><a href='event:buy 24 100'>
[Satın Al]</a></B>]]

function eventNewPlayer(n)
tfm.exec.bindKeyboard(n,32,true)
p[n]={coin=500,fly=false}
end

for n in pairs (tfm.get.room.playerList) do
eventNewPlayer(n)
end

function eventPlayerWon(n)
p[n].coin=p[n].coin+10
ui.updateTextArea(2,"<TI><B><N>Peyniriniz: <BV>"..p[n].coin,n)
end

function eventChatCommand(n,cmd)
if cmd:lower()=="market" then
o={x=5,y=27,w=300,h=150}
ui.addTextArea(0,shop,n,o.x,o.y,o.w,o.h,1,1,0.8,true)
ui.addTextArea(1,"<TI><B><R><a href='event:close'>[Kapat]",n,o.x+o.w-70,o.y+o.h-25,nil,nil,1,1,0,true)
ui.addTextArea(2,"<TI><B>Peyniriniz: <BV>"..p[n].coin,n,o.x,o.y+o.h-25,nil,nil,1,1,0,true)
end
end

function eventKeyboard(n,k,d,x,y)
if k==32 and p[n].fly then
tfm.exec.movePlayer(n,0,0,true,0,-50,false)
end
end

function eventTextAreaCallback(id,n,cb)
args={}
for arg in cb:gmatch("%S+") do
table.insert(args,arg)
end
if cb=="close" then
ui.removeTextArea(0,n)
ui.removeTextArea(1,n)
ui.removeTextArea(2,n)
end
if args[1]=="buy" and p[n].coin >= tonumber(args[3]) then
p[n].coin=p[n].coin-args[3]
ui.updateTextArea(2,"<TI><B><N>Peyniriniz: <BV>"..p[n].coin,n)
if args[2]=="cheese" then
x.cheese(n)
elseif args[2]=="meep" then
x.meep(n)
elseif args[2]=="fly" then
x.fly(n)
elseif args[2]=="24" then
x[24](n)
end
end
end
Zekabatu
« Citoyen »
1430303340000
    • Zekabatu#0000
    • Profil
    • Derniers messages
#6512
  0
lua çalışmıyo arkadaşlar ne oldu (kabile yetkim var map açma ve /np yetkisi var)
Wolfcomed
« Citoyen »
1430304840000
    • Wolfcomed#0000
    • Profil
    • Derniers messages
    • Tribu
#6513
  0
Anlamlı konu ama bazıları sitelerin yazılarından yazılıyor.
Zekabatu
« Citoyen »
1430315100000
    • Zekabatu#0000
    • Profil
    • Derniers messages
#6514
  0
1 fareyi önünde zemin varmış gibi itme kodu ne (varsa)
Kuppiarda
« Citoyen »
1430325960000
    • Kuppiarda#0000
    • Profil
    • Derniers messages
    • Tribu
#6515
  0
---Silindi---
Muco
« Censeur »
1430330400000
    • Muco#2311
    • Profil
    • Derniers messages
    • Tribu
#6516
  0
Kuppiarda a dit :
---Silindi---

Bir yorum yazmamışsın ki silinsin.
Xxacemicadix
« Citoyen »
1430334780000
    • Xxacemicadix#0000
    • Profil
    • Derniers messages
    • Tribu
#6517
  0
neonstrayzer a dit :
Xxacemicadix a dit :
x={cheese=function(n) tfm.exec.giveCheese(n) end,
meep=function(n) tfm.exec.giveMeep(n) end,
fly=function(n) p[n].fly=true end,
24=function(n) p[n].24=true end}
p={}
shop=[[&lt;BV&gt;&lt;p align='center'&gt;&lt;B&gt;&lt;TI&gt;Shop&lt;/TI&gt;&lt;/B&gt;&lt;/p&gt;
&lt;B&gt;&lt;J&gt;Meep (75 peynir)&lt;N&gt;&lt;a href='event:buy meep 75'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;
&lt;B&gt;&lt;J&gt;Uçma (500 peynir)&lt;N&gt;&lt;a href='event:buy fly 500'&gt;
[Satın Al] &lt;/a&gt;&lt;B&gt;
&lt;B&gt;&lt;J&gt;Peynir (25 peynir)&lt;N&gt;&lt;a href='event:buy cheese 25'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;
&lt;B&gt;&lt;J&gt;Ruh (100 peynir)&lt;N&gt;&lt;a href='event:buy 24 100'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;]]

function eventNewPlayer(n)
tfm.exec.bindKeyboard(n,32,true)
p[n]={coin=500,fly=false}
end

for n in pairs (tfm.get.room.playerList) do
eventNewPlayer(n)
end

function eventPlayerWon(n)
p[n].coin=p[n].coin+10
ui.updateTextArea(2,"&lt;TI&gt;&lt;B&gt;&lt;N&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n)
end

function eventChatCommand(n,cmd)
if cmd:lower()=="market" then
o={x=5,y=27,w=300,h=150}
ui.addTextArea(0,shop,n,o.x,o.y,o.w,o.h,1,1,0.8,true)
ui.addTextArea(1,"&lt;TI&gt;&lt;B&gt;&lt;R&gt;&lt;a href='event:close'&gt;[Kapat]",n,o.x+o.w-70,o.y+o.h-25,nil,nil,1,1,0,true)
ui.addTextArea(2,"&lt;TI&gt;&lt;B&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n,o.x,o.y+o.h-25,nil,nil,1,1,0,true)
end
end

function eventKeyboard(n,k,d,x,y)
if k==32 and p[n].fly then
tfm.exec.movePlayer(n,0,0,true,0,-50,false)
end
end

function eventTextAreaCallback(id,n,cb)
args={}
for arg in cb:gmatch("%S+") do
table.insert(args,arg)
end
if cb=="close" then
ui.removeTextArea(0,n)
ui.removeTextArea(1,n)
ui.removeTextArea(2,n)
end
if args[1]=="buy" and p[n].coin &gt;= tonumber(args[3]) then
p[n].coin=p[n].coin-args[3]
ui.updateTextArea(2,"&lt;TI&gt;&lt;B&gt;&lt;N&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n)
if args[2]=="cheese" then
x.cheese(n)
elseif args[2]=="meep" then
x.meep(n)
elseif args[2]=="fly" then
x.fly(n)
elseif args[2]=="24" then
x.24(n)
end
end
end
arkadaşlar ruhun kodu 24 değilmiydi nerde hatta yaptım markete ruh eklemeye calısıyorum

Bir tabloya sayıyı değer olarak atmak için [sayı] şeklinde kullanmalısın. Yani a={1=true} yapman hatalı olur. a={[1]=true} yapman doğru olur. Ama sayılara gerek yok. Direkt olarak a={true} yazarsan print(a[1]) yapınca gene aynı değeri alırsın. Ama burada sen 24'ü bir fonksiyon yapmışsın. Onu [24] yap ve p[n].24=true kısmında p[n][24]=true kullan. Onun dışında x.24(n) yerine de x[24](n) kullan.
Kodun düzelmiş hali burada
x={cheese=function(n) tfm.exec.giveCheese(n) end,
meep=function(n) tfm.exec.giveMeep(n) end,
fly=function(n) p[n].fly=true end,
[24]=function(n) p[n][24]=true end}
p={}
shop=[[&lt;BV&gt;&lt;p align='center'&gt;&lt;B&gt;&lt;TI&gt;Shop&lt;/TI&gt;&lt;/B&gt;&lt;/p&gt;
&lt;B&gt;&lt;J&gt;Meep (75 peynir)&lt;N&gt;&lt;a href='event:buy meep 75'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;
&lt;B&gt;&lt;J&gt;Uçma (500 peynir)&lt;N&gt;&lt;a href='event:buy fly 500'&gt;
[Satın Al] &lt;/a&gt;&lt;B&gt;
&lt;B&gt;&lt;J&gt;Peynir (25 peynir)&lt;N&gt;&lt;a href='event:buy cheese 25'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;
&lt;B&gt;&lt;J&gt;Ruh (100 peynir)&lt;N&gt;&lt;a href='event:buy 24 100'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;]]

function eventNewPlayer(n)
tfm.exec.bindKeyboard(n,32,true)
p[n]={coin=500,fly=false}
end

for n in pairs (tfm.get.room.playerList) do
eventNewPlayer(n)
end

function eventPlayerWon(n)
p[n].coin=p[n].coin+10
ui.updateTextArea(2,"&lt;TI&gt;&lt;B&gt;&lt;N&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n)
end

function eventChatCommand(n,cmd)
if cmd:lower()=="market" then
o={x=5,y=27,w=300,h=150}
ui.addTextArea(0,shop,n,o.x,o.y,o.w,o.h,1,1,0.8,true)
ui.addTextArea(1,"&lt;TI&gt;&lt;B&gt;&lt;R&gt;&lt;a href='event:close'&gt;[Kapat]",n,o.x+o.w-70,o.y+o.h-25,nil,nil,1,1,0,true)
ui.addTextArea(2,"&lt;TI&gt;&lt;B&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n,o.x,o.y+o.h-25,nil,nil,1,1,0,true)
end
end

function eventKeyboard(n,k,d,x,y)
if k==32 and p[n].fly then
tfm.exec.movePlayer(n,0,0,true,0,-50,false)
end
end

function eventTextAreaCallback(id,n,cb)
args={}
for arg in cb:gmatch("%S+") do
table.insert(args,arg)
end
if cb=="close" then
ui.removeTextArea(0,n)
ui.removeTextArea(1,n)
ui.removeTextArea(2,n)
end
if args[1]=="buy" and p[n].coin &gt;= tonumber(args[3]) then
p[n].coin=p[n].coin-args[3]
ui.updateTextArea(2,"&lt;TI&gt;&lt;B&gt;&lt;N&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n)
if args[2]=="cheese" then
x.cheese(n)
elseif args[2]=="meep" then
x.meep(n)
elseif args[2]=="fly" then
x.fly(n)
elseif args[2]=="24" then
x[24](n)
end
end
end

ama ruhu satın almaya basınca almıyor ve neye basınca sp atcak atmıyor
Neonstrayzer
« Citoyen »
1430335560000
    • Neonstrayzer#0000
    • Profil
    • Derniers messages
    • Tribu
#6518
  0
Xxacemicadix a dit :
neonstrayzer a dit :
Xxacemicadix a dit :
x={cheese=function(n) tfm.exec.giveCheese(n) end,
meep=function(n) tfm.exec.giveMeep(n) end,
fly=function(n) p[n].fly=true end,
24=function(n) p[n].24=true end}
p={}
shop=[[&lt;BV&gt;&lt;p align='center'&gt;&lt;B&gt;&lt;TI&gt;Shop&lt;/TI&gt;&lt;/B&gt;&lt;/p&gt;
&lt;B&gt;&lt;J&gt;Meep (75 peynir)&lt;N&gt;&lt;a href='event:buy meep 75'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;
&lt;B&gt;&lt;J&gt;Uçma (500 peynir)&lt;N&gt;&lt;a href='event:buy fly 500'&gt;
[Satın Al] &lt;/a&gt;&lt;B&gt;
&lt;B&gt;&lt;J&gt;Peynir (25 peynir)&lt;N&gt;&lt;a href='event:buy cheese 25'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;
&lt;B&gt;&lt;J&gt;Ruh (100 peynir)&lt;N&gt;&lt;a href='event:buy 24 100'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;]]

function eventNewPlayer(n)
tfm.exec.bindKeyboard(n,32,true)
p[n]={coin=500,fly=false}
end

for n in pairs (tfm.get.room.playerList) do
eventNewPlayer(n)
end

function eventPlayerWon(n)
p[n].coin=p[n].coin+10
ui.updateTextArea(2,"&lt;TI&gt;&lt;B&gt;&lt;N&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n)
end

function eventChatCommand(n,cmd)
if cmd:lower()=="market" then
o={x=5,y=27,w=300,h=150}
ui.addTextArea(0,shop,n,o.x,o.y,o.w,o.h,1,1,0.8,true)
ui.addTextArea(1,"&lt;TI&gt;&lt;B&gt;&lt;R&gt;&lt;a href='event:close'&gt;[Kapat]",n,o.x+o.w-70,o.y+o.h-25,nil,nil,1,1,0,true)
ui.addTextArea(2,"&lt;TI&gt;&lt;B&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n,o.x,o.y+o.h-25,nil,nil,1,1,0,true)
end
end

function eventKeyboard(n,k,d,x,y)
if k==32 and p[n].fly then
tfm.exec.movePlayer(n,0,0,true,0,-50,false)
end
end

function eventTextAreaCallback(id,n,cb)
args={}
for arg in cb:gmatch("%S+") do
table.insert(args,arg)
end
if cb=="close" then
ui.removeTextArea(0,n)
ui.removeTextArea(1,n)
ui.removeTextArea(2,n)
end
if args[1]=="buy" and p[n].coin &gt;= tonumber(args[3]) then
p[n].coin=p[n].coin-args[3]
ui.updateTextArea(2,"&lt;TI&gt;&lt;B&gt;&lt;N&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n)
if args[2]=="cheese" then
x.cheese(n)
elseif args[2]=="meep" then
x.meep(n)
elseif args[2]=="fly" then
x.fly(n)
elseif args[2]=="24" then
x.24(n)
end
end
end
arkadaşlar ruhun kodu 24 değilmiydi nerde hatta yaptım markete ruh eklemeye calısıyorum

Bir tabloya sayıyı değer olarak atmak için [sayı] şeklinde kullanmalısın. Yani a={1=true} yapman hatalı olur. a={[1]=true} yapman doğru olur. Ama sayılara gerek yok. Direkt olarak a={true} yazarsan print(a[1]) yapınca gene aynı değeri alırsın. Ama burada sen 24'ü bir fonksiyon yapmışsın. Onu [24] yap ve p[n].24=true kısmında p[n][24]=true kullan. Onun dışında x.24(n) yerine de x[24](n) kullan.
Kodun düzelmiş hali burada
x={cheese=function(n) tfm.exec.giveCheese(n) end,
meep=function(n) tfm.exec.giveMeep(n) end,
fly=function(n) p[n].fly=true end,
[24]=function(n) p[n][24]=true end}
p={}
shop=[[&lt;BV&gt;&lt;p align='center'&gt;&lt;B&gt;&lt;TI&gt;Shop&lt;/TI&gt;&lt;/B&gt;&lt;/p&gt;
&lt;B&gt;&lt;J&gt;Meep (75 peynir)&lt;N&gt;&lt;a href='event:buy meep 75'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;
&lt;B&gt;&lt;J&gt;Uçma (500 peynir)&lt;N&gt;&lt;a href='event:buy fly 500'&gt;
[Satın Al] &lt;/a&gt;&lt;B&gt;
&lt;B&gt;&lt;J&gt;Peynir (25 peynir)&lt;N&gt;&lt;a href='event:buy cheese 25'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;
&lt;B&gt;&lt;J&gt;Ruh (100 peynir)&lt;N&gt;&lt;a href='event:buy 24 100'&gt;
[Satın Al]&lt;/a&gt;&lt;/B&gt;]]

function eventNewPlayer(n)
tfm.exec.bindKeyboard(n,32,true)
p[n]={coin=500,fly=false}
end

for n in pairs (tfm.get.room.playerList) do
eventNewPlayer(n)
end

function eventPlayerWon(n)
p[n].coin=p[n].coin+10
ui.updateTextArea(2,"&lt;TI&gt;&lt;B&gt;&lt;N&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n)
end

function eventChatCommand(n,cmd)
if cmd:lower()=="market" then
o={x=5,y=27,w=300,h=150}
ui.addTextArea(0,shop,n,o.x,o.y,o.w,o.h,1,1,0.8,true)
ui.addTextArea(1,"&lt;TI&gt;&lt;B&gt;&lt;R&gt;&lt;a href='event:close'&gt;[Kapat]",n,o.x+o.w-70,o.y+o.h-25,nil,nil,1,1,0,true)
ui.addTextArea(2,"&lt;TI&gt;&lt;B&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n,o.x,o.y+o.h-25,nil,nil,1,1,0,true)
end
end

function eventKeyboard(n,k,d,x,y)
if k==32 and p[n].fly then
tfm.exec.movePlayer(n,0,0,true,0,-50,false)
end
end

function eventTextAreaCallback(id,n,cb)
args={}
for arg in cb:gmatch("%S+") do
table.insert(args,arg)
end
if cb=="close" then
ui.removeTextArea(0,n)
ui.removeTextArea(1,n)
ui.removeTextArea(2,n)
end
if args[1]=="buy" and p[n].coin &gt;= tonumber(args[3]) then
p[n].coin=p[n].coin-args[3]
ui.updateTextArea(2,"&lt;TI&gt;&lt;B&gt;&lt;N&gt;Peyniriniz: &lt;BV&gt;"..p[n].coin,n)
if args[2]=="cheese" then
x.cheese(n)
elseif args[2]=="meep" then
x.meep(n)
elseif args[2]=="fly" then
x.fly(n)
elseif args[2]=="24" then
x[24](n)
end
end
end

ama ruhu satın almaya basınca almıyor ve neye basınca sp atcak atmıyor

Ayarlamadığın bir şeyi neden soruyorsun? Kodun arasında sp atmasını sağlayacak bir şey yok. Sadece ID 24'ü onaylama var. O onaylamayı kullanarak yapacaksın
Xxacemicadix
« Citoyen »
1430339280000
    • Xxacemicadix#0000
    • Profil
    • Derniers messages
    • Tribu
#6519
  0
arkadaşlar luada arkadaplana resim vermek istiyorum ama yapamıyorum yardım edermisiniz "x_evenements/x_carnaval2014.jpg" gibi link nasıl yapabilirim
Zekabatu
« Citoyen »
1430378520000
    • Zekabatu#0000
    • Profil
    • Derniers messages
#6520
  0
seri büyük kutu yaratma kodu ne, seri derken durmadan yaratsın
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Lua Kodları Tartışma & Yardımlaşma Başlığı
« ‹ 326 / 388 › »
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27