Advertisement
Guest User

Untitled

a guest
Jun 4th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. <?php
  2.  
  3. $dir = "C:/Users/Heavenfall/Documents/My Games/FallenEnchantress/Mods/Gfx/Stormworld/ExpandedFactionsFE/Shadows/armor/xml";
  4.  
  5. // Open a known directory, and proceed to read its contents
  6. if (is_dir($dir)) {
  7. if ($dh = opendir($dir)) {
  8. while (($file = readdir($dh)) !== false) {
  9. if ($file != ".." && $file != ".") {
  10. print "$file\n";
  11. $openfile = fopen ("C:/Users/Heavenfall/Documents/My Games/FallenEnchantress/Mods/Gfx/Stormworld/ExpandedFactionsFE/Shadows/armor/xml/$file", 'r+');
  12. $storestring = fread($openfile, filesize("C:/Users/Heavenfall/Documents/My Games/FallenEnchantress/Mods/Gfx/Stormworld/ExpandedFactionsFE/Shadows/armor/xml/$file"));
  13. $storestring = str_replace("<hkparam name=\"name\">Metal</hkparam>", "<hkparam name=\"name\">Trans</hkparam>", $storestring);
  14. $storestring = str_replace("<hkparam name=\"name\">Skin</hkparam>", "<hkparam name=\"name\">Trans</hkparam>", $storestring);
  15. $storestring = str_replace("<hkparam name=\"name\">Hair</hkparam>", "<hkparam name=\"name\">Trans</hkparam>", $storestring);
  16. $storestring = str_replace("<hkparam name=\"name\">Clothing1</hkparam>", "<hkparam name=\"name\">Trans</hkparam>", $storestring);
  17. $storestring = str_replace("<hkparam name=\"name\">Clothing2</hkparam>", "<hkparam name=\"name\">Trans</hkparam>", $storestring);
  18. $storestring = str_replace("<hkparam name=\"name\">Primary</hkparam>", "<hkparam name=\"name\">Trans</hkparam>", $storestring);
  19. $storestring = str_replace("<hkparam name=\"name\">Secondary</hkparam>", "<hkparam name=\"name\">Trans</hkparam>", $storestring);
  20.  
  21.  
  22. fclose($openfile);
  23. $openfile = fopen ("C:/Users/Heavenfall/Documents/My Games/FallenEnchantress/Mods/Gfx/Stormworld/ExpandedFactionsFE/Shadows/armor/xml/$file", 'w');
  24. fwrite ($openfile, $storestring);
  25. }
  26. }
  27. closedir($dh);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement