Advertisement
Guest User

Authentic Weather with No bad language

a guest
Jun 4th, 2017
1,186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.83 KB | None | 0 0
  1. phrase={
  2. {
  3.     ["highlight"]="love is",
  4.     ["title"]="Love is#CRLF#in the air.",
  5.     ["subline"]="Take off your shirt and get wet.",
  6.     ["min"]=25,
  7.     ["condition"]="clear",
  8.     ["color"]="FF0060"
  9. },
  10. {
  11.     ["highlight"]="raining",
  12.     ["title"]="It's#CRLF#raining.",
  13.     ["subline"]="You can look outside to get more information.",
  14.     ["condition"]="rain",
  15.     ["color"]="007EFF"
  16. },
  17. {
  18.     ["highlight"]="cloudy",
  19.     ["title"]="It's#CRLF#cloudy.",
  20.     ["subline"]="You can look outside to get more information.",
  21.     ["condition"]="cloudy",
  22.     ["color"]="007EFF"
  23. },
  24. {
  25.     ["highlight"]="fridge.",
  26.     ["title"]="Freezing#CRLF#cold like#CRLF#a fridge.",
  27.     ["subline"]="You can look outside to get more information.",
  28.     ["max"]=4,
  29.     ["color"]="004A96"
  30. },
  31. {
  32.     ["highlight"]="nice",
  33.     ["title"]="It's#CRLF#nice.",
  34.     ["subline"]="Take off your shirt but keep on your panties.",
  35.     ["min"]=20,
  36.     ["max"]=30,
  37.     ["color"]="FF0060"
  38. },
  39. {
  40.     ["highlight"]="snow",
  41.     ["title"]="Holy#CRLF#snow.",
  42.     ["subline"]="Still not ready for building that snow castle.",
  43.     ["condition"]="snow",
  44.     ["color"]="007EFF"
  45. },
  46. {
  47.     ["color"]="007EFF",
  48.     ["condition"]="clear",
  49.     ["min"]=5,
  50.     ["title"]="It's#CRLF#alright#CRLF#today.",
  51.     ["subline"]="Not amazeballs but also not bad.",
  52.     ["highlight"]="alright",
  53.     ["max"]=15
  54. },
  55. {
  56.     ["highlight"]="freezing",
  57.     ["title"]="Are you#CRLF#freezing#CRLF#serious?",
  58.     ["subline"]="You can't look outside because of snow.",
  59.     ["max"]=3,
  60.     ["condition"]="snow",
  61.     ["color"]="007EFF"
  62. },
  63. {
  64.     ["highlight"]="oven.",
  65.     ["title"]="It's like#CRLF#a oven.",
  66.     ["subline"]="Just get naked, now - And get some ice cream.",
  67.     ["min"]=30,
  68.     ["color"]="FFC600"
  69. },
  70. {
  71.     ["color"]="9F9F9F",
  72.     ["condition"]="cloudy",
  73.     ["min"]=5,
  74.     ["title"]="It's just#CRLF#grey.",
  75.     ["subline"]="Just clouds & no love, but computer games.",
  76.     ["highlight"]="grey.",
  77.     ["max"]=16
  78. },
  79. {
  80.     ["highlight"]="snow",
  81.     ["title"]="Can't see#CRLF#because#CRLF#snow.",
  82.     ["subline"]="Try looking outside for more information, try it...",
  83.     ["condition"]="snow",
  84.     ["color"]="FFFFFF"
  85. },
  86. {
  87.     ["highlight"]="snow",
  88.     ["title"]="Can't see#CRLF#because#CRLF#snow.",
  89.     ["subline"]="Try looking outside for more information, try it...",
  90.     ["condition"]="sleet",
  91.     ["color"]="FFFFFF"
  92. },
  93. {
  94.     ["color"]="FF0060",
  95.     ["condition"]="clear",
  96.     ["min"]=20,
  97.     ["title"]="Amaze#CRLF#Balls.",
  98.     ["subline"]="So nice outside, holy schmoly.",
  99.     ["highlight"]="Amaze",
  100.     ["max"]=35
  101. },
  102. {
  103.     ["highlight"]="melting",
  104.     ["title"]="I'm#CRLF#melting.",
  105.     ["subline"]="Take off your shirt and get wet.",
  106.     ["min"]=23,
  107.     ["color"]="FF0000"
  108. },
  109. {
  110.     ["highlight"]="hot",
  111.     ["title"]="It's so#CRLF#hot.",
  112.     ["subline"]="I wouldn't go outside for more information.",
  113.     ["min"]=25,
  114.     ["color"]="FF0000"
  115. },
  116. {
  117.     ["highlight"]="car wash",
  118.     ["title"]="It's#CRLF#car wash#CRLF#time.",
  119.     ["subline"]="Exactly! It's going to be hot as hell.",
  120.     ["min"]=24,
  121.     ["color"]="FF0F66"
  122. },
  123. {
  124.     ["highlight"]="naked",
  125.     ["title"]="Let's get#CRLF#naked.",
  126.     ["subline"]="You heard it, it's going to be hot!",
  127.     ["min"]=24,
  128.     ["color"]="FF0F66"
  129. },
  130. {
  131.     ["highlight"]="warming",
  132.     ["title"]="Global#CRLF#warming.",
  133.     ["subline"]="Yeah, let's blame Global Warming.",
  134.     ["min"]=30,
  135.     ["color"]="FF0000"
  136. },
  137. {
  138.     ["highlight"]="tropical",
  139.     ["title"]="It's#CRLF#tropical.",
  140.     ["subline"]="Ice Cream is my final answer.",
  141.     ["min"]=35,
  142.     ["color"]="FF0000"
  143. },
  144. {
  145.     ["highlight"]="damn",
  146.     ["title"]="It's too#CRLF#damn#CRLF#hot.",
  147.     ["subline"]="Ice Cream is my final answer.",
  148.     ["min"]=33,
  149.     ["color"]="FF0000"
  150. },
  151. {
  152.     ["highlight"]="you are",
  153.     ["title"]="I think#CRLF#you are#CRLF#hot.",
  154.     ["subline"]="Just kidding, but the weather is.",
  155.     ["min"]=25,
  156.     ["color"]="FF0000"
  157. },
  158. {
  159.     ["highlight"]="hot.",
  160.     ["title"]="Drop it#CRLF#like it's#CRLF#hot.",
  161.     ["subline"]="*Don't drop your iPhone though, seriously.",
  162.     ["min"]=35,
  163.     ["color"]="FF0000"
  164. },
  165. {
  166.     ["highlight"]="BBQ",
  167.     ["title"]="It's#CRLF#BBQ#CRLF#time.",
  168.     ["subline"]="Vegetarians and Meat fans unite! BBQ is for all of us.",
  169.     ["min"]=24,
  170.     ["color"]="FF0000"
  171. },
  172. {
  173.     ["highlight"]="umbrella.",
  174.     ["title"]="Get your#CRLF#umbrella.",
  175.     ["subline"]="Loads of rain is awaiting you.",
  176.     ["condition"]="rain",
  177.     ["color"]="007EFF"
  178. },
  179. {
  180.     ["highlight"]="shades",
  181.     ["title"]="Fifty#CRLF#shades#CRLF#of grey.",
  182.     ["subline"]="Grey clouds everywhere.",
  183.     ["condition"]="cloudy",
  184.     ["color"]="9F9F9F"
  185. },
  186. {
  187.     ["highlight"]="Thunder",
  188.     ["title"]="Thunder#CRLF#storm.",
  189.     ["subline"]="It's time to sing the Screw you Thunder song.",
  190.     ["condition"]="wind",
  191.     ["color"]="9F9F9F"
  192. },
  193. {
  194.     ["highlight"]="Cloudy",
  195.     ["title"]="Cloudy#CRLF#with a#CRLF#chance#CRLF#of....",
  196.     ["subline"]="You thought I would say meatballs right? Stupid.",
  197.     ["condition"]="cloudy",
  198.     ["color"]="007EFF"
  199. },
  200. {
  201.     ["highlight"]="dark",
  202.     ["title"]="It's#CRLF#getting#CRLF#dark.",
  203.     ["subline"]="The storm is coming - May the Force be with you.",
  204.     ["condition"]="wind",
  205.     ["color"]="9F9F9F"
  206. },
  207. {
  208.     ["highlight"]="stoopid.",
  209.     ["title"]="So hot#CRLF#makin'#CRLF#me#CRLF#stoopid.",
  210.     ["subline"]="I heard that Ryan Gosling said this.",
  211.     ["min"]=34,
  212.     ["color"]="FF0000"
  213. },
  214. {
  215.     ["highlight"]="stupid",
  216.     ["title"]="It's#CRLF#stupid#CRLF#hot.",
  217.     ["subline"]="Even Siri has no answer for you today.",
  218.     ["min"]=25,
  219.     ["color"]="FF0000"
  220. },
  221. {
  222.     ["highlight"]="whiskey",
  223.     ["title"]="It's#CRLF#whiskey#CRLF#time.",
  224.     ["subline"]="This will warm you up. It's freezing!",
  225.     ["max"]=5,
  226.     ["color"]="004A96"
  227. },
  228. {
  229.     ["highlight"]="skiing",
  230.     ["title"]="It's#CRLF#skiing#CRLF#time.",
  231.     ["subline"]="Snow every where, yay!",
  232.     ["condition"]="snow",
  233.     ["color"]="004A96"
  234. },
  235. {
  236.     ["highlight"]="monkey",
  237.     ["title"]="Cold ass#CRLF#monkey#CRLF#pants.",
  238.     ["subline"]="Yeah, exactly.",
  239.     ["max"]=5,
  240.     ["color"]="004A96"
  241. },
  242. {
  243.     ["highlight"]="cold",
  244.     ["title"]="Hey girl#CRLF#are you#CRLF#cold?",
  245.     ["subline"]="That's because it's freezing outside. Go & look.",
  246.     ["max"]=5,
  247.     ["color"]="004A96"
  248. },
  249. {
  250.     ["highlight"]="Hello?",
  251.     ["title"]="Hello?#CRLF#Yes, this#CRLF#is snow-#CRLF#man.",
  252.     ["subline"]="It's time to build me. Look outside fancy pants.",
  253.     ["condition"]="snow",
  254.     ["color"]="004A96"
  255. },
  256. {
  257.     ["highlight"]="Frozen",
  258.     ["title"]="Frozen#CRLF#weather.",
  259.     ["subline"]="It's freezing right now, look outside.",
  260.     ["max"]=5,
  261.     ["color"]="004A96"
  262. },
  263. {
  264.     ["highlight"]="zero",
  265.     ["title"]="Negative#CRLF#zero.",
  266.     ["subline"]="It's freezing right now, look outside!",
  267.     ["max"]=0,
  268.     ["color"]="004A96"
  269. },
  270. {
  271.     ["highlight"]="zero",
  272.     ["title"]="Below#CRLF#zero.",
  273.     ["subline"]="It's freezing right now, look outside!",
  274.     ["max"]=-1,
  275.     ["color"]="004A96"
  276. },
  277. {
  278.     ["highlight"]="ice",
  279.     ["title"]="Cold as#CRLF#ice.",
  280.     ["subline"]="You heard it, unpack your space heater!",
  281.     ["max"]=4,
  282.     ["color"]="004A96"
  283. },
  284. {
  285.     ["highlight"]="chilly",
  286.     ["title"]="It's#CRLF#getting#CRLF#chilly.",
  287.     ["subline"]="You heard it, unpack your space heater!",
  288.     ["min"]=5,
  289.     ["max"]=10,
  290.     ["color"]="004A96"
  291. },
  292. {
  293.     ["highlight"]="Frozen",
  294.     ["title"]="Frozen#CRLF#fingers.",
  295.     ["subline"]="Can't feel my fingers any more.",
  296.     ["max"]=0,
  297.     ["color"]="004A96"
  298. },
  299. {
  300.     ["highlight"]="Frost",
  301.     ["title"]="Frost#CRLF#bite.",
  302.     ["subline"]="Can't feel my fingers any more.",
  303.     ["max"]=0,
  304.     ["color"]="004A96"
  305. },
  306. {
  307.     ["highlight"]="penguin",
  308.     ["title"]="As cold#CRLF#as a#CRLF#penguin.",
  309.     ["subline"]="I have to admit, that sounds kinda cute.",
  310.     ["max"]=0,
  311.     ["color"]="004A96"
  312. },
  313. {
  314.     ["highlight"]="pole",
  315.     ["title"]="North#CRLF#pole.",
  316.     ["subline"]="Nothing against the north pole, but seriously!",
  317.     ["max"]=0,
  318.     ["color"]="004A96"
  319. },
  320. {
  321.     ["highlight"]="your stuff.",
  322.     ["title"]="Icebergs#CRLF#all over#CRLF#your stuff.",
  323.     ["subline"]="Time to get cozy and watch Titanic again!",
  324.     ["max"]=5,
  325.     ["color"]="004A96"
  326. },
  327. {
  328.     ["highlight"]="Ice age.",
  329.     ["title"]="Ice age.",
  330.     ["subline"]="The movie was great, the weather is not.",
  331.     ["max"]=0,
  332.     ["color"]="004A96"
  333. },
  334. {
  335.     ["highlight"]="arctic",
  336.     ["title"]="It's#CRLF#arctic.",
  337.     ["subline"]="Can't feel my fingers any more.",
  338.     ["max"]=0,
  339.     ["color"]="004A96"
  340. },
  341. {
  342.     ["highlight"]="Glacial",
  343.     ["title"]="Glacial#CRLF#ice.",
  344.     ["subline"]="Can't feel my fingers any more.",
  345.     ["max"]=0,
  346.     ["color"]="004A96"
  347. },
  348. {
  349.     ["highlight"]="Numb",
  350.     ["title"]="Numb#CRLF#fingers.",
  351.     ["subline"]="Can't feel my fingers any more.",
  352.     ["max"]=3,
  353.     ["color"]="004A96"
  354. },
  355. {
  356.     ["highlight"]="thermic",
  357.     ["title"]="Hypo#CRLF#thermic.",
  358.     ["subline"]="A friend of mine called Tim said that. Smartypants.",
  359.     ["max"]=-3,
  360.     ["color"]="004A96"
  361. },
  362. {
  363.     ["highlight"]="nipples",
  364.     ["title"]="Am I#CRLF#allowed#CRLF#to say#CRLF#nipples?",
  365.     ["subline"]="Because it's freezing! You get the point.",
  366.     ["max"]=5,
  367.     ["color"]="004A96"
  368. },
  369. {
  370.     ["highlight"]="Brezzy",
  371.     ["title"]="Brezzy#CRLF#breezy.",
  372.     ["subline"]="It's getting cold outside!",
  373.     ["max"]=6,
  374.     ["color"]="004A96"
  375. },
  376. {
  377.     ["highlight"]="foggy",
  378.     ["title"]="It's#CRLF#foggy.",
  379.     ["subline"]="It's getting cold outside!",
  380.     ["condition"]="fog",
  381.     ["color"]="004A96"
  382. },
  383. {
  384.     ["highlight"]="windy",
  385.     ["title"]="It's#CRLF#windy.",
  386.     ["subline"]="It's getting cold outside!",
  387.     ["condition"]="wind",
  388.     ["color"]="004A96"
  389. },
  390. {
  391.     ["highlight"]="bad",
  392.     ["title"]="Totally#CRLF#not#CRLF#bad.",
  393.     ["subline"]="Look outside for more information.",
  394.     ["min"]=10,
  395.     ["condition"]="cloudy",
  396.     ["color"]="004A96"
  397. },
  398. {
  399.     ["highlight"]="okay",
  400.     ["title"]="It's#CRLF#okay.",
  401.     ["subline"]="Look outside for more information.",
  402.     ["min"]=9,
  403.     ["max"]=20,
  404.     ["color"]="004A96"
  405. },
  406. {
  407.     ["highlight"]="ducking",
  408.     ["title"]="It's#CRLF#ducking#CRLF#freezing.",
  409.     ["subline"]="Oh damnit you autocorrect.",
  410.     ["max"]=3,
  411.     ["color"]="004A96"
  412. },
  413. {
  414.     ["highlight"]="nippy!",
  415.     ["title"]="It's a#CRLF#wee bit #CRLF#nippy!",
  416.     ["subline"]="This is for you my Scottish friends.",
  417.     ["min"]=-3,
  418.     ["max"]=6,
  419.     ["color"]="004A96"
  420. },
  421. {
  422.     ["highlight"]="frosty",
  423.     ["title"]="It's#CRLF#frosty#CRLF#as icy.",
  424.     ["subline"]="This is for you my Scottish friends.",
  425.     ["max"]=0,
  426.     ["color"]="004A96"
  427. },
  428. {
  429.     ["highlight"]="It rains",
  430.     ["title"]="It rains#CRLF#cats and#CRLF#dogs.",
  431.     ["subline"]="You better get an umbrella my friend.",
  432.     ["condition"]="rain",
  433.     ["color"]="004A96"
  434. },
  435. {
  436.     ["highlight"]="for chest",
  437.     ["title"]="Prepare#CRLF#for chest#CRLF#hair.",
  438.     ["subline"]="It's freezing, boys & girls!",
  439.     ["max"]=0,
  440.     ["color"]="004A96"
  441. },
  442. {
  443.     ["highlight"]="freeze.",
  444.     ["title"]="Brain#CRLF#freeze.",
  445.     ["subline"]="Oh Yeah Ice Cream!",
  446.     ["min"]=20,
  447.     ["color"]="FF0000"
  448. },
  449. {
  450.     ["highlight"]="glasses.",
  451.     ["title"]="Sun#CRLF#glasses.",
  452.     ["subline"]="Time to put on my coolest shades.",
  453.     ["min"]=15,
  454.     ["condition"]="clear",
  455.     ["color"]="FF0000"
  456. },
  457. {
  458.     ["highlight"]="fried.",
  459.     ["title"]="Let's get#CRLF#fried.",
  460.     ["subline"]="Take off your shirt but keep on the panties.",
  461.     ["min"]=20,
  462.     ["color"]="FF0000"
  463. },
  464. {
  465.     ["highlight"]="boat",
  466.     ["title"]="I'm on a#CRLF#boat.",
  467.     ["subline"]="It's hot! Take off your shirt, keep on your pants.",
  468.     ["min"]=20,
  469.     ["color"]="FF0000"
  470. },
  471. {
  472.     ["highlight"]="in bed.",
  473.     ["title"]="Meh...#CRLF#Just stay#CRLF#in bed.",
  474.     ["subline"]="You can browse Tumblr & play Angrybirds.",
  475.     ["condition"]="rain",
  476.     ["color"]="004A96"
  477. },
  478. {
  479.     ["highlight"]="in bed.",
  480.     ["title"]="Meh...#CRLF#Just stay#CRLF#in bed.",
  481.     ["subline"]="You can browse Tumblr & play Angrybirds.",
  482.     ["condition"]="sleet",
  483.     ["color"]="004A96"
  484. },
  485. {
  486.     ["highlight"]="in bed.",
  487.     ["title"]="Meh...#CRLF#Just stay#CRLF#in bed.",
  488.     ["subline"]="You can browse Tumblr & play Angrybirds.",
  489.     ["min"]=10,
  490.     ["condition"]="cloudy",
  491.     ["color"]="004A96"
  492. },
  493. {
  494.     ["highlight"]="in bed.",
  495.     ["title"]="Meh...#CRLF#Just stay#CRLF#in bed.",
  496.     ["subline"]="You can browse Tumblr & play Angrybirds.",
  497.     ["min"]=15,
  498.     ["condition"]="fog",
  499.     ["color"]="004A96"
  500. },
  501. {
  502.     ["highlight"]="beard.",
  503.     ["title"]="Grow a#CRLF#beard.",
  504.     ["subline"]="It's freezing outside, you will need it.",
  505.     ["max"]=4,
  506.     ["color"]="004A96"
  507. },
  508. {
  509.     ["highlight"]="amazing",
  510.     ["title"]="You look#CRLF#amazing#CRLF#today.",
  511.     ["subline"]="And so is the weather. You just need to believe it.",
  512.     ["min"]=15,
  513.     ["max"]=20,
  514.     ["color"]="FF0F66"
  515. },
  516. {
  517.     ["highlight"]="amazing",
  518.     ["title"]="You look#CRLF#amazing#CRLF#today.",
  519.     ["subline"]="And so is the weather.",
  520.     ["min"]=15,
  521.     ["condition"]="clear",
  522.     ["color"]="FF0F66"
  523. },
  524. {
  525.     ["color"]="FE730F",
  526.     ["condition"]="cloudy",
  527.     ["min"]=3,
  528.     ["title"]="It’s like#CRLF#a meh…#CRLF#kinda#CRLF#day.",
  529.     ["subline"]="But you can change it with a smile =) Or drugs.",
  530.     ["highlight"]="kinda",
  531.     ["max"]=9
  532. }
  533. }
  534.  
  535. function getphrase()
  536.     condition = SKIN:GetMeasure('MeasureIcon'):GetStringValue()
  537.     temp = SKIN:GetMeasure('MeasureTempC'):GetValue()
  538.     possiblePhrases = {}
  539.     for k,v in ipairs(phrase) do
  540.         if v['condition'] then
  541.             if string.match(v['condition'],condition) then
  542.                 if v['min'] then
  543.                     if temp >= v['min'] then
  544.                         if v['max'] then
  545.                             if temp <= v['max'] then
  546.                                 table.insert(possiblePhrases,k)
  547.                             end
  548.                         else
  549.                             table.insert(possiblePhrases,k)
  550.                         end
  551.                     end
  552.                 elseif v['max'] then
  553.                     if temp <= v['max'] then
  554.                         table.insert(possiblePhrases,k)
  555.                     end
  556.                 else
  557.                     table.insert(possiblePhrases,k)
  558.                 end
  559.             end
  560.         else
  561.             if v['min'] then
  562.                 if temp >= v['min'] then
  563.                     if v['max'] then
  564.                         if temp <= v['max'] then
  565.                             table.insert(possiblePhrases,k)
  566.                         end
  567.                     else
  568.                         table.insert(possiblePhrases,k)
  569.                     end
  570.                 end
  571.             elseif v['max'] then
  572.                 if temp <= v['max'] then
  573.                     table.insert(possiblePhrases,k)
  574.                 end
  575.             end
  576.         end
  577.     end
  578.     sorandom = possiblePhrases[math.random(1,#possiblePhrases)]
  579.     SKIN:Bang('!SetOption MeterString Text "'..phrase[sorandom]['title'])
  580.     SKIN:Bang('!SetOption MeterString InlinePattern "'..phrase[sorandom]['highlight'])
  581.     SKIN:Bang('!SetOption MeterString InlineSetting "Color|'..phrase[sorandom]['color'])
  582.     SKIN:Bang('!SetOption Subline Text "'..phrase[sorandom]['subline'])
  583.     SKIN:Bang('[!SetOption Icon ImageName "#@#Icon\\#*IconColor*#\\[*MeasureIcon*]"][!ShowMeter TempText][!UpdateMeterGroup Text][!UpdateMeterGroup Text]')
  584. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement