Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Keiz' can_walk updater for the pre-fixed Azure
- // Skype: keiz.er
- function startsWith($haystack, $needle) {
- return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;
- }
- $fx = file_get_contents('furnidata.xml'); // Put the furnidata in the folder of this script.
- $xml = simplexml_load_string($fx);
- $xml = json_encode($xml);
- $xml = json_decode($xml, true);
- foreach($xml['roomitemtypes']['furnitype'] as $f)
- {
- $a = $f['@attributes'];
- $id = $a['classname'];
- $canwalk = $f['canstandon'];
- if($canwalk == 0) continue;
- if(startsWith($id, "hole")) continue;
- echo "UPDATE catalog_furnis SET can_walk = '" . $canwalk . "' WHERE item_name = '" . $id . "';<br>";
- }
- echo "UPDATE catalog_furnis SET can_walk = '0' WHERE interaction_type = 'teleport';<br>";
- echo "UPDATE catalog_furnis SET can_walk = '0' WHERE interaction_type = 'bb_pyramid';<br>";
- echo "UPDATE catalog_furnis SET can_walk = '0' WHERE interaction_type = 'banzaipyramid';";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement