Advertisement
Itchyboy

The Boberts Tribe House Code

Oct 1st, 2014
2,128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 49.37 KB | None | 0 0
  1. tfm.exec.setUIMapName('<b><font color="#95D9D6" size="14">ALL HAIL BOB</font></b><textformat blockindent></textformat>')
  2. tfm.exec.setUIShamanName('')
  3. tfm.exec.disableAutoScore(true)
  4. tfm.exec.disableAfkDeath(true)
  5. tfm.exec.disableAutoNewGame(true)
  6. tfm.exec.disableAutoShaman(true)
  7. tfm.exec.newGame('#0')
  8. rune=0
  9. rune2=false
  10. bjoint={}
  11. jointDef={}
  12. joint={}
  13. jtype=0
  14. sban={}
  15. pet={}
  16. speed={}
  17. space=false
  18. val='<C><P L="4800" F="6" /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="773" o="ffffff" H="10" X="4415" Y="174" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="324650" H="242" X="3930" Y="200" T="14" /><S P="0,0,0.3,0.2,0,0,0,0" L="850" o="324650" H="10" X="4340" Y="86" T="14" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="FFFFFF" H="385" X="4805" Y="208" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="873" o="ffffff" H="30" X="4365" Y="386" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="773" o="ffffff" H="10" X="4415" Y="274" T="12" /><S P="0,0,0.3,0.2,27,0,0,0" L="10" o="324650" H="70" X="4785" Y="54" T="14" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" H="30" X="2400" Y="386" T="6" /><S P="0,0,0.3,0.2,0,0,0,0" L="40" H="30" X="3913" Y="386" T="6" /><S H="30" P="0,0,0.3,0.2,0,0,0,0" L="3000" X="1500" Y="386" T="6" /></S><D><P X="4726" P="0,0" Y="372" T="68" /><P X="4565" P="0,0" Y="372" T="68" /><P X="4515" P="0,0" Y="372" T="67" /><P X="4615" P="0,1" Y="372" T="67" /><P X="4676" P="0,0" Y="372" T="67" /><P X="4776" P="0,1" Y="372" T="67" /><P X="4404" P="0,0" Y="372" T="68" /><P X="4354" P="0,0" Y="372" T="67" /><P X="4454" P="0,1" Y="372" T="67" /><P X="4566" P="0,0" Y="232" T="72" /><P X="4260" P="0,0" Y="370" T="69" /><P X="4726" P="0,0" Y="232" T="71" /><P X="4404" P="0,0" Y="332" T="71" /><P X="4565" P="0,0" Y="332" T="73" /><P X="4726" P="0,0" Y="332" T="72" /><P X="4565" P="0,0" Y="270" T="68" /><P X="4726" P="0,0" Y="270" T="68" /><P X="4404" P="0,0" Y="270" T="68" /><P X="4354" P="0,0" Y="270" T="67" /><P X="4454" P="0,1" Y="269" T="67" /><P X="4515" P="0,0" Y="269" T="67" /><P X="4615" P="0,1" Y="269" T="67" /><P X="4675" P="0,0" Y="269" T="67" /><P X="4775" P="0,1" Y="269" T="67" /><P X="4404" P="0,0" Y="232" T="73" /><P X="4268" P="0,0" Y="269" T="75" /><P X="3690" P="0,0" Y="370" T="68" /><P X="3690" P="0,0" Y="330" T="66" /><P X="3640" P="0,0" Y="370" T="67" /><P X="3740" P="0,1" Y="370" T="67" /></D><O /></Z></C>'
  19. mp=0
  20. mx=0
  21. my=0
  22. magnet=false
  23. dxml2='<C><P F="3" /><Z><S><S P="0,0,0.3,0.2,-40,0,0,0" L="130" o="0" H="40" X="48" Y="135" T="12" /><S P="0,0,0.3,0.2,30,0,0,0" X="27" L="215" o="0" H="320" c="2" Y="379" T="12" /><S P="0,0,0.3,0.2,40,0,0,0" X="-22" L="215" o="0" H="396" c="2" Y="375" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" X="37" L="20" o="0" H="10" c="2" Y="168" T="13" /><S P="0,0,0.3,0.2,5,0,0,0" L="20" o="0" H="41" X="318" Y="334" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="135" o="111111" H="10" X="187" Y="166" T="13" /><S P="0,0,0.3,0.2,27,0,0,0" L="150" o="0" H="49" X="271" Y="299" T="12" /><S P="0,0,0.3,0.9,-15,0,0,0" L="37" o="0" H="41" X="422" Y="248" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="130" o="0" H="10" X="197" Y="168" T="13" /><S P="0,0,0.3,0.2,75,0,0,0" L="80" o="0" H="41" X="340" Y="324" T="12" /><S P="0,0,0.3,0.2,-15,0,0,0" L="37" o="d7d7d7" H="41" X="357" Y="311" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="60" o="0" H="10" X="389" Y="286" T="13" /><S P="0,0,0.3,0.2,50,0,0,0" L="20" o="0" H="59" X="376" Y="355" T="12" /><S P="0,0,0.3,0.2,30,0,0,0" L="12" o="0" H="59" X="360" Y="358" T="12" /><S P="0,0,0.3,0.2,15,0,0,0" L="159" o="0" H="46" X="341" Y="238" T="12" /><S P="0,0,0.3,0.2,-15,0,0,0" L="37" o="d7d7d7" H="41" X="322" Y="300" T="12" /><S P="0,0,0.3,0.2,-15,0,0,0" L="37" o="bdbdbd" H="41" X="291" Y="272" T="12" /><S P="0,0,0.3,0.2,-15,0,0,0" L="10" o="c5c5c5" H="41" X="308" Y="304" T="12" /><S P="0,0,0.3,0.2,5,0,0,0" L="10" o="c5c5c5" H="41" X="313" Y="295" T="12" /><S P="0,0,0.3,0.2,50,0,0,0" L="159" o="0" H="46" X="325" Y="217" T="12" /><S P="0,0,0.3,0.2,20,0,0,0" L="159" o="0" H="46" X="300" Y="269" T="12" /><S P="0,0,0.3,0.2,40,0,0,0" L="159" o="0" H="46" X="328" Y="277" T="12" /><S P="0,0,0.3,0.2,-75,0,0,0" L="10" o="0" H="10" X="390" Y="256" T="12" /><S P="0,0,0.3,0.2,-30,0,0,0" L="20" o="0" H="10" X="349" Y="382" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="23" o="0" H="10" X="402" Y="275" T="13" /><S P="0,0,0.3,0.2,0,0,0,0" L="23" o="0" H="10" X="405" Y="282" T="13" /><S P="0,0,0.3,0.2,-75,0,0,0" L="10" o="0" H="10" X="395" Y="263" T="12" /><S P="0,0,0.3,0.2,15,0,0,0" L="10" o="0" H="10" X="400" Y="279" T="12" /><S P="0,0,0.3,0.2,-30,0,0,0" L="20" o="0" H="60" X="239" Y="181" T="12" /><S P="0,0,0.3,0.2,25,0,0,0" L="30" o="0" H="30" X="407" Y="297" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="34" o="0" H="10" X="266" Y="189" T="13" /><S P="0,0,0.3,0.2,-75,0,0,0" L="20" o="0" H="60" X="247" Y="160" T="12" /><S P="0,0,0.3,0.2,15,0,0,0" L="20" o="0" H="41" X="283" Y="204" T="12" /><S P="0,0,0.3,0.2,-100,0,0,0" L="30" o="ffffff" H="30" X="248" Y="177" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="30" o="ffffff" H="10" X="266" Y="189" T="13" /><S P="0,0,0.3,0.2,-75,0,0,0" L="15" o="ffffff" H="10" X="281" Y="212" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="21" o="f696de" H="10" X="272" Y="194" T="13" /><S P="0,0,0.3,0.2,0,0,0,0" L="19" o="e24bbb" H="10" X="273" Y="194" T="13" /><S P="0,0,0.3,0.2,0,0,0,0" L="17" o="9c0977" H="10" X="273" Y="195" T="13" /><S P="0,0,0.3,0.2,0,0,0,0" L="14" o="700e57" H="10" X="274" Y="195" T="13" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="400030" H="10" X="279" Y="198" T="13" /><S P="0,0,0.3,0.2,-30,0,0,0" L="10" o="400030" H="10" X="281" Y="190" T="12" /><S P="0,0,0.3,0.2,-45,0,0,0" H="160" L="40" o="cfc477" X="81" c="2" N="" Y="48" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="16" o="ffffff" H="10" X="267" Y="175" T="13" /><S P="0,0,0.3,0.2,-55,0,0,0" L="10" o="ffffff" H="10" X="275" Y="209" T="12" /><S P="0,0,0.3,0.2,-58,0,0,0" H="160" L="40" o="f8efac" X="95" c="2" N="" Y="31" T="12" /><S P="0,0,0.3,0.2,-75,0,0,0" X="123" L="18" o="0" H="50" c="2" N="" Y="116" T="12" /><S P="0,0,0,0.2,0,0,0,0" X="-238" L="477" o="6a7495" H="800" c="1" Y="300" T="12" /><S P="0,0,0,0.2,180,0,0,0" X="50" L="70" o="6a7495" H="30" c="2" N="" Y="-14" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="800" H="10" X="400" Y="405" T="0" /></S><D><P X="194" P="0,0" Y="471" T="49" /><F Y="80" X="693" /><T Y="227" X="374" /><DS Y="208" X="372" /><P X="432" P="0,0" Y="247" T="55" /><P X="387" P="0,0" Y="384" T="45" /><P X="447" P="0,0" Y="69" T="43" /><P X="424" P="0,0" Y="256" T="55" /><P X="436" P="0,0" Y="276" T="71" /><P X="413" P="0,1" Y="257" T="21" /></D><O /></Z></C>'
  24. popx=0
  25. popy=0
  26. perm=0
  27. xml=''
  28. dxml='<C><P F="3" /><Z><S><S H="12" P="0,0,0.3,0.2,180,0,0,0" L="22" o="0" X="104" Y="144" T="12" /><S H="50" P="0,0,0.3,0.2,-160,0,0,0" L="112" o="0" X="467" Y="226" T="12" /><S H="20" P="0,0,0.3,0.2,120,0,0,0" L="42" o="0" X="90" Y="136" T="12" /><S H="10" P="0,0,0.3,0.2,-40,0,0,0" L="42" o="0" X="738" Y="63" T="12" /><S H="35" P="0,0,0.3,0.2,30,0,0,0" L="42" o="0" X="449" Y="221" T="12" /><S H="25" P="0,0,0.3,0.2,160,0,0,0" L="80" o="0" X="124" Y="126" T="12" /><S H="15" P="0,0,0.3,0.2,140,0,0,0" L="35" o="0" X="169" Y="93" T="12" /><S H="48" P="0,0,0.3,0.2,30,0,0,0" L="123" o="0" X="356" Y="139" T="12" /><S H="70" P="0,0,0.3,0.2,0,0,0,0" L="60" o="0" X="375" Y="192" T="12" /><S H="66" P="0,0,0.3,0.2,-120,0,0,0" L="119" o="0" X="404" Y="163" T="12" /><S H="20" P="0,0,0.3,0.2,80,0,0,0" L="59" o="0" X="344" Y="192" T="12" /><S H="75" P="0,0,0.3,0.2,-155,0,0,0" L="64" o="0" X="354" Y="263" T="12" /><S H="42" P="0,0,0.3,0.2,170,0,0,0" L="76" o="0" X="199" Y="116" T="12" /><S H="13" P="0,0,0.3,0.2,-60,0,0,0" L="70" o="0" X="149" Y="176" T="12" /><S H="65" P="0,0,0.3,0.2,-30,0,0,0" L="60" o="0" X="392" Y="220" T="12" /><S H="55" P="0,0,0.3,0.2,-50,0,0,0" L="38" o="0" X="162" Y="125" T="12" /><S H="50" P="0,0,0.3,0.2,150,0,0,0" L="101" o="0" X="276" Y="89" T="12" /><S H="141" P="0,0,0.3,0.2,160,0,0,0" L="68" o="0" X="317" Y="184" T="12" /><S H="26" P="0,0,0.3,0.2,60,0,0,0" L="52" o="0" X="146" Y="141" T="12" /><S H="110" P="0,0,0.3,0.2,150,0,0,0" L="99" o="0" X="262" Y="248" T="12" /><S H="44" P="0,0,0.3,0.2,120,0,0,0" L="220" o="0" X="254" Y="164" T="12" /><S H="65" P="0,0,0.3,0.2,-150,0,0,0" L="114" o="0" X="337" Y="95" T="12" /><S H="11" P="0,0,0.3,0.2,-70,0,0,0" L="41" o="0" X="719" Y="89" T="12" /><S H="44" P="0,0,0.3,0.2,-185,0,0,0" L="87" o="0" X="549" Y="241" T="12" /><S H="15" P="0,0,0.3,0.2,-280,0,0,0" L="48" o="0" X="719" Y="125" T="12" /><S H="10" P="0,0,20,0.2,70,0,0,0" L="31" o="ff" X="708" Y="144" T="12" /><S H="35" P="0,0,0.3,0.2,-220,0,0,0" L="81" o="0" X="614" Y="218" T="12" /><S H="28" P="0,0,0.3,0.2,170,0,0,0" L="66" o="0" X="668" Y="189" T="12" /><S H="23" P="0,0,0.3,0.2,-240,0,0,0" L="61" o="0" X="707" Y="164" T="12" /><S H="10" P="0,0,10,0.2,-80,0,0,0" L="281" o="ff" X="265" Y="206" T="12" /><S H="10" P="0,0,10,0.2,-60,0,0,0" L="240" o="ff" X="226" Y="175" T="12" /><S H="10" P="0,0,0.3,0.2,60,0,0,0" L="132" o="ff" X="320" Y="123" T="12" /><S H="10" P="0,0,0.3,0.2,80,0,0,0" L="120" o="ff" X="364" Y="238" T="12" /><S H="17" P="0,0,0.3,0.2,-20,0,0,0" L="19" o="0" X="134" Y="201" T="12" /><S H="10" P="0,0,0,20,-20,0,0,0" L="20" o="ff0000" X="149" Y="114" T="12" /><S H="10" P="0,0,0,0.2,-80,0,0,0" L="40" o="ff" X="372" Y="315" T="12" /><S H="10" P="0,0,20,0.2,-30,0,0,0" L="35" o="ff" X="143" Y="109" T="12" /><S H="10" P="0,0,20,0.2,40,0,0,0" L="174" o="ff" X="362" Y="125" T="12" /><S H="10" P="0,0,0.3,0.2,60,0,0,0" L="93" o="ff" X="439" Y="208" T="12" /><S H="10" P="0,0,20,0.2,-20,0,0,0" L="36" o="ff" X="725" Y="147" T="12" /></S><D><T Y="323" X="221" /><F Y="171" X="119" /><DS Y="203" X="581" /><DC Y="156" X="680" /><P X="387" P="0,0" Y="386" T="45" /></D><O /></Z></C>'
  29. btele={}
  30. bground={}
  31. bsham={}
  32. bpart={}
  33. bexp={}
  34. ntele={}
  35. nground={}
  36. nsham={}
  37. npart={}
  38. nexp={}
  39. deadp=0
  40. players=0
  41. survivor=false
  42. surv={'3685564','787131','2408376','3670885','3620709','3587860','3549404','481676'}
  43. name3=false
  44. name2={}
  45. worship2={}
  46. obj={}
  47. sacr={}
  48. sacrifice=false
  49. worship={}
  50. LongMap='<S P="0,0,0.3,0.2,0,0,0,0" L="10" o="0" H="3000" X="-5" Y="2400" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="0" H="3000" X="2400" Y="2400" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="0" H="10" X="4800" Y="4805" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="0" H="10" X="2400" Y="-5" T="12" /><S P="1,-1,0.3,0.2,0,0,0,0" X="1200" L="2400" o="6a7495" H="3000" c="4" Y="3200" T="12" lua="bg" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="0" H="3000" X="-5" Y="1500" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="0" H="3000" X="4805" Y="1500" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="0" H="3000" X="-5" Y="3300" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="0" H="3000" X="4805" Y="2400" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="0" H="3000" X="4805" Y="3300" T="12" /><S P="1,-1,0.3,0.2,0,0,0,0" H="3000" L="2400" o="6a7495" X="1200" c="4" Y="3300" T="12" lua="bg" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="0" H="10" X="2400" Y="805" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="0" H="10" X="1500" Y="805" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="0" H="10" X="3300" Y="805" T="12" /><S P="1,-1,0.3,0.2,0,0,0,0" H="3000" L="2400" o="6a7495" X="1200" c="4" Y="1500" T="12" lua="bg" /><S P="1,-1,0.3,0.2,0,0,0,0" X="1200" L="2400" o="6a7495" H="3000" c="4" Y="3000" T="12" lua="bg" /><S P="0,0,0.3,0.2,0,0,0,0" c="4" L="10" o="0" H="3000" X="2400" Y="1500" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" H="3000" L="10" o="0" X="2400" c="4" Y="3300" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" X="4805" L="10" o="0" H="3000" c="1" Y="3300" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" H="3000" L="10" o="0" X="4805" c="1" Y="3000" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" X="4805" L="10" o="0" H="3000" c="1" Y="1500" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="0" H="10" X="1500" Y="-5" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="3000" o="0" H="10" X="3300" Y="-5" T="12" /></S><D><DS Y="785" X="2400" /></D><O /></Z></C>'
  51. rp={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37}
  52. time=0
  53. time2=false
  54. ax=825
  55. ay=300
  56. ar=100
  57. help2=0
  58. help=0
  59. doll={}
  60. ban2=false
  61. ban={hi}
  62. objects={}
  63. print2=false
  64. rcolor3=0
  65. rcolor2=false
  66. nadmins={}
  67. worsh2={0,10,20,30,40}
  68. ptype=0
  69. pid={}
  70. rcolor=false
  71. rcolor2=0
  72. dead=false
  73. color2={0xff0000,0x0066ff,0x00ff00,0xff66cc,0xffffff,0xffff00,0xff9900}
  74. gtype=10000
  75. bodyDef = {}
  76. id2={1,2,3,4,5,6,7,10,17,18,19,23,24,28,32,34,35,39,40,45,46,54,57,59,60,61,62,101,102,201,201,203,301,302,401,402,403,1002,2801,2802,2803,2805,2806,2807,65,601,1003,701,1701,1702,602,404,303,1703,103,405,304,205,2808,2809,67,68,69,85}
  77. bl=0
  78. admins={Itchyboy=true, Drblackjack=true, Bobalmighty=true, Cuppycakeyy=true, Roosderp=true, Smrue=true, Laviender=true, Xxpuppylover=true, Tacoyummy=true, Chuichikaru=true}
  79. id={}
  80. function        eventNewPlayer(name)
  81. table.insert(jointDef,name) jointDef[name]={
  82. type=0,
  83. point1=0,
  84. point2=0,
  85. frequency=10,
  86. damping=0.2,
  87. line=10,
  88. color=0xFF6600,
  89. alpha=1,
  90. foreground=false
  91. }
  92. table.insert(joint,name) joint[name]=0
  93. table.insert(bjoint,name) bjoint[name]=false
  94.     table.insert(speed,name) speed[name]={bool=false,num=0}
  95.     table.insert(id,name) id[name]={id,angle,vx,vy,ghost,bool} id[name].bool=false
  96.     table.insert(pid,name) pid[name]={pid,vx,vy,ax,ay,bool} pid[name].bool=false
  97.     table.insert(bodyDef,name) bodyDef[name]={type = 12,width = 60,height = 10,foreground = false,friction =0,restitution = 0.2,angle = 0,miceCollision = true,color=0,groundCollision = false,dynamic = false,fixedRotation = true,mass = 0,linearDamping = 0,angularDamping = 0}
  98.     table.insert(btele,name) table.insert(bground,name) table.insert(bsham,name) table.insert(bpart,name) table.insert(bexp,name)
  99.     btele[name]=false bground[name]=false bsham[name]=false bpart[name]=false bexp[name]=false
  100.     table.insert(ntele,name) table.insert(nground,name) table.insert(nsham,name) table.insert(npart,name) table.insert(nexp,name)
  101.     ntele[name]=0 nground[name]=0 nsham[name]=0 npart[name]=0 nexp[name]=0
  102.     for keys, k in pairs({32,18,40,190,80,77,75,191,48,70,37,39,79,76,73,71,72,74,16,17,83,186,81,85,73,84}) do
  103.     tfm.exec.bindKeyboard(name,k,true,true)
  104.     end
  105. players=players+1
  106.                 system.bindMouse(name)
  107.                 tfm.exec.setPlayerScore(name,200)
  108.                 if name=='Laviender' then Lavi=true end
  109.                 if name=='Drblackjack' then sheep3=true end
  110.                 tfm.exec.respawnPlayer(name)
  111. for i,v in pairs(ban) do tfm.exec.killPlayer(i) end
  112. end
  113.  
  114. for      name,player in pairs(tfm.get.room.playerList)do
  115.          eventNewPlayer(name)
  116. end
  117. function eventPopupAnswer(popid,name,cmd)
  118. if popid==10 then ui.addTextArea(4,'<b><font size="17">'..cmd..'</font><b>',nil,popx-200,popy-200,400,400,0x000001,0xff0000,100) end
  119. end
  120. function pythag(x1,y1,x2,y2,r)
  121. local x=x2-x1
  122. local y=y2-y1
  123. local r=r+r
  124. return x*x+y*y<r*r
  125. end
  126. function eventTextAreaCallback(type,name,callback)
  127. if callback=='Shoot' and not sban[name] then rune=rune+1 rune2=true
  128. elseif callback=='help' then if help==0 then ui.updateTextArea(2,'<font color="#999966">!bob color [color in 0x000000 format]</font> Sets your name color<br><font color="#999966">!bob newmap</font> Makes a randomly generated map</br><br><font color="#999966">!bob setseed [seed]</font> Sets the seed that the map uses when you say !bob newmap</br><br><font color="#999966">!bob makeground [x] [y]</font> Makes ground at the x and y</br><br><font color="#999966">!bob setground [ground type]</font> Sets the ground you make when you say !bob makeground or press U</br>',name) ui.addTextArea(5,'<a href="event:help2">Last</a>',name,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y-90,40,20,0x000001,0x000001,100)
  129.     elseif help==1 then ui.updateTextArea(2,'<b><font color="#999966">!bob setfriction [friction]</font> Sets the friction of the ground you spawn when you say !bob makeground or press U<br><font color="#999966">!bob setbounce [bounciness]</font> Sets the bounciness of the ground you make when you say !bob makeground or press U</br><br><font color="#999966">!bob setgcollision [0 for false, 1 for true]</font> Sets whether grounds and shaman objects touch the ground that you spawn when you say !bob makeground or press U</br></b>',name)
  130.     elseif help==2 then ui.updateTextArea(2,'<b><font color="#999966">!bob setmcollision [0 for false, 1 for true]</font> Sets whether mice touch the ground that you make by saying !bob makeground or pressing U<br><font color="#999966">!bob setdynamic [0 for false, 1 for true]</font> Sets whether the ground that you make is dynamic when you say !bob makeground or press U<br><font color="#999966">!bob setmass [mass]</font> Sets the mass of the ground that you make when you say !bob makeground or press U</br></b>',name)
  131.     elseif help==3 then ui.updateTextArea(2,'<b><font color="#999966">!bob setlength [length]</font> Sets the length of the ground that you make when you say !bob makeground or press U<br><font color="#999966">!bob setheight [height]</font> Sets the height of the ground that you make when you say !bob makeground or press U</font></br><br><font color="#999966">!bob gdefault</font> Sets the ground information back to default</font></br><br><font color="#999966">!bob tpme [x] [y]</font> Teleports you to the x and y</br><br><font color="#999966">!bob cheese</font> Gives you cheese</br></b>',name)
  132.     elseif help==4 then ui.updateTextArea(2,'<b><font color="#999966">!bob vampme</font> Makes you a vampire</b>',name)
  133.     elseif help==5 and admins[name] then ui.updateTextArea(2,'<b><font color="#999966">!bob kill [name]</font> Kills a player<br><font color="#999966">!bob ice [name]</font> Freezes a player</br><br><font color="#999966">!bob tp [name] [x] [y]</font> Teleports a player to the x and y</br><br><font color="#999966">!bob vamp [name]</font> Makes a player a vampire</br><br><font color="#999966">!bob score [score]</font> Sets your score</br><br><font color="#999966">!bob acolor [name] [color in 0x000000 format]</font> Sets the name color of a player</br><br><font color="#999966">!bob rain</font> Makes shaman objects fall</br></b>',name)
  134.     elseif help==6 and admins[name] then ui.updateTextArea(2,'<b><font color="#999966">!bob jx [x]</font> Sets where the shaman objects spawn when you say !bob rain</b>',name)
  135.     end
  136.     help=help+1
  137. elseif callback=='close' then ui.removeTextArea(2,name) ui.removeTextArea(3,name) ui.removeTextArea(4,name) ui.removeTextArea(5,name) help=0
  138. elseif callback=='help2' then if help==1 then ui.updateTextArea(2,'<b><font color="#999966">!bob id [shaman object id] [angle] [velocity x] [velocity y] [0 for solid, 1 for ghost]</font> Sets the shaman object information for when you press P.<br><font color="#999966">!bob printid</font> Shows you all the current shaman object info.</br><br><font color="#999966">!bob pid [particle id]</font> Sets the particle id for what you spawn when you press G.</br><br><font color="#999966">!bob printpid</font> Shows you the current particle id.</br>',name)
  139.     elseif help==2 then ui.updateTextArea(2,'<font color="#999966">!bob color [color in 0x000000]</font> Sets your name color<br><font color="#999966">!bob newmap</font> Makes a randomly generated map</br><br><font color="#999966">!bob setseed [seed]</font> Sets the seed that the map uses when you say !bob newmap</br><br><font color="#999966">!bob makeground [x] [y]</font> Makes ground at the x and y</br><br><font color="#999966">!bob setground [ground type]</font> Sets the ground you make when you say !bob makeground or press U</br>',name)
  140.     elseif help==3 then ui.updateTextArea(2,'<b><font color="#999966">!bob setfriction [friction]</font> Sets the friction of the ground you spawn when you say !bob makeground or press U<br><font color="#999966">!bob setbounce [bounciness]</font> Sets the bounciness of the ground you make when you say !bob makeground or press U</br><br><font color="#999966">!bob setgcollision [0 for false, 1 for true]</font> Sets whether grounds and shaman objects touch the ground that you spawn when you say !bob makeground or press U</br></b>',name)
  141.     elseif help==4 then ui.updateTextArea(2,'<b><font color="#999966">!bob setmcollision [0 for false, 1 for true]</font> Sets whether mice touch the ground that you make by saying !bob makeground or pressing U<br><font color="#999966">!bob setdynamic [0 for false, 1 for true]</font> Sets whether the ground that you make is dynamic when you say !bob makeground or press U<br><font color="#999966">!bob setmass [mass]</font> Sets the mass of the ground that you make when you say !bob makeground or press U</br></b>',name)
  142.     elseif help==5 then ui.updateTextArea(2,'<b><font color="#999966">!bob vampme</font> Makes you a vampire</b>',name)
  143.     elseif help==6 then ui.updateTextArea(2,'<b><font color="#999966">!bob setlength [length]</font> Sets the length of the ground that you make when you say !bob makeground or press U<br><font color="#999966">!bob setheight [height]</font> Sets the height of the ground that you make when you say !bob makeground or press U</font></br><br><font color="#999966">!bob gdefault</font> Sets the ground information back to default</font></br><br><font color="#999966">!bob tpme [x] [y]</font> Teleports you to the x and y</br><font color="#999966">!bob cheese</font> Gives you cheese</br></b>',name)
  144.     elseif help==7 then ui.updateTextArea(2,'<b><font color="#999966">!bob kill [name]</font> Kills a player<br><font color="#999966">!bob ice [name]</font> Freezes a player</br><br><font color="#999966">!bob tp [name] [x] [y]</font> Teleports a player to the x and y</br><br><font color="#999966">!bob vamp [name]</font> Makes a player a vampire</br><br><font color="#999966">!bob score [score]</font> Sets your score</br><br><font color="#999966">!bob acolor [name] [color in 0x000000 format]</font> Sets the name color of a player</br><br><font color="#999966">!bob rain</font> Makes shaman objects fall</br></b>',name)
  145.     end
  146.     help=help-1
  147. elseif callback=='secret' then tfm.exec.newGame(begin)
  148. end
  149. if rune==2 then rune=0 rune2=false ui.updateTextArea(0,'<b><font size="14" color="#FF0000"><a href="event:Shoot">Off</a></font></b>') end
  150. if rune==1 then ui.updateTextArea(0,'<a href="event:Shoot"><b><font size="14" color="#0000FF">On</font></b></a>') end
  151. end
  152. function eventPlayerDied(name)
  153. deadp=deadp+1
  154. if deadp<=players-1 and survivor then for i,v in pairs(tfm.get.room.playerList) do if v.isShaman then tfm.exec.setPlayerScore(i,-1) tfm.exec.newGame(surv[math.random(#surv)]) end end
  155. if tfm.get.room.playerList[name].isShaman then for i,v in pairs(tfm.get.room.playerList) do if not v.isDead and not v.isShaman then tfm.exec.setPlayerScore(i,10,true) tfm.exec.newGame(surv[math.random(#surv)]) end end end end
  156.          for i,player in pairs(tfm.get.room.playerList) do if player.score>0 and not ban[name] and not survivor then tfm.exec.setPlayerScore(name,-10,true) tfm.exec.respawnPlayer(name) end end
  157.          if name==sacr[1] then table.remove(sacr,1)  sacrifice=false end
  158. end
  159. function eventPlayerRespawn(name)
  160.          if dead then tfm.exec.movePlayer(name,dx,dy) end
  161. end
  162. function eventSummoningStart(name,object,x,y,sangle)
  163.          if print2 then print(object) end
  164. end
  165. function longMap(g)
  166.          local longXML='<C><P L="100000000" H="800" G="0,'..g..'" /><Z><S>'
  167.          longXML=longXML..LongMap
  168.          tfm.exec.newGame(longXML)
  169. end
  170. function gDefault(name)
  171. bodyDef[name].width=60 bodyDef[name].height=10 bodyDef[name].dynamic=false bodyDef[name].miceCollision=true bodyDef[name].groundCollision=true bodyDef[name].type=12 bodyDef[name].friction=0 bodyDef[name].restitution=0.3
  172. end
  173. function eventChatCommand(name,cmd)
  174. if not ban[name] then
  175. local args = {}
  176.         for i in cmd:gmatch("%S+") do table.insert(args, i) end
  177.         if (#args > 1 and args[1]=='bob') then
  178. if args[2]=='id' and args[7] then
  179. id[name].id=args[3] id[name].angle=args[4] id[name].vx=args[5] id[name].vy=args[6] if args[7]=='1' then id[name].ghost=true elseif args[7]=='0' then id[name].ghost=false end id[name].bool=true
  180. elseif args[2]=='kill' and args[3] and admins[name] then
  181. tfm.exec.killPlayer(args[3])
  182. elseif args[2]=='color' and args[3] then
  183. tfm.exec.setNameColor(name,args[3])
  184. elseif args[2]=='acolor' and admins[name] and args[4] then
  185. tfm.exec.setNameColor(args[3],args[4])
  186. elseif args[2]=='pid' and args[7] then
  187. pid[name].pid=args[3] pid[name].vx=args[4] pid[name].vy=args[5] pid[name].ax=args[6] pid[name].ay=args[7] pid[name].bool=true
  188. elseif args[2]=='printid' then ptype=ptype+1 if id[name].ghost==false then ui.addPopup(ptype,0,'id: '..id[name].id..' angle: '..id[name].angle..' vx: '..id[name].vx..' vy: '..id[name].vy..' ghost: false',name,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y,100) elseif ghost==true then ui.addPopup(ptype,0,'id: '..id[name].id..' angle: '..id[name].angle..' vx: '..id[name].vx..' vy: '..id[name].vy..' ghost: true',name,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y,100) end
  189. elseif args[2]=='printpid' then ptype=ptype+1 ui.addPopup(ptype,0,'id: '..pid[name].id..' vx: '..pid[name].vx..' vy: '..pid[name].vy..' ax: '..pid[name].ax..' ay: '..pid[name].ay,name,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y,100)
  190. elseif args[2]=='end' and name=='Itchyboy' then system.exit()
  191. elseif args[2]=='tp' and args[3] and args[4] and args[5] and admins[name] then tfm.exec.movePlayer(args[3],args[4],args[5])
  192. elseif args[2]=='tpme' and args[3] and args[4] then tfm.exec.movePlayer(name,args[3],args[4])
  193. elseif args[2]=='jx' and args[3] and admins[name] then jx=args[3]
  194. elseif args[2]=='worship' and admins[name] then table.insert(worship,name) table.insert(worship2,name) if worship2[name]~=1 then worship2[name]=0 end if worship2[name]==0 then worship[name]=true elseif worship2[name]==1 then worship[name]=false end if worship2[name]==0 then worship2[name]=1 elseif worship2[name]==1 then worship2[name]=0 end
  195. elseif args[2]=='vampme' then tfm.exec.setVampirePlayer(name)
  196. elseif args[2]=='vamp' and args[3] and admins[name] then tfm.exec.setVampirePlayer(args[3])
  197. elseif args[2]=='score' and args[3] and admins[name] then tfm.exec.setPlayerScore(name,args[3])
  198. elseif args[2]=='setground' and args[3] then bodyDef[name].type=args[3]
  199. elseif args[2]=='ground' and admins[name] then nground[name]=nground[name]+1 bground[name]=true
  200. elseif args[2]=='setfriction' and args[3] then bodyDef[name].friction=args[3]
  201. elseif args[2]=='setbounce' and args[3] then bodyDef[name].restitution=args[3]
  202. elseif args[2]=='setgcollision' and args[3] then if args[3]=='0' then bodyDef[name].groundCollision=false elseif args[3]=='1' then bodyDef[name].groundCollision=true end
  203. elseif args[2]=='setmcollision' and args[3] then if args[3]=='0' then bodyDef[name].miceCollision=false elseif args[3]=='1' then bodyDef[name].micecollision=true end
  204. elseif args[2]=='setdynamic' and args[3] then if args[3]=='0' then bodyDef[name].dynamic=false elseif args[3]=='1' then bodyDef[name].dynamic=1 end
  205. elseif args[2]=='rcolor' then rcolor3=rcolor3+1 rcolor2=true
  206. elseif args[2]=='setheight' and args[3] then bodyDef[name].height=args[3]
  207. elseif args[2]=='setmass' and args[3] then bodyDef[name].mass=args[3]
  208. elseif args[2]=='setlength' and args[3] then bodyDef[name].width=args[3]
  209. elseif args[2]=='makeground' and args[4] then gtype=gtype+1 tfm.exec.addPhysicObject(gtype,args[3],args[4],bodyDef[name])
  210. elseif args[2]=='gdefault' then gDefault(name)
  211. elseif args[2]=='printobj' and args[3] and name=='Itchyboy' then if args[3]=='on' then print2=true elseif args[3]=='off' then print2=false end
  212. elseif args[2]=='ban' and args[3] and name=='Itchyboy' then table.insert(ban,args[3]) ban[args[3]]=true tfm.exec.killPlayer(args[3])
  213. elseif args[2]=='unban' and name=='Itchyboy' and args[3] then ban[args[3]]=false tfm.exec.respawnPlayer(args[3],200,-300)
  214. elseif args[2]=='doll' and name=='Itchyboy' then table.insert(doll,1,args[3])
  215. elseif args[2]=='help' then ui.addTextArea(2,'<b><font color="#999966">!bob id [shaman object id] [angle] [velocity x] [velocity y] [0 for solid, 1 for ghost]</font> Sets the shaman object information for when you press P.<br><font color="#999966">!bob printid</font> Shows you all the current shaman object info.</br><br><font color="#999966">!bob pid [particle id]</font> Sets the particle id for what you spawn when you press G.</br><br><font color="#999966">!bob printpid</font> Shows you the current particle id.</br>',name,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y-300,200,200,0x000001,0x000001,100) ui.addTextArea(3,'<a href="event:help">Next</a>',name,tfm.get.room.playerList[name].x+170,tfm.get.room.playerList[name].y-90,30,20,0x000001,0x000001,100) ui.addTextArea(4,'<a href="event:close">Close</a>',name,tfm.get.room.playerList[name].x+80,tfm.get.room.playerList[name].y-90,40,20,0x000001,0x000001,100)
  216. elseif args[2]=='longmap' and name=='Itchyboy' and args[3] then longMap(args[3])
  217. elseif args[2]=='mort' and name~=sacr[1] then tfm.exec.killPlayer(name)
  218. elseif args[2]=='meep' then tfm.exec.giveMeep(name)
  219. elseif args[2]=='checkpoint' then for name,player in pairs(tfm.get.room.playerList)do if i==name then dx=player.x dy=player.y end end dead=true
  220. elseif args[2]=='gocheckpoint' then if dead then tfm.exec.movePlayer(name,dx,dy) end
  221. elseif args[2]=='admin' and args[3] and admins[name] then table.insert(admins,args[3]) admins[args[3]]=true
  222. elseif args[2]=='unadmin' and admins[name] and args[3] and args[3]~='Itchyboy' then admins[args[3]]=false
  223. elseif args[2]=='sacrifice' and name=='Itchyboy' and tfm.get.room.currentMap=='@5342349' then table.insert(sacr,args[3]) sacrifice=true if worship[args[3]] then worship[args[3]]=false end
  224. elseif args[2]=='magnet' and args[3] and admins[name] then table.insert(name2,1,args[3]) if args[3]~='nil' then name3=true elseif args[3]=='nil' then name3=false end
  225. elseif args[2]=='bl' and name=='Itchyboy' then bl=0
  226. elseif args[2]=='printxml' and name=='Itchyboy' then if xml:len()<=2000 then print('<b><font color="#FF0000">'..perm..': '..tfm.get.room.currentMap..': </font></b>'..xml:gsub("<","&lt;")) elseif xml:len()>2000 and xml:len()<4000 then print('<b><font color="#FF0000" >'..tfm.get.room.currentMap..':</font></b>'..xml:sub(0,xml:len()/2):gsub('<','&lt;')) print(xml:sub(xml:len()/2+1,xml:len()):gsub('<','&lt;')) elseif xml:len()>4000 and xml:len()<6000 then print('<b><font color="#FF0000" >'..tfm.get.room.currentMap..':</font></b>'..xml:sub(0,xml:len()/4):gsub('<','&lt;')) print(xml:sub(xml:len()/4+1,xml:len()/2):gsub('<','&lt;')) print(xml:sub(xml:len()/2+1,xml:len()*0.75):gsub('<','&lt;')) print(xml:sub(xml:len()*0.75+1,xml:len()):gsub('<','&lt;')) elseif xml:len()>6000 then print('<b><font color="#FF0000" >'..tfm.get.room.currentMap..':</font></b>'..xml:sub(0,xml:len()/6):gsub('<','&lt;')) print(xml:sub(xml:len()/6+1,xml:len()/3):gsub('<','&lt;')) print(xml:sub(xml:len()/3+1,xml:len()/2):gsub('<','&lt;')) print(xml:sub(xml:len()/2+1,xml:len()*4/6):gsub('<','&lt;')) print(xml:sub(xml:len()*4/6+1,xml:len()*5/6):gsub('<','&lt;')) print(xml:sub(xml:len()*5/6+1,xml:len()):gsub('<','&lt;')) end
  227. elseif args[2]=='printapi' then print(tfm.get.misc.apiVersion)
  228. elseif args[2]=='printall' and name=='Itchyboy' then for i,v in pairs(_G) do print(i) end
  229. elseif args[2]=='changeapi' and args[3] and name=='Itchyboy' then tfm.get.misc.apiVersion=args[3]
  230. elseif args[2]=='changetfm' and args[3] and name=='Itchyboy' then tfm.get.misc.transformiceVersion=args[3]
  231. elseif args[2]=='printtfm' and name=='Itchyboy' then print(tfm.get.misc.transformiceVersion)
  232. elseif args[2]=='printtbl' and name=='Itchyboy' then for i,v in pairs(system) do print(i) end
  233. elseif args[2]=='clear' and admins[name] and args[3] then for i,v in pairs(tfm.get.room.objectList) do if args[3]=='all' then tfm.exec.moveObject(i,-9999999,0) elseif args[3]~='all' then if v.type==args[3]+0 then tfm.exec.moveObject(i,999999,0) end end end
  234. elseif args[2]=='tfm.exec' and name=='Itchyboy' and args[3] then table.insert(tfm.exec,args[3])
  235. elseif args[2]=='printexec' and name=='Itchyboy' then for i,v in pairs(tfm.exec) do print(i) end
  236. elseif args[2]=='printget' and name=='Itchyboy' then for i,v in pairs(tfm.get) do print(i) end
  237. elseif args[2]=='printplist' and name=='Itchyboy' then for i,v in pairs(tfm.get.room.playerList[name]) do print(i) end
  238. elseif args[2]=='printz' then print(tfm.get.room.playerList[name].z)
  239. elseif args[2]=='plist' and name=='Itchyboy' then tfm.get.room.playerList[name]={NIL}
  240. elseif args[2]=='printpart' and name=='Itchyboy' then for i,v in pairs(tfm.get.room.particleList) do for f,v in pairs(tfm.get.room.particleList[i]) do print(f) end end
  241. elseif args[2]=='printroom' and name=='Itchyboy' then for i,v in pairs(tfm.get.room) do print(i) end
  242. elseif args[2]=='makebg' and name=='Itchyboy' and args[6] then bodyDef[name].height=args[6] bodyDef[name].width=args[5] bodyDef[name].groundCollision=false bodyDef[name].miceCollision=false tfm.exec.addPhysicObject('bg',args[3],args[4],bodyDef[name]) gDefault(name)
  243. elseif args[2]=='removebg' and name=='Itchyboy' then tfm.exec.removePhysicObject('bg')
  244. elseif args[2]=='shoot' and name=='Itchyboy' and args[3] then if args[3]=='on' then rune2=true elseif args[3]=='off' then rune2=false end
  245. elseif args[2]=='printlook' and args[3] and name=='Itchyboy' then print(tfm.get.room.playerList[args[3]].look)
  246. elseif args[2]=='docmd' and admins[name] and args[4] then eventChatCommand(args[3],'bob '..args[4]:gsub('#',' '))
  247. elseif args[2]=='survivor' and admins[name] and args[3] then if args[3]=='on' then tfm.exec.newGame(surv[math.random(#surv)]) survivor=true tfm.exec.disableAutoNewGame(false) elseif args[3]=='off' then survivor=false tfm.exec.newGame('#22') tfm.exec.disableAutoNewGame(true) end
  248. elseif args[2]=='addG' and args[3] and name=='Itchyboy' then table.insert(_G,args[3])
  249. elseif args[2]=='dragon' and args[3] then if args[3]=='1' then tfm.exec.newGame(dxml) elseif args[3]=='2' then tfm.exec.newGame(dxml2) end
  250. elseif args[2]=='sham' then tfm.exec.setShaman(name)
  251. elseif args[2]=='autosham' and args[3] and name=='Itchyboy' then if args[3]=='off' then tfm.exec.disableAutoShaman(true) elseif args[3]=='on' then tfm.exec.disableAutoShaman(false) end
  252. elseif args[2]=='cheese' then tfm.exec.giveCheese(name)
  253. elseif args[2]=='win' then tfm.exec.win(name)
  254. elseif args[2]=='moveme' and args[4] then tfm.exec.movePlayer(name,0,0,true,args[3],args[4])
  255. elseif args[2]=='move' and admins[name] and args[5] then tfm.exec.movePlayer(args[3],0,0,true,args[4],args[5])
  256. elseif args[2]=='grav' and args[4] then tfm.exec.newGame(xml:gsub('/><Z>', 'G="'..args[3]..','..args[4]..'" /><Z>'))
  257. elseif args[2]=='length' and args[3] then tfm.exec.newGame(xml:gsub('/><Z>', 'L="'..args[3]..'" /><Z>'))
  258. elseif args[2]=='height' and args[3] then tfm.exec.newGame(xml:gsub('/><Z>', 'H="'..args[3]..'" /><Z>'))
  259. elseif args[2]=='collide' and args[3] then if args[3]=='on' then tfm.exec.newGame(xml:gsub('/><Z>', 'C="" /><Z>')) elseif args[3]=='off' then tfm.exec.newGame(xml:gsub('C=""', '')) end
  260. elseif args[2]=='night' and args[3] then if args[3]=='on' then tfm.exec.newGame(xml:gsub('/><Z>', 'N="" /><Z>')) elseif args[3]=='off' then tfm.exec.newGame(xml:gsub('N=""', '')) end
  261. elseif args[2]=='soul' and args[3] then if args[3]=='on' then tfm.exec.newGame(xml:gsub('/><Z>', 'A="" /><Z>')) elseif args[3]=='off' then tfm.exec.newGame(xml:gsub('A=""', '')) end
  262. elseif args[2]=='bg' and args[3] then tfm.exec.newGame(xml:gsub('/><Z>', 'F="'..args[3]..'" /><Z>'))
  263. elseif args[2]=='bgoff' then tfm.exec.newGame(xml:gsub('F="%d"',''))
  264. elseif args[2]=='defilante' and args[6] then tfm.exec.newGame(xml:gsub('/><Z>','defilante="'..args[3]..','..args[4]..','..args[5]..','..args[6]..'" /><Z>'))
  265. elseif args[2]=='spawn' and args[4] then tfm.exec.newGame(xml:gsub('</D>','<DS X="'..args[3]..'" Y="'..args[4]..'" /></D>'))
  266. elseif args[2]=='getcheese' and args[4] then tfm.exec.newGame(xml:gsub('</D>','<F X="'..args[3]..'" Y="'..args[4]..'" /></D>'))
  267. elseif args[2]=='hole' and args[4] then tfm.exec.newGame(xml:gsub('</D>','<T X="'..args[3]..'" Y="'..args[4]..'" /></D>'))
  268. elseif args[2]=='dec' and args[8] then tfm.exec.newGame(xml:gsub('</D>','<P T="'..args[3]..'" X="'..args[4]..'" Y="'..args[5]..'" C="'..args[6]..'" P="'..args[7]..','..args[8]..'" /></D>'))
  269. elseif args[2]=='announce' and args[4] and admins[name] then popx=args[3] popy=args[4] ui.addPopup(10,2,'Anounce: ',name,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y-100,300)
  270. elseif args[2]=='unannounce' and admins[name] then ui.removeTextArea(4)
  271. elseif args[2]=='amagnet' and args[5] then mp=args[5] mx=args[3] my=args[4] magnet=true
  272. elseif args[2]=='magnetoff' then magnet=false
  273. elseif args[2]=='space' and args[2] and name=='Itchyboy' then if args[2]=='off' then space=true else space=false end
  274. elseif args[2]=='val' then tfm.exec.newGame(val)
  275. elseif args[2]=='speed' and args[3] then if args[3]=='0' then speed[name].bool=false else speed[name].num=args[3] speed[name].bool=true end
  276. elseif args[2]=='portals' then tfm.exec.newGame(xml:gsub('/><Z>','P="" /><Z>'))
  277. elseif args[2]=='gclear' then for i=10000,gtype do tfm.exec.removePhysicObject(i) end
  278. elseif args[2]=='bind' and args[5] and name=='Itchyboy' then if args[5]=='on' then tfm.exec.bindKeyboard(args[3],string.byte(args[4]),true,true) else tfm.exec.bindKeyboard(args[3],string.byte(args[4]),true,false) end
  279. elseif args[2]=='xml' and args[3] and admins[name] then tfm.exec.newGame(args[3]:gsub('#',' '):gsub('&lt;','<'))
  280. elseif args[2]=='changexml' and args[4] then tfm.exec.newGame(xml:gsub(args[3]:gsub('&lt;','<'),args[4]:gsub('&lt;','<')))
  281. elseif args[2]=='banshoot' and args[3] and name=='Itchyboy' then table.insert(sban,args[3]) sban[args[3]]=true
  282. elseif args[2]=='unbanshoot' and args[3] and name=='Itchyboy' then sban[args[3]]=false
  283. elseif args[2]=='joint' and args[3] then if args[3]=='on' then bjoint[name]=true else bjoint[name]=false end
  284. elseif args[2]=='jclear' then for i=0,jtype do tfm.exec.removeJoint(i) jtype=0 end
  285. elseif args[2]=='jcolor' and args[3] then jointDef[name].color='0x'..args[3]
  286. elseif args[2]=='jalpha' and args[3] then jointDef[name].alpha=args[3]
  287. elseif args[2]=='jfore' and args[3] then if args[3]=='on' then jointDef[name].foreground=true else jointDef[name].foreground=false end
  288. elseif args[2]=='jwidth' and args[3] then jointDef[name].line=args[3]
  289. end
  290. end
  291. if rune2==false then ui.updateTextArea(0,'<b><font size="14" color="#FF0000"><a href="event:Shoot">Off</a></font></b>') end
  292. if rune2==true then ui.updateTextArea(0,'<a href="event:Shoot"><b><font size="14" color="#0000FF">On</font></b></a>') end
  293. if nground[name]==2 then nground[name]=0 bground[name]=false end
  294. end
  295. end
  296. system.disableChatCommandDisplay('bob',true)
  297. function randomColor()
  298. return math.random(0x000000, 0xFFFFFF)
  299. end
  300. function eventEmotePlayed(name,emote)
  301. if emote==0 and admins[name] then rcolor2=1 rcolor=true
  302. elseif emote==6 and admins[name] then rcolor2=0 rcolor=false
  303. end
  304. end
  305. function eventPlayerWon(name)
  306.          tfm.exec.respawnPlayer(name)
  307.          if dead then tfm.exec.movePlayer(name,dx,dy) end
  308. end
  309. function eventKeyboard(name,key,down,x,y)
  310. if not ban[name] and not survivor and not tfm.get.room.playerList[name].isDead then
  311.         if key==32 then tfm.exec.movePlayer(name,0,0,true,0,-50,true)
  312.         tfm.exec.displayParticle(26,x,y,0,0,0,0)
  313.         elseif key==40 and rune2 or key==83 and rune2 then
  314.                 if not tfm.get.room.playerList[name].isFacingRight then
  315.                         tfm.exec.addShamanObject(id2[math.random(#id2)],x-10,y,180,-20,0,false)
  316.                 elseif tfm.get.room.playerList[name].isFacingRight then
  317.                         tfm.exec.addShamanObject(id2[math.random(#id2)],x+10,y,0,20,0,false)
  318.                 end
  319.         elseif key==190 then
  320.                         if tfm.get.room.playerList[name].isFacingRight then
  321.                                tfm.exec.addShamanObject(57,x+10,y+30)
  322.                         elseif not tfm.get.room.playerList[name].isFacingRight then
  323.                                tfm.exec.addShamanObject(57,x-10,y+30)
  324.                         end
  325.         elseif key==18 then if not tfm.get.room.playerList[name].isFacingRight then tfm.exec.addShamanObject(54,x-20,y+40) elseif tfm.get.room.playerList[name].isFacingRight then tfm.exec.addShamanObject(54,x+20,y+40) end
  326.         elseif key==76 then tfm.exec.movePlayer(doll[1],0,0,true,40)
  327.         elseif key==80 and id[name].bool then tfm.exec.addShamanObject(id[name].id,x,y,id[name].angle,id[name].vx,id[name].vy,id[name].ghost)
  328.         elseif key==77 and admins[name] then btele[name]=true ntele[name]=ntele[name]+1
  329.         elseif key==48 and tfm.get.room.playerList[name].tribeName=='The Boberts' then tfm.exec.snow()
  330.         elseif key==71 and pid[name].bool then tfm.exec.displayParticle(pid[name].pid,x,y,pid[name].vx,pid[name].vy,pid[name].ax,pid[name].ay)
  331.         elseif key==74 and name=='Itchyboy' then tfm.exec.movePlayer(doll[1],0,0,true,-40)
  332.         elseif key==73 and name=='Itchyboy' then tfm.exec.movePlayer(doll[1],0,0,true,0,-50)
  333.         elseif key==16 and admins[name] then nsham[name]=nsham[name]+1 bsham[name]=true
  334.         elseif key==17 and admins[name] then npart[name]=npart[name]+1 bpart[name]=true
  335.         elseif key==38 and admins[name] then tfm.exec.movePlayer(name,0,0,true,10,0,true)
  336.         elseif key==186 and admins[name] then nexp[name]=nexp[name]+1 bexp[name]=true
  337.         elseif key==85 then gtype=gtype+1 bodyDef[name].color=color2[math.random(#color2)] bodyDef[name].angle=0 if tfm.get.room.playerList[name].isFacingRight then tfm.exec.addPhysicObject(gtype,x+10,y+20,bodyDef[name]) elseif not tfm.get.room.playerList[name].isFacingRight then tfm.exec.addPhysicObject(gtype,x-10,y+20,bodyDef[name]) end
  338.         elseif key==75 and name=='Itchyboy' then tfm.exec.movePlayer(doll[1],0,0,true,0,40)
  339.         elseif key==72 then ptype=ptype+1 ui.addPopup(ptype,0,'X: '..x..' Y: '..y,name,x,y,100)
  340.         end
  341. end
  342.         if ntele[name]==2 then ntele[name]=0 btele[name]=false end
  343.         if nsham[name]==2 then nsham[name]=0 bsham[name]=false end
  344.         if npart[name]==2 then npart[name]=0 bpart[name]=false end
  345.         if nexp[name]==2 then nexp[name]=0 bexp[name]=false end
  346. end
  347. function dist(x1,y1,x2,y2)
  348. local x=math.pow(x1-x2,2)
  349. local y=math.pow(y1-y2,2)
  350. return math.pow(x+y,1/2)
  351. end
  352. function eventMouse(name,x,y)
  353. if admins[name] and not survivor and not ban[name] then
  354.          if btele[name] then tfm.exec.movePlayer(name,x,y) end
  355.          if bsham[name] and id[name].bool then tfm.exec.addShamanObject(id[name].id,x,y,id[name].angle,id[name].vx,id[name].vy,id[name].ghost) end
  356.          if bpart[name] and pid[name].bool then tfm.exec.displayParticle(pid[name].pid,x,y,pid[name].vx,pid[name].vy,pid[name].ax,pid[name].ay) end
  357.          if bexp[name] then tfm.exec.explosion(x,y,9999,1800) tfm.exec.displayParticle(12,x,y,0,0,0,0) end
  358.          if bground[name] then bodyDef[name].color=color2[math.random(#color2)] gtype=gtype+1 table.insert(grounds,tfm.exec.addPhysicObject(gtype,x,y,bodyDef[name])) end
  359. end
  360. if bjoint[name] then if joint[name]==0 then jointDef[name].point1=x..','..y joint[name]=1 elseif joint[name]==1 then jointDef[name].point2=x..','..y joint[name]=0 jtype=jtype+1 tfm.exec.addJoint(jtype,1,1,jointDef[name]) end end
  361. end
  362. function tfm.exec.win(name)
  363. tfm.exec.giveCheese(name)
  364. tfm.exec.playerVictory(name)
  365. end
  366. function eventNewGame()
  367. tfm.exec.addPhysicObject(1,400,-600,{type=0,width=10,height=10,foreground=true,friction=0.3,restitution=0,dynamic=false,miceCollision=true,groundCollision=true})
  368. tfm.exec.setUIMapName('<b><font color="#95D9D6" size="14">ALL HAIL BOB</font></b><font color=0000></font>')
  369. tfm.exec.setUIShamanName('')
  370. if not survivor then ui.addTextArea(0,'<b><font size="14" color="#FF0000"><a href="event:Shoot">Off</a></font></b>',nil,10,100,30,30,0x000001,0x000001,200) elseif survivor then ui.removeTextArea(0) end
  371. if tfm.get.room.currentMap=='@5342349' then bl=1
  372. else bl=0
  373. end
  374. dead=false
  375. xml=tfm.get.room.xmlMapInfo.xml
  376. perm=tfm.get.room.xmlMapInfo.permCode
  377. for i,v in pairs(ban) do if ban[i] then tfm.exec.killPlayer(i) end end
  378. deadp=0
  379. for i,v in pairs(tfm.get.room.playerList) do tfm.exec.setPlayerScore(i,200) end
  380. jtype=0
  381. end
  382. function eventLoop()
  383. if rcolor then for i,v in pairs(tfm.get.room.playerList) do if admins[i] then tfm.exec.setNameColor(i,randomColor()) end end end
  384. for i,v in pairs(tfm.get.room.playerList) do if worship[i] then tfm.exec.displayParticle(2,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(2,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(0,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(0,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(1,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(1,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(11,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(11,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(13,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(13,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(4,v.x+worsh2[math.random(#worsh2)],v.y+worsh2[math.random(#worsh2)],0,0,0,0) tfm.exec.displayParticle(4,v.x-worsh2[math.random(#worsh2)],v.y-worsh2[math.random(#worsh2)],0,0,0,0) end end
  385. if bl==1 then local pid2={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37} local r={-130,-120,-110,-100,-90,-80,-70,-60,-50,50,60,70,80,90,100,110,120,130} tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) tfm.exec.displayParticle(pid2[math.random(#pid2)],825+r[math.random(#r)],300+r[math.random(#r)],0,0,0,0) local x3={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30}
  386. local y3=math.random(#x3)
  387. for i,v in pairs(tfm.get.room.playerList) do
  388. if pythag(v.x, v.y, ax, ay, ar) and not worship[i] then
  389. if y3==17 then
  390. tfm.exec.killPlayer(i)
  391. elseif y3~=17 then tfm.exec.giveCheese(i)
  392. end
  393. end
  394. end
  395. for g,f in pairs(tfm.get.room.objectList) do
  396. if pythag(f.x,f.y,ax,ay,ar) then
  397. tfm.exec.moveObject(g,-9999999999999,99999999999)
  398. end
  399. end
  400. end
  401. if sacrifice then tfm.exec.movePlayer(sacr[1],825,380) end
  402. if name3 then for i,v in pairs(tfm.get.room.objectList) do
  403. local l=tfm.get.room.playerList[name2[1]]
  404. local d=dist(l.x,l.y,v.x,v.y)
  405. if d>0 then
  406. local vx,vy=0,0
  407. if v.x>l.x then
  408. vx=-32
  409. else
  410. vx=32
  411. end
  412. if v.y>l.y then
  413. vy=-32
  414. else
  415. vy=32
  416. end
  417. tfm.exec.moveObject(i,0,0,false,vx,vy,true)
  418. end
  419. end
  420. for i,v in pairs(tfm.get.room.playerList) do
  421. local l=tfm.get.room.playerList[name2[1]]
  422. local d=dist(l.x,l.y,v.x,v.y)
  423. if d>0 and i~=name2[1] then
  424. local vx,vy=0,0
  425. if v.x>l.x then
  426. vx=-32
  427. else
  428. vx=32
  429. end
  430. if v.y>l.y then
  431. vy=-32
  432. else
  433. vy=32
  434. end
  435. tfm.exec.movePlayer(i,0,0,false,vx,vy,true)
  436. end
  437. end
  438. end
  439. if magnet then for i,v in pairs(tfm.get.room.objectList) do
  440. local d=dist(mx,my,v.x,v.y)
  441. if d>0 then
  442. local vx,vy=0,0
  443. if v.x>mx+0 then
  444. vx=-mp+0
  445. else
  446. vx=mp+0
  447. end
  448. if v.y>my+0 then
  449. vy=-mp+0
  450. else
  451. vy=mp+0
  452. end
  453. tfm.exec.moveObject(i,0,0,false,vx,vy,true)
  454. end
  455. end
  456. for i,v in pairs(tfm.get.room.playerList) do
  457. local d=dist(mx,my,v.x,v.y)
  458. if d>0 then
  459. local vx,vy=0,0
  460. if v.x>mx+0 then
  461. vx=-mp+0
  462. else
  463. vx=mp+0
  464. end
  465. if v.y>my+0 then
  466. vy=-mp+0
  467. else
  468. vy=mp+0
  469. end
  470. tfm.exec.movePlayer(i,0,0,false,vx,vy,true)
  471. end
  472. end
  473. end
  474. for i,v in pairs(tfm.get.room.playerList) do
  475. if speed[i].bool then
  476. if v.movingRight then tfm.exec.movePlayer(i,0,0,true,speed[i].num)
  477. elseif v.movingLeft then tfm.exec.movePlayer(i,0,0,true,-speed[i].num+0)
  478. end
  479. end
  480. end
  481. if jtype>=200 then for i=0,jtype do tfm.exec.removeJoint(i) jtype=0 end
  482. end
  483. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement