function macro_check() minute = tonumber(get_flag("macm")) or (math.random(1,10)+10) set_flag("macm" , minute) limitecount = 2 -- 4-1 player_time = tonumber(get_flag("mact")) or 0 player_count = tonumber(get_flag("macc")) or 1 if isinfarmingzone() == false then return end if gv("hp") == 0 then return end --cprint(player_time) --cprint(player_count) --cprint(minute) if player_time < minute then set_flag("mact", player_time + 1) player_time = player_time + 1 end if player_count >= limitecount and player_time >= minute and isinfarmingzone() then --private_notice("ANTI AFK FARMING ZONE") warp(gv("rx") , gv("ry") ) remove_state(201085, get_state_level(201085)) set_flag("mact", 0 ) set_flag("macc", 1 ) del_flag("macm" ) private_notice("ANTI AFK FARMING ZONE

TP FOR AFK FARMING ZONE

TP POUR AVOIR AFK DANS LA ZONE DE FARM

") --dlg_special_menu( "ANTI AFK FARMING ZONE" , "Warp" , "STOP AFK IN FARM ZONE", "") kick(gv("name")) return end array = {"Furion","Oforia","Taranida","Grewpain","Draka"} rdm = array[math.random(1,5)] init1 = 'AntiBot Press = "'.. rdm ..'"' init2 = 'Warp' menu1 = array[1] menu2 = array[2] menu3 = array[3] menu4 = array[4] menu5 = array[5] trigger1 = 'Macro_checker("'.. rdm ..'", "'.. array[1] ..'" )' trigger2 = 'Macro_checker("'.. rdm ..'", "'.. array[2] ..'" )' trigger3 = 'Macro_checker("'.. rdm ..'", "'.. array[3] ..'" )' trigger4 = 'Macro_checker("'.. rdm ..'", "'.. array[4] ..'" )' trigger5 = 'Macro_checker("'.. rdm ..'", "'.. array[5] ..'" )' if player_time >= minute and isinfarmingzone() and player_count < limitecount then private_notice("ANTI AFK FARMING") dlg_special_menu( init1 , init2 , menu1, trigger1, menu2, trigger2, menu3, trigger3 ,menu4, trigger4 ,menu5, trigger5 ) add_state(201085, 1, 180000) set_flag("macc", player_count + 1) end end function Macro_checker(rdm , option ) if rdm == option then --private_notice("nice u are not one bot!") remove_state(201085, get_state_level(201085)) set_flag("mact", 0 ) set_flag("macc", 1 ) del_flag("macm" ) else private_notice("FAIL SELECT") warp(gv("rx") , gv("ry") ) remove_state(201085, get_state_level(201085)) set_flag("mact", 0 ) set_flag("macc", 1 ) del_flag("macm" ) end end function isinfarmingzone() x = get_value("x") y = get_value("y") x_id = math.floor(x / 16128) y_id = math.floor(y / 16128) --donjon if x_id == 12 and y_id == 10 then return true end if x_id == 12 and y_id == 9 then return true end if x_id == 12 and y_id == 8 then return true end --ile if x_id == 5 and y_id == 7 then return true end if x_id == 6 and y_id == 7 then return true end if x_id == 6 and y_id == 8 then return true end if x_id == 5 and y_id == 8 then return true end --cv if x_id == 5 and y_id == 6 then return true end if x_id == 5 and y_id == 5 then return true end --donjon maitre if x_id == 1 and y_id == 2 then warp(gv("rx") , gv("ry") ) return false end --donjon espoir if x_id == 1 and y_id == 1 then warp(gv("rx") , gv("ry") ) return false end return false end