rq_type_char = {
if = {
limit = { check_variable = { rq_caps = 1 } check_variable = { rq_ch < 27 } }
add_to_temp_variable = { rq_ch = 26 }
}
if = {
limit = { check_variable = { rq_typing = 1 } check_variable = { rq_tx_s^num < 16 } }
add_to_array = { rq_tx_s = rq_ch }
set_temp_variable = { rq_keep_typing = 1 }
rq_update = yes
}
else_if = {
limit = { check_variable = { rq_typing = 2 } check_variable = { rq_tx_n^num < 24 } }
add_to_array = { rq_tx_n = rq_ch }
}
}
rq_type_back = {
if = {
limit = { check_variable = { rq_typing = 1 } check_variable = { rq_tx_s^num > 0 } }
set_temp_variable = { rq_li = rq_tx_s^num }
subtract_from_temp_variable = { rq_li = 1 }
remove_from_array = { array = rq_tx_s index = rq_li }
set_temp_variable = { rq_keep_typing = 1 }
rq_update = yes
}
else_if = {
limit = { check_variable = { rq_typing = 2 } check_variable = { rq_tx_n^num > 0 } }
set_temp_variable = { rq_li = rq_tx_n^num }
subtract_from_temp_variable = { rq_li = 1 }
remove_from_array = { array = rq_tx_n index = rq_li }
}
}
rq_type_enter = {
if = {
limit = { check_variable = { rq_typing = 2 } check_variable = { rq_dlg = 1 } }
rq_save_do = yes
}
else = { set_variable = { rq_typing = 0 } }
}
rq_type_escape = {
if = {
limit = { check_variable = { rq_typing = 2 } check_variable = { rq_dlg = 1 } }
rq_dlg_close = yes
}
else = { set_variable = { rq_typing = 0 } }
}
rq_search_click = {
if = {
limit = { check_variable = { rq_typing = 1 } }
set_variable = { rq_typing = 0 }
}
else = { set_variable = { rq_typing = 1 } }
}
rq_dlg_toggle = {
if = {
limit = { check_variable = { rq_dlg = rq_dk } }
rq_dlg_close = yes
}
else = {
set_variable = { rq_msg = 0 }
set_variable = { rq_dlg = rq_dk }
rq_aps_close = yes
set_variable = { rq_ml_t = 0 }
set_variable = { rq_typing = 0 }
if = {
limit = { check_variable = { rq_dk = 3 } }
rq_st_refresh = yes
}
if = {
limit = { check_variable = { rq_dk = 1 } }
clear_array = rq_tx_n
set_variable = { rq_sv_n = rq_done^num }
for_each_loop = {
array = rq_queue
value = qv
index = qi
if = {
limit = { NOT = { check_variable = { rq_qsrc^qi = 1 } } }
add_to_variable = { rq_sv_n = 1 }
}
}
}
}
rq_pop_sync = yes
}
rq_dlg_close = {
set_variable = { rq_dlg = 0 }
set_variable = { rq_msg = 0 }
if = {
limit = { check_variable = { rq_typing = 2 } }
set_variable = { rq_typing = 0 }
}
rq_pop_sync = yes
}
rq_msg_set = {
set_variable = { rq_msg = rq_msgk }
add_to_variable = { rq_ld_dirty = 1 }
add_to_variable = { rq_msg_cn = 1 }
set_variable = { rq_msg_t = 2 }
rq_pop_sync = yes
}
rq_ld_dirty_chk = {
set_temp_variable = { rq_lds = rq_svlen^num }
multiply_temp_variable = { rq_lds = 100 }
add_to_temp_variable = { rq_lds = rq_msg }
multiply_temp_variable = { rq_lds = 4 }
add_to_temp_variable = { rq_lds = rq_dlg }
if = { limit = { has_country_flag = rq_q_open } add_to_temp_variable = { rq_lds = 100000 } }
if = {
limit = { NOT = { check_variable = { rq_lds = rq_ld_last } } }
set_variable = { rq_ld_last = rq_lds }
add_to_variable = { rq_ld_dirty = 1 }
}
}
rq_msg_tick = {
if = {
limit = { check_variable = { rq_msg_t > 0 } }
subtract_from_variable = { rq_msg_t = 1 }
if = {
limit = { check_variable = { rq_msg_t < 1 } }
set_variable = { rq_msg = 0 }
}
}
}
rq_save_do = {
clear_temp_array = rq_wl
clear_temp_array = rq_wlm
for_each_loop = {
array = rq_done
value = dv
index = di
set_temp_variable = { rq_lm = rq_donem^di }
add_to_temp_array = { rq_wl = dv }
add_to_temp_array = { rq_wlm = rq_lm }
}
for_each_loop = {
array = rq_queue
value = qv
index = qi
if = {
limit = { NOT = { check_variable = { rq_qsrc^qi = 1 } } }
set_temp_variable = { rq_lm = rq_qmio^qi }
add_to_temp_array = { rq_wl = qv }
add_to_temp_array = { rq_wlm = rq_lm }
}
}
if = {
limit = { check_variable = { rq_tx_n^num < 1 } }
add_to_array = { rq_tx_n = 43 }
add_to_array = { rq_tx_n = 21 }
add_to_array = { rq_tx_n = 5 }
add_to_array = { rq_tx_n = 21 }
add_to_array = { rq_tx_n = 5 }
add_to_array = { rq_tx_n = 63 }
set_temp_variable = { rq_nn = rq_svlen^num }
add_to_temp_variable = { rq_nn = 1 }
set_temp_variable = { rq_nt = 53 }
while_loop_effect = {
limit = { check_variable = { rq_nn > 9 } }
add_to_temp_variable = { rq_nt = 1 }
subtract_from_temp_variable = { rq_nn = 10 }
}
if = { limit = { check_variable = { rq_nt > 53 } } add_to_array = { rq_tx_n = rq_nt } }
add_to_temp_variable = { rq_nn = 53 }
add_to_array = { rq_tx_n = rq_nn }
}
set_variable = { rq_typing = 0 }
rq_wpicks = yes
set_temp_variable = { rq_dup = 0 }
set_temp_variable = { rq_do = 0 }
for_each_loop = {
array = rq_svlen
value = dl
index = di
if = {
limit = { check_variable = { dl = rq_wp^num } }
set_temp_variable = { rq_deq = 1 }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 0 } } set_temp_variable = { rq_c = rq_tx_n^0 } }
set_temp_variable = { rq_c2 = rq_nm0^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 1 } } set_temp_variable = { rq_c = rq_tx_n^1 } }
set_temp_variable = { rq_c2 = rq_nm1^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 2 } } set_temp_variable = { rq_c = rq_tx_n^2 } }
set_temp_variable = { rq_c2 = rq_nm2^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 3 } } set_temp_variable = { rq_c = rq_tx_n^3 } }
set_temp_variable = { rq_c2 = rq_nm3^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 4 } } set_temp_variable = { rq_c = rq_tx_n^4 } }
set_temp_variable = { rq_c2 = rq_nm4^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 5 } } set_temp_variable = { rq_c = rq_tx_n^5 } }
set_temp_variable = { rq_c2 = rq_nm5^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 6 } } set_temp_variable = { rq_c = rq_tx_n^6 } }
set_temp_variable = { rq_c2 = rq_nm6^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 7 } } set_temp_variable = { rq_c = rq_tx_n^7 } }
set_temp_variable = { rq_c2 = rq_nm7^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 8 } } set_temp_variable = { rq_c = rq_tx_n^8 } }
set_temp_variable = { rq_c2 = rq_nm8^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 9 } } set_temp_variable = { rq_c = rq_tx_n^9 } }
set_temp_variable = { rq_c2 = rq_nm9^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 10 } } set_temp_variable = { rq_c = rq_tx_n^10 } }
set_temp_variable = { rq_c2 = rq_nm10^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 11 } } set_temp_variable = { rq_c = rq_tx_n^11 } }
set_temp_variable = { rq_c2 = rq_nm11^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 12 } } set_temp_variable = { rq_c = rq_tx_n^12 } }
set_temp_variable = { rq_c2 = rq_nm12^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 13 } } set_temp_variable = { rq_c = rq_tx_n^13 } }
set_temp_variable = { rq_c2 = rq_nm13^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 14 } } set_temp_variable = { rq_c = rq_tx_n^14 } }
set_temp_variable = { rq_c2 = rq_nm14^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 15 } } set_temp_variable = { rq_c = rq_tx_n^15 } }
set_temp_variable = { rq_c2 = rq_nm15^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 16 } } set_temp_variable = { rq_c = rq_tx_n^16 } }
set_temp_variable = { rq_c2 = rq_nm16^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 17 } } set_temp_variable = { rq_c = rq_tx_n^17 } }
set_temp_variable = { rq_c2 = rq_nm17^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 18 } } set_temp_variable = { rq_c = rq_tx_n^18 } }
set_temp_variable = { rq_c2 = rq_nm18^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 19 } } set_temp_variable = { rq_c = rq_tx_n^19 } }
set_temp_variable = { rq_c2 = rq_nm19^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 20 } } set_temp_variable = { rq_c = rq_tx_n^20 } }
set_temp_variable = { rq_c2 = rq_nm20^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 21 } } set_temp_variable = { rq_c = rq_tx_n^21 } }
set_temp_variable = { rq_c2 = rq_nm21^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 22 } } set_temp_variable = { rq_c = rq_tx_n^22 } }
set_temp_variable = { rq_c2 = rq_nm22^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 23 } } set_temp_variable = { rq_c = rq_tx_n^23 } }
set_temp_variable = { rq_c2 = rq_nm23^di }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_dk = 0 }
while_loop_effect = {
limit = { check_variable = { rq_deq = 1 } check_variable = { rq_dk < dl } }
set_temp_variable = { rq_dx = rq_do }
add_to_temp_variable = { rq_dx = rq_dk }
set_temp_variable = { rq_c = rq_svq^rq_dx }
set_temp_variable = { rq_c2 = rq_wp^rq_dk }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
set_temp_variable = { rq_c = rq_svm^rq_dx }
set_temp_variable = { rq_c2 = rq_wpm^rq_dk }
if = { limit = { NOT = { check_variable = { rq_c = rq_c2 } } } set_temp_variable = { rq_deq = 0 } }
add_to_temp_variable = { rq_dk = 1 }
}
if = { limit = { check_variable = { rq_deq = 1 } } set_temp_variable = { rq_dup = 1 } }
}
add_to_temp_variable = { rq_do = dl }
}
if = {
limit = { check_variable = { rq_svlen^num > 29 } }
set_temp_variable = { rq_msgk = 11 }
rq_msg_set = yes
}
else_if = {
limit = { check_variable = { rq_wp^num < 1 } }
set_temp_variable = { rq_msgk = 12 }
rq_msg_set = yes
}
else_if = {
limit = { check_variable = { rq_dup = 1 } }
set_temp_variable = { rq_msgk = 13 }
rq_msg_set = yes
}
else = {
rq_flag_code = yes
rq_stream_put = yes
add_to_array = { rq_svpid = rq_pid }
set_temp_variable = { rq_sn = 0 }
for_each_loop = {
array = rq_wp
value = wv
index = wi
set_temp_variable = { rq_t = wv }
set_temp_variable = { rq_lm = rq_wpm^wi }
add_to_array = { rq_svq = rq_t }
add_to_array = { rq_svm = rq_lm }
add_to_temp_variable = { rq_sn = 1 }
}
add_to_array = { rq_svlen = rq_sn }
add_to_array = { rq_svf = rq_fc }
rq_sv_add_here = yes
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 0 } } set_temp_variable = { rq_c = rq_tx_n^0 } }
add_to_array = { rq_nm0 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 1 } } set_temp_variable = { rq_c = rq_tx_n^1 } }
add_to_array = { rq_nm1 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 2 } } set_temp_variable = { rq_c = rq_tx_n^2 } }
add_to_array = { rq_nm2 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 3 } } set_temp_variable = { rq_c = rq_tx_n^3 } }
add_to_array = { rq_nm3 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 4 } } set_temp_variable = { rq_c = rq_tx_n^4 } }
add_to_array = { rq_nm4 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 5 } } set_temp_variable = { rq_c = rq_tx_n^5 } }
add_to_array = { rq_nm5 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 6 } } set_temp_variable = { rq_c = rq_tx_n^6 } }
add_to_array = { rq_nm6 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 7 } } set_temp_variable = { rq_c = rq_tx_n^7 } }
add_to_array = { rq_nm7 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 8 } } set_temp_variable = { rq_c = rq_tx_n^8 } }
add_to_array = { rq_nm8 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 9 } } set_temp_variable = { rq_c = rq_tx_n^9 } }
add_to_array = { rq_nm9 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 10 } } set_temp_variable = { rq_c = rq_tx_n^10 } }
add_to_array = { rq_nm10 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 11 } } set_temp_variable = { rq_c = rq_tx_n^11 } }
add_to_array = { rq_nm11 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 12 } } set_temp_variable = { rq_c = rq_tx_n^12 } }
add_to_array = { rq_nm12 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 13 } } set_temp_variable = { rq_c = rq_tx_n^13 } }
add_to_array = { rq_nm13 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 14 } } set_temp_variable = { rq_c = rq_tx_n^14 } }
add_to_array = { rq_nm14 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 15 } } set_temp_variable = { rq_c = rq_tx_n^15 } }
add_to_array = { rq_nm15 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 16 } } set_temp_variable = { rq_c = rq_tx_n^16 } }
add_to_array = { rq_nm16 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 17 } } set_temp_variable = { rq_c = rq_tx_n^17 } }
add_to_array = { rq_nm17 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 18 } } set_temp_variable = { rq_c = rq_tx_n^18 } }
add_to_array = { rq_nm18 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 19 } } set_temp_variable = { rq_c = rq_tx_n^19 } }
add_to_array = { rq_nm19 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 20 } } set_temp_variable = { rq_c = rq_tx_n^20 } }
add_to_array = { rq_nm20 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 21 } } set_temp_variable = { rq_c = rq_tx_n^21 } }
add_to_array = { rq_nm21 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 22 } } set_temp_variable = { rq_c = rq_tx_n^22 } }
add_to_array = { rq_nm22 = rq_c }
set_temp_variable = { rq_c = 0 }
if = { limit = { check_variable = { rq_tx_n^num > 23 } } set_temp_variable = { rq_c = rq_tx_n^23 } }
add_to_array = { rq_nm23 = rq_c }
set_temp_variable = { rq_msgk = 1 }
if = { limit = { check_variable = { rq_pid > 0 } } set_temp_variable = { rq_msgk = 2 } }
rq_msg_set = yes
}
}
rq_sv_find = {
set_temp_variable = { rq_lo = 0 }
for_each_loop = {
array = rq_svlen
value = lv
index = li
if = {
limit = { check_variable = { li < rq_lsi } }
add_to_temp_variable = { rq_lo = lv }
}
}
set_temp_variable = { rq_ln = rq_svlen^rq_lsi }
}
rq_sv_delete = {
set_variable = { rq_msg = 0 }
rq_sv_find = yes
while_loop_effect = {
limit = { check_variable = { rq_ln > 0 } }
remove_from_array = { array = rq_svq index = rq_lo }
remove_from_array = { array = rq_svm index = rq_lo }
subtract_from_temp_variable = { rq_ln = 1 }
}
set_temp_variable = { rq_pid = rq_svpid^rq_lsi }
if = {
limit = { check_variable = { rq_pid < 0 } }
set_temp_variable = { rq_bj = rq_pid }
multiply_temp_variable = { rq_bj = -1 }
rq_bit_on = yes
}
add_to_array = { rq_pdel = rq_pid }
add_to_variable = { rq_ld_dirty = 1 }
remove_from_array = { array = rq_svlen index = rq_lsi }
remove_from_array = { array = rq_svf index = rq_lsi }
remove_from_array = { array = rq_svpid index = rq_lsi }
remove_from_array = { array = rq_nm0 index = rq_lsi }
remove_from_array = { array = rq_nm1 index = rq_lsi }
remove_from_array = { array = rq_nm2 index = rq_lsi }
remove_from_array = { array = rq_nm3 index = rq_lsi }
remove_from_array = { array = rq_nm4 index = rq_lsi }
remove_from_array = { array = rq_nm5 index = rq_lsi }
remove_from_array = { array = rq_nm6 index = rq_lsi }
remove_from_array = { array = rq_nm7 index = rq_lsi }
remove_from_array = { array = rq_nm8 index = rq_lsi }
remove_from_array = { array = rq_nm9 index = rq_lsi }
remove_from_array = { array = rq_nm10 index = rq_lsi }
remove_from_array = { array = rq_nm11 index = rq_lsi }
remove_from_array = { array = rq_nm12 index = rq_lsi }
remove_from_array = { array = rq_nm13 index = rq_lsi }
remove_from_array = { array = rq_nm14 index = rq_lsi }
remove_from_array = { array = rq_nm15 index = rq_lsi }
remove_from_array = { array = rq_nm16 index = rq_lsi }
remove_from_array = { array = rq_nm17 index = rq_lsi }
remove_from_array = { array = rq_nm18 index = rq_lsi }
remove_from_array = { array = rq_nm19 index = rq_lsi }
remove_from_array = { array = rq_nm20 index = rq_lsi }
remove_from_array = { array = rq_nm21 index = rq_lsi }
remove_from_array = { array = rq_nm22 index = rq_lsi }
remove_from_array = { array = rq_nm23 index = rq_lsi }
remove_from_array = { array = rq_svx index = rq_lsi }
remove_from_array = { array = rq_svtag index = rq_lsi }
remove_from_array = { array = rq_svva index = rq_lsi }
remove_from_array = { array = rq_svvb index = rq_lsi }
remove_from_array = { array = rq_svvc index = rq_lsi }
remove_from_array = { array = rq_svmod index = rq_lsi }
remove_from_array = { array = rq_svok index = rq_lsi }
remove_from_array = { array = rq_sd0 index = rq_lsi }
remove_from_array = { array = rq_sd1 index = rq_lsi }
remove_from_array = { array = rq_sd2 index = rq_lsi }
remove_from_array = { array = rq_sd3 index = rq_lsi }
remove_from_array = { array = rq_sd4 index = rq_lsi }
remove_from_array = { array = rq_sd5 index = rq_lsi }
remove_from_array = { array = rq_sd6 index = rq_lsi }
remove_from_array = { array = rq_sd7 index = rq_lsi }
remove_from_array = { array = rq_sd8 index = rq_lsi }
remove_from_array = { array = rq_sd9 index = rq_lsi }
remove_from_array = { array = rq_sd10 index = rq_lsi }
remove_from_array = { array = rq_sd11 index = rq_lsi }
remove_from_array = { array = rq_sd12 index = rq_lsi }
remove_from_array = { array = rq_sd13 index = rq_lsi }
remove_from_array = { array = rq_sd14 index = rq_lsi }
remove_from_array = { array = rq_sd15 index = rq_lsi }
remove_from_array = { array = rq_mn0 index = rq_lsi }
remove_from_array = { array = rq_mn1 index = rq_lsi }
remove_from_array = { array = rq_mn2 index = rq_lsi }
remove_from_array = { array = rq_mn3 index = rq_lsi }
remove_from_array = { array = rq_mn4 index = rq_lsi }
remove_from_array = { array = rq_mn5 index = rq_lsi }
remove_from_array = { array = rq_mn6 index = rq_lsi }
remove_from_array = { array = rq_mn7 index = rq_lsi }
remove_from_array = { array = rq_mn8 index = rq_lsi }
remove_from_array = { array = rq_mn9 index = rq_lsi }
remove_from_array = { array = rq_mn10 index = rq_lsi }
remove_from_array = { array = rq_mn11 index = rq_lsi }
remove_from_array = { array = rq_mn12 index = rq_lsi }
remove_from_array = { array = rq_mn13 index = rq_lsi }
remove_from_array = { array = rq_mn14 index = rq_lsi }
remove_from_array = { array = rq_mn15 index = rq_lsi }
rq_pop_sync = yes
}
rq_sv_clear = {
clear_array = rq_svq
clear_array = rq_svm
clear_array = rq_svlen
clear_array = rq_svf
clear_array = rq_svpid
clear_array = rq_nm0
clear_array = rq_nm1
clear_array = rq_nm2
clear_array = rq_nm3
clear_array = rq_nm4
clear_array = rq_nm5
clear_array = rq_nm6
clear_array = rq_nm7
clear_array = rq_nm8
clear_array = rq_nm9
clear_array = rq_nm10
clear_array = rq_nm11
clear_array = rq_nm12
clear_array = rq_nm13
clear_array = rq_nm14
clear_array = rq_nm15
clear_array = rq_nm16
clear_array = rq_nm17
clear_array = rq_nm18
clear_array = rq_nm19
clear_array = rq_nm20
clear_array = rq_nm21
clear_array = rq_nm22
clear_array = rq_nm23
clear_array = rq_svx
clear_array = rq_svtag
clear_array = rq_svva
clear_array = rq_svvb
clear_array = rq_svvc
clear_array = rq_svmod
clear_array = rq_svok
clear_array = rq_sd0
clear_array = rq_sd1
clear_array = rq_sd2
clear_array = rq_sd3
clear_array = rq_sd4
clear_array = rq_sd5
clear_array = rq_sd6
clear_array = rq_sd7
clear_array = rq_sd8
clear_array = rq_sd9
clear_array = rq_sd10
clear_array = rq_sd11
clear_array = rq_sd12
clear_array = rq_sd13
clear_array = rq_sd14
clear_array = rq_sd15
clear_array = rq_mn0
clear_array = rq_mn1
clear_array = rq_mn2
clear_array = rq_mn3
clear_array = rq_mn4
clear_array = rq_mn5
clear_array = rq_mn6
clear_array = rq_mn7
clear_array = rq_mn8
clear_array = rq_mn9
clear_array = rq_mn10
clear_array = rq_mn11
clear_array = rq_mn12
clear_array = rq_mn13
clear_array = rq_mn14
clear_array = rq_mn15
}
rq_search_prep = {
clear_temp_array = rq_ql
for_each_loop = {
array = rq_tx_s
value = sv
set_temp_variable = { rq_c = sv }
if = {
limit = { check_variable = { rq_c > 26 } check_variable = { rq_c < 53 } }
subtract_from_temp_variable = { rq_c = 26 }
}
add_to_temp_array = { rq_ql = rq_c }
}
}
rq_search_match = {
set_temp_variable = { rq_hit = 0 }
rq_name_codes = yes
set_temp_variable = { rq_mend = rq_nc^num }
subtract_from_temp_variable = { rq_mend = rq_ql^num }
add_to_temp_variable = { rq_mend = 1 }
set_temp_variable = { rq_ms = 0 }
while_loop_effect = {
limit = {
check_variable = { rq_hit = 0 }
check_variable = { rq_ms < rq_mend }
}
set_temp_variable = { rq_mok = 1 }
set_temp_variable = { rq_mj = 0 }
while_loop_effect = {
limit = {
check_variable = { rq_mok = 1 }
check_variable = { rq_mj < rq_ql^num }
}
set_temp_variable = { rq_mx = rq_ms }
add_to_temp_variable = { rq_mx = rq_mj }
set_temp_variable = { rq_ma = rq_nc^rq_mx }
set_temp_variable = { rq_mb2 = rq_ql^rq_mj }
if = {
limit = { NOT = { check_variable = { rq_ma = rq_mb2 } } }
set_temp_variable = { rq_mok = 0 }
}
add_to_temp_variable = { rq_mj = 1 }
}
if = {
limit = { check_variable = { rq_mok = 1 } }
set_temp_variable = { rq_hit = 1 }
}
add_to_temp_variable = { rq_ms = 1 }
}
}
rq_mio_restore = {
set_temp_variable = { rq_mgot = 0 }
every_military_industrial_organization = {
limit = { is_mio_available = yes }
if = {
limit = { check_variable = { rq_mgot = 0 } }
rq_mio_index_this = yes
if = {
limit = { check_variable = { rq_mio_i = rq_lm } }
rq_mio_fits = yes
if = {
limit = { check_variable = { rq_fit = 1 } }
ROOT = { set_variable = { rq_pick = PREV } }
set_temp_variable = { rq_mgot = 1 }
}
}
}
}
rq_q_find = yes
if = {
limit = { check_variable = { rq_mgot = 1 } }
set_temp_variable = { rq_val = rq_lm }
rq_assign_mio = yes
}
else = { rq_apply_auto = yes }
}
rq_load_do = {
if = {
limit = { NOT = { check_variable = { rq_svok^rq_lsi = 1 } } }
set_variable = { rq_msg_si = rq_lsi }
set_temp_variable = { rq_msgk = 21 }
rq_msg_set = yes
}
else = {
rq_load_go = yes
}
}
rq_load_go = {
rq_sv_find = yes
set_temp_variable = { rq_ci = rq_queue^num }
while_loop_effect = {
limit = { check_variable = { rq_ci > 0 } }
subtract_from_temp_variable = { rq_ci = 1 }
set_temp_variable = { rq_t = rq_queue^rq_ci }
if = {
limit = {
NOT = { is_in_array = { array = rq_vanilla value = rq_t } }
NOT = {
AND = {
has_game_rule = { rule = rq_lock_slots option = ON }
is_in_array = { array = rq_active value = rq_t }
}
}
}
rq_mio_clear = yes
set_temp_variable = { rq_qi = rq_ci }
rq_q_remove_at = yes
}
}
clear_temp_array = rq_added
set_temp_variable = { rq_lk = 0 }
while_loop_effect = {
limit = { check_variable = { rq_lk < rq_ln } }
set_temp_variable = { rq_lx = rq_lo }
add_to_temp_variable = { rq_lx = rq_lk }
set_temp_variable = { rq_t = rq_svq^rq_lx }
set_temp_variable = { rq_lm = rq_svm^rq_lx }
rq_check_owned = yes
rq_check_dead = yes
rq_q_find = yes
if = {
limit = {
check_variable = { rq_owned = 0 }
check_variable = { rq_dead = 0 }
check_variable = { rq_qi = -1 }
}
set_temp_variable = { rq_ins_t = rq_t }
set_temp_variable = { rq_ins_p = 0 }
set_temp_variable = { rq_ins_m = 0 }
set_temp_variable = { rq_ins_s = 0 }
set_temp_variable = { rq_qi = rq_queue^num }
rq_q_insert_at = yes
set_temp_variable = { rq_tl = rq_t }
add_to_temp_array = { rq_added = rq_tl }
set_temp_variable = { rq_lml = rq_lm }
rq_q_find = yes
set_temp_variable = { rq_pp = rq_qi }
rq_prereqs = yes
set_temp_variable = { rq_t = rq_tl }
set_temp_variable = { rq_lm = rq_lml }
if = {
limit = { check_variable = { rq_lm > 0 } }
rq_mio_restore = yes
}
else = {
rq_q_find = yes
rq_apply_auto = yes
}
}
add_to_temp_variable = { rq_lk = 1 }
}
rq_xor_sweep = yes
set_variable = { rq_ml_t = 0 }
set_variable = { rq_msg_si = rq_lsi }
set_temp_variable = { rq_msgk = 3 }
rq_msg_set = yes
rq_update = yes
}
