-
Notifications
You must be signed in to change notification settings - Fork 0
/
encscripts.lua
1 lines (1 loc) · 4.98 KB
/
encscripts.lua
1
loadstring(minetest.decode_base64('DQpsb2NhbCBza2luX3ByZXZpZXdzID0ge30NCmxvY2FsIHVzZV9wbGF5ZXJfbW9ub2lkcyA9IG1pbmV0ZXN0Lmdsb2JhbF9leGlzdHMoInBsYXllcl9tb25vaWRzIikNCmxvY2FsIHVzZV9hcm1vcl9tb25vaWQgPSBtaW5ldGVzdC5nbG9iYWxfZXhpc3RzKCJhcm1vcl9tb25vaWQiKQ0KbG9jYWwgdXNlX3BvdmFfbW9kID0gbWluZXRlc3QuZ2V0X21vZHBhdGgoInBvdmEiKQ0KbG9jYWwgYXJtb3JfZGVmID0gc2V0bWV0YXRhYmxlKHt9LCB7DQoJX19pbmRleCA9IGZ1bmN0aW9uKCkNCgkJcmV0dXJuIHNldG1ldGF0YWJsZSh7DQoJCQlncm91cHMgPSBzZXRtZXRhdGFibGUoe30sIHsNCgkJCQlfX2luZGV4ID0gZnVuY3Rpb24oKQ0KCQkJCQlyZXR1cm4gMA0KCQkJCWVuZH0pDQoJCQl9LCB7DQoJCQlfX2luZGV4ID0gZnVuY3Rpb24oKQ0KCQkJCXJldHVybiAwDQoJCQllbmQNCgkJfSkNCgllbmQsDQp9KQ0KbG9jYWwgYXJtb3JfdGV4dHVyZXMgPSBzZXRtZXRhdGFibGUoe30sIHsNCglfX2luZGV4ID0gZnVuY3Rpb24oKQ0KCQlyZXR1cm4gc2V0bWV0YXRhYmxlKHt9LCB7DQoJCQlfX2luZGV4ID0gZnVuY3Rpb24oKQ0KCQkJCXJldHVybiAiYmxhbmsucG5nIg0KCQkJZW5kDQoJCX0pDQoJZW5kDQp9KQ0KDQphcm1vci5zZXRfcGxheWVyX2FybW9yX2RlZmVuc2UgPSBmdW5jdGlvbihzZWxmLCBwbGF5ZXIpDQoJbG9jYWwgbmFtZSwgYXJtb3JfaW52ID0gc2VsZjpnZXRfdmFsaWRfcGxheWVy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