Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $arr=''; // go to http://yaml-online-parser.appspot.com/ insert your residence world yaml there then get the result and copy it into here inbetween the ''
- $a= json_decode($arr,true);
- $counterthing = 56; // go to your claimData folder and put the number in _nextClaimID here
- $b=array_values($a);
- foreach($b as $values)
- {
- if(is_array($values)) {
- foreach(array_keys($values) as $c){
- $x1 = $a['Residences'][$c]['Areas']['main']['X1'];
- $y1 = $a['Residences'][$c]['Areas']['main']['Y1'];
- $z1 = $a['Residences'][$c]['Areas']['main']['Z1'];
- $x2 = $a['Residences'][$c]['Areas']['main']['X2'];
- $y2 = $a['Residences'][$c]['Areas']['main']['Y2'];
- $z2 = $a['Residences'][$c]['Areas']['main']['Z2'];
- $owner = $a['Residences'][$c]['Permissions']['Owner'];
- $counterthing = $counterthing +1;
- $File = $counterthing;
- $Handle = fopen($File, 'w');
- $Data = "VivaWorld;$x1;$y1;$z1;\nVivaWorld;$x2;$y2;$z2;\n$owner\n\n\n\n\n==========\n";
- fwrite($Handle, $Data);
- fclose($Handle);
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment