mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-27 03:10:54 +00:00
#1470 final commit gsoc 2012; work continues...
This commit is contained in:
parent
dbaa15b488
commit
e00a4cec9c
6 changed files with 23 additions and 205 deletions
|
@ -1,132 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
* This is an example for evaluation scripts taken from the Ryzom Armory and adapted... it is a mess!
|
||||
*/
|
||||
|
||||
@include_once("script/include_InPoly_class.php");
|
||||
|
||||
function in_region($pos,$where) {
|
||||
$region = array();
|
||||
|
||||
/*$region['dunes_of_exile'] = array("16254 -25988","16510 -26034","16590 -25980","16644 -25866","16616 -25752","16664 -25630","16690 -25510","16788 -25302","16844 -25174","16792 -24680","16964 -24434","17020 -24100","16266 -23846","16118 -23882","16068 -24472","15936 -24610","15924 -24884","16176 -25508","16246 -25504","16274 -25684","16278 -25852","16206 -25928","16254 -25988");
|
||||
|
||||
$region['frahar_towers'] = array("16968 -24444","16798 -24652","16796 -24830","16822 -24982","16830 -25072","16848 -25166","16690 -25504","16620 -25760","16646 -25872","16598 -25964","16612 -26012","16768 -26018","16782 -25988","16812 -25990","16816 -26014","16860 -26010","16916 -26052","17004 -26040","17000 -25984","17102 -25928","17136 -25856","17152 -25732","17186 -25748","17182 -25992","17208 -26018","17268 -25994","17256 -25962","17340 -25914","17338 -25866","17394 -25834","17436 -25716","17436 -25586","17448 -25386","17454 -25026","17468 -24896","17472 -24736","17586 -24560","17606 -24488","17592 -24276","17594 -24154","16968 -24444");
|
||||
|
||||
$region['oflovaks_oasis'] = array("17400 -25838","17420 -25890","17508 -25872","17532 -25826","17568 -25820","17610 -25840","17634 -25876","17670 -25838","17662 -25776","17702 -25726","17700 -25662","17770 -25668","17774 -25602","17798 -25558","17784 -25498","17846 -25436","17960 -25454","17994 -25432","18074 -25444","18066 -25372","18090 -25304","18092 -25046","18152 -24862","18160 -24730","18154 -24644","18168 -24326","18122 -24196","17596 -24244","17588 -24338","17606 -24502","17512 -24684","17462 -24732","17460 -24846","17464 -25000","17446 -25078","17452 -25336","17430 -25604","17440 -25688","17400 -25838");
|
||||
|
||||
$region['imperial_dunes'] = array("18146 -24058","18134 -24212","18166 -24314","18154 -24648","18162 -24758","18130 -24936","18092 -25054","18090 -25308","18174 -25338","18236 -25420","18258 -25422","18274 -25466","18368 -25462","18454 -25496","18534 -25482","18570 -25420","18546 -25378","18560 -25332","18540 -25306","18548 -25250","18508 -25204","18572 -25178","18570 -25128","18602 -25114","18578 -25048","18586 -25016","18664 -25012","18668 -24964","18642 -24868","18660 -24784","18718 -24784","18702 -24846","18708 -24894","18724 -24940","18768 -24958","18762 -24890","18804 -24880","18822 -24844","18862 -24842","18888 -24862","18960 -24800","19012 -24830","19068 -24800","19124 -24776","19124 -24750","19066 -24730","19058 -24690","19102 -24668","19152 -24686","19224 -24622","19192 -24584","19220 -24532","19248 -24550","19320 -24476","19292 -24434","19320 -24404","19292 -24354","19330 -24322","19366 -24362","19406 -24356","19426 -24308","19506 -24274","19490 -24228","19592 -24042","-256048 -628","-256584 -628","18146 -24058");
|
||||
|
||||
$region['outlaw_canyon'] = array("18518 -25216","18560 -25262","18538 -25298","18558 -25342","18546 -25390","18576 -25420","18554 -25504","18518 -25548","18564 -25622","18560 -25708","18624 -25766","18660 -25852","18680 -25918","18726 -25970","18756 -26052","18800 -26090","18854 -26088","18878 -26122","18932 -26104","18932 -26046","18972 -26032","19044 -26056","19080 -26008","19122 -26064","19166 -26032","19220 -26112","19270 -26084","19254 -26022","19288 -25994","19392 -25972","19462 -26006","19536 -25966","19430 -25932","19326 -25918","19216 -25956","19110 -25906","19148 -25878","19130 -25822","19226 -25800","19158 -25766","19198 -25726","19202 -25676","19252 -25682","19264 -25612","19242 -25582","19196 -25586","19186 -25554","19232 -25546","19240 -25486","19312 -25484","19332 -25422","19378 -25396","19364 -25350","19398 -25344","19362 -25300","19364 -25238","19434 -25226","19456 -25272","19496 -25264","19504 -25208","19446 -25166","19502 -25118","19570 -25146","19590 -25082","19670 -24994","19734 -25000","19752 -24970","19742 -24938","19784 -24922","19860 -24974","19890 -24948","19876 -24892","19810 -24858","19862 -24798","19970 -24840","19958 -24896","19986 -24996","20020 -24884","20026 -24770","20086 -24722","20130 -24698","20196 -24704","20294 -24668","20310 -24618","20274 -24376","20034 -24250","19940 -24152","19772 -24088","19526 -24136","19494 -24228","19494 -24290","19434 -24308","19380 -24368","19330 -24330","19294 -24362","19314 -24412","19292 -24446","19310 -24484","19254 -24544","19218 -24536","19184 -24582","19224 -24616","19146 -24686","19080 -24666","19052 -24714","19144 -24762","19012 -24826","18956 -24802","18884 -24862","18842 -24840","18758 -24904","18770 -24956","18708 -24948","18720 -24900","18706 -24776","18652 -24776","18638 -24888","18666 -25002","18580 -25028","18604 -25122","18576 -25136","18560 -25198","18518 -25216");
|
||||
|
||||
$region['sawdust_mines'] = array("19284 -26078","19368 -26066","19660 -26082","19726 -26112","19786 -26070","19970 -26100","20094 -26078","19940 -25808","20222 -25488","20308 -25234","20314 -25064","20208 -24702","20122 -24704","20026 -24776","20012 -24930","19994 -25000","19948 -24896","19974 -24846","19872 -24808","19802 -24854","19886 -24904","19886 -24956","19850 -24974","19776 -24928","19732 -24948","19752 -24976","19710 -25000","19664 -24992","19608 -25096","19578 -25098","19572 -25136","19490 -25118","19450 -25176","19504 -25226","19500 -25268","19440 -25260","19422 -25228","19360 -25236","19370 -25310","19398 -25356","19306 -25460","19308 -25498","19236 -25504","19228 -25550","19188 -25562","19198 -25592","19244 -25586","19272 -25626","19254 -25676","19200 -25676","19182 -25742","19152 -25778","19224 -25798","19164 -25822","19126 -25824","19130 -25880","19098 -25904","19212 -25958","19340 -25916","19514 -25968","19470 -26006","19378 -25978","19280 -25994","19254 -26032","19284 -26078");
|
||||
|
||||
$region['savage_dunes'] = array("19272 -26074","19466 -26068","19718 -26102","19834 -26068","19978 -26096","20036 -26088","20310 -26460","20320 -26682","20320 -26800","20280 -26958","20206 -27022","19926 -26970","18092 -26922","18096 -26758","18032 -26680","17994 -26678","17956 -26610","18106 -26610","18116 -26576","18174 -26558","18210 -26602","18268 -26570","18296 -26606","18362 -26596","18410 -26622","18482 -26582","18534 -26568","18538 -26510","18466 -26462","18486 -26424","18568 -26398","18608 -26404","18648 -26392","18624 -26314","18646 -26244","18694 -26244","18688 -26202","18722 -26192","18728 -26116","18814 -26128","18824 -26090","18892 -26124","18936 -26094","18936 -26048","18968 -26032","19040 -26062","19082 -26008","19116 -26058","19164 -26026","19220 -26116","19272 -26074");
|
||||
|
||||
$region['scorched_corridor'] = array("17954 -26620","17108 -26814","16788 -26780","16274 -26616","16012 -26236","16094 -26036","16252 -26000","16504 -26054","16606 -25978","16618 -26022","16764 -26020","16786 -25970","16822 -26022","16872 -26010","16922 -26064","17004 -26036","17002 -25974","17134 -25914","17148 -25714","17196 -25760","17186 -25816","17200 -25876","17184 -25932","17208 -26022","17268 -26006","17254 -25954","17346 -25918","17346 -25854","17392 -25834","17426 -25888","17512 -25862","17534 -25818","17594 -25832","17636 -25874","17670 -25840","17666 -25772","17700 -25726","17692 -25654","17762 -25666","17796 -25552","17786 -25494","17842 -25438","18070 -25442","18068 -25364","18084 -25312","18176 -25338","18270 -25462","18548 -25492","18526 -25550","18572 -25648","18562 -25710","18618 -25762","18668 -25864","18698 -25952","18738 -25988","18778 -26074","18832 -26098","18782 -26134","18720 -26120","18724 -26196","18684 -26214","18676 -26252","18630 -26262","18650 -26394","18588 -26410","18492 -26438","18474 -26476","18542 -26526","18528 -26580","18430 -26618","18342 -26598","18290 -26604","18260 -26578","18200 -26602","18170 -26562","18114 -26584","18092 -26610","17954 -26620");
|
||||
|
||||
$region['nexus_minor'] = array("9160 -6100","7852 -6740","7892 -7168","8120 -7420","8356 -7612","8560 -7672","8668 -8320","-252676 -7900","9340 -7732","9436 -7352","9752 -7312","9668 -6640","9580 -6104","9160 -6100");
|
||||
|
||||
$region['winds_of_muse'] = array("14476 -30936","15300 -30864","15228 -31408","15460 -31656","15988 -31496","17036 -30592","16932 -29720","16460 -29528","15580 -29608","15116 -29680","14988 -29984","14588 -30000","14308 -30624","14476 -30936");
|
||||
|
||||
$region['bounty_beaches'] = array("14364 -31280","15172 -31280","15364 -31688","15228 -32184","15260 -33280","14924 -33320","14676 -33200","14284 -33336","13788 -33008","13764 -32784","13760 -32356","13852 -32080","13768 -31876","13780 -31636","13792 -31428","14364 -31280");
|
||||
|
||||
$region['fount'] = array("14276 -33456","14668 -33144","15052 -33440","15500 -33376","15916 -34232","16244 -34288","16284 -34632","15732 -34864","15396 -34800","14636 -34864","14268 -34592","14276 -33456");
|
||||
|
||||
$region['enchanted_isle'] = array("17036 -34072","16764 -34352","16956 -34744","17348 -34856","17668 -34864","18164 -34672","18388 -34520","18660 -34456","18636 -33584","18612 -33264","17428 -33472","17060 -33680","17036 -34072");
|
||||
|
||||
$region['liberty_lake'] = array("15228 -32288","15292 -32720","15284 -33256","15804 -33696","15848 -33752","16016 -33596","16180 -33444","16308 -33348","16408 -33328","16416 -33244","16580 -33180","16656 -33352","16844 -33516","17260 -33576","17980 -33320","18628 -33264","18740 -32512","18700 -31224","18668 -30600","17844 -30624","17796 -30856","17684 -31024","17640 -31324","17508 -31564","17620 -31684","17736 -31736","17768 -31812","17724 -31916","17524 -31948","17372 -32020","17380 -32116","17316 -32144","17292 -32252","17240 -32156","17116 -32124","16952 -32212","16892 -32124","16800 -32084","16784 -32000","16672 -31976","16604 -31912","16516 -31916","16468 -31848","16540 -31804","16480 -31760","16476 -31700","16180 -31432","15312 -31964","15228 -32288");
|
||||
|
||||
$region['dew_drops'] = array("17116 -30504","16188 -31392","16322 -31574","16476 -31706","16486 -31766","16546 -31806","16464 -31850","16534 -31934","16592 -31912","16694 -31982","16778 -31994","16800 -32086","16896 -32126","16944 -32212","17028 -32182","17102 -32128","17218 -32144","17270 -32186","17284 -32246","17322 -32240","17318 -32148","17386 -32116","17378 -32004","17554 -31936","17728 -31920","17776 -31814","17734 -31732","17632 -31690","17526 -31580","17514 -31552","17632 -31346","17686 -31030","17802 -30856","17850 -30658","17116 -30504");
|
||||
|
||||
$region['lagoons_of_loria'] = array("16956 -29960","17116 -30488","18540 -30472","18724 -30952","18700 -32000","19116 -32272","19776 -32084","19740 -31316","20000 -30688","19972 -29992","19476 -29760","19204 -29464","17988 -29456","17544 -29496","16956 -29960");
|
||||
|
||||
$region['resting_water'] = array("15748 -33856","15944 -34232","16352 -34384","16800 -34364","17048 -34040","17032 -33612","16886 -33542","16726 -33416","16646 -33354","16614 -33200","16530 -33196","16470 -33240","16430 -33246","16410 -33326","16286 -33366","16196 -33428","16130 -33496","16060 -33534","16022 -33612","15938 -33648","15908 -33698","15766 -33800","15748 -33856");
|
||||
|
||||
$region['hidden_source'] = array("356 -964","912 -1552","1244 -1940","1422 -2004","1546 -1918","1642 -1956","1674 -2012","1730 -2008","1758 -2040","1836 -2020","1832 -1968","1868 -1958","1876 -1888","2024 -1848","2048 -1800","2092 -1802","2108 -1756","2154 -1774","2202 -1764","2234 -1726","2196 -1674","2230 -1596","2266 -1588","2282 -1548","2350 -1518","2324 -1480","2334 -1448","2368 -1442","2374 -1350","2430 -1316","2466 -1322","2522 -1256","1996 -580","1560 -336","1236 -324","636 -416","320 -664","356 -964");
|
||||
|
||||
$region['knoll_of_dissent'] = array("1256 -2232","1976 -2888","2816 -2856","2988 -2790","3132 -2698","3274 -2624","3366 -2552","3522 -2542","3580 -2568","3656 -2566","3684 -2498","3836 -2412","4492 -2148","4460 -2042","4382 -1890","4320 -1848","4284 -1802","4204 -1742","4154 -1656","4080 -1620","3990 -1540","3942 -1522","3854 -1406","3780 -1388","3742 -1326","3590 -1180","2536 -1236","2472 -1310","2378 -1342","2366 -1444","2320 -1464","2340 -1524","2288 -1540","2268 -1582","2230 -1602","2196 -1674","2236 -1728","2198 -1766","2116 -1766","2078 -1800","2032 -1816","2030 -1850","1880 -1882","1866 -1962","1836 -1966","1832 -2020","1758 -2032","1726 -2012","1674 -2008","1638 -1952","1556 -1922","1296 -2072","1256 -2232");
|
||||
|
||||
$region['grove_of_confusion'] = array("3590 -1182","3748 -1330","3780 -1388","3858 -1402","3944 -1532","3986 -1534","4084 -1630","4140 -1644","4214 -1756","4304 -1822","4336 -1872","4372 -1882","4566 -2240","5292 -1924","6240 -1280","6240 -320","4352 -320","3664 -560","3590 -1182");
|
||||
|
||||
$region['majestic_garden'] = array("3842 -2410","3688 -2498","3654 -2570","3576 -2576","3524 -2544","3368 -2560","3234 -2644","3198 -2676","3106 -2706","2850 -2882","3320 -3472","3216 -3968","4240 -4764","4360 -4856","4428 -4844","4556 -4876","4632 -4868","4690 -4904","4756 -4926","4814 -4954","5232 -4934","5412 -4376","5124 -3908","5160 -3380","4936 -2948","4256 -2820","4184 -2564","3842 -2410");
|
||||
|
||||
$region['fleeting_garden'] = array("4056 -4740","4242 -4754","4354 -4852","4428 -4848","4540 -4876","4638 -4870","4690 -4912","4756 -4920","4810 -4954","5130 -4940","5424 -5552","6020 -5536","6176 -5656","6240 -6368","5988 -6440","5830 -6372","5722 -6286","5626 -6270","5572 -6224","5346 -6242","5302 -6270","5184 -6274","5100 -6306","4822 -6380","4552 -6020","4474 -5804","4410 -5718","4324 -5582","4202 -5416","4110 -5410","4036 -5354","4010 -5282","3812 -5116","3650 -4904","3902 -4726","4056 -4740");
|
||||
|
||||
$region['upper_bog'] = array("4588 -6150","4480 -5818","4416 -5720","4318 -5572","4210 -5426","4110 -5412","4044 -5356","4010 -5284","3810 -5112","3642 -4892","3388 -5268","3100 -5712","2904 -6848","2768 -7792","3636 -7788","4616 -7776","4520 -7288","4688 -6664","4588 -6150");
|
||||
|
||||
$region['heretics_hovel'] = array("4704 -6644","4444 -7236","4444 -7808","5784 -7832","6236 -7828","6236 -7096","6080 -6496","5906 -6396","5820 -6368","5758 -6320","5718 -6278","5628 -6270","5562 -6224","5440 -6240","5342 -6240","5304 -6274","5190 -6272","5120 -6302","5044 -6312","4806 -6388","4704 -6644");
|
||||
|
||||
$region['knot_of_dementia'] = array("6880 -1752","6884 -2472","7300 -3436","7904 -4088","8240 -4024","8404 -3908","8496 -3820","8620 -3720","8644 -3670","8614 -3636","8614 -3570","8652 -3546","8638 -3230","8596 -3198","8512 -3196","8454 -3098","8444 -2850","8466 -2654","8518 -2550","8802 -2558","8810 -2252","8924 -2206","8966 -2080","8958 -1982","9120 -1746","9184 -1542","9214 -1352","8800 -984","8296 -1016","7748 -1156","7352 -1340","7140 -1508","6880 -1544","6880 -1752");
|
||||
|
||||
$region['haven_of_purity'] = array("9222 -1344","9188 -1464","9178 -1574","9162 -1660","8958 -1978","8964 -2080","8924 -2214","8818 -2254","8792 -2582","8824 -2636","8752 -2712","8800 -2800","8816 -2866","8868 -2906","8954 -2880","9070 -2874","9114 -2926","9136 -3006","9192 -3052","9230 -3050","9280 -3106","9280 -3148","9330 -3198","9440 -3204","9498 -3322","9616 -3358","9876 -3356","9924 -3286","9918 -3202","9962 -3156","10082 -3038","10090 -2996","10022 -2956","10080 -2890","10128 -2856","10216 -2864","10238 -2830","10234 -2620","10142 -2542","10138 -2498","10080 -2484","10032 -2410","9846 -2388","9754 -2284","9758 -2116","9702 -1928","9662 -1506","9664 -1450","9854 -1276","9474 -1120","9274 -1146","9222 -1344");
|
||||
|
||||
$region['void'] = array("9808 -1342","9658 -1470","9672 -1640","9694 -1898","9724 -1996","9758 -2126","9754 -2286","9818 -2360","9832 -2394","10010 -2402","10046 -2420","10074 -2490","10134 -2494","10148 -2558","10222 -2602","10238 -2692","10290 -2718","10362 -2718","10406 -2788","10416 -2836","10484 -2884","10670 -2868","10730 -2852","10836 -2886","10878 -2958","10886 -3126","10950 -3198","11084 -3196","11128 -3240","11182 -3230","11206 -3178","11196 -2952","11284 -2870","11354 -2888","11432 -2868","11448 -2892","11420 -2914","11504 -2898","11528 -2858","11522 -2782","11588 -2722","11758 -2694","11904 -2638","11996 -2604","12054 -2614","12274 -2550","12428 -2516","12480 -2476","12480 -1232","11952 -980","10496 -1008","9808 -1342");
|
||||
|
||||
$region['cities_of_intuition'] = array("8086 -4048","8204 -4032","8348 -3958","8466 -3848","8558 -3784","8638 -3690","8612 -3578","8648 -3530","8634 -3228","8514 -3192","8456 -3108","8436 -2858","8474 -2632","8510 -2552","8792 -2554","8806 -2618","8828 -2638","8756 -2706","8756 -2750","8800 -2790","8810 -2866","8866 -2910","8950 -2878","9062 -2878","9126 -2948","9142 -3014","9236 -3056","9282 -3102","9284 -3158","9330 -3200","9442 -3200","9498 -3322","9634 -3358","9876 -3358","9950 -3346","10092 -3366","10168 -3410","10244 -3382","10240 -3504","10286 -3664","10346 -3668","10432 -3732","10408 -3848","10438 -3940","10376 -4002","10162 -3994","10084 -4060","10074 -4154","10152 -4250","10120 -4272","10084 -4366","10014 -4370","9936 -4326","9756 -4334","9400 -4588","9128 -4452","9008 -4176","8920 -4096","8236 -4112","8086 -4048");
|
||||
|
||||
$region['grove_of_umbra'] = array("9418 -4580","9616 -4422","9776 -4330","9932 -4324","10024 -4368","10092 -4370","10114 -4284","10154 -4246","10076 -4146","10098 -4046","10162 -3990","10380 -4008","10404 -4100","10472 -4156","10580 -4132","10696 -4160","10840 -4156","10890 -4090","10914 -4020","11006 -3970","11084 -3852","11136 -3832","11442 -3838","11502 -3890","11530 -3956","11590 -4008","11732 -3998","11860 -3992","12024 -3910","12240 -3804","12448 -3796","12468 -5896","11328 -5888","9756 -5340","9524 -5128","9418 -4580");
|
||||
|
||||
$region['maiden_grove'] = array("12272 -3794","12012 -3918","11870 -3988","11594 -4006","11520 -3934","11456 -3842","11272 -3830","11094 -3840","11002 -3974","10930 -4004","10888 -4062","10878 -4112","10834 -4150","10694 -4160","10602 -4132","10484 -4156","10404 -4098","10378 -4002","10442 -3936","10408 -3862","10430 -3760","10412 -3712","10330 -3660","10290 -3660","10254 -3588","10238 -3476","10236 -3378","10178 -3406","10092 -3362","9930 -3344","9876 -3348","9924 -3280","9922 -3192","10084 -3028","10088 -2990","10026 -2956","10088 -2878","10154 -2852","10216 -2868","10236 -2828","10236 -2690","10276 -2714","10352 -2716","10410 -2788","10416 -2834","10476 -2882","10662 -2868","10726 -2846","10820 -2874","10878 -2946","10886 -3086","10890 -3134","10948 -3200","11084 -3198","11124 -3236","11184 -3228","11206 -3176","11196 -2950","11224 -2912","11280 -2874","11346 -2884","11424 -2864","11428 -2904","11490 -2904","11522 -2860","11516 -2782","11574 -2720","11738 -2700","11994 -2600","12046 -2614","12346 -2540","12416 -2524","12432 -2860","12448 -3460","12272 -3794");
|
||||
|
||||
$region['under_spring'] = array("2596 -10496","2576 -10716","2628 -10912","3160 -11264","3436 -11272","3666 -11044","3726 -10666","3828 -10538","3782 -9890","3542 -9788","3348 -9788","2914 -10028","2612 -10276","2596 -10496");
|
||||
|
||||
$region['land_of_continuity'] = array("452 -13296","184 -13676","-259776 -5920","540 -14856","1176 -15120","1324 -14824","1420 -14784","1572 -14760","1920 -14528","1756 -14120","1740 -13752","1584 -13740","1636 -13392","1196 -13124","652 -13140","452 -13296");
|
||||
|
||||
$region['sunken_city'] = array("1768 -14184","1904 -14540","2696 -14556","2948 -14420","2924 -13780","2404 -13144","1852 -13132","1616 -13416","1604 -13708","1748 -13760","1768 -14184");
|
||||
|
||||
$region['forbidden_depths'] = array("1956 -14552","2716 -14568","3020 -14696","3020 -15352","2500 -15784","1956 -15840","1844 -15440","1108 -15240","1324 -14680","1956 -14552");
|
||||
|
||||
$region['windy_gate'] = array("5496 -10240","5480 -10904","5648 -11960","5888 -12000","6072 -12000","6192 -12016","6296 -11984","6468 -11988","6416 -11100","6332 -10148","6240 -9700","5952 -9644","5580 -9632","5444 -9888","5496 -10240");
|
||||
|
||||
$region['elusive_forest'] = array("5666 -11962","5898 -11996","6082 -12002","6198 -12022","6290 -11988","6448 -11996","6710 -11978","6756 -12280","7324 -12296","7348 -12824","6792 -13152","6660 -13588","6468 -13584","6300 -13612","6064 -13604","5828 -13564","5728 -12892","5568 -12160","5666 -11962");
|
||||
|
||||
$region['gate_of_obscurity'] = array("5922 -13596","6094 -13612","6306 -13618","6486 -13582","6670 -13584","6776 -14124","6876 -14592","6732 -15212","6908 -15308","6864 -15836","6712 -15854","6638 -15842","6530 -15854","6338 -15698","6120 -15410","6162 -14942","6154 -14562","5842 -14432","5954 -14004","5922 -13596");
|
||||
|
||||
$region['trench_of_trials'] = array("6348 -15714","6520 -15852","6664 -15846","6812 -15860","7022 -16332","7078 -16776","7082 -16900","6900 -16946","6582 -16892","6450 -16618","6150 -16906","5914 -16922","5526 -16926","5450 -16668","5462 -16394","5840 -16174","5882 -15768","5990 -15566","6348 -15714");
|
||||
|
||||
$region['abyss_of_ichor'] = array("492 -10932","508 -11288","672 -11348","924 -11328","1148 -11088","1488 -11164","1588 -10952","1568 -10636","1596 -9816","1004 -9768","852 -9812","616 -10296","484 -10652","492 -10932");*/
|
||||
|
||||
$region['silan_shining_lake'] = array("8876 -11020","8788 -10664","9020 -10528","9236 -10560","9348 -10820","9212 -11020","8876 -11020");
|
||||
|
||||
$region['silan_throne_room'] = array("9580 -10552","9412 -10740","9516 -10900","9876 -10840","10008 -10636","9792 -10468","9580 -10552");
|
||||
|
||||
$region['silan_blight_zone'] = array("9372 -10992","9224 -11112","9096 -11280","9076 -11664","9208 -11836","9772 -11832","9840 -11356","9604 -11036","9372 -10992");
|
||||
|
||||
$region['silan_arena'] = array("10208 -11534","10098 -11532","10092 -11644","10166 -11700","10218 -11694","10208 -11534");
|
||||
|
||||
$region['silan_hunting_grounds'] = array("10472 -10676","10212 -10980","10356 -11364","10988 -11512","11260 -11092","11060 -10760","10472 -10676");
|
||||
|
||||
$region['silan_rangers_land'] = array("10256 -11608","10186 -11652","10204 -11718","10338 -11710","10356 -11630","10256 -11608");
|
||||
|
||||
$region['silan_kami'] = array("10398 -11636","10338 -11670","10356 -11702","10488 -11708","10494 -11672","10398 -11636");
|
||||
|
||||
$region['silan_karavan'] = array("10314 -11814","10292 -11884","10498 -11888","10512 -11828","10314 -11814");
|
||||
|
||||
echo "pos!";
|
||||
|
||||
|
||||
if(!isset($region[$where])) {
|
||||
echo "unknown";
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$points = array();
|
||||
//load charpos & petpos
|
||||
#$comp = $DBc->sendSQL("SELECT c_pos_x,c_pos_y FROM ryzom_character WHERE c_xmlid='".$xmlid."'","ARRAY");
|
||||
#$points[] = floor($comp[0]['c_pos_x'])." ".floor($comp[0]['c_pos_y']);
|
||||
$points[] = floor($pos->x/1000)." ".floor($pos->y/1000);
|
||||
|
||||
$pointLocation = new pointLocation();
|
||||
|
||||
foreach($points as $point) {
|
||||
if($pointLocation->pointInPolygon($point, $region[$where], false) != "outside") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
echo "false";
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -1,70 +0,0 @@
|
|||
<?php
|
||||
class pointLocation {
|
||||
var $pointOnVertex = true; // Check if the point sits exactly on one of the vertices
|
||||
|
||||
function pointLocation() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
function pointInPolygon($point, $polygon, $pointOnVertex = true) {
|
||||
$this->pointOnVertex = $pointOnVertex;
|
||||
|
||||
// Transform string coordinates into arrays with x and y values
|
||||
$point = $this->pointStringToCoordinates($point);
|
||||
$vertices = array();
|
||||
foreach($polygon as $vertex) {
|
||||
$vertices[] = $this->pointStringToCoordinates($vertex);
|
||||
}
|
||||
|
||||
// Check if the point sits exactly on a vertex
|
||||
if($this->pointOnVertex == true and $this->pointOnVertex($point, $vertices) == true) {
|
||||
return "vertex";
|
||||
}
|
||||
|
||||
// Check if the point is inside the polygon or on the boundary
|
||||
$intersections = 0;
|
||||
$vertices_count = count($vertices);
|
||||
|
||||
for($i=1; $i < $vertices_count; $i++) {
|
||||
$vertex1 = $vertices[$i-1];
|
||||
$vertex2 = $vertices[$i];
|
||||
if($vertex1['y'] == $vertex2['y'] and $vertex1['y'] == $point['y'] and $point['x'] > min($vertex1['x'], $vertex2['x']) and $point['x'] < max($vertex1['x'], $vertex2['x'])) { // Check if point is on an horizontal polygon boundary
|
||||
return "boundary";
|
||||
}
|
||||
if($point['y'] > min($vertex1['y'], $vertex2['y']) and $point['y'] <= max($vertex1['y'], $vertex2['y']) and $point['x'] <= max($vertex1['x'], $vertex2['x']) and $vertex1['y'] != $vertex2['y']) {
|
||||
$xinters = ($point['y'] - $vertex1['y']) * ($vertex2['x'] - $vertex1['x']) / ($vertex2['y'] - $vertex1['y']) + $vertex1['x'];
|
||||
if($xinters == $point['x']) { // Check if point is on the polygon boundary (other than horizontal)
|
||||
return "boundary";
|
||||
}
|
||||
if($vertex1['x'] == $vertex2['x'] || $point['x'] <= $xinters) {
|
||||
$intersections++;
|
||||
}
|
||||
}
|
||||
}
|
||||
// If the number of edges we passed through is even, then it's in the polygon.
|
||||
if ($intersections % 2 != 0) {
|
||||
return "inside";
|
||||
}
|
||||
else {
|
||||
return "outside";
|
||||
}
|
||||
}
|
||||
|
||||
function pointOnVertex($point, $vertices) {
|
||||
foreach($vertices as $vertex) {
|
||||
if ($point == $vertex) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
function pointStringToCoordinates($pointString) {
|
||||
$coordinates = explode(" ", $pointString);
|
||||
return array("x" => $coordinates[0], "y" => $coordinates[1]);
|
||||
}
|
||||
}
|
||||
?>
|
Binary file not shown.
|
@ -69,6 +69,8 @@ if(!$_USER->isIG()) {
|
|||
'cookie' => true
|
||||
));
|
||||
|
||||
#code taken from facebook tutorial
|
||||
|
||||
// Get the url to redirect for login to facebook
|
||||
// and request permission to write on the user's wall.
|
||||
$login_url = $facebook->getLoginUrl(
|
||||
|
|
|
@ -74,7 +74,7 @@ require_once("class/CSRAtom_class.php");
|
|||
|
||||
$DBc = ryDB::getInstance("app_achievements_test");
|
||||
|
||||
function mkn($x) {
|
||||
function mkn($x) { // make NULL function for SQL
|
||||
global $DBc;
|
||||
if($x == null || strtolower($x) == "null" || $x == "") {
|
||||
return "NULL";
|
||||
|
@ -87,7 +87,7 @@ function mkn($x) {
|
|||
|
||||
$c = "<script type='text/javascript'>
|
||||
|
||||
function hs(id,mod) {
|
||||
function hs(id,mod) { // hide / show
|
||||
if(document.getElementById(id).style.display == 'none') {
|
||||
document.getElementById(id).style.display=mod;
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ $c = "<script type='text/javascript'>
|
|||
}
|
||||
}
|
||||
|
||||
function hs_force(id,mod,show) {
|
||||
function hs_force(id,mod,show) { // hide / show forced
|
||||
if(show == true) {
|
||||
document.getElementById(id).style.display=mod;
|
||||
}
|
||||
|
@ -137,6 +137,9 @@ $c = "<script type='text/javascript'>
|
|||
$c .= "</div></td>
|
||||
<td valign='top'>";
|
||||
|
||||
/*
|
||||
* translation
|
||||
*/
|
||||
if($_REQUEST['mode'] == "lang" && $_ADMIN->isAdmin()) {
|
||||
$c .= "<h1>Language Editor</h1>";
|
||||
|
||||
|
@ -211,6 +214,10 @@ $c .= "</div></td>
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* Trigger settings
|
||||
*/
|
||||
|
||||
if($_REQUEST['mode'] == "atom" && $_ADMIN->isAdmin()) {
|
||||
$c .= "<h1>Tigger Settings</h1>";
|
||||
|
||||
|
@ -282,6 +289,10 @@ $c .= "</div></td>
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* Menu settings
|
||||
*/
|
||||
|
||||
if($_REQUEST['mode'] == "menu" && $_ADMIN->isAdmin()) {
|
||||
$c .= "<h1>Menu Settings</h1>";
|
||||
|
||||
|
@ -326,6 +337,10 @@ $c .= "</div></td>
|
|||
$c .= adm_render_menu($menu);
|
||||
}
|
||||
|
||||
/*
|
||||
* Achievement settings
|
||||
*/
|
||||
|
||||
if($_REQUEST['mode'] == "ach" && $_ADMIN->isAdmin()) {
|
||||
$c .= "<h1>Achievement Settings</h1>";
|
||||
|
||||
|
@ -538,6 +553,9 @@ $c .= "</div></td>
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
* CSR player manager
|
||||
*/
|
||||
if($_REQUEST['mode'] == "player" && $_ADMIN->isCSR()) {
|
||||
$c .= "<h1>Player Administration</h1>";
|
||||
|
||||
|
|
Loading…
Reference in a new issue