Guest User

Untitled

a guest
Feb 16th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <?php
  2. $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 ''
  3. $a= json_decode($arr,true);
  4. $counterthing = 56; // go to your claimData folder and put the number in _nextClaimID here
  5. $b=array_values($a);
  6. foreach($b as $values)
  7. {
  8. if(is_array($values)) {
  9.  
  10. foreach(array_keys($values) as $c){
  11.  
  12. $x1 = $a['Residences'][$c]['Areas']['main']['X1'];
  13. $y1 = $a['Residences'][$c]['Areas']['main']['Y1'];
  14. $z1 = $a['Residences'][$c]['Areas']['main']['Z1'];
  15. $x2 = $a['Residences'][$c]['Areas']['main']['X2'];
  16. $y2 = $a['Residences'][$c]['Areas']['main']['Y2'];
  17. $z2 = $a['Residences'][$c]['Areas']['main']['Z2'];
  18. $owner = $a['Residences'][$c]['Permissions']['Owner'];
  19.  
  20. $counterthing = $counterthing +1;
  21.  
  22. $File = $counterthing;
  23. $Handle = fopen($File, 'w');
  24. $Data = "VivaWorld;$x1;$y1;$z1;\nVivaWorld;$x2;$y2;$z2;\n$owner\n\n\n\n\n==========\n";
  25. fwrite($Handle, $Data);
  26. fclose($Handle);
  27. }
  28.  
  29. }
  30.  
  31.  
  32. }
  33.  
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment