cef

- |2347| -

Известный
Автор темы
356
118
Версия MoonLoader
.026-beta
Подскажите, как правильно делать регулировки для таких выражений через text:find.

window.executeEvent('event.property.list.pushItems', `[[{"id":1099,"type":"property","title":"Имя: Club","opened":1,"stats":[{"title":"Город","value":"San Fierro"},{"title":"Коммуналка","value":"$10600"},{"title":"Налог","value":"$0"}], "status": "normal","distance": 4544 }]]`);
 
Решение
Lua:
local text = 'window.executeEvent(\'event.property.list.pushItems\', `[[{"id":1099,"type":"property","title":"Имя: Club","opened":1,"stats":[{"title":"Город","value":"San Fierro"},{"title":"Коммуналка","value":"$10600"},{"title":"Налог","value":"$0"}], "status": "normal","distance": 4544 }]]`);'

local json = text:match('window.executeEvent%(\'event.property.list.pushItems\', `(.+)`%)');
local data = decodeJson(json);
for index, propertyInfo in pairs(data[1]) do
    print('Коммуналка:', propertyInfo.stats[2].value);
end

cloused2

Известный
392
132
дай полную строку из цефа
window.executeEvent('event.property.list.pushItems', `[[{"id":1099,"type":"property","title":"Имя: Club","opened":1,"stats":[{"title":"Город","value":"San Fierro"},{"title":"Коммуналка","value":"$10600"},{"title":"Налог","value":"$0"}], "status": "normal","distance": 4544 }]]`);
 

- |2347| -

Известный
Автор темы
356
118
дай полную строку из цефа
Ьwindow.executeEvent('event.property.list.pushItems', `[[{"id":1099,"type":"property","title":"Имя: Club","opened":1,"stats":[{"title":"Город","value":"San Fierro"},{"title":"Коммуналка","value":"$4500"},{"title":"Налог","value":"$0"}], "status": "normal","distance": 4314 }]]`);+ | 220, 17, 0, 0, 0, 0, 30, 1, 0, 0, 119, 105, 110, 100, 111, 119, 46, 101, 120, 101, 99, 117, 116, 101, 69, 118, 101, 110, 116, 40, 39, 101, 118, 101, 110, 116, 46, 112, 114, 111, 112, 101, 114, 116, 121, 46, 108, 105, 115, 116, 46, 112, 117, 115, 104, 73, 116, 101, 109, 115, 39, 44, 32, 96, 91, 91, 123, 34, 105, 100, 34, 58, 49, 48, 52, 56, 44, 34, 116, 121, 112, 101, 34, 58, 34, 112, 114, 111, 112, 101, 114, 116, 121, 34, 44, 34, 116, 105, 116, 108, 101, 34, 58, 34, 200, 236, 255, 58, 32, 67, 108, 117, 98, 32, 204, 224, 233, 237, 229, 240, 251, 34, 44, 34, 111, 112, 101, 110, 101, 100, 34, 58, 49, 44, 34, 115, 116, 97, 116, 115, 34, 58, 91, 123, 34, 116, 105, 116, 108, 101, 34, 58, 34, 195, 238, 240, 238, 228, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 34, 83, 97, 110, 32, 70, 105, 101, 114, 114, 111, 34, 125, 44, 123, 34, 116, 105, 116, 108, 101, 34, 58, 34, 202, 238, 236, 236, 243, 237, 224, 235, 234, 224, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 34, 36, 52, 53, 48, 48, 34, 125, 44, 123, 34, 116, 105, 116, 108, 101, 34, 58, 34, 205, 224, 235, 238, 227, 34, 44, 34, 118, 97, 108, 117, 101, 34, 58, 34, 36, 48, 34, 125, 93, 44, 32, 34, 115, 116, 97, 116, 117, 115, 34, 58, 32, 34, 110, 111, 114, 109, 97, 108, 34, 44, 34, 100, 105, 115, 116, 97, 110, 99, 101, 34, 58, 32, 52, 51, 49, 52, 32, 125, 93, 93, 96, 41, 59, 43, 0, 0, 0
 

chapo

чопа сребдс // @moujeek
Модератор
8,967
11,749
Lua:
local text = 'window.executeEvent(\'event.property.list.pushItems\', `[[{"id":1099,"type":"property","title":"Имя: Club","opened":1,"stats":[{"title":"Город","value":"San Fierro"},{"title":"Коммуналка","value":"$10600"},{"title":"Налог","value":"$0"}], "status": "normal","distance": 4544 }]]`);'

local json = text:match('window.executeEvent%(\'event.property.list.pushItems\', `(.+)`%)');
local data = decodeJson(json);
for index, propertyInfo in pairs(data[1]) do
    print('Коммуналка:', propertyInfo.stats[2].value);
end
 

- |2347| -

Известный
Автор темы
356
118
Lua:
local text = 'window.executeEvent(\'event.property.list.pushItems\', `[[{"id":1099,"type":"property","title":"Имя: Club","opened":1,"stats":[{"title":"Город","value":"San Fierro"},{"title":"Коммуналка","value":"$10600"},{"title":"Налог","value":"$0"}], "status": "normal","distance": 4544 }]]`);'

local json = text:match('window.executeEvent%(\'event.property.list.pushItems\', `(.+)`%)');
local data = decodeJson(json);
for index, propertyInfo in pairs(data[1]) do
    print('Коммуналка:', propertyInfo.stats[2].value);
end
Спасибо чапо