Advertisement
Guest User

[Script] Taring

a guest
May 13th, 2014
513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.36 KB | None | 0 0
  1. print("<vp><br>Taring Oyununa Hoş Geldiniz<br><j>Destek =><ROSE> http://www.transformice.com/forum/?s=733766&p=0</ROSE>")
  2.  
  3. playerAlive = {}
  4.  
  5. mapList = {"@216735" , "@217282" , "@217881" , "@217900" , "@219548" , "@220500" , "@221564" , "@222098" , "@223293" , "@223810" , "@223986" , "@224441" , "@225017" , "@226069" , "@226879" , "@226883" , "@227417" , "@227851" , "@228462" , "@229814" , "@229827" , "@229830" , "@229834" , "@229835" , "@229944" , "@230510" , "@230741" , "@231254" , "@231694" , "@231905" , "@232140" , "@232274" , "@232451" , "@232699" , "@232791" , "@233230" , "@233345" , "@233398" , "@233687" , "@234039" , "@234502" , "@234959" , "@235034" , "@235501" , "@235651" , "@236146" , "@237000" , "@237041" , "@237263" , "@237269" , "@237278" , "@237281" , "@237297" , "@237321" , "@237744" , "@237759" , "@238380" , "@238791" , "@239826" , "@239880" , "@240544" , "@240548" , "@240973" , "@241211" , "@241295" , "@242708" , "@243279" , "@244006" , "@244699" , "@244888" , "@245223" , "@246790" , "@246973" , "@247815" , "@247818" , "@248098" , "@250610" , "@250634" , "@251459" , "@252033" , "@252759" , "@252806" , "@253883" , "@254291" , "@255098" , "@255542" , "@255893" , "@258717" , "@259604" , "@259716" , "@259833" , "@260024" , "@260292" , "@260338" , "@260377" , "@260384" , "@260478" , "@260678" , "@261078" , "@261172" , "@261720" , "@261959" , "@262144" , "@262212" , "@262239" , "@263163" , "@263182" , "@263624" , "@263907" , "@264132" , "@264232" , "@264348" , "@265221" , "@266704" , "@266765" , "@266807" , "@266854" , "@266913" , "@266930" , "@267187" , "@267597" , "@268985" , "@269337" , "@270668" , "@270819" , "@271523" , "@273434" , "@274321" , "@275017" , "@275514" , "@277687" , "@277784" , "@278506" , "@278916" , "@279100" , "@279256" , "@280382" , "@280896" , "@281730" , "@282101" , "@282434" , "@282694" , "@283526" , "@283715" , "@283874" , "@284299" , "@285752" , "@286333" , "@287268" , "@289821" , "@291628" , "@292348" , "@292614" , "@293065" , "@294522" , "@294943" , "@299002" , "@299503" , "@299971" , "@300055" , "@301315" , "@302936" , "@304356" , "@305677" , "@306213" , "@308280" , "@308435" , "@308694" , "@308711" , "@308729" , "@308992" , "@309029" , "@309057" , "@309169" , "@309834" , "@312713" , "@313245" , "@314159" , "@314205" , "@315801" , "@316289" , "@317696" , "@317754" , "@317779" , "@318378" , "@318813" , "@319524" , "@319841" , "@321339" , "@321712" , "@321814" , "@321906" , "@322771" , "@323085" , "@323115" , "@323366" , "@323600" , "@324355" , "@325172" , "@326032" , "@326192" , "@326585" , "@327254" , "@327266" , "@330441" , "@332210" , "@332290" , "@332467" , "@333277" , "@333656" , "@333714" , "@333837" , "@335507" , "@337581" , "@337774" , "@339272" , "@339418" , "@339643" , "@339896" , "@340069" , "@340901" , "@341116" , "@341239" , "@343048" , "@344361" , "@344865" , "@344952" , "@345257" , "@345312" , "@345943" , "@348479" , "@348801" , "@349140" , "@349389" , "@349984" , "@350251" , "@350519" , "@352381" , "@352710" , "@352885" , "@354616" , "@354878" , "@355658" , "@355676" , "@355769" , "@355957" , "@356722" , "@356982" , "@357328" , "@357428" , "@357629" , "@359055" , "@359521" , "@359901" , "@360201" , "@360271" , "@360273" , "@360365" , "@361382" , "@361852" , "@362549" , "@363411" , "@363625" , "@363638" , "@363822" , "@364186" , "@364998" , "@365315" , "@365464" , "@365652" , "@365774" , "@367520" , "@369160" , "@369230" , "@370444" , "@370850" , "@371076" , "@371078" , "@372970" , "@373511" , "@375381" , "@378826" , "@379326" , "@379550" , "@379745" , "@379866" , "@381043" , "@381287" , "@381305" , "@381569" , "@381669" , "@382977" , "@384206" , "@384869" , "@385203" , "@385295" , "@386029" , "@386046" , "@386959" , "@387012" , "@387180" , "@387270" , "@387290" , "@387638" , "@389582" , "@391625" , "@391693" , "@391831" , "@391868" , "@391990" , "@392446" , "@392492" , "@392913" , "@393675" , "@393851" , "@394890" , "@395459" , "@395585" , "@395607" , "@395638" , "@396223" , "@396332" , "@396347" , "@396645" , "@396861" , "@397093" , "@397296" , "@397501" , "@397812" , "@397938" , "@398011" , "@398041" , "@398081" , "@398942" , "@399633" , "@399673" , "@400429" , "@400666" , "@401443" , "@401778" , "@401945" , "@401995" , "@402214" , "@402239" , "@402453" , "@402936" , "@403698" , "@403910" , "@404440" , "@404590" , "@405075" , "@405295" , "@405339" , "@405497" , "@405679" , "@405833" , "@405955" , "@406266" , "@406486" , "@406881" , "@406982" , "@407165" , "@407230" , "@407294" , "@407455" , "@407457" , "@407488" , "@407495" , "@407536" , "@407686" , "@407746" , "@408978" , "@409199" , "@410230" , "@410532" , "@410565" , "@410608" , "@410736" , "@410813" , "@412211" , "@412316" , "@412657" , "@412752" , "@413408" , "@414188" , "@414460" , "@414899" , "@416015" , "@416142" , "@416552" , "@418022" , "@418196" , "@418265" , "@418293" , "@418323" , "@418337" , "@418600" , "@418606" , "@418658" , "@419374" , "@419735" , "@420806" , "@420956" , "@421302" , "@421717" , "@422361" , "@422580" , "@422939" , "@423062" , "@423449" , "@423517" , "@423672" , "@424361" , "@424786" , "@424795" , "@425030" , "@425044" , "@425215" , "@425349" , "@425548" , "@425600" , "@425771" , "@425797" , "@425806" , "@426638" , "@427300" , "@428517" , "@429262" , "@429822" , "@429897" , "@430145" , "@430219" , "@430736" , "@431142" , "@431373" , "@431887" , "@433937" , "@434887" , "@436041" , "@436107" , "@436447" , "@437860" , "@438154" , "@440676" , "@441047" , "@441376" , "@441598" , "@443309" , "@444490" , "@444830" , "@444964" , "@445133" , "@445219" , "@447556" , "@448281" , "@453701" , "@455167" , "@459349" , "@463195" , "@463977" , "@465205" , "@468260" , "@470687" , "@470727" , "@471053" , "@472379" , "@472665" , "@475151" , "@475790" , "@477370" , "@477603" , "@480023" , "@482951" , "@483924" , "@484992" , "@494706" , "@496091" , "@496945" , "@499109" , "@499682" , "@499684" , "@499687" , "@500074" , "@501428" , "@501711" , "@501916" , "@504409" , "@504461" , "@504704" , "@504951" , "@505109" , "@505963" , "@506215" , "@507308" , "@507325" , "@508106" , "@508451" , "@509047" , "@509082" , "@510194" , "@511187" , "@511275" , "@512291" , "@512927" , "@514510" , "@514982" , "@517005" , "@517697" , "@523046" , "@528428" , "@531569" , "@536235" , "@537776" , "@538116" , "@545493" , "@549470" , "@551126" , "@556253" , "@556426" , "@558790" , "@563183" , "@563484" , "@564033" , "@566347" , "@566438" , "@571144" , "@580031" , "@583056" , "@583715" , "@586622" , "@586688" , "@587458" , "@590641" , "@592204" , "@594049" , "@594883" , "@595447" , "@603381" , "@606719" , "@606723" , "@608459" , "@610137" , "@611320" , "@613985" , "@616373" , "@616433" , "@620996" , "@624098" , "@624721" , "@627609" , "@634945" , "@639649" , "@645288" , "@646968" , "@658464" , "@664949" , "@667920" , "@669031" , "@670226" , "@694900" , "@704015" , "@734476" , "@737824" , "@737841" , "@749102" , "@759128" , "@763371" , "@763378" , "@789058" , "@792062" , "@798953" , "@813156" , "@824082" , "@829657" , "@838069" , "@846805" , "@849224" , "@879616" , "@905496" , "@972616" , "@976721" , "@976786" , "@979179" , "@982242" , "@996947" , "@1015436" , "@1015582" , "@1019378" , "@1033170" , "@1034035" , "@1051378" , "@1051384" , "@1058681" , "@1085530" , "@1102815" , "@1130728" , "@1132357" , "@1132639" , "@1142116" , "@1143815" , "@1144548" , "@1162611" , "@1167153" , "@1167734" , "@1172426" , "@1174107" , "@1195842" , "@1208798" , "@1208979" , "@1210037" , "@1214182" , "@1216253" , "@1221661" , "@1222899" , "@1229246" , "@1231216" , "@1234914" , "@1249601" , "@1252122" , "@1253523" , "@1255130" , "@1255148" , "@1256845" , "@1262248" , "@1281700" , "@1281981" , "@1286910" , "@1307880" , "@1311059" , "@1321417" , "@1321664" , "@1341396" , "@1346440" , "@1351308" , "@1352534" , "@1358446" , "@1359797" , "@1364063" , "@1368222" , "@1368233" , "@1371239" , "@1371294" , "@1372941" , "@1373000" , "@1373748" , "@1375345" , "@1378209" , "@1393405" , "@1394120" , "@1398732" , "@1404417" , "@1405249" , "@1405496" , "@1416040" , "@1425101" , "@1428436" , "@1445160" , "@1448760" , "@1450554" , "@1453667" , "@1471124" , "@1483155" , "@1487161" , "@1490438" , "@1491022" , "@1492120" , "@1495344" , "@1503393" , "@1504586" , "@1506007" , "@1509474" , "@1512355" , "@1513407" , "@1525272" , "@1531388" , "@1538895" , "@1539515" , "@1539791" , "@1542618" , "@1542736" , "@1555532" , "@1555862" , "@1556661" , "@1564762" , "@1567620" , "@1573213" , "@1573997" , "@1580508" , "@1583655" , "@1586439" , "@1587904" , "@1588884" , "@1589026" , "@1591471" , "@1592767" , "@1595600" , "@1595610" , "@1597594" , "@1600443" , "@1601492" , "@1601786" , "@1601857" , "@1602654" , "@1603050" , "@1605364" , "@1608259" , "@1608638" , "@1609978" , "@1611631" , "@1612436" , "@1612796" , "@1613550" , "@1613927" , "@1614563" , "@1618110" , "@1619934" , "@1621611" , "@1622737" , "@1623300" , "@1628732" , "@1629164" , "@1632294" , "@1632541" , "@1632706" , "@1632746" , "@1634741" , "@1637638" , "@1639996" , "@1643157" , "@1644638" , "@1646120" , "@1648583" , "@1651658" , "@1654096" , "@1654105" , "@1654841" , "@1654903" , "@1657021" , "@1657360" , "@1658171" , "@1659639" , "@1659716" , "@1661852" , "@1663380" , "@1663415" , "@1665249" , "@1665516" , "@1665775" , "@1669046" , "@1673174" , "@1674534" , "@1675083" , "@1678717" , "@1687268" , "@1689382" , "@1692628" , "@1693705" , "@1694602" , "@1703617" , "@1705316" , "@1716693" , "@1716949" , "@1718723" , "@1724289" , "@1728943" , "@1749434" , "@1751944" , "@1759287" , "@1768347" , "@1778687" , "@1787232" , "@1787239" , "@1794287" , "@1802907" , "@1841744" , "@1845710" , "@1848032" , "@1851411" , "@1851568" , "@1851968" , "@1856349" , "@1862800" , "@1862823" , "@1873736" , "@1923785" , "@1924227" , "@1926831" , "@1927270" , "@1932796" , "@1951856" , "@1952851" , "@1954369" , "@1954898" , "@1956002" , "@1956555" , "@1964700" , "@1964752" , "@1965819" , "@1973574" , "@1975275" , "@1975286" , "@1975684" , "@1975753" , "@1976007" , "@1976857" , "@1979131" , "@1982476" , "@1985019" , "@1987990" , "@2005559" , "@2007170" , "@2007205" , "@2007295" , "@2012147" , "@2018511" , "@2023552" , "@2030343" , "@2046467" , "@2047177" , "@2048474" , "@2068543" , "@2070768" , "@2076632" , "@2079190" , "@2089069" , "@2098621" , "@2101747" , "@2106576" , "@2118599" , "@2134537" , "@2138401" , "@2139408" , "@2141379" , "@2144010" , "@2149382" , "@2150335" , "@2174319" , "@2176620" , "@2180790" , "@2185089" , "@2194041" , "@2214661" , "@2219308" , "@2223685" , "@2228834" , "@2245005" , "@2255210" , "@2262476" , "@2286056" , "@2287914" , "@2331474" , "@2347666" , "@2372538" , "@2378820" , "@2393139" , "@2417713" , "@2424058" , "@2453022" , "@2509175" , "@2527934" , "@2536577" , "@2538131" , "@2546484" , "@2557885" , "@2564883" , "@2577060" , "@2580114" , "@2582610" , "@2586491" , "@2588032" , "@2617003" , "@2645615" , "@2682985" , "@2683170" , "@2686505" , "@2725924" , "@2726034" , "@2794075" , "@2796001" , "@2813487" , "@2816067" , "@2840770" , "@2854246" , "@2868414" , "@2883986" , "@2894072" , "@2928081" , "@2953315" , "@2981609" , "@2988325" , "@2989266" , "@2991507" , "@2992312" , "@3008155" , "@3026533" , "@3029580" , "@3036416" , "@3120368" , "@3123384" , "@3142015" , "@3156569" , "@3175920" , "@3203738" , "@3209087" , "@3213562" , "@3249833" , "@3267620" , "@3347209" , "@3408247" , "@3444803" , "@3447108" , "@3453351" , "@3469987" , "@3504036" , "@3517347" , "@3518418" , "@3535192" , "@3537419" , "@3544895" , "@3548376" , "@3548378" , "@3548406" , "@3549484" , "@3549627" , "@3549840" , "@3556405" , "@3556489" , "@3556690" , "@3572407" , "@3574927" , "@3575034" , "@3575108" , "@3575170" , "@3575216" , "@3575293" , "@3575425" , "@3575463" , "@3579335" , "@3579476" , "@3582577" , "@3584275" , "@3584689" , "@3592471" , "@3594130" , "@3595900" , "@3603799" , "@3603802" , "@3603809" , "@3604799" , "@3607846" , "@3611885" , "@3613029" , "@3617674" , "@3620542" , "@3630433" , "@3631748" , "@3637041" , "@3638794" , "@3639993" , "@3644272" , "@3652003" , "@3652102" , "@3654416" , "@3662698" , "@3667358" , "@3668754" , "@3669358" , "@3670084" , "@3674997" , "@3676141" , "@3676555" , "@3679397" , "@3679666" , "@3679884" , "@3680180" , "@3680220" , "@3680221" , "@3680223" , "@3682405" , "@3683201" , "@3683224" , "@3683294" , "@3683383" , "@3683393" , "@3683520" , "@3683600" , "@3684229" , "@3684455" , "@3684457" , "@3684465" , "@3684784" , "@3684802" , "@3685352" , "@3685382" , "@3685486" , "@3688419" , "@3690578" , "@3691609" , "@3691622" , "@3693822" , "@3696662" , "@3700155" , "@3700684" , "@3702767" , "@3705931" , "@3706599" , "@3712183" , "@3716560" , "@3721990" , "@3727755" , "@3728013" , "@3737576" , "@3738767" , "@3778389" , "@3799507" , "@3799857" , "@3799951" , "@3801780" , "@3816622" , "@3818249" , "@3821104" , "@3832217" , "@3834905" , "@3845214" , "@3847244" , "@3854268" , "@3857914" , "@3877599" , "@3889414" , "@3901403" , "@3909339" , "@3912540" , "@3931290" , "@3946626" , "@3948683" , "@3953320" , "@3953425" , "@3967150" , "@3967250" , "@3970909" , "@3974317" , "@3984750" , "@3985806" , "@3986301" , "@3988460" , "@3992276" , "@3992671" , "@3994471" , "@3999981" , "@4003729" , "@4024450" , "@4029729" , "@4035194" , "@4049042" , "@4059294" , "@4088014" , "@4088129" , "@4091580" , "@4103460" , "@4119705" , "@4142205" , "@4146225" , "@4148332" , "@4174318" , "@4174320" , "@4212491" , "@4229660" , "@4230149" , "@4234534" , "@4238784" , "@4271298" , "@4323335" , "@4337892" , "@4338921" , "@4465679" , "@4612295", "@3078" , "@8679" , "@82090" , "@127419" , "@129835" , "@142101" , "@142738" , "@146364" , "@146615" , "@147437" , "@149853" , "@153201" , "@155415" , "@159076" , "@159204" , "@162804" , "@164931" , "@165808" , "@169033" , "@169909" , "@178486" , "@179656" , "@180035" , "@180617" , "@181261" , "@182233" , "@185646" , "@185955" , "@185985" , "@186484" , "@186695" , "@191070" , "@197413" , "@197442" , "@197503" , "@197742" , "@199957" , "@201502" , "@201606" , "@210217" , "@211248" , "@212576" , "@212903" , "@213470" , "@214465" , "@214788" , "@215601" , "@219889" , "@220737" , "@221767" , "@222730" , "@228517" , "@233294" , "@233333" , "@235464" , "@237251" , "@238378" , "@240994" , "@244642" , "@245152" , "@247329" , "@247904" , "@248906" , "@250491" , "@250619" , "@261462" , "@266889" , "@269131" , "@269534" , "@270645" , "@274963" , "@276098" , "@280637" , "@281784" , "@284702" , "@286087" , "@292057" , "@294500" , "@298123" , "@302456" , "@303391" , "@306755" , "@313182" , "@318970" , "@321268" , "@327447" , "@329627" , "@335361" , "@337813" , "@352622" , "@353079" , "@363635" , "@364490" , "@366205" , "@369138" , "@371072" , "@371332" , "@387110" , "@402190" , "@405795" , "@417816" , "@421885" , "@422655" , "@423989" , "@424864" , "@429339" , "@433483" , "@446627" , "@446819" , "@455094" , "@466871" , "@470069" , "@482003" , "@500133" , "@505196" , "@511007" , "@520258" , "@523865" , "@547602" , "@552213" , "@557334" , "@581408" , "@611234" , "@629731" , "@639804" , "@659216" , "@667934" , "@724780" , "@763961" , "@780286" , "@847540" , "@1053516" , "@1107804" , "@1190826" , "@1193625" , "@1222017" , "@1222509" , "@1252255" , "@1368022" , "@1429444" , "@1481024" , "@1502799" , "@1550076" , "@1556972" , "@1563226" , "@1662570" , "@1683790" , "@1698845" , "@1699288" , "@1855968" , "@1864676" , "@1931963" , "@1943359" , "@1958341" , "@1970001" , "@2006183" , "@2019746" , "@2188104" , "@2208335" , "@2223354" , "@2227644" , "@2261303" , "@2262297" , "@2311047" , "@2355739" , "@2378818" , "@2419958" , "@2439335" , "@2444362" , "@2458243" , "@2558294" , "@2589845" , "@2598599" , "@2616341" , "@2675699" , "@2708773" , "@2746128" , "@2805602" , "@2808729" , "@2813218" , "@2827176" , "@2842279" , "@2847966" , "@2870002" , "@2929597" , "@2932980" , "@2959762" , "@2959999" , "@2960917" , "@2969368" , "@2972400" , "@2973921" , "@2978151" , "@3008536" , "@3014728" , "@3051957" , "@3117749" , "@3124326" , "@3124696" , "@3224383" , "@3237735" , "@3270188" , "@3279863" , "@3297112" , "@3314017" , "@3373223" , "@3407209" , "@3425103" , "@3432133" , "@3452208" , "@3464359" , "@3469357" , "@3497411" , "@3512325" , "@3526384" , "@3560912" , "@3586018" , "@3603116" , "@3605217" , "@3671328" , "@3710926" , "@3714605" , "@3723142" , "@3779546" , "@3865524" , "@3866374" , "@4116927" , "@4140588" , "@4148686"}
  6.  
  7. teamBlue = {}
  8. teamRed = {}
  9. scoreBlue = 0
  10. scoreRed = 0
  11. nbWon = 0
  12. nbRound = 0
  13. totalRound = 10
  14. start = 0
  15. winner = ""
  16.  
  17. -- chat command
  18. admin = "Noktats"
  19. system.disableChatCommandDisplay("mavi")
  20. system.disableChatCommandDisplay("rouge")
  21. --system.disableChatCommandDisplay("help")
  22. system.disableChatCommandDisplay("stop")
  23.  
  24. function eventChatCommand(name, action)
  25. if start == 0 and action == "bleu" then
  26. removeFromTeam(name)
  27. table.insert(teamBlue, name)
  28. tfm.exec.setNameColor(name, 0x0000FF)
  29. displayTeam()
  30. elseif start == 0 and action == "rouge" then
  31. removeFromTeam(name)
  32. table.insert(teamRed, name)
  33. tfm.exec.setNameColor(name, 0xFF0000)
  34. displayTeam()
  35. elseif action == "stop" and name == admin then
  36. system.exit()
  37. end
  38. end
  39. -- end chat command
  40.  
  41. -- EVENT
  42.  
  43. function eventPlayerDied(name)
  44. --print(name.." est mort atrocement!")
  45. playerAlive = stillAlive()
  46. if #playerAlive == 0 and start == 1 then
  47. --print("Tout les monde est mort!")
  48. if nbRound == totalRound then
  49. displayVictory()
  50. else
  51. tfm.exec.newGame(mapList[math.random(#mapList)])
  52. end
  53. --else
  54. --print("Nombre de joueur(s) encore en vie: "..#playerAlive)
  55. end
  56. end
  57.  
  58. function eventPlayerWon(name)
  59. --print(name.." a gagné la partie, cool!")
  60. nbWon = nbWon + 1
  61. givingPoint(name)
  62. playerAlive = stillAlive()
  63. if #playerAlive == 0 then
  64. if nbRound == totalRound then
  65. displayVictory()
  66. else
  67. tfm.exec.newGame(mapList[math.random(#mapList)])
  68. end
  69. end
  70. end
  71.  
  72. function eventNewGame()
  73. if start == 1 then
  74. ui.updateTextArea(0, "Puan durumu: <font color=\"#0000FF\">"..scoreBlue.." puan ile mavi takım</font> ve <font color=\"#FF0000\">"..scoreRed.." ile kırmızı takım</font>!")
  75. --print("Les scores sont de "..scoreBlue.." pour les bleus et de "..scoreRed.." pour les rouges!")
  76. nbWon = 0
  77. playerAlive = stillAlive()
  78. nbRound = nbRound + 1
  79. ui.updateTextArea(110, "Tur: "..nbRound.."/"..totalRound)
  80. --print("Nombre de joueur(s) pour la nouvelle partie: "..#playerAlive)
  81. end
  82. end
  83.  
  84. function eventNewPlayer(name)
  85. if #teamBlue > #teamRed then
  86. table.insert(teamRed, name)
  87. tfm.exec.setNameColor(name, 0xFF0000)
  88. ui.updateTextArea(0, name.." a oyuna katıldı <font color=\"#FF0000\">Kırmızı takım</font>!")
  89. else
  90. table.insert(teamBlue, name)
  91. tfm.exec.setNameColor(name, 0x0000FF)
  92. ui.updateTextArea(0, name.." oyuna katıldı <font color=\"#0000FF\">Mavi takım</font>!")
  93. end
  94. end
  95.  
  96. function eventPlayerLeft(name)
  97. removeFromTeam(name)
  98. end
  99.  
  100. function eventLoop(currentTime, timeRemaining)
  101. if start == 0 then
  102. ui.updateTextArea(10, " Başlamasına "..(timeRemaining/1000-(timeRemaining%1000)/1000).." saniye kaldı!")
  103. if timeRemaining < 1 then
  104. start = 1
  105. ui.removeTextArea(10)
  106. ui.removeTextArea(20)
  107. end
  108. elseif start == 1 and timeRemaining < 1 then
  109. if nbRound == totalRound then
  110. displayVictory()
  111. else
  112. tfm.exec.newGame(mapList[math.random(#mapList)])
  113. end
  114. elseif start == 2 then
  115. i = 0
  116. if winner == "bleu" then
  117. tmp = 23
  118. elseif winner == "rouge" then
  119. tmp = 21
  120. else
  121. tmp = 24
  122. end
  123. posx = math.random(801)-1
  124. posy = math.random(601)-1
  125. while i < 40 do
  126. tfm.exec.displayParticle (tmp, posx+math.random(-25,25), posy+math.random(-25,25), 0, 0, 0, 0, nil)
  127. i = i + 1
  128. end
  129. if timeRemaining < 1 then
  130. initTeam()
  131. end
  132. end
  133. end
  134.  
  135. -- FUNCTION
  136.  
  137. function stillAlive()
  138. playerAlive = {}
  139. for pseudo, playerid in pairs(tfm.get.room.playerList) do
  140. if not playerid.isDead then
  141. table.insert(playerAlive, pseudo)
  142. end
  143. end
  144. return playerAlive
  145. end
  146.  
  147. -- si le joueur est dans l'équipe renvoie son index sinon renvoie 0
  148. function inBlue(name)
  149. local i = 1
  150. while i <= #teamBlue do
  151. if teamBlue[i] == name then
  152. return i
  153. end
  154. i = i + 1
  155. end
  156. return 0
  157. end
  158.  
  159. function inRed(name)
  160. local i = 1
  161. while i <= #teamRed do
  162. if teamRed[i] == name then
  163. return i
  164. end
  165. i = i + 1
  166. end
  167. return 0
  168. end
  169. -- end inTeam
  170.  
  171. function removeFromTeam(name)
  172. local indexBlue = inBlue(name)
  173. local indexRed = inRed(name)
  174. if indexBlue > 0 then
  175. table.remove(teamBlue, indexBlue)
  176. elseif indexRed > 0 then
  177. table.remove(teamRed, indexRed)
  178. else
  179. print("Le joueur n'était dans aucune équipe!")
  180. end
  181. end
  182.  
  183. function givingPoint(name)
  184. local indexBlue = inBlue(name)
  185. local indexRed = inRed(name)
  186. if indexBlue > 0 then
  187. givingPointBis(name, "blue")
  188. elseif indexRed > 0 then
  189. givingPointBis(name, "red")
  190. else
  191. print("Le joueur n'est dans aucune équipe!")
  192. end
  193. end
  194.  
  195. function givingPointBis(name, team)
  196. if nbWon == 1 then
  197. if team == "blue" then
  198. ui.updateTextArea(0, name.." yi tebrik ederiz <font color=\"#0000FF\">mavi</font> takım 4 puan kazandı.")
  199. scoreBlue = scoreBlue + 4
  200. else
  201. ui.updateTextArea(0, name.." yi tebrik ederiz <font color=\"#FF0000\">Kızmızı</font> takım 4 puan kazandı.")
  202. scoreRed = scoreRed + 4
  203. end
  204. elseif nbWon == 2 then
  205. if team == "blue" then
  206. ui.updateTextArea(0, name.." yi tebrik ederiz <font color=\"#0000FF\">Mavi</font> takım 2 puan kazandı.")
  207. scoreBlue = scoreBlue + 2
  208. else
  209. ui.updateTextArea(0, name.." yi tebrik ederiz <font color=\"#FF0000\">Kırmızı</font> takım 2 puan kazandı.")
  210. scoreRed = scoreRed + 2
  211. end
  212. elseif nbWon == 3 then
  213. if team == "blue" then
  214. ui.updateTextArea(0, name.." yi tebrik ederiz <font color=\"#0000FF\">Mavi</font> takım 1 puan kazandı.")
  215. scoreBlue = scoreBlue + 1
  216. else
  217. ui.updateTextArea(0, name.." yi tebrik ederiz <font color=\"#FF0000\">Kırmızı</font> takım 1 puan kazandı.")
  218. scoreRed = scoreRed + 1
  219. end
  220. --else
  221. --print(name.." ne rapporte pas de point à son équipe!")
  222. end
  223. end
  224.  
  225.  
  226. function displayTeam()
  227. stringBlue = " "
  228. stringRed = " "
  229. i = 1
  230. while i <= #teamBlue do
  231. stringBlue = stringBlue..teamBlue[i].." "
  232. i = i + 1
  233. end
  234. i = 1
  235. while i <= #teamRed do
  236. stringRed = stringRed..teamRed[i].." "
  237. i = i + 1
  238. end
  239. ui.updateTextArea(20, "Oyuncular ve Takımları:<br><font color=\"#003AFF\">Mavi: </font>"..stringBlue.."<br><font color=\"#FF0000\">Kızmızı: </font>"..stringRed)
  240. end
  241.  
  242. function displayVictory()
  243. start = 2
  244. tfm.exec.newGame("@4710798")
  245. tfm.exec.setGameTime(25)
  246. if scoreBlue > scoreRed then
  247. winner = "bleu"
  248. ui.updateTextArea(0, " Tebrik ederiz <font color=\"#0000FF\">Mavi</font> takım oyunu kazandı.")
  249. elseif scoreRed > scoreBlue then
  250. winner = "rouge"
  251. ui.updateTextArea(0, " Tebrik ederiz <font color=\"#FF0000\">Kırmızı</font> takım oyunu kazandı.")
  252. else
  253. winner = ""
  254. ui.updateTextArea(0, " <font color=\"#FFFF00\"> Dostluk kazandı. </font> kazanamdı.")
  255. end
  256. end
  257.  
  258. function initTeam()
  259. player = {}
  260. teamBlue = {}
  261. teamRed = {}
  262. start = 0
  263. scoreBlue = 0
  264. scoreRed = 0
  265. nbRound = 0
  266. for name, k in pairs(tfm.get.room.playerList) do
  267. table.insert(player, name)
  268. end
  269. tfm.exec.newGame("@4710798")
  270. tfm.exec.setGameTime(20)
  271. ui.addTextArea(10, " ", nil, 300, 200, 210, 20, 0x101010, 0x000000, 1.0, true)
  272. local i = 1
  273. while i <= #player do
  274. if i%2 == 1 then
  275. --print(player[i].." rejoint l'équipe bleue!")
  276. tfm.exec.setNameColor(player[i], 0x0000FF)
  277. table.insert(teamBlue, player[i])
  278. else
  279. --print(player[i].." rejoint l'équipe rouge!")
  280. tfm.exec.setNameColor(player[i], 0xFF0000)
  281. table.insert(teamRed, player[i])
  282. end
  283. i = i + 1
  284. end
  285. ui.addTextArea(20, " ", nil, 200, 80, 400, 80, 0x101010, 0x000000, 1.0, true)
  286. ui.addTextArea(110, "Tur: "..nbRound.."/"..totalRound, nil, 700, 30, 100, 20, 0x101010, 0x000000, 0.5, true)
  287. displayTeam()
  288. ui.addTextArea(0, " Takımlar!", nil, 200, 30, 400, 20, 0x101010, 0x000000, 0.7, true)
  289. end
  290.  
  291.  
  292. tfm.exec.disableAutoShaman(true)
  293. tfm.exec.disableAutoNewGame(true)
  294. initTeam()
  295. function eventChatCommand(name,command)
  296. if command=="öl" then
  297. tfm.exec.killPlayer(name)
  298. end
  299. end
  300. ui.addTextArea(669,"<p align='center'><a href='event:help'><b><R>?</b></a></p>",name,775,383,16,16,1,1,0.8,true)
  301. function eventTextAreaCallback(id, name, callback)
  302. if callback=="help" then
  303. ui.addTextArea(999, "<ROSE><B> Taring Oyununa Hoş Geldiniz </B> </ROSE> <BR><V>Amaç</V> <J>• <T>Puan toplayarak takımınıza oyun kazandırmak.</T></J></br> <br><V>Kurallar ve Özellikler</V><J> • <T>1. girene 4 puan, 2. girene 3 puan, 3. girene 2 puan takımına gelmektedir.</T> </J><br> <J>• <T>4 ve sonrasına puan eklenmemektedir.<br><T><J><br><V>Komutlar</V><J><J>• <T>!öl<R> = <J><T>kendinizi öldürmek </T></T></J> </R> <br><V>Yönetici</V><J><J>• <T>Noktats </T></J>", "Noktats", 225, 100, 350, 220, 1, 1, 0.8)
  304. ui.addTextArea(779,"<p align='center'><a href='event:close'><b>Kapat</b></a></p>",name,250,350,300,16,1,1,0.8,true)
  305. elseif callback=="close" then
  306. ui.removeTextArea(999,name)
  307. ui.removeTextArea(779,name)
  308. end
  309. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement