Advertisement
Sossia

[Minigame] Hungry - News Updates

Oct 29th, 2018
941
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 36.44 KB | None | 0 0
  1. --[[
  2. About: Hungry is a game where the player must collect cheeses countless times, the game is still in development and some other things will be added to the games. The best players (who collected the most cheeses) are in the top 10.
  3. Created by: Sossia#6280
  4. Status: Under development
  5. Translations: BR,EN,ES,FR
  6. ]]--
  7. -- Important variables
  8. Player_in_room = 1
  9. Live_players = 1
  10. Rounds = 0
  11. -- Tables
  12. deleteObjectShaman = {}
  13. maps = {'<C><P H="800" L="1600" /><Z><S><S X="923" L="3000" Y="806" H="51" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="66" L="128" Y="806" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="382" L="128" Y="806" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="702" L="128" Y="806" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="1015" L="128" Y="806" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="951" L="3000" Y="661" H="51" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="1361" L="128" Y="806" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="214" L="128" Y="661" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="538" L="128" Y="661" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="867" L="128" Y="661" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="1200" L="128" Y="661" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="1519" L="128" Y="661" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="1363" L="10" Y="717" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="1429" L="10" Y="749" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="824" L="10" Y="609" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="991" L="3000" Y="520" H="51" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="1" L="128" Y="520" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="366" L="128" Y="520" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="704" L="128" Y="520" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="1040" L="128" Y="520" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="1366" L="128" Y="520" H="52" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="21" L="10" Y="759" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="371" L="520" Y="366" H="41" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="1061" L="520" Y="366" H="41" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="630" L="10" Y="470" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="803" L="10" Y="470" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="711" L="10" Y="406" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /></S><D><T X="368" Y="343" /><F X="1065" Y="344" /><DS X="58" Y="757" /><DC X="108" Y="770" /></D><O /></Z></C>','<C><P /><Z><S><S X="239" L="42" Y="396" H="234" P="0,0,0.3,0.2,90,0,0,0" T="8" /><S X="832" L="200" Y="113" H="87" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="799" L="200" Y="396" H="87" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="22" L="200" Y="396" H="87" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="582" L="42" Y="396" H="234" P="0,0,0.3,0.2,90,0,0,0" T="8" /><S X="415" L="200" Y="396" H="87" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="-33" L="200" Y="113" H="87" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="66" L="42" Y="91" H="234" P="0,0,0.3,0.2,90,0,0,0" T="8" /><S X="734" L="42" Y="92" H="234" P="0,0,0.3,0.2,90,0,0,0" T="8" /><S X="607" L="21" Y="109" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="192" L="21" Y="109" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="329" L="21" Y="314" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="499" L="21" Y="314" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="500" L="21" Y="271" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="498" L="21" Y="214" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="498" L="21" Y="160" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="494" L="21" Y="73" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="329" L="21" Y="271" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="327" L="21" Y="214" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="328" L="21" Y="160" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="328" L="21" Y="73" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="418" L="255" Y="313" H="10" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="418" L="255" Y="270" H="10" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="412" L="255" Y="161" H="10" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="412" L="255" Y="214" H="10" P="0,0,0.3,0.2,0,0,0,0" T="8" /></S><D><T X="762" Y="354" /><T X="46" Y="352" /><F X="755" Y="65" /><F X="27" Y="66" /><DS X="455" Y="341" /><DC X="455" Y="345" /></D><O /></Z></C>','<C><P L="1200" /><Z><S><S X="869" L="555" Y="145" H="42" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="197" L="155" Y="421" H="85" P="0,0,0.3,0.2,20,0,0,0" T="6" /><S X="441" L="300" Y="394" H="42" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="101" L="200" Y="377" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="428" L="32" Y="394" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="741" L="120" Y="394" H="35" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="494" L="555" Y="245" H="42" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="520" L="30" Y="322" H="10" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="65" L="888" Y="142" H="42" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="753" L="32" Y="243" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="520" L="32" Y="245" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="600" L="10" Y="142" H="47" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="205" L="200" Y="245" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="1031" L="25" Y="407" H="32" P="0,0,0,1.2,0,0,0,0" T="2" /><S X="-9" L="345" Y="143" H="45" P="0,0,0.3,0.2,40,0,0,0" T="6" /><S X="503" L="200" Y="142" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="573" L="32" Y="394" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="219" L="32" Y="142" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="826" L="10" Y="142" H="47" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="923" L="200" Y="142" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="1176" L="155" Y="347" H="555" P="0,0,0,0.2,40,0,0,0" T="1" /></S><D><T X="781" Y="376" /><F X="948" Y="110" /><DS X="23" Y="335" /><DC X="24" Y="333" /></D><O /></Z></C>','<C><P L="1200" /><Z><S><S X="197" L="155" Y="421" H="85" P="0,0,0.3,0.2,20,0,0,0" T="6" /><S X="441" L="300" Y="394" H="42" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="98" L="200" Y="379" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="446" L="32" Y="396" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="741" L="120" Y="394" H="35" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="494" L="555" Y="245" H="42" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="445" L="30" Y="310" H="10" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="65" L="888" Y="142" H="42" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="753" L="32" Y="243" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="520" L="32" Y="245" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="606" L="10" Y="142" H="47" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="205" L="200" Y="245" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="512" L="200" Y="140" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="954" L="196" Y="80" H="344" P="0,0,,,,0,0,0" T="9" /><S X="219" L="32" Y="142" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="29" L="200" Y="100" H="51" P="0,0,0.3,0.2,90,0,0,0" T="6" N="" /><S X="955" L="200" Y="243" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="953" L="199" Y="-52" H="13" P="0,0,0,20,0,0,0,0" T="3" /></S><D><T X="781" Y="376" /><F X="544" Y="112" /><DS X="23" Y="335" /><DC X="24" Y="333" /></D><O /></Z></C>','<C><P /><Z><S><S X="197" L="155" Y="421" H="85" P="0,0,0.3,0.2,20,0,0,0" T="6" /><S X="441" L="300" Y="394" H="42" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="101" L="200" Y="377" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="428" L="32" Y="394" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="741" L="120" Y="394" H="35" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="494" L="555" Y="245" H="42" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="520" L="30" Y="322" H="10" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="65" L="888" Y="142" H="42" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="753" L="32" Y="243" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="520" L="32" Y="245" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="606" L="10" Y="142" H="47" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="205" L="200" Y="245" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="-9" L="345" Y="143" H="45" P="0,0,0.3,0.2,40,0,0,0" T="6" /><S X="503" L="200" Y="142" H="51" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="573" L="32" Y="394" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /><S X="219" L="32" Y="142" H="45" P="0,0,0.3,0.2,0,0,0,0" T="6" N="" /></S><D><T X="781" Y="376" /><F X="524" Y="109" /><DS X="23" Y="335" /><DC X="24" Y="333" /></D><O /></Z></C>','<C><P /><Z><S><S X="12" L="24" Y="79" H="444" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="27" L="54" Y="288" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="269" L="54" Y="275" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="450" L="54" Y="275" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="271" L="45" Y="275" H="184" P="0,0,0.3,0.2,40,0,0,0" T="8" /><S X="635" L="54" Y="223" H="26" P="0,0,0.3,0.2,-50,0,0,0" T="0" /><S X="466" L="45" Y="91" H="184" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="467" L="54" Y="169" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="500" L="10" Y="169" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="436" L="10" Y="169" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="309" L="54" Y="169" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="342" L="10" Y="169" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="276" L="10" Y="169" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="74" L="22" Y="70" H="255" P="0,0,0.3,0.2,-40,0,0,0" T="0" N="" /><S X="161" L="10" Y="158" H="10" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="261" L="54" Y="82" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="451" L="45" Y="275" H="184" P="0,0,0.3,0.2,40,0,0,0" T="8" /><S X="635" L="45" Y="223" H="184" P="0,0,0.3,0.2,40,0,0,0" T="8" /><S X="262" L="45" Y="80" H="184" P="0,0,0.3,0.2,40,0,0,0" T="8" /><S X="28" L="54" Y="136" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" /></S><D><T X="183" Y="55" /><F X="45" Y="128" /><DS X="38" Y="122" /><DC X="42" Y="134" /></D><O /></Z></C>','<C><P /><Z><S><S X="11" L="47" Y="229" H="72" P="0,0,0,1.2,40,0,0,0" T="2" /><S X="441" L="615" Y="371" H="52" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="12" L="24" Y="79" H="444" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="27" L="54" Y="288" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="161" L="54" Y="371" H="54" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="139" L="10" Y="112" H="35" P="0,0,20,0.2,40,0,0,0" T="4" /><S X="65" L="225" Y="177" H="10" P="0,0,0,0.2,130,0,0,0" T="1" /><S X="456" L="54" Y="260" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="362" L="15" Y="75" H="10" P="0,0,0.3,0.2,40,0,0,0" T="0" /><S X="147" L="10" Y="100" H="15" P="0,0,20,0.2,-50,0,0,0" T="4" /><S X="257" L="54" Y="260" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="581" L="444" Y="84" H="15" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="63" L="22" Y="190" H="255" P="0,0,0.3,0.2,-140,0,0,0" T="0" N="" /><S X="349" L="26" Y="80" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="361" L="54" Y="371" H="54" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="561" L="54" Y="371" H="54" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="721" L="54" Y="371" H="54" P="0,0,0.3,0.2,0,0,0,0" T="0" /><S X="643" L="54" Y="260" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="458" L="615" Y="221" H="52" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="354" L="54" Y="182" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="568" L="54" Y="182" H="26" P="0,0,0.3,0.2,0,0,0,0" T="0" N="" /><S X="816" L="79" Y="350" H="101" P="0,0,0,1.2,40,0,0,0" T="2" /><S X="802" L="54" Y="357" H="54" P="0,0,0.3,0.2,-50,0,0,0" T="0" /><S X="840" L="73" Y="303" H="66" P="0,0,0.3,0.2,0,0,0,0" T="0" /></S><D><T X="779" Y="75" /><F X="50" Y="38" /><DS X="34" Y="261" /><DC X="40" Y="258" /></D><O /></Z></C>','<C><P F="3" /><Z><S><S X="348" L="999" Y="439" H="124" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="401" L="10" Y="233" H="238" P="1,0,0.3,0.2,0,0,0,0" T="0" /><S X="400" L="10" Y="233" H="238" P="1,0,0.3,0.2,-90,0,0,0" T="0" /><S X="668" L="276" Y="233" H="26" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="136" L="276" Y="233" H="26" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="41" L="80" Y="226" H="37" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="759" L="80" Y="226" H="37" P="0,0,0.3,0.2,0,0,0,0" T="6" /></S><D><T X="780" Y="208" /><F X="28" Y="201" /></D><O><O C="12" X="402" P="0" Y="236" /></O></Z></C>','<C><P F="3" /><Z><S><S X="348" L="999" Y="439" H="124" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="401" L="10" Y="233" H="238" P="1,0,0.3,0.2,0,0,0,0" T="0" /><S X="400" L="10" Y="233" H="238" P="1,0,0.3,0.2,-90,0,0,0" T="0" /><S X="668" L="276" Y="233" H="26" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="136" L="276" Y="233" H="26" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="271" L="10" Y="136" H="30" P="0,0,0,0.2,0,0,0,0" T="1" /><S X="41" L="80" Y="226" H="37" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="759" L="80" Y="226" H="37" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="136" L="276" Y="147" H="26" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="234" L="80" Y="140" H="37" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="140" L="276" Y="67" H="26" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="40" L="80" Y="65" H="37" P="0,0,0.3,0.2,0,0,0,0" T="6" /></S><D><T X="780" Y="208" /><F X="266" Y="44" /></D><O><O C="12" X="402" P="0" Y="236" /></O></Z></C>','<C><P F="3" /><Z><S><S X="348" L="999" Y="439" H="124" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="401" L="10" Y="233" H="238" P="1,0,0.3,0.2,0,0,0,0" T="0" /><S X="400" L="10" Y="233" H="238" P="1,0,0.3,0.2,-90,0,0,0" T="0" /><S X="668" L="276" Y="233" H="26" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="136" L="276" Y="233" H="26" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="41" L="80" Y="226" H="37" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="759" L="80" Y="226" H="37" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="403" L="10" Y="234" H="238" P="1,0,0.3,0.2,-40,0,0,0" T="0" /><S X="402" L="10" Y="235" H="238" P="1,0,0.3,0.2,-140,0,0,0" T="0" /><S X="142" L="276" Y="130" H="26" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="241" L="80" Y="129" H="37" P="0,0,0.3,0.2,0,0,0,0" T="6" /><S X="675" L="276" Y="134" H="26" P="0,0,0.3,0.2,0,0,0,0" T="8" /><S X="572" L="80" Y="129" H="37" P="0,0,0.3,0.2,0,0,0,0" T="6" /></S><D><F X="39" Y="42" /><DS X="464" Y="355" /><T X="784" Y="75" /></D><O><O C="12" X="402" P="0" Y="236" /></O></Z></C>'}
  14. Data = {} -- Data player
  15. Cheeses = {} -- Cheeses name
  16. Namez = {} -- Names
  17.  
  18. -- Translations = BR, EN, ES, FR
  19. translations = {br = {Achievement = "Conquistas", CheeseCollected = "Queijos coletados", JumpLimites = "<R>Você atingiu o limite de saltos nesta rodada.", DoublePoints = "Pontos Duplos", GamePlayed = "Partidas Jogadas", Item = "Item Conquistado", Help = "<J>Faminto? Colete o máximo de queijos que puder até o final da partida. Os melhores ficam no top 10", OneWins = "<ROSE>Não houve vencedores na partida", PlayerDie = "<R>Opa! Você morreu</R>", PlayerWon = "<V>Bom trabalho! Corra o tempo está passando!</V>", PlayerWonRound = "<VP>Bom trabalho!! Você ganhou a partida", Profile = "Perfil", UnlockTitle = "<VP>Você adquiriu o título:</VP>", YouStuck = "<R>Nãão! Colocaram você numa armadilha!</R><br><V>A cada 2x que você se abaixa você danifica a armadilha! Faça isso até que a barra de carregamento fique cheia!</V>", YourTitle = "<VP>Seus títulos são:<br>", Round = "Rodada", WinnerRound = "<V>é o vencedor da partida!", Jump = "Saltos", Titles = {Addicted = "Viciado", DelaySide = "Atrasa lado", NumberOne = "N° 1", Hungry = "Faminto", Top10 = "O top 10", }, Achievements = {Addicted = "<p align='center'><font size='12'><b><VP>Título - Viciado</VP></b></font></p>\nJogue 50 partidas", DelaySide = "<p align='center'><font size='12'><b><VP>Título - Atrasa Lado</VP></b></font></p>\nFique abaixo do 5° lugar 20 vezes", DoublePoints = "<p align='center'><font size='10'><b><V>Pontos Duplos</V></b></font></p>\nDesbloqueie o título N° 1", Jump = "<p align='center'><font size='10'><b><V>Salto/Jump</V></b></font></p>\nJogue 100 partidas", NumberOne = "<p align='center'><font size='12'><b><VP>Título - N°1</VP></b></font></p>Fique em 1° lugar no top 10, 5 vezes", Hungry = "<p align='center'><font size='12'><b><VP>Título - Faminto</VP></b></font></p>\nColete 1000 queijos", Top10 = "<p align='center'><font size='12'><b><VP>Título - The Top 10</VP></b></p></font>\nFique no top 10, 20 vezes", }, }, en = {Achievement = "Achievements", CheeseCollected = "Collected cheeses", JumpLimites = "<R>You've reached the jumping limit in this round.", DoublePoints = "Double Points", GamePlayed = "Played Games", Item = "Achievement", Help = "<J>Hungry? Collect as many cheeses as you can until the end of the game! The best will stay in the Top 10", OneWins = "<ROSE>There were no winners in the match", PlayerDie = "<R>Oops, you died", PlayerWon = "<V>Good job, run time is passing!", PlayerWonRound = "<VP>Good job !! You won the match", Profile = "Profile", UnlockTitle = " <VP>You have acquired the title:</VP>", YouStuck = "<R>Oh no! You're stuck!!</R><br><V>Every 2x you press the [↓] button you damage the trap! Do this until the loading bar is full!</V>", YourTitle = "<VP>Here’s your titles:<br>", Round = "Round", WinnerRound = "<V>It's the winner of the round!", Jump = "Jump", Titles = {Addicted = "Addicted", DelaySide = "Delay Side", NumberOne = "N° 1", Hungry = "Hungry", Top10 = "The top 10", }, Achievements = {Addicted = "<p align='center'><font size='11'><b><VP>Title - Addicted</VP></b></font></p>\nPlay 50 matches.", DelaySide = "<p align='center'><font size='11'><b><VP>Title - Delay Side</VP></b></p></font>\nStay below 5th place in the top 10, 20 times", DoublePoints = "<p align='center'><font size='13'><b><V>Double Points</V></b></p></font>\nGet first in the top 10, 5 times", Jump = "<p align='center'><font size='13'><b><V>Jumps</V></b></p></font>\nPlay 100 matches", NumberOne = "<p align='center'><font size='13'><b><VP>Title - N° 1</VP></b></p></font>\nGet first in the top 10, 5 times", Hungry = "<p align='center'><font size='11'><b><VP>Title - Hungry</VP></b></font></p>\nCollect 1000 cheeses", Top10 = "<p align='center'><font size='12'><b><VP>Title - The Top 10</VP></b></p></font>\nBe in the top 10, 10 times", }, }, es = {Achievement = "Logros", CheeseCollected = "Quesos recolectados", DoublePoints = " Puntos dobles", GamePlayed = "Juegos jugados", Item = "Artículo adquirido", Help = "<J>Hambriento? Recoge todos los quesos que puedas hasta el final del juego! Los mejores se quedarán en el Top 10.", OneWins = "<ROSE>No hubo ganadores en el partido", PlayerDie = "<R>Vaya, te moriste", PlayerWon = "<V>Buen trabajo, el tiempo de ejecución está pasando!", PlayerWonRound = "<VP>Buen trabajo! Has ganado el partido", Perfil = "Perfil", Round = "Salida", UnlockTitle = "<VP>Has adquirido el título:</VP>", YouStuck = "<R>Opa, te colocaste en una trampa!</R><br><V>Cada 2x que presione el botón [↓] daña la trampa! Haga esto hasta que la barra de carga esté llena!</V>", YourTitle = "<VP>Aquí están tus títulos:<br>", WinnerRound = "<V>es el ganador del partido!", Jump = "Pulos", Titles = {Addicted = "Addicted", DelaySide = "Delay Side", NumberOne = "N ° 1", Hungry = "hambriento", Top10 = "El top 10", }, Achievements = {Addicted = "<p align='center'><font size='10'><b><VP>Titulo - Fanático</VP></b></font></p>\nJuega 50 rondas", DelaySide = "<p align='center'><b><VP>Titulo - Perezoso</VP></b></p>Manténgase por debajo del 5° en el top 10, 20 veces", DoublePoints = "<p align='center'><font size='10'><b><V>Double Points</V></b></font></p>\nDesbloquear título N° 1", Jump = "<p align='center'><font size='15'><b><V>Jump</V></b></font></p>\nJugar 100 partidos", NumberOne = "<p align='center'><font size='10'><b><VP>Titulo - Number One</VP></b></p></font>Obtener primero en el top 10, 5 veces", Hungry = "<p align='center'><font size='10'><b><VP>Titulo - Hambriento</VP></b></font></p>\nRecoge 1000 quesos", Top10 = "<p align='center'><font size='10'><b><VP>Titulo - El Top 10</VP></b></font></p>\nEstar en el top 10, 10 veces", }, }, fr = {Achievement = "Réalisations", CheeseCollected = "Fromages collectés", DoublePoints = "Points doubles", GamePlayed = "Jeux joués", Item = "Article acheté", Help = "<J>Faim? Ramassez autant de fromages que vous pouvez jusqu'à la fin du jeu! Les meilleurs resteront dans le Top 10", OneWins = "<ROSE>Il n'y a pas eu de vainqueurs dans le match", PlayerDie = "<R>Oups, vous êtes mort", PlayerWon = "<V>sensationnel, le temps est écoulé!", PlayerWonRound = "<VP>Incroyable! Vous avez gagné le tour", Profile = "Profil", UnlockTitle = "<VP>Vous avez acquis le titre:</VP>", YouStuck = "<R>Oh non! Tu es coincé!!</R><br><V>Chaque fois que vous appuyez deux fois sur le bouton [↓], vous endommagez le piège! Faites-le jusqu'à ce que la barre de chargement soit pleine!</V>", YourTitle = "<VP>Voici vos titres:<br>", Round = "Round", WinnerRound = "<V>C'est le vainqueur du match!", Jump = "Saut", Titles = {Addicted = "Accro", DelaySide = "Retard Side", NumberOne = "N° 1", Hungry = "Affamé", Top10 = "Top 10", }, Achievements = {Addicted = "<p align='center'><font size='14'><b><VP>Titre - Accro</VP></b></font></p>\nJouer 50 tours", DelaySide = "<p align='center'><font size='10'><b><VP>Titre - Retard Side</VP></b></p></font>Restez en dessous de la 5ème place dans le top 10, 20 fois", DoublePoints = "<p align='center'><font size='10'><b><V>Points Doubles</V></b></p>\n</font>Débloquer le titre N° 1", Jump = "<p align='center'><font size='15'><b><V>Sauts</V></b></p>\n</font>Jouer 1000 tours", NumberOne = "<p align='center'><font size='12'><b><VP>Titre - Numéro un</VP></b></p></font>\nRester à la 1ère place dans le top 10, 5 fois", Hungry = "<p align='center'><font size='15'><b><VP>Titre - Affamé</VP></b></p>\n</font>Collectez 1000 fromages", Top10 = "<p align='center'><font size='15'><b><VP>Titre - Top 10</VP></b></p>\n</font>Être dans le top 10, 10 fois", }, }, }
  20.  
  21. -- Disable PhysicalConsumables,AutoTimeLeft,AfkDeath,AutoNewGame.
  22. for _, r in next, {'AfkDeath', 'AutoTimeLeft', 'PhysicalConsumables', 'AutoNewGame', 'AutoShaman'} do
  23.     tfm.exec['disable' .. r]()
  24. end
  25.  
  26.  
  27. -- Event that happens when a player enters the room
  28. eventNewPlayer = function(name)
  29.     Player_in_room = Player_in_room + 1
  30.     Data[name] = {
  31.         Cheeses_collected = 0, -- Cheese collected by the player
  32.         GamesPlayed = 0, -- Number of player games     
  33.         Top10 = 0, -- Whenever a player gets in the top 10 will be counted in his profile
  34.         Reversion = 65,
  35.         Below_fifth_place = 0,
  36.         Language = "", --  Player language (EX: br, en, ru)
  37.         Title = "", -- Titles
  38.         UnlockTitles = {Addicted = false, Hungry = false, Top10 = false, DelaySide = false,},
  39.         Jumped = 0,
  40.         RoomPower = {
  41.             Adrenaline = false,
  42.             Trap = false,
  43.             Jump = false,
  44.             StuckTrap = false,
  45.             Loading = "",
  46.             UnlockTrap = 0,
  47.         },
  48.         MyTitles = {}, -- Data titles
  49.     }  
  50.     Data[name].Language = translations[tfm.get.room.playerList[name].community] and tfm.get.room.playerList[name].community or 'en'
  51.     ui.setMapName("<BL>@".. tfm.get.room.currentMap.." |</BL> <CH>Round "..Rounds.."/10")  
  52.     settingsKeyboard(name)
  53. -- Help, Profile, Achievements and shop
  54.     ui.addTextArea(300, "<p align='center'><a href='event:profile'><PT><b>P</a></p>", name, 691, 373, 30, 18, 0x2a2b2e, 0x2EBA7E, 1, true)
  55.     ui.addTextArea(301, "<p align='center'><a href='event:Achievements'><BV>█</a></p>", name, 733, 373, 20, 18, 0x2a2b2e, 0x2F7FCC, 1, true)
  56.     ui.addTextArea(302, "<p align='center'><a href='event:help'><B><J>H</B></a></p>", name, 765, 373, 30, 18, 0x2a2b2e, 0xBABD2F, 1, true)
  57. end
  58.  
  59. -- Rounds
  60. R = function()
  61.     if Rounds == 11 then
  62.         ui.setMapName("<BL>@".. tfm.get.room.currentMap.." |</BL> <CH>Round <R>"..Rounds.."</R>/10")
  63.         table.sort(Namez, function(a, b)
  64.             return Cheeses[a] > Cheeses[b]
  65.         end);
  66.         if #Namez == 0 then
  67.             for name in pairs(tfm.get.room.playerList) do
  68.                 tfm.exec.chatMessage(translations[Data[name].Language].OneWins.."",name)        
  69.             end
  70.             return;
  71.         end
  72.         --
  73.         text = "<font size='20'><p align='center'><b><VP>Top 10</VP></b></p></font><font size='15'><br>";
  74.         for i = 1, #Namez do
  75.             if i >= 10 then
  76.                  break;
  77.             end        
  78.             text = text ..i.. '<BL>#</BL>' ..Namez[i].. '<br>';
  79.             Data[Namez[i]].Top10 = Data[Namez[i]].Top10 + 1
  80.         end
  81.         --
  82.         for i = 5, #Namez do
  83.             if Namez[i] == nil then
  84.                 break;
  85.             else
  86.                 Data[Namez[i]].Below_fifth_place = Data[Namez[i]].Below_fifth_place + 1;
  87.             end
  88.         end    
  89.         --
  90.         ui.addTextArea(0, "<b><PT>"..text.."", nil, 595, 56, 193, 286, 0x2a2b2e, 0x313a4a, 0.8, true)
  91.         for name in pairs(tfm.get.room.playerList) do
  92.             tfm.exec.chatMessage(""..Namez[1].." "..translations[Data[name].Language].WinnerRound.."",name)    
  93.             Data[name].GamesPlayed = Data[name].GamesPlayed + 1    
  94.         end    
  95.     end
  96.     --
  97.     if Rounds == 1 then
  98.         Namez = {}
  99.         Cheeses = {}
  100.         for name in pairs(tfm.get.room.playerList) do      
  101.             ui.removeTextArea(0,name)
  102.         end
  103.     end
  104.     --
  105.     if Rounds > 11 then
  106.         Rounds = 0
  107.         ui.setMapName("<BL>@".. tfm.get.room.currentMap.." |</BL> <CH>Round "..Rounds.."/10")                  
  108.     end
  109.     if Rounds > 0 and Rounds < 11 then
  110.         for name in pairs(tfm.get.room.playerList) do  
  111.             if Cheeses[name] >= 20 then
  112.                 Data[name].RoomPower.Adrenaline = true
  113.                 tfm.exec.chatMessage("<VI>⚡ Adrenaline mode activated ⚡",name)
  114.                 ui.addTextArea(2018, "", name, 8, 349, Data[name].Reversion, 44, 0x29063b, 0x4c0970, 1, true)
  115.                 ui.addTextArea(2019, "<p align='center'><font color='#29063b'><font size='25'><b>⚡</b></font></font></p>", name, 8, 349, 66, 44, 0x7d419e, 0x7d419e, 0.6, true)
  116.             end
  117.             if Data[name].Reversion <= 0 then
  118.                 Data[name].RoomPower.Adrenaline = false
  119.                 tfm.exec.chatMessage("<VI>⚡ Adrenaline Mode Off ⚡",name)
  120.                 ui.removeTextArea(2018,name)
  121.                 ui.removeTextArea(2019,name)
  122.             end
  123.         end
  124.     end
  125. end
  126.  
  127. -- Event that happens when a player dies
  128. eventPlayerDied = function(name)
  129.     Live_players = Live_players - 1
  130.     tfm.exec.chatMessage(""..translations[Data[name].Language].PlayerDie.."",name)
  131. end
  132.  
  133.  
  134. -- Event Loop
  135. eventLoop = function(current,remaining)
  136.     for _,obj in ipairs(deleteObjectShaman) do
  137.         if obj.time < os.time()-19000 then -- 19s to remove
  138.             tfm.exec.removeObject(obj.id)
  139.             table.remove(deleteObjectShaman,_)
  140.         end
  141.     end
  142.     if Live_players == 0 or remaining <= 00000 then -- If the number of live players = 0 or time = 0
  143.         tfm.exec.newGame(maps[math.random(#maps)])
  144.     end
  145. end
  146.  
  147.  
  148. -- Event happens when a new game starts
  149. eventNewGame = function()
  150.     Rounds = Rounds + 1
  151.     Live_players = Live_players + 1
  152.     for name in pairs(tfm.get.room.playerList) do
  153.         ui.setMapName("<BL>@".. tfm.get.room.currentMap.." |</BL> <CH>Round "..Rounds.."/10")
  154.         tfm.exec.giveTransformations(name,true)    
  155.         Data[name].Reversion = 65
  156.     end
  157.     R()
  158. end
  159.  
  160.  
  161. -- Title function
  162. titles = function(name)
  163.     -- Unlock Title Addicted
  164.     if Data[name].GamesPlayed == 50 and Data[name].UnlockTitles.Addicted == false then
  165.         Data[name].UnlockTitles.Addicted = true
  166.         Data[name].Title = ""..translations[Data[name].Language].Titles.Addicted..""
  167.         table.insert(Data[name].MyTitles,""..translations[Data[name].Language].Titles.Addicted.."")
  168.         tfm.exec.chatMessage(""..translations[Data[name].Language].UnlockTitle.." "..translations[Data[name].Language].Titles.Addicted.."",name)
  169.     end
  170.     -- Unlock Title Hungry
  171.     if Data[name].Cheeses_collected == 1000 and Data[name].UnlockTitles.Hungry == false then
  172.         Data[name].UnlockTitles.Hungry = true
  173.         Data[name].Title = ""..translations[Data[name].Language].Titles.Hungry.."" 
  174.         table.insert(Data[name].MyTitles,""..translations[Data[name].Language].Titles.Hungry.."")  
  175.         tfm.exec.chatMessage(""..translations[Data[name].Language].UnlockTitle.." "..translations[Data[name].Language].Titles.Hungry.."",name)                 
  176.     end
  177.     -- Unlock Title Top 10
  178.     if Data[name].Top10 == 20 and Data[name].UnlockTitles.Top10 == false then
  179.         Data[name].UnlockTitles.Top10 = true
  180.         Data[name].Title = ""..translations[Data[name].Language].Titles.Top10..""
  181.         table.insert(Data[name].MyTitles,""..translations[Data[name].Language].Titles.Top10.."")
  182.         tfm.exec.chatMessage(""..translations[Data[name].Language].UnlockTitle.." "..translations[Data[name].Language].Titles.Top10.."",name)                                                      
  183.     end
  184.     -- Delay Side
  185.     if Data[name].Below_fifth_place == 20 and Data[name].UnlockTitles.DelaySide == false then
  186.         Data[name].UnlockTitles.DelaySide = true
  187.         Data[name].Title = ""..translations[Data[name].Language].Titles.DelaySide..""
  188.         table.insert(Data[name].MyTitles,""..translations[Data[name].Language].Titles.DelaySide.."")
  189.         tfm.exec.chatMessage(""..translations[Data[name].Language].UnlockTitle.." "..translations[Data[name].Language].Titles.DelaySide.."",name)                                                      
  190.     end
  191. end
  192.  
  193.  
  194. -- If the player leaves the room
  195. eventPlayerLeft = function(name)
  196.     Live_players = Live_players - 1
  197.     Player_in_room = Player_in_room - 1
  198. end
  199.  
  200.  
  201. --Event callback
  202. eventTextAreaCallback = function(t,name,link)
  203.     titles(name)
  204.     if link == "profile" then
  205.         ui.addTextArea(100, "", name, 250, 97, 300, 205, 0x2a2b2e, 0x2a2b2e, 1, true)
  206.         ui.addTextArea(101, "<p align='center'>"..name.."</p>", name, 331, 98, 135, 20, 0x2a2b2e, 0x2a2b2e, 1, true)
  207.         ui.addTextArea(102, "<font size='15'><b><p align='center'><a href='event:Close_profile'>X</a>", name, 524, 98, 26, 27, 0x2a2b2e, 0x2a2b2e, 0.9, true)
  208.         ui.addTextArea(103, "<p align='center'>"..translations[Data[name].Language].CheeseCollected.." | "..translations[Data[name].Language].GamePlayed.."</p>", name, 300, 139, 210, 20, 0x313a4a, 0x313a4a, 1, true)
  209.         ui.addTextArea(104, "<p align='center'>"..Data[name].Cheeses_collected.."</p>", name, 255, 181, 135, 20, 0x313a4a, 0x313a4a, 1, true)
  210.         ui.addTextArea(105, "<p align='center'>"..Data[name].GamesPlayed.."</p>", name, 410, 181, 135, 20, 0x313a4a, 0x313a4a, 1, true)
  211.         ui.addTextArea(106, "<p align='center'>Title | Top 10</p>", name, 300, 221, 210, 20, 0x313a4a, 0x313a4a, 1, true)
  212.         ui.addTextArea(107, "<p align='center'>"..Data[name].Title.."</p>", name, 255, 265, 135, 20, 0x313a4a, 0x313a4a, 1, true)
  213.         ui.addTextArea(108, "<a href='event:title_player'><p align='center'><V>[T]</p></a>", name, 368, 265, 24, 21, 0x313a4a, 0x313a4a, 0, true)
  214.         ui.addTextArea(109, "<p align='center'>"..Data[name].Top10.."</p>", name, 410, 265, 135, 20, 0x313a4a, 0x313a4a, 1, true)
  215.     elseif link == [[Close_profile]] then
  216.         for i = 100,109 do --
  217.             ui.removeTextArea(i,name)
  218.         end
  219.     elseif link == [[Achievements]] then
  220.         ui.addTextArea(200, "<p align='center'><font size='20'><CH><B>"..translations[Data[name].Language].Achievement.."</font></p>", name, 171, 59, 458, 282, 0x2a2b2e, 0x2a2b2e, 1, true)
  221.         ui.addTextArea(202, ""..translations[Data[name].Language].Achievements.DelaySide.."", name, 331, 129, 136, 83, 0x313a4a, 0x313a4a, 1, true)
  222.         ui.addTextArea(206, ""..translations[Data[name].Language].Achievements.Jump.."", name, 486, 228, 136, 83, 0x313a4a, 0x313a4a, 1, true)
  223.         ui.addTextArea(207, "<p align='center'><font size='15'><a href='event:close_Achievements'><b><CH>X</R></a></p>", name, 604, 60, 27, 27, 0x324650, 0x000000, 0, true)
  224.         ui.addTextArea(208, "<p align='center'><font size='15'><a href='event:backpage1'><b><CH>◄</R></a></p>", name, 171, 317, 27, 23, 0x324650, 0x000000, 0, true)
  225.         ui.addTextArea(209, "<p align='center'><font size='15'><a href='event:nextpage1'><b><CH>►</R></a></p>", name, 603, 317, 27, 23, 0x324650, 0x000000, 0, true)
  226.         -- Addicted
  227.         if Data[name].UnlockTitles.Addicted == true then
  228.             ui.addTextArea(201, "<p align='center'><b>\n\n"..translations[Data[name].Language].Item.."</b></p>", name, 177, 129, 136, 83, 0x232d3d, 0x313a4a, 1, true)
  229.         else
  230.             ui.addTextArea(201, ""..translations[Data[name].Language].Achievements.Addicted.."", name, 177, 129, 136, 83, 0x313a4a, 0x313a4a, 1, true)
  231.         end
  232.         -- Hungry
  233.         if Data[name].UnlockTitles.Hungry == true then
  234.             ui.addTextArea(204, "<p align='center'><b>\n\n"..translations[Data[name].Language].Item.."</b></p>", name, 177, 228, 136, 83, 0x313a4a, 0x313a4a, 1, true)
  235.         else
  236.             ui.addTextArea(204, ""..translations[Data[name].Language].Achievements.Hungry.."</b></p>", name, 177, 228, 136, 83, 0x313a4a, 0x313a4a, 1, true)
  237.         end
  238.         -- Top 10
  239.         if Data[name].UnlockTitles.Top10 == true then
  240.             ui.addTextArea(205, "<p align='center'><b>\n\n"..translations[Data[name].Language].Item.."</b></p>", name, 331, 228, 136, 83, 0x313a4a, 0x313a4a, 1, true)
  241.         else
  242.             ui.addTextArea(205, ""..translations[Data[name].Language].Achievements.Top10.."", name, 331, 228, 136, 83, 0x313a4a, 0x313a4a, 1, true)    
  243.         end
  244.         -- Number ONE
  245.         if Data[name].UnlockTitles.NumberOne == true then
  246.             ui.addTextArea(203, "<p align='center'><b>\n\n"..translations[Data[name].Language].Item.."</b></p>", name, 486, 129, 136, 83, 0x313a4a, 0x313a4a, 1, true)
  247.         else
  248.             ui.addTextArea(203, ""..translations[Data[name].Language].Achievements.NumberOne.."", name, 486, 129, 136, 83, 0x313a4a, 0x313a4a, 1, true)        
  249.         end    
  250.     elseif link == [[close_Achievements]] then
  251.         for i = 200,212 do --
  252.             ui.removeTextArea(i,name)
  253.         end
  254.     elseif link == [[title_player]] then
  255.         tfm.exec.chatMessage(""..translations[Data[name].Language].YourTitle.."",name)
  256.         tfm.exec.chatMessage(""..table.concat(Data[name].MyTitles,"<br>"),name)
  257.     elseif link == [[help]] then
  258.         tfm.exec.chatMessage(""..translations[Data[name].Language].Help.."",name)
  259.     end
  260. end
  261.  
  262.  
  263. -- Event that happens when a player won
  264. eventPlayerWon = function(name)
  265.     titles(name)
  266.     tfm.exec.respawnPlayer(name)   
  267.     local hasFound = false
  268.     for i = 1, #Namez do
  269.         if Namez[i] == name then
  270.             hasFound = true
  271.             break
  272.         end
  273.     end
  274.  
  275.     if not hasFound then
  276.         table.insert(Namez, name)
  277.     end
  278.     Cheeses[name] = Cheeses[name] and Cheeses[name] + 1 or 1;
  279.     tfm.exec.chatMessage(""..translations[Data[name].Language].PlayerWon.."",name)
  280.     Data[name].Cheeses_collected = Data[name].Cheeses_collected + 1
  281.     Data[name].RoomPower.Trap = false  
  282.     Data[name].RoomPower.UnlockTrap = 0    
  283. end
  284.  
  285. -- Settings keyboard
  286. settingsKeyboard = function(name)
  287.     if k == 32 and tfm.get.room.playerList[name].isFacingRight == true and info[name].time < os.time()-1500 then
  288.         info[name].time = os.time()
  289.         tfm.exec.movePlayer(name,0,0,true,100,0,false)
  290.     elseif k == 32 and tfm.get.room.playerList[name].isFacingRight == false and info[name].time < os.time()-1500 then
  291.         info[name].time = os.time()
  292.         tfm.exec.movePlayer(name,0,0,true,-100,0,false)
  293.     end
  294.     local facingLeft = {} -- Create a table facing left
  295.     for name in pairs(tfm.get.room.playerList) do
  296.         for _,key in pairs{0,2,3,32,38,40,74,75} do
  297.             system.bindKeyboard(name, key, true)
  298.         end
  299.     end
  300. eventKeyboard = function(name, key, down, x, y)
  301.     if key == 32 then
  302.         for b,player in pairs(tfm.get.room.playerList) do
  303.             if name ~= b and x >= player.x - 50 and x <= player.x + 50 and y >= player.y - 50 and y <= player.y + 50 and Data[name].RoomPower.Trap == false then
  304.                 Data[name].RoomPower.Trap = true
  305.                 Data[b].RoomPower.StuckTrap = true
  306.                 tfm.exec.displayParticle(10,x,y,-0.2,-0.2,0,0)
  307.                 obj_id = tfm.exec.addShamanObject(68, player.x, player.y);
  308.                 tfm.exec.chatMessage(""..translations[Data[b].Language].YouStuck.."",b)
  309.                 ui.addTextArea(600, ""..Data[b].RoomPower.Loading.."", b, 313, 370, 166, 19, 0x2a2b2e, 0x313a4a, 1, true)
  310.                 break
  311.             end
  312.             table.insert(deleteObjectShaman,{id=obj_id,time=os.time()}) -- Remove the traps
  313.         end
  314.     elseif key == 40 then
  315.         if Data[name].RoomPower.StuckTrap == true then
  316.             Data[name].RoomPower.UnlockTrap = Data[name].RoomPower.UnlockTrap + 1 if Data[name].RoomPower.UnlockTrap == 2 then Data[name].RoomPower.Loading = "█ █"ui.updateTextArea(600,""..Data[name].RoomPower.Loading.."",name) elseif Data[name].RoomPower.UnlockTrap == 4 then Data[name].RoomPower.Loading = "█ █ █ █"ui.updateTextArea(600,""..Data[name].RoomPower.Loading.."",name) elseif Data[name].RoomPower.UnlockTrap == 6 then Data[name].RoomPower.Loading = "█ █ █ █ █ █"ui.updateTextArea(600,""..Data[name].RoomPower.Loading.."",name) elseif Data[name].RoomPower.UnlockTrap == 8 then Data[name].RoomPower.Loading = "█ █ █ █ █ █ █ █"ui.updateTextArea(600,""..Data[name].RoomPower.Loading.."",name) elseif Data[name].RoomPower.UnlockTrap == 10 then Data[name].RoomPower.Loading = "█ █ █ █ █ █ █ █ █ █"ui.updateTextArea(600,""..Data[name].RoomPower.Loading.."",name) elseif Data[name].RoomPower.UnlockTrap == 12 then Data[name].RoomPower.Loading = "█ █ █ █ █ █ █ █ █ █ █ █"ui.updateTextArea(600,""..Data[name].RoomPower.Loading.."",name) elseif Data[name].RoomPower.UnlockTrap == 14 then Data[name].RoomPower.Loading = "█ █ █ █ █ █ █ █ █ █ █ █ █ █"ui.updateTextArea(600,""..Data[name].RoomPower.Loading.."",name) tfm.exec.movePlayer(name, x + 35, y + 35) ui.removeTextArea(600,name) end
  317.         end
  318.     elseif key == 38 then
  319.         if Data[name].RoomPower.Adrenaline == true then
  320.             tfm.exec.displayParticle(1,x,y,-0.2,-0.2,0,0)
  321.             tfm.exec.movePlayer(name,0,-1,true,0,-49,false)
  322.             Data[name].Reversion = Data[name].Reversion - 5
  323.             R()
  324.         end
  325.     end
  326. end
  327. end
  328. -- Others
  329. ui.setMapName("<BL>@".. tfm.get.room.currentMap.." |</BL> <CH>Round "..Rounds.."/10")  
  330. table.foreach(tfm.get.room.playerList,eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement