core = exports.oCore
color, r, g, b = core:getServerColor()
cmarker = exports.oCustomMarker
--font = exports.oFont
interface = exports.oInterface
inventory = exports.oInventory
chat = exports.oChat
bone = exports.oBone
job = exports.oJob

trash_objects = {
    {2672, 0.68}, 
    {2677, 0.68}, 
    {2674, 0.9}, 
    {2675, 0.9}, 
    {2673, 0.9},
    {2670, 0.9},
    {2840, 0.95},
    {2814, 0.95},
    {2839, 0.95},
    {2821, 0.95},
    {2856, 0.95},
}

text_wait = 60

texts = {
    ["start"] = {
        "Azt hittem már sosem kezdesz el dolgozni...",
        "Mellesleg üdvözöllek!",
        "Itt is van az első cím amire ki kell menned takarítani.",
        "Jó munkát, és kevés szemetet kívánok! Legyél minél gyorsabb!",
    },
    ["normal"] = {
        "Na végre, visszatértél...",
        "Tessék itt a következő cím amire ki kell menned.",
        "Jó munkát!"
    },
}

housepositions = {
    --{1623.1530761719, -1894.1378173828, 13.550086021423},
    {1180.4255371094, -1254.9686279297, 18.890762329102},
    {1142.6934814453, -1093.1544189453, 28.1875},
    {1333.8464355469, -1266.7452392578, 13.546875},
    {1326.4940185547, -1067.7713623047, 31.5546875},
    {1410.4484863281, -920.86395263672, 38.421875},
    {2156.4340820313, -1071.8416748047, 39.892322540283},
    {2189.1657714844, -1082.3471679688, 43.71798324585},
    {2492.1403808594, -1239.4018554688, 37.905414581299},
    {2623.2749023438, -1229.4075927734, 53.6796875},
    {2756.1145019531, -1181.2739257813, 69.396560668945},
    {2379.3024902344, -1785.3245849609, 13.546875},
    {2139.0515136719, -1698.7196044922, 15.078443527222},
    {2015.0573730469, -1716.3861083984, 13.554683685303},
    {1980.8337402344, -1719.1217041016, 17.030546188354},
    {1974.8746337891, -1633.9481201172, 18.568988800049},
    {1910.0405273438, -1598.6123046875, 14.306245803833},
    {1733.8572998047, -2098.4931640625, 14.036639213562},
    {1734.7786865234, -2129.8330078125, 14.021014213562},
    {653.37469482422, -1714.0015869141, 14.764795303345},
    {693.7919921875, -1705.6888427734, 3.8194825649261},
    {766.55810546875, -1605.8216552734, 13.803857803345},
    {776.74932861328, -1036.4920654297, 24.280162811279},
    {1539.3583984375, -850.63360595703, 64.336059570313},
    {1527.392578125, -772.83215332031, 80.578125},
    {1045.1990966797, -641.50463867188, 120.1171875},
    {899.31793212891, -678.45922851563, 116.89044189453},
    {612.06115722656, -1085.1260986328, 58.826656341553},
    {558.00317382813, -1160.3405761719, 54.422348022461},
    {471.37704467773, -1165.0932617188, 67.104080200195},
    {143.31050109863, -1469.8317871094, 25.203598022461},
    {192.73179626465, -1770.0645751953, 4.3098516464233},
    {263.96597290039, -1766.0666503906, 4.7556009292603},
    {315.59652709961, -1770.8446044922, 4.6739902496338},
    {507.65646362305, -1607.9738769531, 16.399541854858},
    {1667.7175292969, -1409.0828857422, 13.546875},
    {1677.1224365234, -1462.2873535156, 13.553773880005},
    {1690.8911132813, -1458.6156005859, 13.546875},
    {1685.8314208984, -1462.8481445313, 13.546875},
    {2153.7243652344, -1242.1051025391, 25.285774230957},
    {2230.2385253906, -1281.5659179688, 25.3671875},
    {2250.2082519531, -1280.4144287109, 25.4765625},

    -- Red County
    {313.21551513672, -121.18361663818, 3.5353941917419},
    {2204.9682617188, 106.21240997314, 28.44164276123},
    {2324.8361816406, 136.33419799805, 28.44164276123},
    {2415.505859375, -51.752468109131, 28.153547286987},
    {2550.734375, 91.950141906738, 27.675647735596},
    
    -- red country v2
    {2249.2661132812,111.11064910889,28.44164276123},
    {2269.4689941406,111.16893768311,28.441644668579},
    {2413.4604492188,61.137199401855,28.44164276123},
    {2443.1110839844,60.903728485107,28.44164276123},
    {2439.0122070312,-54.430923461914,28.153549194336},
    {2367.5778808594,-62.560726165771,28.153547286987},
    {2272.4768066406,-118.56056213379,28.153547286987},
    {744.01171875,-590.78558349609,18.012922286987},
    {745.32708740234,-570.47631835938,18.013334274292},
    {768.29656982422,-504.24212646484,18.012926101685},
    {2363.4040527344,142.06802368164,28.44164276123},
    {2324.6176757812,190.82447814941,28.44164276123},
    {2258.2062988281,167.51133728027,28.153551101685},

}

randinteriors = {
    --interiorid,interiorx,y,z
    {5,22.79996,1404.642,1084.43},
    {5,227.5617980957, 1114.2365722656, 1080.9993896484},
    {5,140.32577514648, 1366.9681396484, 1083.859375},
    {6,234.34999084473, 1064.8571777344, 1084.2105712891},
    {6,-68.850860595703, 1352.3098144531, 1080.2109375},
    {3,235.10081481934, 1188.1052246094, 1080.2578125},
    {2, 2467.9487304688,-1698.1713867188,1013.5078125},
    {3, 2495.8591308594,-1692.6229248047,1014.7421875},
}

interiorkoszok = {
    {
        bin = {pos = Vector3(21.371379852295, 1405.3096923828, 1084.4296875), rot = 268},
        {16.176774978638, 1407.9168701172, 1084.4296875},
        {30.737838745117, 1405.6253662109, 1084.4296875},
        {26.457866668701, 1406.3929443359, 1084.4296875},
        {31.213422775269, 1413.6456298828, 1084.4296875},
        {28.379722595215, 1417.3208007813, 1084.4296875},
        {17.723094940186, 1411.2734375, 1084.4296875},
        {20.317861557007, 1415.9140625, 1084.4296875},
    },

    {
        bin = {pos = Vector3(231.8818359375, 1113.2667236328, 1080.9921875), rot = 5},
        {226.87496948242, 1106.9509277344, 1080.9921875},
        {230.68037414551, 1106.2440185547, 1080.9921875},
        {226.81192016602, 1111.3397216797, 1080.9995117188},
        {233.52537536621, 1109.1785888672, 1080.9921875},
        {233.93659973145, 1117.4033203125, 1080.9921875},
        {239.51734924316, 1118.9901123047, 1080.9921875},
        {239.29539489746, 1116.2829589844, 1080.9921875},
        {236.66909790039, 1117.8393554688, 1080.9921875},
        {247.3694152832, 1113.2493896484, 1080.9921875},
        {246.0281829834, 1106.5139160156, 1080.9921875},
        {242.69445800781, 1111.1151123047, 1080.9995117188},
        {242.94580078125, 1119.0773925781, 1080.9921875},
        {249.62156677246, 1119.0014648438, 1082.9921875},
        {247.5152130127, 1115.3112792969, 1084.9964599609},
        {243.38569641113, 1107.8267822266, 1085.0390625},
        {240.44465637207, 1111.6971435547, 1085.0390625},
        {232.5855255127, 1114.4571533203, 1084.998046875},
        {237.54217529297, 1114.9100341797, 1084.9942626953},
        {231.61776733398, 1106.6658935547, 1085.015625},
        {231.80819702148, 1111.8703613281, 1085.015625},
    },

    {
        bin = {pos = Vector3(142.35023498535, 1365.9252929688, 1083.859375), rot = 0},
        {145.06782531738, 1373.1942138672, 1083.8637695313},
        {152.10330200195, 1368.9487304688, 1083.859375},
        {147.6009979248, 1375.8341064453, 1083.859375},
        {135.61654663086, 1376.4650878906, 1083.8669433594},
        {152.34825134277, 1376.0244140625, 1083.859375},
        {136.9508972168, 1386.7095947266, 1083.8695068359},
        {141.21826171875, 1384.8154296875, 1083.8671875},
        {138.64976501465, 1385.8626708984, 1083.8671875},
        {141.52655029297, 1379.9291992188, 1083.8671875},
        {144.67683410645, 1385.4995117188, 1083.8645019531},
        {152.81335449219, 1386.533203125, 1083.859375},
        {146.96144104004, 1379.6495361328, 1083.859375},
        {152.56044006348, 1379.0540771484, 1083.859375},
        {143.80685424805, 1382.0635986328, 1083.8662109375},
        {150.00009155273, 1380.2780761719, 1088.3671875},
        {143.6565246582, 1378.7521972656, 1088.3671875},
        {140.69299316406, 1379.9085693359, 1088.3671875},
        {136.43046569824, 1384.0594482422, 1088.3671875},
        {145.00621032715, 1385.8024902344, 1088.3671875},
    },

    {
        bin = {pos = Vector3(230.97398376465, 1064.3068847656, 1084.2102050781), rot = 271},
        {236.30523681641, 1067.462890625, 1084.2067871094},
        {220.56739807129, 1072.2822265625, 1084.1953125},
        {222.08345031738, 1076.0795898438, 1084.1953125},
        {228.35252380371, 1080.4827880859, 1084.2294921875},
        {223.66859436035, 1084.8819580078, 1084.1998291016},
        {234.50569152832, 1083.2072753906, 1084.234375},
        {231.85679626465, 1075.6759033203, 1084.2414550781},
        {236.41328430176, 1075.9478759766, 1084.234375},
        {243.24081420898, 1075.8868408203, 1084.1875},
        {247.17025756836, 1073.1839599609, 1084.1875},
        {243.8383026123, 1082.6358642578, 1084.1921386719},
        {247.43495178223, 1080.0621337891, 1084.1875},
        {239.57754516602, 1079.9929199219, 1087.8203125},
        {235.51091003418, 1083.783203125, 1087.8203125},
        {229.47486877441, 1084.9096679688, 1087.828125},
        {225.25782775879, 1086.6140136719, 1087.828125},
    },

    {
        bin = {pos = Vector3(-67.346435546875, 1351.3125, 1080.2109375), rot = 359},
        {-60.874691009521, 1362.3050537109, 1080.2185058594},
        {-59.997230529785, 1365.8400878906, 1080.2109375},
        {-71.199234008789, 1364.9708251953, 1080.2185058594},
        {-65.307739257813, 1362.12109375, 1080.2109375},
        {-61.982940673828, 1355.4752197266, 1080.2109375},
        {-65.295112609863, 1353.8942871094, 1080.2185058594},
        {-69.89493560791, 1354.9494628906, 1080.2109375},
    },

    {
        bin = {pos = Vector3(231.06512451172, 1187.5346679688, 1080.2578125), rot = 270},
        {239.54345703125, 1187.7012939453, 1080.2645263672},
        {244.87631225586, 1191.3155517578, 1080.2578125},
        {239.00434875488, 1195.2542724609, 1080.2578125},
        {236.79763793945, 1191.8802490234, 1080.2645263672},
        {231.14672851563, 1197.7757568359, 1080.2578125},
        {232.70304870605, 1202.7087402344, 1080.2578125},
        {224.41578674316, 1200.5667724609, 1080.2696533203},
        {226.95471191406, 1196.7874755859, 1080.2666015625},
        {236.30859375, 1207.4467773438, 1080.2578125},
        {233.54647827148, 1206.2526855469, 1080.2578125},
        {224.41691589355, 1193.5433349609, 1084.40625},
        {228.59266662598, 1196.7142333984, 1084.40625},
        {234.31030273438, 1190.1420898438, 1084.4174804688},
        {232.54469299316, 1202.9398193359, 1084.4163818359},
        {233.74699401855, 1211.7399902344, 1084.3785400391},
        {237.76301574707, 1207.9680175781, 1084.3688964844},
    },

    {
        bin = {pos = Vector3(2449.6962890625,-1696.3736572266,1013.5078125), rot = 0},
        {2450.3479003906,-1690.0462646484,1013.5078125},
        {2448.2329101562,-1694.4437255859,1013.5078125},
        {2449.8774414062,-1703.173828125,1013.5078125},
        {2456.0051269531,-1705.9903564453,1013.5078125},
        {2465.3967285156,-1698.3588867188,1013.5151977539},
        {2459.9780273438,-1698.1225585938,1013.5078125},
        {2458.7075195312,-1693.2004394531,1013.5078125},
        {2456.9096679688,-1695.0524902344,1013.5078125},
    },

    {
        bin = {pos = Vector3(2497.9436035156,-1694.16796875,1014.734375), rot = 270},
        {2496.4096679688,-1695.7557373047,1014.7421875},
        {2491.5297851562,-1700.9114990234,1014.7520751953},
        {2498.9548339844,-1708.3596191406,1014.7421875},
        {2493.2600097656,-1711.0565185547,1014.7421875},
        {2495.8005371094,-1705.7242431641,1014.7421875},
        {2497.3312988281,-1703.2275390625,1014.7421875},
        {2499.5319824219,-1707.0747070312,1018.34375},
        {2492.4436035156,-1707.5404052734,1018.3367919922},
        {2492.8989257812,-1703.0451660156,1018.34375},
        {2495.3251953125,-1704.0903320312,1018.34375},
        {2495.634765625,-1700.5268554688,1018.34375},
    }
}

function shadowedText(text,x,y,w,h,color,fontsize,font,aligX,alignY)
    dxDrawText(text:gsub("#%x%x%x%x%x%x",""),x,y+1,w,h+1,tocolor(0,0,0,255),fontsize,font,aligX,alignY, false, false, false, true) 
    dxDrawText(text:gsub("#%x%x%x%x%x%x",""),x,y-1,w,h-1,tocolor(0,0,0,255),fontsize,font,aligX,alignY, false, false, false, true)
    dxDrawText(text:gsub("#%x%x%x%x%x%x",""),x-1,y,w-1,h,tocolor(0,0,0,255),fontsize,font,aligX,alignY, false, false, false, true) 
    dxDrawText(text:gsub("#%x%x%x%x%x%x",""),x+1,y,w+1,h,tocolor(0,0,0,255),fontsize,font,aligX,alignY, false, false, false, true) 
    dxDrawText(text,x,y,w,h,color,fontsize,font,aligX,alignY, false, false, false, true)
end