Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function table.concat(list,sep,f,i,j)
- local txt = ""
- sep = sep or ""
- i,j = i or 1,j or #list
- for k,v in next,list do
- if type(k) ~= "number" and true or (k >= i and k <= j) then
- txt = txt .. (f and f(k,v) or v) .. sep
- end
- end
- return string.sub(txt,1,-1-#sep)
- end
- function table.find(list,value,index,f)
- for k,v in next,list do
- local i = (type(v) == "table" and index and v[index] or v)
- if (not f and i or f(i)) == value then
- return true,k
- end
- end
- return false,0
- end
- function ui.timerImage(img,x,y,n,bomb,time)
- time=time or 5
- axis=axis or {100,100}
- local img=tfm.exec.addImage(img..".png","&0",x,y,n)
- system.newTimer(function()
- tfm.exec.removeImage(img,n)
- if bomb==true then
- tfm.exec.explosion(x,y,20,150)
- tfm.exec.displayParticle(12,x,y)
- end
- end,time*1000,false)
- end
- text={}
- lang={}
- lang.ar={commands="\n<b><VP>!اسم الشخصية</VP></b> - التحول إلى شخصية محددة\n<b><VP>!random</VP></b> - التحول إلى شخصية عشوائية\n<b><VP>!mouse</VP></b> - العودة إلى فأر مرة أخرى\n\n<b><VP>!guild</VP></b> - فتح قائمة النقابات <font size='10'>(فتح الملف الشخصي لنقابتك إذا كنت عضوًا بنقابة)</font>\n<p align='center'><a href='event:guild'><b><BV>قائمة النقابات</BV></b></a></p>\n<b><VP>!profile</VP></b> [<V><b>الاسم</b></V>] - فتح الملف الشخصي للاعب محدد\n<p align='center'><a href='event:profile'><b><BV>الملف الشخصي</BV></b></a></p>\n<b><VP>!help</VP></b> - فتح قائمة المساعدة\n<p align='center'><a href='event:help'><b><BV>قائمة المساعدة</BV></b></a></p>\n<b><VP>!shop</VP></b> - فتح المتجر\n<p align='center'><a href='event:shop'><b><BV>المتجر</BV></b></a></p>\n<b><VP>!list</VP></b> - فتح قائمة الشخصيات\n<p align='center'><a href='event:characters'><b><BV>قائمة الشخصيات</BV></b></a></p>\n\n",newbadge="لقد حصلت على وسامٍ جديد!",creditsbutton="ائتمان",commandsbutton="الأوامر",gameplaybutton="كيفية اللعب",credits="<p align='center'><font face='Soopafresh' size='30'><u>ائتمان</u></font>\n\n<b><R>•</R></b> صانع النمط\n<b><VP>•</VP></b> أغراض برمجية/صور\n<b><ROSE>•</ROSE></b> رسام\n<b><J>•</J></b> مترجم</p>\n<R><b>Bodykudo<font size='8'><V>#0000</V></font></b></R> هذه اللعبة تمت صناعتها بواسطة\n\nهؤلاء الأشخاص ساعدوا ببعض الأغراض البرمجية والصور\n<VP><b>Bolodefchoco<font size='8'><V>#0000</V></font></b></VP>, <VP><b>Laagaadoo<font size='8'><V>#0000</V></font></b></VP> و <VP><b>Animjarcanin<font size='8'><V>#0000</V></font></b></VP>\n\n<ROSE><b>Chocodivo<font size='8'><V>#0000</V></font></b></ROSE> ساعدت بتصميم الصور",mouse="عليك أن تنتظر للجولة القادمة حتى تصبح فأرًا",items="أ\nغـ\nـر\nا\nض",skills="مـ\nـهـ\nـا\nر\nا\nت",buy="شراء",inRoom="%s في الغرفة",wins="مرات الفوز",losses="مرات الخسارة",rounds="الجولات الملعوبة",stats="الإحصائيات",gm="أعضاء نقابتك",join="الانضمام",closebutton="إغلاق",members="الأعضاء",leave="المغادرة"}
- lang.en={commands="\n<b><VP>!Character's Name</VP></b> - Transform to a Certain Character\n<b><VP>!random</VP></b> - Transform to a Random Character\n<b><VP>!mouse</VP></b> - Return back to a Mouse again\n\n<b><VP>!guild</VP></b> - Display the Guilds' menu <font size='10'>(Display your Guild's Profile if you are a part in a guild)</font>\n<p align='center'><a href='event:guild'><b><BV>The Guilds' Menu</BV></b></a></p>\n<b><VP>!profile</VP></b> [<V><b>Name</b></V>] - Display the Player's Profile\n<p align='center'><a href='event:profile'><b><BV>The Profile</BV></b></a></p>\n<b><VP>!help</VP></b> - Display the Help menu\n<p align='center'><a href='event:help'><b><BV>The Help Menu</BV></b></a></p>\n<b><VP>!shop</VP></b> - Display the Shop\n<p align='center'><a href='event:shop'><b><BV>The Shop</BV></b></a></p>\n<b><VP>!list</VP></b> - Display the Characters' list\n<p align='center'><a href='event:characters'><b><BV>The Characters' List</BV></b></a></p>\n\n",newbadge="You Have Got a New Badge!",creditsbutton="Credits",commandsbutton="Commands",gameplaybutton="Gameplay",credits="<p align='center'><font face='Soopafresh' size='30'><u>Credits</u></font>\n\n<b><R>•</R></b> Module Developer\n<b><VP>•</VP></b> Coding/Images Stuff\n<b><ROSE>•</ROSE></b> Artist\n<b><J>•</J></b> Translator</p>\nThis Game was Developed by <R><b>Bodykudo<font size='8'><V>#0000</V></font></b></R>\n\nThose people helped with Some Coding and Images Stuff\n<VP><b>Bolodefchoco<font size='8'><V>#0000</V></font></b></VP>, <VP><b>Laagaadoo<font size='8'><V>#0000</V></font></b></VP> and <VP><b>Animjarcanin<font size='8'><V>#0000</V></font></b></VP>\n\n<ROSE><b>Chocodivo<font size='8'><V>#0000</V></font></b></ROSE> Helped with Drawings",mouse="You have to wait until the next round to become a Mouse",items="I\nt\ne\nm\ns",skills="S\nk\ni\nl\nl\ns",buy="Buy",inRoom="%s in the Room",wins="Wins",losses="Losses",rounds="Played Rounds",stats="Stats",gm="Your guild Members",join="Join",closebutton="Close",members="Members",leave="Leave"}
- lang.br={commands="\n<b><VP>!Character's Name</VP></b> - Transform to a Certain Character\n<b><VP>!random</VP></b> - Transform to a Random Character\n<b><VP>!mouse</VP></b> - Return back to a Mouse again\n\n<b><VP>!guild</VP></b> - Display the Guilds menu <font size='10'>(Display your Guild's Profile if you are a part in a guild)</font>\n<p align='center'><a href='event:guild'><b><BV>The Guilds Menu</BV></b></a></p>\n<b><VP>!profile</VP></b> [<V><b>Name</b></V>] - Display the Player's Profile\n<p align='center'><a href='event:profile'><b><BV>The Profile</BV></b></a></p>\n<b><VP>!help</VP></b> - Display the Help menu\n<p align='center'><a href='event:help'><b><BV>The Help Menu</BV></b></a></p>\n<b><VP>!shop</VP></b> - Display the Shop\n<p align='center'><a href='event:shop'><b><BV>The Shop</BV></b></a></p>\n<b><VP>!list</VP></b> - Display the Characters' list\n<p align='center'><a href='event:characters'><b><BV>The Characters' List</BV></b></a></p>\n\n",newbadge="You Have Got a New Badge!",creditsbutton="Credits",commandsbutton="Commands",gameplaybutton="Gameplay",credits="<p align='center'><font face='Soopafresh' size='30'><u>Credits</u></font>\n\n<b><R>•</R></b> Module Developer\n<b><VP>•</VP></b> Coding/Images Stuff\n<b><ROSE>•</ROSE></b> Artist\n<b><J>•</J></b> Translator</p>\nThis Game was Developed by <R><b>Bodykudo<font size='8'><V>#0000</V></font></b></R>\n\nThose people helped with Some Coding and Images Stuff\n<VP><b>Bolodefchoco<font size='8'><V>#0000</V></font></b></VP>, <VP><b>Laagaadoo<font size='8'><V>#0000</V></font></b></VP> and <VP><b>Animjarcanin<font size='8'><V>#0000</V></font></b></VP>\n\n<ROSE><b>Chocodivo<font size='8'><V>#0000</V></font></b></ROSE> Helped with Drawings\n\n<J><b>Bolodefchoco<font size='8'><V>#0000</V></font></b></J><font size='8'>(BR)</font> Helped with Translating The Module",mouse="You have to wait until the next round to become Mouse",items="I\nt\ne\nn\ns",skills="H\na\nb\ni\nl\ni\nd\na\nd\ne\ns",buy="Comprar",inRoom="%s na sala",wins="Vitórias",losses="Derrotas",rounds="Partidas jogadas",stats="Estatísticas",gm="Membros da sua equipe",join="Entrar",closebutton="Fechar",members="Membros",leave="Sair"}
- lang.pl={commands="\n<b><VP>!Nazwa Postaci</VP></b> - Zmiana w określoną Postać\n<b><VP>!random</VP></b> - Zmiana w Losową Postać\n<b><VP>!mouse</VP></b> - Powróć do wyglądu zwykłej Myszki\n\n<b><VP>!guild</VP></b> - Pokazuje menu Gildi <font size='10'>(Pokazuje Profil twojej gildii, jeżeli w jakieś jesteś)</font>\n<p align='center'><a href='event:guild'><b><BV>Gildia</BV></b></a></p>\n<b><VP>!profile</VP></b> [<V><b>Nazwa</b></V>] - Pokazuje Profil Gracza\n<p align='center'><a href='event:profile'><b><BV>Profil</BV></b></a></p>\n<b><VP>!help</VP></b> - Pokazuje menu Pomocy\n<p align='center'><a href='event:help'><b><BV>Pomoc</BV></b></a></p>\n<b><VP>!shop</VP></b> - Pokazuje Sklep\n<p align='center'><a href='event:shop'><b><BV>Sklep</BV></b></a></p>\n<b><VP>!list</VP></b> - Pokazuje listę postaci\n<p align='center'><a href='event:characters'><b><BV>Lista Postaci</BV></b></a></p>\n\n",newbadge="Otrzymałeś/-aś nową odznakę!",creditsbutton="Credits",commandsbutton="Komendy",gameplaybutton="Rozgrywka",credits="<p align='center'><font face='Soopafresh' size='30'><u>Credits</u></font>\n\n<b><R>•</R></b> Twórca modułu\n<b><VP>•</VP></b> Programowanie/Obrazki\n<b><ROSE>•</ROSE></b> Artysta\n<b><J>•</J></b> Tłumacz</p>\nTa minigra jest stworzona przez <R><b>Bodykudo<font size='8'><V>#0000</V></font></b></R>\n\nCi ludzie pomogli mi w kodzie i dodawaniu obrazków\n<VP><b>Bolodefchoco<font size='8'><V>#0000</V></font></b></VP>, <VP><b>Laagaadoo<font size='8'><V>#0000</V></font></b></VP> and <VP><b>Animjarcanin<font size='8'><V>#0000</V></font></b></VP>\n\n<ROSE><b>Chocodivo<font size='8'><V>#0000</V></font></b></ROSE> Namalowała kilka obrazków\n\n<J><b>Sebafrancuz<font size='8'><V>#0000</V></font></b></J><font size='8'>(PL)</font> Pomógł w tłumaczeniu modułu",mouse="Musisz poczekać do kolejnej rundy, aby zostać Myszką",items="P\nr\nz\ne\nd\nm\ni\no\nt\ny",skills="S\nk\ni\nl\nl\ne",buy="Kup",inRoom="%s w Pokoju",wins="Wygrane",losses="Przegrane",rounds="Rozegrane Rundy",stats="Statystyki",gm="Członkowie twojej gildi",join="Dołącz",closebutton="Zamknij",members="Członkowie",leave="Opuść"}
- lang.nl={commands="\n<b><VP>!Naam van Personage</VP></b> - Transformeer naar een Bepaalde Personage\n<b><VP>!random</VP></b> - Transformeer naar een Random Personage\n<b><VP>!mouse</VP></b> - Transformeer terug naar een Muis\n\n<b><VP>!guild</VP></b> - Toon het Gildemenu <font size='10'>(Toon je Gilde Profile als je deel uitmaakt van een gilde)</font>\n<p align='center'><a href='event:guild'><b><BV>De Gilde Menu</BV></b></a></p>\n<b><VP>!profile</VP></b> [<V><b>Naam</b></V>] - Geef het profiel van de speler weer\n<p align='center'><a href='event:profile'><b><BV>Het Profiel</BV></b></a></p>\n<b><VP>!help</VP></b> - Geef het Help menu weer\n<p align='center'><a href='event:help'><b><BV>Het Help Menu</BV></b></a></p>\n<b><VP>!shop</VP></b> - Toon de winkel\n<p align='center'><a href='event:shop'><b><BV>De Winkel</BV></b></a></p>\n<b><VP>!list</VP></b> - Geef de lijst met Personages weer\n<p align='center'><a href='event:characters'><b><BV>De lijst met Personages</BV></b></a></p>\n\n",newbadge="Je hebt een nieuwe badge!",creditsbutton="Credits",commandsbutton="Commando's",gameplaybutton="Gameplay",credits="<p align='center'><font face='Soopafresh' size='30'><u>Credits</u></font>\n\n<b><R>•</R></b> Moduleontwikkelaar\n<b><VP>•</VP></b> Codering/Afbeeldingen dingen\n<b><ROSE>•</ROSE></b> Artiest\n<b><J>•</J></b> Vertaler</p>\nDeze game is ontwikkeld door <R><b>Bodykudo<font size='8'><V>#0000</V></font></b></R>\n\nDeze mensen hebben geholpen met Codering en Afbeeldingen dingen\n<VP><b>Bolodefchoco<font size='8'><V>#0000</V></font></b></VP>, <VP><b>Laagaadoo<font size='8'><V>#0000</V></font></b></VP> and <VP><b>Animjarcanin<font size='8'><V>#0000</V></font></b></VP>\n\n<ROSE><b>Chocodivo<font size='8'><V>#0000</V></font></b></ROSE> Hielp met tekeningen\n\n<J><b>Distances<font size='8'><V>#0000</V></font></b></J><font size='8'>(NL)</font> Geholpen met het vertalen van de Module",mouse="Je moet wachten tot de volgende ronde om muis te worden",items="D\ni\nn\ng\ne\nn",skills="V\na\na\nr\nd\ni\ng\nh\ne\nd\ne\nn",buy="Kopen",inRoom="%s in de Kamer",wins="Wint",losses="Verliest",rounds="Gespeelde Rondes",stats="Stats",gm="Je Gildeleden",join="Toetreden",closebutton="Sluiten",members="Leden",leave="Verlaten"}
- lang.hu={commands="\n<b><VP>!A karakter neve </VP></b> - Átalakulás egy adott karakterré\n<b><VP>!random</VP></b> - Átalakulás egy véletlenszerűen kapott karakterré\n<b><VP>!mouse</VP></b> - Vissza egérré\n\n<b><VP>!guild</VP></b> - Mutasd a Csapat menüjét <font size='10'>(Mutasd a Csapatod profilját, ha tagja vagy egynek)</font>\n<p align='center'><a href='event:guild'><b><BV>Csapat</BV></b></a></p>\n<b><VP>!profile</VP></b> [<V><b>Név</b></V>] - Mutasd a játékos profilját\n<p align='center'><a href='event:profile'><b><BV>Profil</BV></b></a></p>\n<b><VP>!help</VP></b> - Mutasd a Segítség menüt\n<p align='center'><a href='event:help'><b><BV>Segítség</BV></b></a></p>\n<b><VP>!shop</VP></b> - Mutasd a boltot\n<p align='center'><a href='event:shop'><b><BV>Bolt</BV></b></a></p>\n<b><VP>!list</VP></b> - Mutasd a karakterek listáját\n<p align='center'><a href='event:characters'><b><BV>Karakterlista</BV></b></a></p>\n\n",newbadge="Új kitűzőt szereztél!",creditsbutton="Köszönet",commandsbutton="Parancsok",gameplaybutton="Játék",credits="<p align='center'><font face='Soopafresh' size='30'><u>Köszönet</u></font>\n\n<b><R>•</R></b> Modul Fejlesztő\n<b><VP>•</VP></b> Kódolás/Képek\n<b><ROSE>•</ROSE></b> Művész\n<b><J>•</J></b> Fordító</p>\nA játékot fejlesztette: <R><b>Bodykudo<font size='8'><V>#0000</V></font></b></R>\n\nEzek az emberek segítettek még a kódolásban és a képekkel: \n<VP><b>Bolodefchoco<font size='8'><V>#0000</V></font></b></VP>, <VP><b>Laagaadoo<font size='8'><V>#0000</V></font></b></VP> and <VP><b>Animjarcanin<font size='8'><V>#0000</V></font></b></VP>\n\n<ROSE><b>Chocodivo<font size='8'><V>#0000</V></font></b></ROSE> Segített a rajzaival: \n\n<J><b>Toby<font size='8'><V>#3989</V></font></b></J><font size='8'>(HU)</font> Segített lefordítani a modult: ",mouse="A következő pályáig várnod kell, hogy ismét egér lehess!",items="T\n\ná\nr\ng\ny\na\nk",skills="K\né\np\ne\ns\ns\né\ng\ne\nk\nb\nu\ny",buy="Megvesz",inRoom="%s a szobában van.",wins="Győzelmek",losses="Vereségek",rounds="Lejátszott körök",stats="Statisztikák",gm="A csapattagjaid ",join="Csatlakozás",closebutton="Bezárás",members="Tagok",leave="Kilépés"}
- lang.fr={commands="\n<b><VP>!Nom du personnage</VP></b> - Transformer en un certain personnage\n<b><VP>!random</VP></b> - Transforme en un personnage aléatoire\n<b><VP>!mouse</VP></b> - Revenir de nouveau en Souris\n\n<b><VP>!guild</VP></b> - Afficher le menu des Guildes <font size='10'>(Affiche le profil de votre Guilde si vous faites partie d'une guilde)</font>\n<p align='center'><a href='event:guild'><b><BV>Le Menu des Guildes</BV></b></a></p>\n<b><VP>!profile</VP></b> [<V><b>Nom</b></V>] - Afficher le profil du joueur \n<p align='center'><a href='event:profile'><b><BV>Le profil</BV></b></a></p>\n<b><VP>!help</VP></b> - Afficher le menu Aide\n<p align='center'><a href='event:help'><b><BV>Le menu Aide</BV></b></a></p>\n<b><VP>!shop</VP></b> - Afficher le magasin\n<p align='center'><a href='event:shop'><b><BV>Le Magasin</BV></b></a></p>\n<b><VP>!list</VP></b> - Afficher la liste des personnages\n<p align='center'><a href='event:characters'><b><BV>La liste des personnages</BV></b></a></p>\n\n",newbadge="Vous avez obtenu un nouveau badge !",creditsbutton="Crédits",commandsbutton="Commandes",gameplaybutton="Gameplay",credits="<p align='center'><font face='Soopafresh' size='30'><u>Crédits</u></font>\n\n<b><R>•</R></b> Développeur du module\n<b><VP>•</VP></b> Codage/Images\n<b><ROSE>•</ROSE></b> Artiste\n<b><J>•</J></b> Traducteur</p>\nCe jeu a été créé par <R><b>Bodykudo<font size='8'><V>#0000</V></font></b></R>\n\nCes personnes ont aidé pour le codage et les images\n<VP><b>Bolodefchoco<font size='8'><V>#0000</V></font></b></VP>, <VP><b>Laagaadoo<font size='8'><V>#0000</V></font></b></VP> and <VP><b>Animjarcanin<font size='8'><V>#0000</V></font></b></VP>\n\n<ROSE><b>Chocodivo<font size='8'><V>#0000</V></font></b></ROSE> Ont aidé avec les dessins\n\n<J><b>Eyeground<font size='8'><V>#0000</V></font></b></J><font size='8'>(FR)</font> Ont aidé à la traduction du module",mouse="Tu dois attendre le prochain tour pour devenir une souris",items="O\nb\nj\ne\nt\ns",skills="C\no\nm\np\né\nt\ne\nn\nc\ne\ns",buy="Acheter",inRoom="%s dans le salon",wins="Victoires",losses="Défaites",rounds="Rounds joués",stats="Statistiques",gm="Tes membres de guilde",join="Rejoindre",closebutton="Fermer",members="Membres",leave="Quitter"}
- lang.de={commands="\n<b><VP>!Name des Charakters</VP></b> - Verwandle dich in einen spezifischen Charakter\n<b><VP>!random</VP></b> - Verwandle dich in einen zufälligen Charakter\n<b><VP>!mouse</VP></b> - Verwandle dich in eine Maus zurück\n\n<b><VP>!guild</VP></b> - Zeige das Menü der Gilde <font size='10'>(Zeige das Profil deiner Gilde sofern du Teil einer Gilde bist)</font>\n<p align='center'><a href='event:guild'><b><BV>Menü der Gilde</BV></b></a></p>\n<b><VP>!profile</VP></b> [<V><b>Name</b></V>] - Zeige das Profil des Spielers\n<p align='center'><a href='event:profile'><b><BV>Das Profil</BV></b></a></p>\n<b><VP>!help</VP></b> - Zeige die Hilfe\n<p align='center'><a href='event:help'><b><BV>Die Hilfe</BV></b></a></p>\n<b><VP>!shop</VP></b> - Zeige das Geschäft\n<p align='center'><a href='event:shop'><b><BV>Das Geschäft</BV></b></a></p>\n<b><VP>!list</VP></b> - Zeige die Liste der Charaktere\n<p align='center'><a href='event:characters'><b><BV>Liste der Charaktere</BV></b></a></p>\n\n",newbadge="Du hast ein neues Abzeichen!",creditsbutton="Credits",commandsbutton="Kommandos",gameplaybutton="Gameplay",credits="<p align='center'><font face='Soopafresh' size='30'><u>Credits</u></font>\n\n<b><R>•</R></b> Module Entwickler\n<b><VP>•</VP></b> Kodierung/Bilder\n<b><ROSE>•</ROSE></b> Künstler\n<b><J>•</J></b> Übersetzer</p>\nDieses Spiel wurde entwickelt von <R><b>Bodykudo<font size='8'><V>#0000</V></font></b></R>\n\nDiese Leute haben bei Dingen wie Kodierung und Bildern geholfen\n<VP><b>Bolodefchoco<font size='8'><V>#0000</V></font></b></VP>, <VP><b>Laagaadoo<font size='8'><V>#0000</V></font></b></VP> and <VP><b>Animjarcanin<font size='8'><V>#0000</V></font></b></VP>\n\n<ROSE><b>Chocodivo<font size='8'><V>#0000</V></font></b></ROSE> Half bei Grafiken\n\n<J><b>Perlchen<font size='8'><V>#0000</V></font></b></J><font size='8'>(DE)</font> Half bei der Übersetzung des Module",mouse="Du musst bis zur nächsten Runde warten um folgendes zu sein:Maus",items="I\nt\ne\nm\ns",skills="F\nä\nh\ni\ng\nk\ne\ni\nt\ne\nn",buy="Kaufe",inRoom="%s im Raum",wins="Gewinne",losses="Niederlagen",rounds="Gespielte Runden",stats="Statistiken",gm="Deine Gilden Mitglieder",join="Beitreten",closebutton="Schließen",members="Mitglieder",leave="Verlassen"}
- play=false
- started=false
- mouse={}
- open={}
- for _,v in pairs ({'disableAutoScore','disableAfkDeath','disablePhysicalConsumables','disableAutoNewGame','disableDebugCommand','disableMinimalistMode','disableMortCommand','disableAutoTimeLeft','disableAutoShaman'}) do
- tfm.exec[v](true)
- end
- guilds={
- ft={name="<font color='#cc0000'>Fairy Tail</font>",members={},inRoom={},notInRoom={},membersNumber=0,inRoomMembers=0,color=0xcc0000,logo="15e15465adb.png",wins=0,losses=0,rounds=0,stats=0},
- st={name="<font color='#f9c944'>Sabertooth</font>",members={},inRoom={},notInRoom={},membersNumber=0,inRoomMembers=0,color=0xf9c944,logo="15e154685d3.png",wins=0,losses=0,rounds=0,stats=0},
- ls={name="<font color='#6cff73'>Lamia Scale</font>",members={},inRoom={},notInRoom={},membersNumber=0,inRoomMembers=0,color=0x6cff73,logo="15e15467027.png",wins=0,losses=0,rounds=0,stats=0},
- bp={name="<font color='#b6deff'>Blue Pegasus</font>",members={},inRoom={},notInRoom={},membersNumber=0,inRoomMembers=0,color=0xb6deff,logo="15e154606d4.png",wins=0,losses=0,rounds=0,stats=0}
- }
- characters={
- arana={name="Arana",right={"1622a0e1227"},left={"16229f2d9a9"},x=-35,y=-55,ids=1},
- bacchus={name="Bacchus",right={"1622a0e6353"},left={"16229f32add"},x=-35,y=-55,ids=1},
- beth={name="Beth",right={"1622a0eb3ed"},left={"16229f37f4d"},x=-35,y=-55,ids=1},
- bob={name="Bob",right={"1622a0f04f4"},left={"16229f3cffb"},x=-35,y=-55,ids=1},
- cana={name="Cana",right={"1622a0f55e6"},left={"16229f420f4"},x=-35,y=-55,ids=1},
- carla={name="Carla",right={"1622a0fa7d8"},left={"16229f471fb"},x=-35,y=-55,ids=1},
- elfman={name="Elfman",right={"1622a0ff93a","1622a104a6c"},left={"16229f4c304","16229f5140a"},x=-35,y=-55,ids=2},
- erza={name="Erza",right={"1622a109af0"},left={"16229f56537"},x=-35,y=-55,ids=1},
- eve={name="Eve",right={"1622a10ebee"},left={"16229f5b950"},x=-35,y=-55,ids=1},
- evergreen={name="Evergreen",right={"1622a113d60"},left={"16229f60a09"},x=-35,y=-55,ids=1},
- flare={name="Flare",right={"1622a118def"},left={"16229f65afe"},x=-35,y=-55,ids=1},
- franmalth={name="Franmalth",right={"1622a11def1"},left={"16229f6ac33"},x=-35,y=-55,ids=1},
- frosch={name="Frosch",right={"1622a122fdf"},left={"16229f6fd30"},x=-35,y=-55,ids=1},
- gajeel={name="Gajeel",right={"1622a128110"},left={"16229f74e2e"},x=-35,y=-55,ids=1},
- gildarts={name="Gildarts",right={"1622a12d225"},left={"16229f79f20"},x=-35,y=-55,ids=1},
- gray={name="Gray",right={"1622a1322f6","1622a1373f7"},left={"16229f7f012","16229f840fb"},x=-35,y=-55,ids=2},
- happy={name="Happy",right={"1622a13c4e6"},left={"16229f897d7"},x=-35,y=-55,ids=1},
- hibiki={name="Hibiki",right={"1622a1415eb"},left={"16229f8e8f1"},x=-35,y=-55,ids=1},
- ichiya={name="Ichiya",right={"1622a1466e7"},left={"16229f939f8"},x=-35,y=-55,ids=1},
- jackal={name="Jackal",right={"1622a14b83a"},left={"16229f98b02"},x=-35,y=-55,ids=1},
- jager={name="Jager",right={"1622a15092f"},left={"16229f9dc19"},x=-35,y=-55,ids=1},
- jellal={name="Jellal",right={"1622a155a1e"},left={"16229fa2cf5"},x=-35,y=-55,ids=1},
- jenny={name="Jenny",right={"1622a15aafc"},left={"16229fa7e0c"},x=-35,y=-55,ids=1},
- jura={name="Jura",right={"1622a15fc0e"},left={"16229facee3"},x=-35,y=-55,ids=1},
- juvia={name="Juvia",right={"1622a164d2d"},left={"16229fb25ae"},x=-35,y=-55,ids=1},
- kagura={name="Kagura",right={"1622a169e06"},left={"16229fb7728"},x=-35,y=-55,ids=1},
- kain={name="Kain",right={"1622a16ef96"},left={"16229fbc819"},x=-35,y=-55,ids=1},
- kurohebi={name="Kurohebi",right={"1622a174111"},left={"16229fc1969"},x=-35,y=-55,ids=1},
- kyoka={name="Kyoka",right={"1622a1791f8"},left={"16229fc6afe"},x=-35,y=-55,ids=1},
- laxus={name="Laxus",right={"1622a17e2f1"},left={"16229fcbbf4"},x=-35,y=-55,ids=1},
- lector={name="Lector",right={"1622a1833f3"},left={"16229fd0cef"},x=-35,y=-55,ids=1},
- levy={name="Levy",right={"1622a188508"},left={"16229fd5e36"},x=-35,y=-55,ids=1},
- lily={name="Lily",right={"1622a18d6c2"},left={"16229fdaf16"},x=-35,y=-55,ids=1},
- lisana={name="Lisana",right={"1622a19282f"},left={"16229fe008b"},x=-35,y=-55,ids=1},
- loke={name="Loke",right={"1622a197912"},left={"16229fe5246"},x=-35,y=-55,ids=1},
- lucy={name="Lucy",right={"1622a19ca61"},left={"16229fea461"},x=-35,y=-55,ids=1},
- lyon={name="Lyon",right={"1622a1a1b2f"},left={"1622a690311"},x=-35,y=-55,ids=1},
- makarov={name="Makarov",right={"1622a1a6bf7"},left={"16229ff4644"},x=-35,y=-55,ids=1},
- mavis={name="Mavis",right={"1622a1abd10"},left={"16229ff96f3"},x=-35,y=-55,ids=1},
- meredy={name="Meredy",right={"1622a1b0e26"},left={"16229ffe7e6"},x=-35,y=-55,ids=1},
- minerva={name="Minerva",right={"1622a1b5ef6"},left={"1622a0038e2"},x=-35,y=-55,ids=1},
- mirajane={name="Mirajane",right={"1622a1baffe","1622a1c0100"},left={"1622a008a3e","1622a00dae6"},x=-35,y=-55,ids=2},
- mystogan={name="Mystogan",right={"1622a1c51fd"},left={"1622a01303b"},x=-35,y=-55,ids=1},
- natsu={name="Natsu",right={"1622a1ca323","1622a1cf43a","1622a1d44ea"},left={"1622a018108","1622a01d650","1622a022a20"},x=-35,y=-55,ids=3},
- rogue={name="Rogue",right={"1622a1f7efe","1622a1fd02e","1622a051650"},left={"1622a046ff7","1622a04c54d","1622a2020f9"},x=-35,y=-55,ids=3},
- nobarly={name="Nobarly",right={"1622a1d95ed"},left={"1622a0282a5"},x=-35,y=-55,ids=1},
- nullpudding={name="Nullpudding",right={"1622a1de726"},left={"1622a02db66"},x=-35,y=-55,ids=1},
- obra={name="Obra",right={"1622a1e3814"},left={"1622a032c18"},x=-35,y=-55,ids=1},
- orga={name="Orga",right={"1622a1e8900"},left={"1622a037ce0"},x=-35,y=-55,ids=1},
- risley={name="Risley",right={"1622a1eda57"},left={"1622a03ce21"},x=-35,y=-55,ids=1},
- rocker={name="Rocker",right={"1622a1f2d7d"},left={"1622a041f1e"},x=-35,y=-55,ids=1},
- romeo={name="Romeo",right={"1622a2071ee"},left={"1622a0566f0"},x=-35,y=-55,ids=1},
- rufus={name="Rufus",right={"1622a20c2e5"},left={"1622a05b7fc"},x=-35,y=-55,ids=1},
- racer={name="Racer",right={"1622a211a30"},left={"1622a060eb1"},x=-35,y=-55,ids=1},
- sawyer={name="Sawyer",right={"1622a211a30"},left={"1622a060eb1"},x=-35,y=-55,ids=1},
- seilah={name="Seilah",right={"1622a216b13"},left={"1622a065fe7"},x=-35,y=-55,ids=1},
- semmes={name="Semmes",right={"1622a21bf9a"},left={"1622a06b136"},x=-35,y=-55,ids=1},
- sherria={name="Sherria",right={"1622a2231ba"},left={"1622a0701f0"},x=-35,y=-55,ids=1},
- silver={name="Silver",right={"1622a228340"},left={"1622a0752f8"},x=-35,y=-55,ids=1},
- sting={name="Sting",right={"1622a22d3f6","1622a232502"},left={"1622a07a3f4","1622a07f526"},x=-35,y=-55,ids=2},
- wendy={name="Wendy",right={"1622a24c037","1622a2510ee"},left={"1622a0994ec","1622a09e9d3"},x=-35,y=-55,ids=2},
- toby={name="Toby",right={"1622a237625"},left={"1622a0845ed"},x=-35,y=-55,ids=1},
- totomaru={name="Totomaru",right={"1622a23c719"},left={"1622a089704"},x=-35,y=-55,ids=1},
- ultear={name="Ultear",right={"1622a241dc0"},left={"1622a08f330"},x=-35,y=-55,ids=1},
- warcry={name="Warcry",right={"1622a246f09"},left={"1622a09441e"},x=-35,y=-55,ids=1},
- yuka={name="Yuka",right={"1622a25623d"},left={"1622a0a3e2f"},x=-35,y=-55,ids=1},
- yukino={name="Yukino",right={"1622a25b626"},left={"1622a0a939a"},x=-35,y=-55,ids=1},
- zancrow={name="Zancrow",right={"1622a2606fd"},left={"1622a0ae50b"},x=-35,y=-55,ids=1},
- zeref={name="Zeref",right={"1622a2657e6"},left={"1622a0b3df2"},x=-35,y=-55,ids=1},
- }
- names={}
- local c={"list","characters","guild","lang","map","","profile","random","mouse","help","shop"}
- for index,p in pairs(characters) do
- table.insert(names,index)
- table.insert(c,index)
- end
- circles={"15e15473f69","15e15471bde","15e15470619","15e1546e1d7","15e1546c318","15e1546a427"}
- data={}
- p={}
- toDespawn={}
- id={list={},badge={},primage={},shop1={},shop2={},shop3={},logo={},logo1={},logo2={},logo3={},logo4={},character={},emt1={},emt2={},emt3={},character={},badge1={},badge2={},badge3={},badge4={},badge5={},help={}}
- items={
- [49]={name="Cannon",id=17,x=15,y=0,max=20,xa=30,angle=90,max_x=24,max_x2=24,max_y=24},
- [50]={name="Plank",id=3,x=70,y=-3,max=15,xa=25,angle=0,max_x=69,max_x2=29,max_y=24},
- [51]={name="Anvil",id=10,x=15,y=0,max=5,xa=25,angle=0,max_x=24,max_x2=-1,max_y=24}
- }
- maps={
- {code="@1667582",x={ft=680,st=124,ls=138,bp=670},y={ft=66,st=66,ls=194,bp=194}},
- {code="@1825269",x={ft=410,st=578,ls=410,bp=106},y={ft=185,st=65,ls=185,bp=265}},
- {code="@1749647",x={ft=400,st=650,ls=150,bp=400},y={ft=335,st=335,ls=335,bp=335}},
- {code="@2324513",x={ft=485,st=629,ls=629,bp=332},y={ft=256,st=215,ls=215,bp=206}},
- {code="@2218853",x={ft=601,st=202,ls=402,bp=404},y={ft=67,st=67,ls=45,bp=162}},
- {code="@3219038",x={ft=637,st=305,ls=325,bp=738},y={ft=245,st=245,ls=105,bp=105}},
- {code="@2020179",x={ft=730,st=398,ls=66,bp=398},y={ft=70,st=85,ls=70,bp=85}},
- {code="@1922239",x={ft=628,st=475,ls=326,bp=178},y={ft=65,st=65,ls=65,bp=65}},
- {code="@4411127",x={ft=401,st=552,ls=248,bp=401},y={ft=163,st=245,ls=245,bp=351}},
- {code="@4383258",x={ft=400,st=400,ls=82,bp=720},y={ft=200,st=200,ls=270,bp=120}},
- {code="@1985678",x={ft=720,st=81,ls=556,bp=244},y={ft=59,st=59,ls=170,bp=170}},
- {code="@589800",x={ft=700,st=550,ls=250,bp=100},y={ft=162,st=162,ls=162,bp=162}},
- {code="@1616785",x={ft=675,st=567,ls=235,bp=127},y={ft=108,st=210,ls=210,bp=108}},
- {code="@1688696",x={ft=738,st=59,ls=182,bp=620},y={ft=115,st=115,ls=215,bp=215}},
- {code="@2232342",x={ft=715,st=715,ls=94,bp=94},y={ft=90,st=190,ls=90,bp=190}},
- {code="@2222981",x={ft=667,st=131,ls=448,bp=354},y={ft=122,st=122,ls=66,bp=66}},
- {code="@7292599",x={ft=739,st=61,ls=402,bp=402},y={ft=44,st=44,ls=74,bp=74}},
- {code="@3015995",x={ft=555,st=255,ls=94,bp=705},y={ft=208,st=208,ls=334,bp=334}},
- {code="@7292145",x={ft=775,st=600,ls=202,bp=20},y={ft=251,st=181,ls=181,bp=251}},
- {code="@5017354",x={ft=400,st=400,ls=740,bp=65},y={ft=81,st=81,ls=141,bp=141}},
- {code="@7286179",x={ft=770,st=308,ls=32,bp=490},y={ft=319,st=336,ls=319,bp=336}},
- {code="@7286382",x={ft=599,st=400,ls=400,bp=204},y={ft=120,st=232,ls=232,bp=120}},
- {code="@7293452",x={ft=645,st=650,ls=155,bp=156},y={ft=266,st=95,ls=95,bp=266}},
- {code="@7297649",x={ft=450,st=684,ls=173,bp=368},y={ft=303,st=132,ls=211,bp=92}},
- {code="@7290901",x={ft=735,st=398,ls=60,bp=398},y={ft=184,st=157,ls=184,bp=157}},
- {code="@7093063",x={ft=740,st=408,ls=408,bp=60},y={ft=99,st=202,ls=202,bp=99}},
- {code="@2839265",x={ft=228,st=574,ls=228,bp=574},y={ft=201,st=201,ls=201,bp=201}},
- {code="@6694506",x={ft=80,st=715,ls=400,bp=400},y={ft=344,st=344,ls=344,bp=344}},
- {code="@7291632",x={ft=680,st=405,ls=406,bp=120},y={ft=332,st=307,ls=307,bp=332}}
- }
- function setLang(n)
- text[n]=lang[tfm.get.room.playerList[n].community] or lang.en
- end
- function nameTagFormat(name, size, color1, color2)
- local Name, Hash = name:match("([^#]+)(#%d+)")
- Name = Name or name
- Hash = Hash or ""
- local size = tonumber(size or 14)
- local color1 = color1 or 'r'
- local color2 = color2 or 'j'
- local colorN, colorH = (color1:match("#") and "<font color='"..color1.."' size='"..size.."'>%s</font>" ) or "<font size='"..size.."'><"..color1..">%s</"..color1.."></font>" , ( color2:match("#") and "<font color='"..color2.."' size='".. math.floor(size*2/3) .."'>%s</font>" ) or "<font size='".. math.floor(size*2/3) .."'><"..color2..">%s</"..color2.."></font>"
- return string.format(colorN, Name)..string.format(colorH, Hash)
- end
- function Data(n)
- data[n]={score=0,wins=0,losses=0,rounds=0,badges={"1622a220aa8.png","1622a220aa8.png","1622a220aa8.png","1622a220aa8.png","1622a220aa8.png"},timer=0,character=names[math.random(#names)],id=1,skills={arrow={can=false,max=15},snowball={can=false,max=10},bombs={can=false,max=5}},inGuild=false,guild="",guild_table="",coins=1000,attack=49,maxx={[49]=20,[50]=15,[51]=5},alpha={[49]=false,[50]=false,[51]=false},x={[49]=15,[50]=70,[51]=15},y={[49]=0,[50]=-3,[51]=0}}
- data[n].max={[49]=data[n].maxx[49],[50]=data[n].maxx[50],[51]=data[n].maxx[51]}
- end
- function newMap()
- map={}
- i=0
- for _,v in pairs(maps) do
- i=i+1
- map[i]=v.code
- end
- tfm.exec.newGame(map[math.random(#map)])
- end
- function eventNewPlayer(n)
- mouse[n]=false
- open[n]=false
- setLang(n)
- p[n]={right=false,left=false,timestamp=os.time(),objectid=0,imageid=0,magic=0,x=tfm.get.room.playerList[n].x,y=tfm.get.room.playerList[n].y,id=1}
- if not data[n] then
- Data(n)
- end
- magic(n)
- ui.addTextArea(23, "<p align='center'><a href='event:help'><b>H", n, 8, 54, 15, 20, 0x8a583c, 0x000000, 1, true)
- ui.addTextArea(24, "<p align='center'><a href='event:guild'><b>G", n, 32, 54, 15, 20, 0x8a583c, 0x000000, 1, true)
- ui.addTextArea(25, "<p align='center'><a href='event:profile'><b>P", n, 56, 54, 15, 20, 0x8a583c, 0x000000, 1, true)
- ui.addTextArea(26, "<p align='center'><a href='event:shop'><b>S", n, 80, 54, 15, 20, 0x8a583c, 0x000000, 1, true)
- if data[n].inGuild then
- guilds[data[n].guild_table].inRoomMembers=guilds[data[n].guild_table].inRoomMembers+1
- end
- for k=0,100 do
- tfm.exec.bindKeyboard(n,k,true,true)
- end
- if data[n].inGuild then
- Guild(n)
- guilds[data[n].guild_table].notInRoom[n]=nil
- guilds[data[n].guild_table].inRoom[n]=true
- else
- Guilds(n)
- end
- end
- function eventPlayerLeft(n)
- if data[n].inGuild then
- guilds[data[n].guild_table].inRoomMembers=guilds[data[n].guild_table].inRoomMembers-1
- guilds[data[n].guild_table].notInRoom[n]=true
- guilds[data[n].guild_table].inRoom[n]=nil
- end
- end
- function Win(guild)
- for i in pairs(guilds[guild].members) do
- tfm.exec.giveCheese(i)
- tfm.exec.playerVictory(i)
- data[i].coins=data[i].coins+1
- data[i].wins=data[i].wins+1
- data[i].score=data[i].score+10
- if data[i].wins==1 and data[i].badges[2]=="1622a220aa8.png" then
- newBadge(i,"1622a2229e9.png",2)
- end
- end
- for i in pairs(guilds) do
- if guilds[i]~=guilds[guild] and guilds[i].inRoomMembers > 0 then
- guilds[i].losses=guilds[i].losses+1
- end
- end
- tfm.exec.setGameTime(5)
- guilds[guild].wins=guilds[guild].wins+1
- end
- function eventNewGame()
- map=tfm.get.room.currentMap
- started=false
- for n in pairs(tfm.get.room.playerList) do
- closeAttackBoard(n)
- tfm.exec.setNameColor(n,0xC2C2DA)
- if not mouse[n] then
- Character(n,data[n].character)
- end
- tfm.exec.setPlayerScore(n,data[n].score)
- end
- if play then
- tfm.exec.setGameTime(123)
- for i in pairs(guilds) do
- if guilds[i].inRoomMembers > 0 then
- guilds[i].rounds=guilds[i].rounds+1
- calculateState=math.floor((guilds[i].wins/guilds[i].rounds)*100+0.5)/100
- guilds[i].stats=(calculateState==1 and 1 or (calculateState==0 and 0 or (#tostring(calculateState):sub(3)==1 and tonumber(tostring(calculateState):sub(3).."0") or tonumber(tostring(calculateState):sub(3)))))
- end
- end
- for n in pairs(tfm.get.room.playerList) do
- if data[n].inGuild then
- data[n].rounds=data[n].rounds+1
- closeGuilds(n)
- tfm.exec.setNameColor(n,guilds[data[n].guild_table].color)
- data[n].attack=49
- data[n].max={[49]=data[n].maxx[49],[50]=data[n].maxx[50],[51]=data[n].maxx[51]}
- for i in pairs(items) do
- if i==data[n].attack then
- data[n].alpha[i]=true
- else
- data[n].alpha[i]=false
- end
- end
- for i,v in pairs(maps) do
- if v.code==map then
- tfm.exec.movePlayer(n,v.x[data[n].guild_table],v.y[data[n].guild_table])
- end
- end
- data[n].skills["arrow"].max=15
- data[n].skills["snowball"].max=10
- data[n].skills["bombs"].max=5
- else
- tfm.exec.killPlayer(n)
- end
- end
- end
- end
- function closeAttackBoard(n)
- for a=7,9 do
- ui.removeTextArea(a,n)
- end
- for k,v in pairs({"emt1","emt2","emt3"}) do
- if id[v][n] then tfm.exec.removeImage(id[v][n],n) id[v][n]=nil end
- end
- end
- function attackBoard(n)
- closeAttackBoard(n)
- ui.addTextArea(7, "<p align='center'><b>Anvil\n\n"..data[n].max[51].." / "..data[n].maxx[51].."", n, 694, 28, 100, 78, 0x324650, 0x000000, data[n].alpha[51] and 0.5 or 0.2, true)
- ui.addTextArea(8, "<p align='center'><b>Plank\n\n"..data[n].max[50].." / "..data[n].maxx[50].."", n, 584, 28, 100, 78, 0x324650, 0x000000, data[n].alpha[50] and 0.5 or 0.2, true)
- ui.addTextArea(9, "<p align='center'><b>Cannon\n\n"..data[n].max[49].." / "..data[n].maxx[49].."", n, 474, 28, 100, 78, 0x324650, 0x000000, data[n].alpha[49] and 0.5 or 0.2, true)
- id["emt1"][n]=tfm.exec.addImage("15e15461b64.png", "&1", 508, 80, n)
- id["emt2"][n]=tfm.exec.addImage("15e1546302e.png", "&2", 617, 80, n)
- id["emt3"][n]=tfm.exec.addImage("15e1546449e.png", "&3", 729, 80, n)
- end
- function Character(n,charc)
- mouse[n]=false
- if id["character"][n] then tfm.exec.removeImage(id["character"][n]) id["character"][n]=nil end
- data[n].character=charc
- data[n].timer=0
- if tfm.get.room.playerList[n].isFacingRight then
- id["character"][n]=tfm.exec.addImage(characters[data[n].character]["right"][data[n].id]..".png", "%"..n, characters[data[n].character]["x"], characters[data[n].character]["y"])
- else
- id["character"][n]=tfm.exec.addImage(characters[data[n].character]["left"][data[n].id]..".png", "%"..n, characters[data[n].character]["x"], characters[data[n].character]["y"])
- end
- end
- function Mirrored(n,mirror)
- if id["character"][n] then tfm.exec.removeImage(id["character"][n]) id["character"][n]=nil end
- id["character"][n]=tfm.exec.addImage(characters[data[n].character][mirror][data[n].id]..".png", "%"..n, characters[data[n].character]["x"], characters[data[n].character]["y"])
- end
- function magic(n)
- ui.addTextArea(20, "", n, 8, 27, 104, 18, 0x142b2e, 0x8a583c, 1, true)
- if p[n].magic > 0 then
- ui.addTextArea(21, "", n, 10, 29, p[n].magic, 14, 0x176eb0, 0x176eb0, 1, true)
- else
- ui.removeTextArea(21,n)
- end
- ui.addTextArea(22, "<p align='center'><b><J>"..p[n].magic.."%", n, 8, 27, 100, 18, 0x000000, 0x000000, 0, true)
- end
- chances={1,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,4,4,5}
- function eventKeyboard(n,k,d,x,y)
- if k==2 then
- p[n].right=true
- p[n].left=true
- if not mouse[n] and started then
- Mirrored(n,"right")
- end
- elseif k==0 then
- p[n].right=false
- p[n].left=false
- if not mouse[n] and started then
- Mirrored(n,"left")
- end
- end
- if play and started then
- if (k==32 or k==3) and p[n].timestamp<os.time()-1000 and not tfm.get.room.playerList[n].isDead and data[n].max[data[n].attack]>0 then
- data[n].max[data[n].attack]=data[n].max[data[n].attack]-1
- p[n].objectid=tfm.exec.addShamanObject(items[data[n].attack].id,x+(p[n].right and data[n].x[data[n].attack] or -data[n].x[data[n].attack]),y+data[n].y[data[n].attack],p[n].right and items[data[n].attack].angle or -items[data[n].attack].angle,p[n].right and 30 or -30)
- p[n].timestamp=os.time()
- table.insert(toDespawn,{os.time(),p[n].objectid})
- if p[n].magic < 100 then
- if p[n].magic >= 96 then
- p[n].magic=p[n].magic+1
- else
- p[n].magic=p[n].magic+chances[math.random(#chances)]
- end
- end
- magic(n)
- elseif k==85 and p[n].timestamp<os.time()-1000 and not tfm.get.room.playerList[n].isDead and data[n].skills["arrow"].can==true and data[n].skills["arrow"].max>0 then
- data[n].skills["arrow"].max=data[n].skills["arrow"].max-1
- p[n].timestamp=os.time()
- p[n].objectid=tfm.exec.addShamanObject(35,x+(p[n].right and 15 or -15),y+0,p[n].right and 0 or 180,p[n].right and 25 or -25)
- table.insert(toDespawn,{os.time(),p[n].objectid})
- elseif k==72 and p[n].timestamp<os.time()-1000 and not tfm.get.room.playerList[n].isDead and data[n].skills["snowball"].can==true and data[n].skills["snowball"].max>0 then
- data[n].skills["snowball"].max=data[n].skills["snowball"].max-1
- p[n].timestamp=os.time()
- tfm.exec.addShamanObject(34,x+(p[n].right and 15 or -15),y,0,p[n].right and 20 or -20)
- tfm.exec.addShamanObject(34,x+(p[n].right and 15 or -15),y+30,0,p[n].right and 20 or -20)
- tfm.exec.addShamanObject(34,x+(p[n].right and 15 or -15),y-30,0,p[n].right and 20 or -20)
- elseif k==66 and p[n].timestamp<os.time()-1000 and not tfm.get.room.playerList[n].isDead and data[n].skills["bombs"].can==true and data[n].skills["bombs"].max>0 then
- data[n].skills["bombs"].max=data[n].skills["bombs"].max-1
- p[n].timestamp=os.time()
- ui.timerImage("161197ad4f2",x-20,y-30,nil,true,5)
- elseif k==17 and p[n].magic==100 and not tfm.get.room.playerList[n].isDead then
- p[n].magic=0
- for i=1,60 do
- tfm.exec.displayParticle(41,x,y-6*i)
- end
- for k in pairs(tfm.get.room.playerList) do
- if data[n].guild_table~=data[k].guild_table and not tfm.get.room.playerList[k].isDead then
- tfm.exec.explosion(p[k].x,p[k].y+30,80,40,false)
- tfm.exec.displayParticle(12,p[k].x,p[k].y+30)
- end
- end
- if data[n].badges[5]=="1622a220aa8.png" then
- newBadge(n,"1622a220aa8.png",5)
- end
- magic(n)
- ui.timerImage(circles[math.random(#circles)],235,45,n,5)
- elseif items[k] and data[n].inGuild and not tfm.get.room.playerList[n].isDead then
- data[n].attack=k
- for i in pairs(items) do
- if i==k then
- data[n].alpha[i]=true
- else
- data[n].alpha[i]=false
- end
- end
- end
- end
- end
- function eventPlayerDied(n)
- if play then
- local t = {ft = 0, st = 0, ls = 0, bp = 0}
- if data[n].inGuild then
- closeAttackBoard(n)
- data[n].losses=data[n].losses+1
- for n,p in pairs(tfm.get.room.playerList) do
- if not p.isDead then
- t[data[n].guild_table] = t[data[n].guild_table] + 1
- end
- end
- local team = {}
- for k,v in pairs(t) do
- if v ~= 0 then
- team[#team+1] = k
- end
- if #team > 1 then
- break
- end
- end
- if #team == 1 then
- Win(team[1])
- end
- end
- end
- end
- function close(n,guild,shop,profile,help,badge,list)
- open[n]=false
- if guild then
- closeGuilds(n)
- end
- if shop then
- closeShop(n)
- end
- if profile then
- closeProfile(n)
- end
- if help then
- closeHelp(n)
- end
- if badge then
- closeBadge(n)
- end
- if list then
- closeCharacters(n)
- end
- end
- function Guilds(n)
- close(n,true,true,true,true,true,true)
- ui.addTextArea(1, "", n, 270, 91, 260, 217, 0x142b2e, 0x8a583c, 1, true)
- ui.addTextArea(2, "<a href='event:ft'><b><font color='#cc0000'><p align='center'>"..text[n].join, n, 278, 170, 74, 20, 0x2c555c, 0x936240, 1, true)
- ui.addTextArea(3, "<a href='event:ls'><b><font color='#6cff73'><p align='center'>"..text[n].join, n, 450, 275, 74, 20, 0x2c555c, 0x936240, 1, true)
- ui.addTextArea(4, "<a href='event:st'><b><font color='#f9c944'><p align='center'>"..text[n].join, n, 278, 275, 74, 20, 0x2c555c, 0x936240, 1, true)
- ui.addTextArea(5, "<a href='event:bp'><b><font color='#b6deff'><p align='center'>"..text[n].join, n, 450, 170, 74, 20, 0x2c555c, 0x936240, 1, true)
- ui.addTextArea(6, "<R><b><a href='event:guild_close'><p align='center'>"..text[n].closebutton, n, 347, 316, 100, 20, 0x142b2e, 0x8a583c, 1, true)
- id["logo1"][n]=tfm.exec.addImage(guilds["bp"].logo, "&1", 465, 105, n)
- id["logo2"][n]=tfm.exec.addImage(guilds["ft"].logo, "&1", 284, 105, n)
- id["logo3"][n]=tfm.exec.addImage(guilds["ls"].logo, "&1", 465, 214, n)
- id["logo4"][n]=tfm.exec.addImage(guilds["st"].logo, "&1", 284, 214, n)
- end
- function Guild(n)
- close(n,true,true,true,true,true,true)
- open[n]=true
- ui.addTextArea(1, "", n, 294, 66, 212, 267, 0x142b2e, 0x8a583c, 1, true)
- ui.addTextArea(2, "", n, 294, 66, 75, 74, 0x2c555c, 0x8a583c, 1, true)
- ui.addTextArea(3, "<p align='center'><J>"..text[n].wins.." : <V>"..guilds[data[n].guild_table].wins.."\n<J>"..text[n].losses.." : <V>"..guilds[data[n].guild_table].losses.."\n<J>"..text[n].members.." : <V>"..guilds[data[n].guild_table].membersNumber.." ("..string.format(text[n].inRoom,guilds[data[n].guild_table].inRoomMembers)..")\n<J>"..text[n].rounds.." :<V> "..guilds[data[n].guild_table].rounds.."\n<J>"..text[n].stats.." : <V>"..guilds[data[n].guild_table].stats.."%\n\n", n, 305, 158, 188, 83, 0x142b2e, 0x8a583c, 1, true)
- ui.addTextArea(4, "<p align='center'><b><a href='event:members'><BV>"..text[n].members.."</a>\n\n<p align='center'><b><a href='event:leave'><R>"..text[n].leave.."</a>", n, 305, 258, 188, 67, 0x142b2e, 0x8a583c, 1, true)
- ui.addTextArea(5, "\n<b><font size='15'><p align='center'>"..guilds[data[n].guild_table].name, n, 379, 66, 126, 74, 0x2c555c, 0x8a583c, 1, true)
- ui.addTextArea(6, "<R><a href='event:guild_close'><b><p align='center'>"..text[n].closebutton, n, 351, 341, 100, 20, 0x142b2e, 0x8a583c, 1, true)
- id["logo"][n]=tfm.exec.addImage(guilds[data[n].guild_table].logo, "&1", 302, 77, n)
- end
- function Characters(n)
- close(n,true,true,true,true,true,true)
- ui.addTextArea(63, "", n, 299, 114, 202, 172, 0x47707d, 0x000000, 1, true)
- ui.addTextArea(64, "<p align='center'><font size='22' face='Soopafresh'><a href='event:"..names[p[n].id].."'>"..characters[names[p[n].id]].name.."</a></font></p>", n, 300, 115, 200, 170, 0x193542, 0x47707d, 1, true)
- ui.addTextArea(65, "", n, 304, 250, 32, 27, 0x47707d, 0x000000, 1, true)
- ui.addTextArea(66, "<p align='center'><font size='2'><font size='12'><a href='event:pre'>←", n, 305, 250, 30, 25, 0x38516b, 0x47707d, 1, true)
- ui.addTextArea(67, "", n, 350, 250, 102, 27, 0x47707d, 0x000000, 1, true)
- ui.addTextArea(68, "<p align='center'><font size='2'><font size='12'><a href='event:close_list'>"..text[n].closebutton, n, 350, 250, 100, 25, 0x38516b, 0x47707d, 1, true)
- ui.addTextArea(69, "", n, 465, 250, 32, 27, 0x47707d, 0x000000, 1, true)
- ui.addTextArea(70, "<p align='center'><font size='2'><font size='12'><a href='event:next'>→", n, 466, 250, 30, 25, 0x38516b, 0x47707d, 1, true)
- if p[n].id==1 then
- ui.removeTextArea(66,n)
- ui.removeTextArea(65,n)
- elseif p[n].id==69 then
- ui.removeTextArea(70,n)
- ui.removeTextArea(69,n)
- end
- id["list"][n]=tfm.exec.addImage(characters[names[p[n].id]].left[1], "&1", 365, 165, n)
- end
- function closeCharacters(n)
- for a=63,70 do
- ui.removeTextArea(a,n)
- end
- if id["list"][n] then tfm.exec.removeImage(id["list"][n],n) id["list"][n]=nil end
- end
- function Shop(n)
- close(n,true,true,true,true,true,true)
- open[n]=true
- ui.addTextArea(27, "", n, 230, 74, 340, 251, 0x142b2e, 0x8a583c, 1, true)
- ui.addTextArea(28, "", n, 280, 140, 49, 50, 0x2c555c, 0x936240, 1, true)
- ui.addTextArea(29, "", n, 380, 140, 50, 50, 0x2c555c, 0x936240, 1, true)
- ui.addTextArea(30, "", n, 480, 140, 50, 50, 0x2c555c, 0x936240, 1, true)
- ui.addTextArea(31, "<b><p align='center'><a href='event:skills'>"..text[n].skills.."", n, 191, 112, 30, nil, 0x142b2e, 0x8a583c, 1, true)
- ui.addTextArea(32, "<p align='center'><b>"..data[n].coins.." $", n, 191, 37, 100, 27, 0x142b2e, 0x8a583c, 1, true)
- ui.addTextArea(33, "<p align='center'><b><r><a href='event:closeshop'>X", n, 192, 74, 30, 28, 0x142b2e, 0x8a583c, 1, true)
- if data[n].maxx[49]~=30 then
- ui.addTextArea(34, "<b><p align='center'><a href='event:+cannon'>+", n, 290, 285, 25, 25, 0x2c555c, 0x936240, 1, true)
- end
- if data[n].maxx[50]~=25 then
- ui.addTextArea(35, "<b><p align='center'><a href='event:+plank'>+", n, 390, 285, 25, 25, 0x2c555c, 0x936240, 1, true)
- end
- if data[n].maxx[51]~=10 then
- ui.addTextArea(36, "<b><p align='center'><a href='event:+anvil'>+", n, 490, 285, 25, 25, 0x2c555c, 0x936240, 1, true)
- end
- ui.addTextArea(37, "<b><p align='center'>3 $", n, 275, 230, 50, 25, 0x324650, 0x000000, 0, true)
- ui.addTextArea(38, "<b><p align='center'>4 $", n, 375, 230, 50, 25, 0x324650, 0x000000, 0, true)
- ui.addTextArea(39, "<b><p align='center'>5 $", n, 475, 230, 50, 25, 0x324650, 0x000000, 0, true)
- ui.addTextArea(40, "<b><p align='center'>"..data[n].maxx[49].."\n30", n, 282, 84, 50, 40, 0x324650, 0x000000, 0, true)
- ui.addTextArea(41, "<b><p align='center'>"..data[n].maxx[50].."\n25", n, 382, 84, 50, 40, 0x324650, 0x000000, 0, true)
- ui.addTextArea(42, "<b><p align='center'>"..data[n].maxx[51].."\n10", n, 482, 84, 50, 40, 0x324650, 0x000000, 0, true)
- id["shop1"][n]=tfm.exec.addImage("1611e2cb8a3.png", "&1", 480, 140, n)
- id["shop2"][n]=tfm.exec.addImage("1611e2ce0e0.png", "&1", 285, 148, n)
- id["shop3"][n]=tfm.exec.addImage("1611e2cf8f7.png", "&1", 380, 165, n)
- end
- function ShopSkills(n)
- close(n,true,true,true,true,true,true)
- open[n]=true
- ui.addTextArea(27, "", n, 230, 74, 340, 251, 0x142b2e, 0x8a583c, 1, true)
- ui.addTextArea(28, "", n, 380, 128, 49, 84, 0x2c555c, 0x936240, 1, true)
- ui.addTextArea(29, "", n, 273, 151, 60, 27, 0x2c555c, 0x936240, 1, true)
- ui.addTextArea(30, "", n, 480, 140, 50, 50, 0x2c555c, 0x936240, 1, true)
- ui.addTextArea(31, "<b><p align='center'><a href='event:shop'>"..text[n].items.."", n, 191, 112, 30, nil, 0x142b2e, 0x8a583c, 1, true)
- ui.addTextArea(32, "<p align='center'><b>"..data[n].coins.." $", n, 191, 37, 100, 27, 0x142b2e, 0x8a583c, 1, true)
- ui.addTextArea(33, "<p align='center'><b><r><a href='event:closeshop'>X", n, 192, 74, 30, 28, 0x142b2e, 0x8a583c, 1, true)
- if not data[n].skills["arrow"].can then
- ui.addTextArea(34, "<b><p align='center'><a href='event:arrow'><BV>"..text[n].buy.."", n, 280, 285, nil, 25, 0x2c555c, 0x936240, 1, true)
- end
- if not data[n].skills["snowball"].can then
- ui.addTextArea(35, "<b><p align='center'><a href='event:snowball'><BV>"..text[n].buy.."", n, 380, 285, nil, 25, 0x2c555c, 0x936240, 1, true)
- end
- if not data[n].skills["bombs"].can then
- ui.addTextArea(36, "<b><p align='center'><a href='event:bombs'><BV>"..text[n].buy.."", n, 480, 285, nil, 25, 0x2c555c, 0x936240, 1, true)
- end
- ui.addTextArea(37, "<b><p align='center'>15 $", n, 275, 230, 50, 25, 0x324650, 0x000000, 0, true)
- ui.addTextArea(38, "<b><p align='center'>30 $", n, 375, 230, 50, 25, 0x324650, 0x000000, 0, true)
- ui.addTextArea(39, "<b><p align='center'>50 $", n, 475, 230, 50, 25, 0x324650, 0x000000, 0, true)
- id["shop1"][n]=tfm.exec.addImage("1611e2d13e8.png", "&3", 271, 157, n)
- id["shop2"][n]=tfm.exec.addImage("1611e2d2618.png", "&1", 392, 136, n)
- id["shop3"][n]=tfm.exec.addImage("161197ad4f2.png", "&2", 484, 145, n)
- end
- function Profile(n,p)
- close(n,true,true,true,true,true,true)
- open[n]=true
- ui.addTextArea(44, "", n, 149, 54, 502, 292, 0x47707d, 0x000000, 1, true)
- if data[p].inGuild then
- ui.addTextArea(45, "<p align='center'><b><font size='22' face='Soopafresh'>"..nameTagFormat(p,22,"N","V").."</font></b>\n<font size='22' face='Soopafresh'>"..guilds[data[p].guild_table].name.."</font></b></p>\n\n", n, 150, 54, 500, 290, 0x193542, 0x47707d, 1, true)
- else
- ui.addTextArea(45, "<p align='center'><b><font size='22' face='Soopafresh'>"..nameTagFormat(p,22,"N","V").."</font></b>", n, 150, 54, 500, 290, 0x193542, 0x47707d, 1, true)
- end
- ui.addTextArea(46, "", n, 565, 130, 75, 75, 0x0b161c, 0x0b161c, 1, true)
- ui.addTextArea(47, "", n, 398, 316, 202, 22, 0x47707d, 0x000000, 1, true)
- ui.addTextArea(48, "<p align='center'><a href='event:close_profile'>"..text[n].closebutton, n, 400, 318, 200, 20, 0x38516b, 0x47707d, 1, true)
- ui.addTextArea(49, "", n, 341, 245, 301, 60, 0x0b161c, 0x0b161c, 1, true)
- ui.addTextArea(50, "<font size='15'>"..text[n].wins.." : "..data[p].wins.."\n\n"..text[n].losses.." : "..data[p].losses.."\n\n"..text[n].rounds.." : "..data[p].rounds.."", n, 343, 123, 205, 100, 0x193542, 0x193542, 1, true)
- if n==p then
- ui.addTextArea(51, "<p align='center'><b>Cannon</b></p>\n\n<font color='#193542'>000</color><V><b>Offset X: </b><N>"..data[p].x[49].." <CH>[<a href='event:49x+'>+</a>] [<a href='event:49x-'>-</a>] [<a href='event:49dx'>D</a>]\n<font color='#193542'>000</color><V><b>Offset Y: </b><N>"..data[p].y[49].." <CH>[<a href='event:49y+'>+</a>] [<a href='event:49y-'>-</a>] [<a href='event:49dy'>D</a>]\n<p align='center'><N><b>Plank</b></p>\n\n<font color='#193542'>000</color><V><b>Offset X: </b><N>"..data[p].x[50].." <CH>[<a href='event:50x+'>+</a>] [<a href='event:50x-'>-</a>] [<a href='event:50dx'>D</a>]\n<font color='#193542'>000</color><V><b>Offset Y: </b><N>"..data[p].y[50].." <CH>[<a href='event:50y+'>+</a>] [<a href='event:50y-'>-</a>] [<a href='event:50dy'>D</a>]\n<p align='center'><N><b>Anvil</b></p>\n\n<font color='#193542'>000</color><V><b>Offset X: </b><N>"..data[p].x[51].." <CH>[<a href='event:51x+'>+</a>] [<a href='event:51x-'>-</a>] [<a href='event:51dx'>D</a>]\n<font color='#193542'>000</color><V><b>Offset Y: </b><N>"..data[p].y[51].." <CH>[<a href='event:51y+'>+</a>] [<a href='event:51y-'>-</a>] [<a href='event:51dy'>D</a>]\n", n, 155, 82, 167, 256, 0x193542, 0x193542, 0, true)
- else
- ui.addTextArea(51, "<p align='center'><b>Cannon</b></p>\n<font color='#193542'>000</color><V><b>Offset X: </b><N>"..data[p].x[49].." \n<font color='#193542'>000</color><V><b>Offset Y: </b><N>"..data[p].y[49].."\n<p align='center'><b>Plank</b></p>\n<font color='#193542'>000</color><V><b>Offset X: </b><N>"..data[p].x[50].." \n<font color='#193542'>000</color><V><b>Offset Y: </b><N>"..data[p].y[50].." \n<p align='center'><b>Anvil</b></p>\n<font color='#193542'>000</color><V><b>Offset X: </b><N>"..data[p].x[51].." \n<font color='#193542'>000</color><V><b>Offset Y: </b><N>"..data[p].y[51].." \n", n, 155, 82, 167, 256, 0x193542, 0x193542, 0, true)
- end
- id["shop1"][n]=tfm.exec.addImage("1611e2cb8a3.png", "&1", 260, 207, n)
- id["shop2"][n]=tfm.exec.addImage("1611e2ce0e0.png", "&2", 270, 80, n)
- id["shop3"][n]=tfm.exec.addImage("1611e2cf8f7.png", "&3", 260, 158, n)
- id["badge5"][n]=tfm.exec.addImage(data[p].badges[5], "&4", 580, 250, n)
- id["badge4"][n]=tfm.exec.addImage(data[p].badges[4], "&5", 520, 250, n)
- id["badge3"][n]=tfm.exec.addImage(data[p].badges[3], "&6", 460, 250, n)
- id["badge2"][n]=tfm.exec.addImage(data[p].badges[2], "&7", 400, 250, n)
- id["badge1"][n]=tfm.exec.addImage(data[p].badges[1], "&8", 340, 250, n)
- id["primage"][n]=tfm.exec.addImage(characters[data[p].character]["left"][data[p].id]..".png", "&9", 565, 130, n)
- end
- function newBadge(n,badge,bn)
- close(n,true,true,true,true,true,true)
- ui.addTextArea(59, "", n, 309, 119, 182, 162, 0x47707d, 0x000000, 1, true)
- ui.addTextArea(60, "<p align='center'><font face='Soopafresh' size='13'>"..text[n].newbadge, n, 310, 120, 180, 160, 0x193542, 0x47707d, 1, true)
- ui.addTextArea(61, "", n, 334, 248, 132, 22, 0x47707d, 0x000000, 1, true)
- ui.addTextArea(62, "<p align='center'><font size='2'><font size='12'><a href='event:close_badge'>"..text[n].closebutton, n, 335, 248, 130, 20, 0x38516b, 0x47707d, 1, true)
- data[n].badges[bn]=badge
- id["badge"][n]=tfm.exec.addImage(data[n].badges[bn], "&1", 375, 175, n)
- end
- function closeBadge(n)
- for a=59,62 do
- ui.removeTextArea(a,n)
- end
- if id["badge"][n] then tfm.exec.removeImage(id["badge"][n],n) id["badge"][n]=nil end
- end
- function Help(n,g,c,r)
- close(n,true,true,true,true,true,true)
- open[n]=true
- ui.addTextArea(54, "", n, 189, 39, 422, 350, 0x47707d, 0x000000, 1, true)
- if g then
- ui.addTextArea(52, "<p align='center'><a href='event:commands'>"..text[n].commandsbutton, n, 87, 120, 100, 23, 0x193542, 0x193542, 1, true)
- ui.addTextArea(58, "<p align='center'><a href='event:credits'>"..text[n].creditsbutton, n, 87, 170, 100, 23, 0x193542, 0x193542, 1, true)
- ui.addTextArea(53, "<p align='center'>"..text[n].gameplaybutton, n, 87, 70, 100, 23, 0x193542, 0x47707d, 1, true)
- ui.addTextArea(55, "", n, 190, 39, 420, 348, 0x193542, 0x47707d, 1, true)
- id["help"][n]=tfm.exec.addImage("1622c48a5a2.png", "&1", 202, 51, n)
- elseif c then
- ui.addTextArea(52, "<p align='center'>"..text[n].commandsbutton, n, 87, 120, 100, 23, 0x193542, 0x47707d, 1, true)
- ui.addTextArea(53, "<p align='center'><a href='event:gameplay'>"..text[n].gameplaybutton, n, 87, 70, 100, 23, 0x193542, 0x193542, 1, true)
- ui.addTextArea(58, "<p align='center'><a href='event:credits'>"..text[n].creditsbutton, n, 87, 170, 100, 23, 0x193542, 0x193542, 1, true)
- ui.addTextArea(55, text[n].commands, n, 190, 39, 420, 348, 0x193542, 0x47707d, 1, true)
- else
- ui.addTextArea(52, "<p align='center'><a href='event:commands'>"..text[n].commandsbutton, n, 87, 120, 100, 23, 0x193542, 0x193542, 1, true)
- ui.addTextArea(53, "<p align='center'><a href='event:gameplay'>"..text[n].gameplaybutton, n, 87, 70, 100, 23, 0x193542, 0x193542, 1, true)
- ui.addTextArea(58, "<p align='center'>"..text[n].creditsbutton, n, 87, 170, 100, 23, 0x193542, 0x47707d, 1, true)
- ui.addTextArea(55, text[n].credits, n, 190, 39, 420, 348, 0x193542, 0x47707d, 1, true)
- end
- ui.addTextArea(56, "", n, 199, 360, 222, 22, 0x47707d, 0x000000, 1, true)
- ui.addTextArea(57, "<p align='center'><font size='2'><font size='12'><a href='event:close_help'>"..text[n].closebutton, n, 200, 360, 220, 20, 0x38516b, 0x47707d, 1, true)
- end
- function closeHelp(n)
- for a=52,58 do
- ui.removeTextArea(a,n)
- end
- if id["help"][n] then tfm.exec.removeImage(id["help"][n],n) id["help"][n]=nil end
- open[n]=false
- end
- function closeProfile(n)
- for a=44,51 do
- ui.removeTextArea(a,n)
- end
- for k,v in pairs({"shop1","shop2","shop3","badge1","badge2","badge3","badge4","badge5","primage"}) do
- if id[v][n] then tfm.exec.removeImage(id[v][n],n) id[v][n]=nil end
- end
- open[n]=false
- end
- function plus(n,id,cns)
- data[n].maxx[id]=data[n].maxx[id]+1
- data[n].max[id]=data[n].max[id]+1
- data[n].coins=data[n].coins-cns
- Shop(n)
- end
- function buy(n,id,cns)
- data[n].skills[id].can=true
- data[n].coins=data[n].coins-cns
- ShopSkills(n)
- end
- function xy(n,xy,id,thing)
- data[n][xy][id]=thing
- Profile(n,n)
- end
- function closeGuilds(n)
- for a=1,6 do
- ui.removeTextArea(a,n)
- end
- for k,v in pairs({"logo","logo1","logo2","logo3","logo4"}) do
- if id[v][n] then tfm.exec.removeImage(id[v][n],n) id[v][n]=nil end
- end
- open[n]=false
- end
- function closeShop(n)
- for a=27,42 do
- ui.removeTextArea(a,n)
- end
- for k,v in pairs({"shop1","shop2","shop3"}) do
- if id[v][n] then tfm.exec.removeImage(id[v][n],n) id[v][n]=nil end
- end
- open[n]=false
- end
- function eventTextAreaCallback(ids,n,cb)
- if guilds[cb] then
- data[n].inGuild=true
- guilds[cb]["members"][n]=true
- data[n].guild=guilds[cb].name
- data[n].guild_table=cb
- guilds[cb].membersNumber=guilds[cb].membersNumber+1
- guilds[cb].inRoomMembers=guilds[cb].inRoomMembers+1
- guilds[cb].inRoom[n]=true
- Guild(n)
- if data[n].badges[1]=="1622a220aa8.png" then
- newBadge(n,"1622a220aa8.png",1)
- end
- elseif characters[cb] then
- Character(n,cb)
- elseif cb=="members" then
- if guilds[data[n].guild_table].membersNumber~=guilds[data[n].guild_table].inRoomMembers then
- tfm.exec.chatMessage("<N>"..text[n].gm.." :-\n<J>"..table.concat(guilds[data[n].guild_table].inRoom," <BL>-<J> ",tostring).."<BL> - "..table.concat(guilds[data[n].guild_table].notInRoom," - ",tostring),n)
- else
- tfm.exec.chatMessage("<N>"..text[n].gm.." :-\n<J>"..table.concat(guilds[data[n].guild_table].inRoom," <BL>-<J> ",tostring),n)
- end
- elseif cb=="guild_close" then
- closeGuilds(n)
- elseif cb=="leave" then
- data[n].inGuild=false
- guilds[data[n].guild_table].members[n]=nil
- guilds[data[n].guild_table].membersNumber=guilds[data[n].guild_table].membersNumber-1
- guilds[data[n].guild_table].inRoomMembers=guilds[data[n].guild_table].inRoomMembers-1
- guilds[data[n].guild_table].notInRoom[n]=nil
- guilds[data[n].guild_table].inRoom[n]=nil
- data[n].guild="No Guild Yet."
- closeGuilds(n)
- Guilds(n)
- if play then
- tfm.exec.killPlayer(n)
- end
- elseif cb=="49x+" and data[n].x[49] <= items[49].max_x then
- xy(n,"x",49,data[n].x[49]+1)
- elseif cb=="49x-" and -items[49].max_x2 <= data[n].x[49] then
- xy(n,"x",49,data[n].x[49]-1)
- elseif cb=="49dx" then
- xy(n,"x",49,15)
- elseif cb=="50x+" and data[n].x[50] <= items[50].max_x then
- xy(n,"x",50,data[n].x[50]+1)
- elseif cb=="50x-" and -items[50].max_x2 <= data[n].x[50] then
- xy(n,"x",50,data[n].x[50]-1)
- elseif cb=="50dx" then
- xy(n,"x",50,70)
- elseif cb=="51x+" and data[n].x[51] <= items[51].max_x then
- xy(n,"x",51,data[n].x[51]+1)
- elseif cb=="51x-" and -items[51].max_x2 <= data[n].x[51] then
- xy(n,"x",51,data[n].x[51]-1)
- elseif cb=="51dx" then
- xy(n,"x",51,15)
- elseif cb=="49y+" and data[n].y[49] <= items[49].max_y then
- xy(n,"y",49,data[n].y[49]+1)
- elseif cb=="49y-" and -items[49].max_y <= data[n].y[49] then
- xy(n,"y",49,data[n].y[49]-1)
- elseif cb=="49dy" then
- xy(n,"y",49,0)
- elseif cb=="50y+" and data[n].y[50] <= items[50].max_y then
- xy(n,"y",50,data[n].y[50]+1)
- elseif cb=="50y-" and -items[50].max_y <= data[n].y[50] then
- xy(n,"y",50,data[n].y[50]-1)
- elseif cb=="50dy" then
- xy(n,"y",50,-3)
- elseif cb=="51y+" and data[n].y[51] <= items[51].max_y then
- xy(n,"y",51,data[n].y[51]+1)
- elseif cb=="51y-" and -items[51].max_y <= data[n].y[51] then
- xy(n,"y",51,data[n].y[51]-1)
- elseif cb=="51dy" then
- xy(n,"y",51,0)
- elseif cb=="close_profile" then
- closeProfile(n)
- elseif cb=="close_badge" then
- closeBadge(n)
- elseif cb=="guild" then
- if data[n].inGuild then
- Guild(n)
- else
- Guilds(n)
- end
- elseif cb=="+cannon" and data[n].maxx[49]~=30 and data[n].coins>=3 then
- plus(n,49,3)
- elseif cb=="+plank" and data[n].maxx[50]~=25 and data[n].coins>=4 then
- plus(n,50,4)
- elseif cb=="+anvil" and data[n].maxx[51]~=10 and data[n].coins>=5 then
- plus(n,51,5)
- if data[n].maxx[51]==10 and data[n].badges[3]=="1622a220aa8.png" then
- newBadge(n,"1622a21c76a.png",3)
- end
- elseif cb=="closeshop" then
- closeShop(n)
- elseif cb=="shop" then
- Shop(n)
- elseif cb=="profile" then
- Profile(n,n)
- elseif cb=="skills" then
- ShopSkills(n)
- elseif cb=="arrow" and data[n].coins>=15 and data[n].skills["arrow"].can==false then
- buy(n,"arrow",15)
- elseif cb=="snowball" and data[n].coins>=30 and data[n].skills["snowball"].can==false then
- buy(n,"snowball",30)
- elseif cb=="bombs" and data[n].coins>=50 and data[n].skills["bombs"].can==false then
- buy(n,"bombs",50)
- if data[n].badges[4]=="1622a220aa8.png" then
- newBadge(n,"1622a220aa8.png",4)
- end
- elseif cb=="commands" then
- Help(n,false,true,false)
- elseif cb=="gameplay" then
- Help(n,true,false,false)
- elseif cb=="credits" then
- Help(n,false,false,true)
- elseif cb=="close_help" then
- closeHelp(n)
- elseif cb=="help" then
- Help(n,true,false,false)
- elseif cb=="characters" then
- Characters(n)
- elseif cb=="next" and p[n].id~=69 then
- p[n].id=p[n].id+1
- Characters(n)
- elseif cb=="pre" and p[n].id~=1 then
- p[n].id=p[n].id-1
- Characters(n)
- elseif cb=="close_list" then
- p[n].id=1
- closeCharacters(n)
- end
- end
- function eventLoop(time,remaining)
- if (guilds["ft"].inRoomMembers > 0 and guilds["st"].inRoomMembers > 0) or (guilds["ft"].inRoomMembers > 0 and guilds["ls"].inRoomMembers > 0) or (guilds["st"].inRoomMembers > 0 and guilds["ls"].inRoomMembers > 0) or (guilds["ls"].inRoomMembers > 0 and guilds["bp"].inRoomMembers > 0) or (guilds["bp"].inRoomMembers > 0 and guilds["ft"].inRoomMembers > 0) or (guilds["bp"].inRoomMembers > 0 and guilds["st"].inRoomMembers > 0) then
- play=true
- else
- play=false
- end
- for i,v in pairs(maps) do
- if v.code==map and time >= 3000 and not started then
- started=true
- end
- end
- if remaining<=0 then
- if play then
- newMap()
- else
- tfm.exec.newGame("@6984945")
- end
- end
- for i,cannon in ipairs(toDespawn) do
- if cannon[1] <= os.time()-1500 then
- tfm.exec.removeObject(cannon[2])
- table.remove(toDespawn,i)
- end
- end
- for n in pairs(tfm.get.room.playerList) do
- if open[n] then
- for k,v in pairs({"emt1","emt2"}) do
- if id[v][n] then tfm.exec.removeImage(id[v][n],n) id[v][n]=nil end
- end
- else
- if data[n].inGuild and play and started and not tfm.get.room.playerList[n].isDead then
- attackBoard(n)
- end
- end
- data[n].timer=data[n].timer+0.5
- if not mouse[n] then
- if data[n].timer==60 then
- if data[n].id~=characters[data[n].character]["ids"] then
- data[n].id=data[n].id+1
- Character(n,data[n].character)
- else
- data[n].id=1
- Character(n,data[n].character)
- end
- data[n].timer=0
- end
- end
- end
- end
- function loop(fnc, ticks)
- local s = 1000/ticks
- local timers = {}
- for t = 0, 1000 - s, s do
- system.newTimer(function () table.insert(timers, system.newTimer(fnc, 1000, true)) end, 1000 + t, false)
- end
- return timers
- end
- loop(function()
- for n in next,tfm.get.room.playerList do
- p[n].x=tfm.get.room.playerList[n].x
- p[n].y=tfm.get.room.playerList[n].y
- end
- end, 5)
- function eventChatCommand(n,cmd)
- local c={}
- for i in cmd:gmatch('[^%s]+') do
- table.insert(c,i)
- end
- c[1]=c[1]:lower()
- local found,index=table.find(characters,cmd:lower(),"name",string.lower)
- if found then
- local character=characters[index]
- data[n].id=1
- Character(n,index)
- end
- if c[1]=="guild" then
- if data[n].inGuild then
- Guild(n)
- else
- Guilds(n)
- end
- elseif c[1]=="shop" then
- Shop(n)
- elseif c[1]=="lang" then
- text[n]=lang[c[2]] or text[n]
- elseif c[1]=="map" and n=="Bodykudo#0000" then
- newMap()
- elseif c[1]=="help" then
- Help(n,true,false,false)
- elseif c[1]=="random" then
- data[n].id=1
- Character(n,names[math.random(#names)])
- elseif c[1]=="mouse" then
- mouse[n]=true
- tfm.exec.chatMessage(text[n].mouse,n)
- elseif c[1]=="characters" or c[1]=="list" then
- Characters(n)
- elseif c[1]=="profile" then
- if c[2] then
- if data[c[2]] then
- Profile(n,c[2])
- end
- else
- Profile(n,n)
- end
- end
- end
- for i=1,#c do
- system.disableChatCommandDisplay(c[i],true)
- end
- if play then
- newMap()
- else
- tfm.exec.newGame("@6984945")
- end
- table.foreach(tfm.get.room.playerList,eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement