Jump to content
StaffEN

Mobs se atacan entre ellos

Recommended Posts

image.png.6846fcc9953da2d618e89c1769ecfb11.pngAlguien tiene idea del porque pasa esto?, los mobs se atacan entre ellos mismos, ya cambie el tipo de mapa pero aun sigue pasando eso, igual con los skills de area, afectan incluso a los mobs mismos

Share this post


Link to post
Share on other sites

Buen Dia,

Eso es por que tu AI esta modificado para que pase , tienes que buscar la en script/ai y revisa y compara con unos Files clean antes de publicar ayuda, si el problema no lo encuentras ahi entonces publica si necesitas ayuda, en la seccion de ingles en Question & Request y te ayudaremos !


xbx3.png

Share this post


Link to post
Share on other sites

Especificamente, creo que podrias mostrar la funcion llamada "is_friend" creo que es, y si mal no recuerdo, se encuentra en "functions.lua".

Share this post


Link to post
Share on other sites
5 hours ago, Angelix said:

Especificamente, creo que podrias mostrar la funcion llamada "is_friend" creo que es, y si mal no recuerdo, se encuentra en "functions.lua".

function is_friend(cha1, cha2) 
--    SystemNotice ( cha1, "transferis_friend" ) 
    local friend_target = 1 
    local Map_type = GetChaMapType( cha1 )
    if CheckChaRole( cha1 ) == 0 and Map_type ~= 2 then            --Èç¹ûcha1Ϊ¹ÖÎïÇÒ²»ÔÚ¹¤»áµØͼÖУ¬Ôòcha2Ϊ¹ÖÎïΪÓÑ·½£¬cha2ΪÈËΪµÐ·½
    if CheckChaRole( cha2 ) == 0 then                            
        return 1 
    else 
        return 0 
    end 

    end
          local map_name_cha1 = GetChaMapName(cha1)
    local map_name_cha2 = GetChaMapName(cha2)
    if (map_name_cha1 == map_name_cha2 and map_name_cha1 == "CTF") then
        if (GetChaSideID(cha1) == GetChaSideID(cha2)) then
            return 1
        else
            return 0
        end
    end 
--        SystemNotice ( cha1 , "1" ) 
--        SystemNotice ( cha1 , "Map_type ="..Map_type ) 
--        if Map_type == 4 then                                    --ÃÔ¹¬PKµØͼÓÑ·½ÅжÏ
--        local team = is_teammate(cha1, cha2) 
--        if team == 1 then 
--            return 1 
--        end 
--        else
--        return 0
--        end
        if Map_type == 1 then 
            if CheckChaRole ( cha1 ) == 1 then 
                    if CheckChaRole( cha2 ) == 0 then                            
                        return 0 
                    else 
                        return 1 
                    end 

            end 
        end 

        if Map_type == 4 then                                    --ÃÔ¹¬PKµØͼÓÑ·½ÅжÏ
            if Is_NormalMonster (cha1) == 1 then                        --Èç¹ûÊÇÆÕͨ¹ÖÎïÔòÓë¹ÖÎïÊÇÓÑ·½
                if Is_NormalMonster (cha2) == 1 then 
                    return 1 
                end 
            end 
            local team = is_teammate(cha1,cha2) 
            if team == 1 then 
                return 1 
            else 
                local guild_id1, guild_id2 
                guild_id1 = get_cha_guild_id(cha1) 
                guild_id2 = get_cha_guild_id(cha2) 
                if guild_id1 ~= 0 and guild_id2 ~= 0 and guild_id1 == guild_id2 then 
                    return 1  
                else
                    return 0 
                end
            end
            --local team = is_teammate(cha1,cha2) 
            --        if team == 1 then 
            --            return 1 
            --        else 
            --            return 0 
            --        end 
        end 

--            SystemNotice ( cha1 , "2" ) 

        if  Map_type ==3 then                                    --ÊǶÓÎéÕ½µØͼÔò¶ÓÓÑΪÓÑ·½
--        SystemNotice ( cha1 , "1" ) 
            local team = is_teammate(cha1, cha2) 
--                    SystemNotice ( cha1 , "2" ) 

            if team == 1 then 
--                    SystemNotice ( cha1 , "3" ) 
                return 1 
            else 
            return 0 
            end
           
        end

        if cha1 == 0 or cha2 == 0 then                            --Ö¸ÕëΪ¿Õ
            return 0 
        end 
--        SystemNotice ( cha1 , "3" ) 
        if Map_type == 2 then                                    --¹¤»áPKµØͼÅжÏ
        if Is_NormalMonster (cha1) == 1 then                        --Èç¹ûÊÇÆÕͨ¹ÖÎïÔòÓë¹ÖÎïÊÇÓÑ·½
            if Is_NormalMonster (cha2) == 1then 
                return 1 
            end 
        end 
        local guild_id1, guild_id2 
        guild_id1 = get_cha_guild_id(cha1) 
        guild_id2 = get_cha_guild_id(cha2) 
        if guild_id1 ~= 0 and guild_id2 ~= 0 and guild_id1 == guild_id2 then 
            return 1 
        else 
            return 0 
        end

        end 
        if Map_type == 5 then                                    --¹¤»áPKµØͼÅжÏ
--        if Is_NormalMonster (cha1) == 1 then                        --Èç¹ûÊÇÆÕͨ¹ÖÎïÔòÓë¹ÖÎïÊÇÓÑ·½
--            if Is_NormalMonster (cha2) == 1then 
--                return 1 
--            end 
--        end 
        local guild_side_1, guild_side_2 
        guild_side_1 = GetChaSideID(cha1) 
        guild_side_2 = GetChaSideID(cha2) 
        --if guild_side_1 <= 100 and guild_side_1 > 0 and guild_side_2 <= 100 and guild_side_2 > 0 then
        if guild_side_1 == guild_side_2 then
            return 1 
        --elseif
           --guild_side_1 > 100 and guild_side_1 <= 200 and guild_side_2 > 100 and guild_side_2 <= 200 then
            --return 1
            else
                return 0
        end

        end 
--        SystemNotice ( cha1 , "4" ) 

        return friend_target 
 end 

 

espero tu respuesta

Share this post


Link to post
Share on other sites

Solucionado, disculpen las molestias y muchas gracias por su atencion, el problema estaba en eso mismo que comento Angelix pero no fue problema del archivo functions.lua, sino que yo para otro mapa tenia una funcion tambien llamada "is_friend", con la cual al activar esa funcion, todos se pueden atacar entre todos, que es como un tipo "purga" o algo similar, solo tenia que cambiar el nombre de esa funcion jeje, nuevamente gracias por su atencion y por su apoyo.

Share this post


Link to post
Share on other sites
On 2/7/2024 at 1:02 AM, StaffEN said:

Solucionado, disculpen las molestias y muchas gracias por su atencion, el problema estaba en eso mismo que comento Angelix pero no fue problema del archivo functions.lua, sino que yo para otro mapa tenia una funcion tambien llamada "is_friend", con la cual al activar esa funcion, todos se pueden atacar entre todos, que es como un tipo "purga" o algo similar, solo tenia que cambiar el nombre de esa funcion jeje, nuevamente gracias por su atencion y por su apoyo.

El problema ha de haber sido que ese mapa intenta hacer hook la funcion "is_friend" pero no delimita las nuevas condiciones al nuevo mapa, si no que la sobreescribe por completo a la antigua funcion. 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...