MOTR logo
    • Категории
    • Последние
    • Популярные
    • Метки
    • Пользователи
    • Группы
    • Зарегистрироваться
    • Войти

    Гайд по написанию скриптов для гомункулусов

    Запланировано Прикреплена Закрыта Перенесена Жизнь в пробирке
    528 Сообщения 60 Posters 51.3k Просмотры
    Загружаем больше сообщений
    • Сначала старые
    • Сначала новые
    • По количеству голосов
    Ответить
    • Ответить, создав новую тему
    Авторизуйтесь, чтобы ответить
    Эта тема была удалена. Только пользователи с правом управления темами могут её видеть.
    • JdMJ Не в сети
      JdM
      отредактировано

      Loneliness, эта функция?

      ! [code:1v9tylrq]--------------------------------------------------
      ! function GetMyEnemy_AnyNoKS(myid)
      ! --------------------------------------------------
      ! -- Log(string.format("---- AGGRESSIVE SCAN STARTED for ID (%d)", myid))
      ! local result = 0
      ! local actors = GetActors ()
      ! local players = {}
      ! local player_idx = 1
      ! local enemy_1st = {} -- primary targets
      ! local index_1st = 1
      ! local enemy_std = {} -- normal targets
      ! local index_std = 1
      ! local enemy_lss = {} -- last targets
      ! local index_lss = 1
      ! local mob_type, mob_target, mobBehav, ListedType
      ! local EnemyMaxHP
      ! local HomunMaxHP = GetV(V_MAXHP, MyID)
      !
      ! for i,v in ipairs(actors) do -- fill the (not "friend") player list
      ! if (v ~= OwnerID and v ~= MyID) then
      ! if (0 == IsMonster(v)) then
      ! if isNotFriend(v) then
      ! players[player_idx] = v
      ! player_idx = player_idx + 1
      ! end
      ! end
      ! end
      ! end
      !
      ! for i,v in ipairs(actors) do
      ! if (v ~= OwnerID) and (v ~= MyID) then -- owner and homunculus aren't valid target, of course
      ! if (IsMonster(v) == 1) and (BlockedPathToEnemyID ~= v) then -- if target is a (reachable) monster
      !
      ! local isOKToAttack = false
      ! mob_type = GetV(V_HOMUNTYPE, v) -- get tact data
      ! mobBehav = GetTact(V_TACTBEHAV, mob_type)
      ! if( (mobBehav == BEHA_attack_1st)
      ! or (mobBehav == BEHA_attack)
      ! or (mobBehav == BEHA_attack_last)
      ! or (mobBehav == BEHA_attack_weak)
      ! ) then -- OK, this a type of monster to attack
      ! if isMobMotionOK(v, players) then
      ! mob_target = GetV(V_TARGET, v) -- check for the monster's target
      ! if (mob_target == 0) then -- if the monster is not in battle
      ! isOKToAttack = true -- he/she can be attacked, unless...
      ! for i2,v2 in ipairs(players) do
      ! if (v == GetV(V_TARGET, v2)) then
      ! isOKToAttack = false -- ...another player is already aiming at him/her (anti-KS)
      ! break
      ! end
      ! end
      ! else -- else, if the monster is already in battle
      ! if (mob_target == MyID)
      ! or (mob_target == OwnerID)
      ! or (not isNotFriend(mob_target))
      ! or IsMonster2(mob_target) then
      ! isOKToAttack = true -- but with me/my owner/a friend, it's OK (anti-KS)
      ! end
      ! end
      ! end
      ! end
      !
      ! if isOKToAttack then
      ! if (mobBehav == BEHA_attack_1st) then
      ! enemy_1st[index_1st] = v
      ! index_1st = index_1st + 1
      ! -- Log(string.format(" added to (1st) as enemyID %d", v))
      ! elseif (mobBehav == BEHA_attack) then
      ! enemy_std[index_std] = v
      ! index_std = index_std + 1
      ! -- Log(string.format(" added to (std) as enemyID %d", v))
      ! else -- BEHA_attack_last, BEHA_attack_weak
      ! enemy_lss[index_lss] = v
      ! index_lss = index_lss + 1
      ! -- Log(string.format(" added to (lss) as enemyID %d", v))
      ! end
      ! end
      !
      ! end
      ! end
      ! end
      !
      ! -- Searches for nearest target ---------------
      ! result = GetClosest(enemy_1st)
      ! if (result == 0) then
      ! -- Log("No primary target in range")
      ! result = GetClosest(enemy_std)
      ! end
      ! if (result == 0) then
      ! -- Log("No standard target in range")
      ! result = GetClosest(enemy_lss)
      ! end
      ! if (result == 0) then
      ! -- Log("No target in range")
      ! else
      ! Log(string.format("<aggressive scan> Target found (ID %d):", result))
      ! HTact = GetFullTact(GetV(V_HOMUNTYPE, result))
      ! end
      !
      ! BlockedPathToEnemyID = 0
      ! -- Log("---- END OF AGGRESSIVE SCAN")
      ! return result
      ! end
      ! [/code:1v9tylrq]

      1 ответ Последний ответ Ответить Цитировать 0
      • JdMJ Не в сети
        JdM
        отредактировано

        Loneliness, эта функция?

        ! [code:1v9tylrq]--------------------------------------------------
        ! function GetMyEnemy_AnyNoKS(myid)
        ! --------------------------------------------------
        ! -- Log(string.format("---- AGGRESSIVE SCAN STARTED for ID (%d)", myid))
        ! local result = 0
        ! local actors = GetActors ()
        ! local players = {}
        ! local player_idx = 1
        ! local enemy_1st = {} -- primary targets
        ! local index_1st = 1
        ! local enemy_std = {} -- normal targets
        ! local index_std = 1
        ! local enemy_lss = {} -- last targets
        ! local index_lss = 1
        ! local mob_type, mob_target, mobBehav, ListedType
        ! local EnemyMaxHP
        ! local HomunMaxHP = GetV(V_MAXHP, MyID)
        !
        ! for i,v in ipairs(actors) do -- fill the (not "friend") player list
        ! if (v ~= OwnerID and v ~= MyID) then
        ! if (0 == IsMonster(v)) then
        ! if isNotFriend(v) then
        ! players[player_idx] = v
        ! player_idx = player_idx + 1
        ! end
        ! end
        ! end
        ! end
        !
        ! for i,v in ipairs(actors) do
        ! if (v ~= OwnerID) and (v ~= MyID) then -- owner and homunculus aren't valid target, of course
        ! if (IsMonster(v) == 1) and (BlockedPathToEnemyID ~= v) then -- if target is a (reachable) monster
        !
        ! local isOKToAttack = false
        ! mob_type = GetV(V_HOMUNTYPE, v) -- get tact data
        ! mobBehav = GetTact(V_TACTBEHAV, mob_type)
        ! if( (mobBehav == BEHA_attack_1st)
        ! or (mobBehav == BEHA_attack)
        ! or (mobBehav == BEHA_attack_last)
        ! or (mobBehav == BEHA_attack_weak)
        ! ) then -- OK, this a type of monster to attack
        ! if isMobMotionOK(v, players) then
        ! mob_target = GetV(V_TARGET, v) -- check for the monster's target
        ! if (mob_target == 0) then -- if the monster is not in battle
        ! isOKToAttack = true -- he/she can be attacked, unless...
        ! for i2,v2 in ipairs(players) do
        ! if (v == GetV(V_TARGET, v2)) then
        ! isOKToAttack = false -- ...another player is already aiming at him/her (anti-KS)
        ! break
        ! end
        ! end
        ! else -- else, if the monster is already in battle
        ! if (mob_target == MyID)
        ! or (mob_target == OwnerID)
        ! or (not isNotFriend(mob_target))
        ! or IsMonster2(mob_target) then
        ! isOKToAttack = true -- but with me/my owner/a friend, it's OK (anti-KS)
        ! end
        ! end
        ! end
        ! end
        !
        ! if isOKToAttack then
        ! if (mobBehav == BEHA_attack_1st) then
        ! enemy_1st[index_1st] = v
        ! index_1st = index_1st + 1
        ! -- Log(string.format(" added to (1st) as enemyID %d", v))
        ! elseif (mobBehav == BEHA_attack) then
        ! enemy_std[index_std] = v
        ! index_std = index_std + 1
        ! -- Log(string.format(" added to (std) as enemyID %d", v))
        ! else -- BEHA_attack_last, BEHA_attack_weak
        ! enemy_lss[index_lss] = v
        ! index_lss = index_lss + 1
        ! -- Log(string.format(" added to (lss) as enemyID %d", v))
        ! end
        ! end
        !
        ! end
        ! end
        ! end
        !
        ! -- Searches for nearest target ---------------
        ! result = GetClosest(enemy_1st)
        ! if (result == 0) then
        ! -- Log("No primary target in range")
        ! result = GetClosest(enemy_std)
        ! end
        ! if (result == 0) then
        ! -- Log("No standard target in range")
        ! result = GetClosest(enemy_lss)
        ! end
        ! if (result == 0) then
        ! -- Log("No target in range")
        ! else
        ! Log(string.format("<aggressive scan> Target found (ID %d):", result))
        ! HTact = GetFullTact(GetV(V_HOMUNTYPE, result))
        ! end
        !
        ! BlockedPathToEnemyID = 0
        ! -- Log("---- END OF AGGRESSIVE SCAN")
        ! return result
        ! end
        ! [/code:1v9tylrq]

        1 ответ Последний ответ Ответить Цитировать 0
        • LonelinessL Не в сети
          Loneliness
          отредактировано

          Да, эта, спасибо ^^ У меня она просто переписана для возможности выставления численных приоритетов и для ограничения минимальных хп/сп по мобам.

          Как-то так должно быть. Не проверяла, но правка достаточно очевидна. Тут мобы для танкования считаются наиболее приоритетными наравне с attack_1st.

          ! [code:vrf7va6g]--------------------------------------------------
          ! function GetMyEnemy_AnyNoKS(myid)
          ! --------------------------------------------------
          ! -- Log(string.format("---- AGGRESSIVE SCAN STARTED for ID (%d)", myid))
          ! local result = 0
          ! local actors = GetActors ()
          ! local players = {}
          ! local player_idx = 1
          ! local enemy_1st = {} -- primary targets
          ! local index_1st = 1
          ! local enemy_std = {} -- normal targets
          ! local index_std = 1
          ! local enemy_lss = {} -- last targets
          ! local index_lss = 1
          ! local mob_type, mob_target, mobBehav, ListedType
          ! local EnemyMaxHP
          ! local HomunMaxHP = GetV(V_MAXHP, MyID)
          !
          ! for i,v in ipairs(actors) do -- fill the (not "friend") player list
          ! if (v ~= OwnerID and v ~= MyID) then
          ! if (0 == IsMonster(v)) then
          ! if isNotFriend(v) then
          ! players[player_idx] = v
          ! player_idx = player_idx + 1
          ! end
          ! end
          ! end
          ! end
          !
          ! for i,v in ipairs(actors) do
          ! if (v ~= OwnerID) and (v ~= MyID) then -- owner and homunculus aren't valid target, of course
          ! if (IsMonster(v) == 1) and (BlockedPathToEnemyID ~= v) then -- if target is a (reachable) monster
          !
          ! local isOKToAttack = false
          ! mob_type = GetV(V_HOMUNTYPE, v) -- get tact data
          ! mobBehav = GetTact(V_TACTBEHAV, mob_type)
          ! if( (mobBehav == BEHA_attack_1st)
          ! or (mobBehav == BEHA_attack)
          ! or (mobBehav == BEHA_attack_last)
          ! or (mobBehav == BEHA_attack_weak)
          ! or (mobBehav == BEHA_tank)
          ! ) then -- OK, this a type of monster to attack
          ! if isMobMotionOK(v, players) then
          ! mob_target = GetV(V_TARGET, v) -- check for the monster's target
          ! if (mob_target == 0) then -- if the monster is not in battle
          ! isOKToAttack = true -- he/she can be attacked, unless...
          ! for i2,v2 in ipairs(players) do
          ! if (v == GetV(V_TARGET, v2)) then
          ! isOKToAttack = false -- ...another player is already aiming at him/her (anti-KS)
          ! break
          ! end
          ! end
          ! else -- else, if the monster is already in battle
          ! if (mob_target == MyID)
          ! or (mob_target == OwnerID)
          ! or (not isNotFriend(mob_target))
          ! or IsMonster2(mob_target) then
          ! isOKToAttack = true -- but with me/my owner/a friend, it's OK (anti-KS)
          ! end
          ! end
          ! end
          ! end
          !
          ! if isOKToAttack then
          ! if ((mobBehav == BEHA_attack_1st) or (mobBehav == BEHA_tank)) then
          ! enemy_1st[index_1st] = v
          ! index_1st = index_1st + 1
          ! -- Log(string.format(" added to (1st) as enemyID %d", v))
          ! elseif (mobBehav == BEHA_attack) then
          ! enemy_std[index_std] = v
          ! index_std = index_std + 1
          ! -- Log(string.format(" added to (std) as enemyID %d", v))
          ! else -- BEHA_attack_last, BEHA_attack_weak
          ! enemy_lss[index_lss] = v
          ! index_lss = index_lss + 1
          ! -- Log(string.format(" added to (lss) as enemyID %d", v))
          ! end
          ! end
          !
          ! end
          ! end
          ! end
          !
          ! -- Searches for nearest target ---------------
          ! result = GetClosest(enemy_1st)
          ! if (result == 0) then
          ! -- Log("No primary target in range")
          ! result = GetClosest(enemy_std)
          ! end
          ! if (result == 0) then
          ! -- Log("No standard target in range")
          ! result = GetClosest(enemy_lss)
          ! end
          ! if (result == 0) then
          ! -- Log("No target in range")
          ! else
          ! Log(string.format("<aggressive scan> Target found (ID %d):", result))
          ! HTact = GetFullTact(GetV(V_HOMUNTYPE, result))
          ! end
          !
          ! BlockedPathToEnemyID = 0
          ! -- Log("---- END OF AGGRESSIVE SCAN")
          ! return result
          ! end[/code:vrf7va6g]

          upd: Aiko Star, несложно, но смысла не вижу. Мне это нужно в основном, чтобы лифка добавляла 25% и не била моба дальше. Лешие и так не переагриваются, а лесавки очень быстро умирают (и у меня таки 194 фли). Ну, и на касты с расстояния лесавки тоже не идут (а если пойдут, то хом сразу начнёт их кусать), поэтому хрупкие интовые химы, по идее, тоже в безопасности.

          Но если что, выглядеть это будет примерно так:

          [code:vrf7va6g] if ( (EnemyTarget ~= MyID) or (HTact.Behav ~= BEHA_tank) or ((GetTick() - AgrPrevention_Last) > AgrPrevention_Delay ) then
          DoCombat()
          AgrPrevention_Last = GetTick()
          end[/code:vrf7va6g]

          И где-нибудь в конфиг.луа объявить, соответственно,
          AgrPrevention_Last = 0
          AgrPrevention_Delay = 5000
          (последнее - задержка между попинываниями в миллисекундах)

          1 ответ Последний ответ Ответить Цитировать 0
          • LonelinessL Не в сети
            Loneliness
            отредактировано

            Да, эта, спасибо ^^ У меня она просто переписана для возможности выставления численных приоритетов и для ограничения минимальных хп/сп по мобам.

            Как-то так должно быть. Не проверяла, но правка достаточно очевидна. Тут мобы для танкования считаются наиболее приоритетными наравне с attack_1st.

            ! [code:vrf7va6g]--------------------------------------------------
            ! function GetMyEnemy_AnyNoKS(myid)
            ! --------------------------------------------------
            ! -- Log(string.format("---- AGGRESSIVE SCAN STARTED for ID (%d)", myid))
            ! local result = 0
            ! local actors = GetActors ()
            ! local players = {}
            ! local player_idx = 1
            ! local enemy_1st = {} -- primary targets
            ! local index_1st = 1
            ! local enemy_std = {} -- normal targets
            ! local index_std = 1
            ! local enemy_lss = {} -- last targets
            ! local index_lss = 1
            ! local mob_type, mob_target, mobBehav, ListedType
            ! local EnemyMaxHP
            ! local HomunMaxHP = GetV(V_MAXHP, MyID)
            !
            ! for i,v in ipairs(actors) do -- fill the (not "friend") player list
            ! if (v ~= OwnerID and v ~= MyID) then
            ! if (0 == IsMonster(v)) then
            ! if isNotFriend(v) then
            ! players[player_idx] = v
            ! player_idx = player_idx + 1
            ! end
            ! end
            ! end
            ! end
            !
            ! for i,v in ipairs(actors) do
            ! if (v ~= OwnerID) and (v ~= MyID) then -- owner and homunculus aren't valid target, of course
            ! if (IsMonster(v) == 1) and (BlockedPathToEnemyID ~= v) then -- if target is a (reachable) monster
            !
            ! local isOKToAttack = false
            ! mob_type = GetV(V_HOMUNTYPE, v) -- get tact data
            ! mobBehav = GetTact(V_TACTBEHAV, mob_type)
            ! if( (mobBehav == BEHA_attack_1st)
            ! or (mobBehav == BEHA_attack)
            ! or (mobBehav == BEHA_attack_last)
            ! or (mobBehav == BEHA_attack_weak)
            ! or (mobBehav == BEHA_tank)
            ! ) then -- OK, this a type of monster to attack
            ! if isMobMotionOK(v, players) then
            ! mob_target = GetV(V_TARGET, v) -- check for the monster's target
            ! if (mob_target == 0) then -- if the monster is not in battle
            ! isOKToAttack = true -- he/she can be attacked, unless...
            ! for i2,v2 in ipairs(players) do
            ! if (v == GetV(V_TARGET, v2)) then
            ! isOKToAttack = false -- ...another player is already aiming at him/her (anti-KS)
            ! break
            ! end
            ! end
            ! else -- else, if the monster is already in battle
            ! if (mob_target == MyID)
            ! or (mob_target == OwnerID)
            ! or (not isNotFriend(mob_target))
            ! or IsMonster2(mob_target) then
            ! isOKToAttack = true -- but with me/my owner/a friend, it's OK (anti-KS)
            ! end
            ! end
            ! end
            ! end
            !
            ! if isOKToAttack then
            ! if ((mobBehav == BEHA_attack_1st) or (mobBehav == BEHA_tank)) then
            ! enemy_1st[index_1st] = v
            ! index_1st = index_1st + 1
            ! -- Log(string.format(" added to (1st) as enemyID %d", v))
            ! elseif (mobBehav == BEHA_attack) then
            ! enemy_std[index_std] = v
            ! index_std = index_std + 1
            ! -- Log(string.format(" added to (std) as enemyID %d", v))
            ! else -- BEHA_attack_last, BEHA_attack_weak
            ! enemy_lss[index_lss] = v
            ! index_lss = index_lss + 1
            ! -- Log(string.format(" added to (lss) as enemyID %d", v))
            ! end
            ! end
            !
            ! end
            ! end
            ! end
            !
            ! -- Searches for nearest target ---------------
            ! result = GetClosest(enemy_1st)
            ! if (result == 0) then
            ! -- Log("No primary target in range")
            ! result = GetClosest(enemy_std)
            ! end
            ! if (result == 0) then
            ! -- Log("No standard target in range")
            ! result = GetClosest(enemy_lss)
            ! end
            ! if (result == 0) then
            ! -- Log("No target in range")
            ! else
            ! Log(string.format("<aggressive scan> Target found (ID %d):", result))
            ! HTact = GetFullTact(GetV(V_HOMUNTYPE, result))
            ! end
            !
            ! BlockedPathToEnemyID = 0
            ! -- Log("---- END OF AGGRESSIVE SCAN")
            ! return result
            ! end[/code:vrf7va6g]

            upd: Aiko Star, несложно, но смысла не вижу. Мне это нужно в основном, чтобы лифка добавляла 25% и не била моба дальше. Лешие и так не переагриваются, а лесавки очень быстро умирают (и у меня таки 194 фли). Ну, и на касты с расстояния лесавки тоже не идут (а если пойдут, то хом сразу начнёт их кусать), поэтому хрупкие интовые химы, по идее, тоже в безопасности.

            Но если что, выглядеть это будет примерно так:

            [code:vrf7va6g] if ( (EnemyTarget ~= MyID) or (HTact.Behav ~= BEHA_tank) or ((GetTick() - AgrPrevention_Last) > AgrPrevention_Delay ) then
            DoCombat()
            AgrPrevention_Last = GetTick()
            end[/code:vrf7va6g]

            И где-нибудь в конфиг.луа объявить, соответственно,
            AgrPrevention_Last = 0
            AgrPrevention_Delay = 5000
            (последнее - задержка между попинываниями в миллисекундах)

            1 ответ Последний ответ Ответить Цитировать 0
            • AgamemnoNA Не в сети
              AgamemnoN
              отредактировано

              Обратный вопорос, как в Azzy сделать, чтобы мерк ждал смерти моба, но сам не бил его при этом?
              1lvl арч в мск всё-равно дохнет от мантисов даже если прикрывать его забеганием химика и приоритетом атаки гома, а вот копейщик - держит и хп реген у него поприличнее ,да вот только подходит к лесавкам вплотную и они на него переагриваются.
              Подозреваю что через сочетание TACT_REACT + KITE_ALWAYS, но KITE вообще не пашет почему-то.

              1 ответ Последний ответ Ответить Цитировать 0
              • AgamemnoNA Не в сети
                AgamemnoN
                отредактировано

                Обратный вопорос, как в Azzy сделать, чтобы мерк ждал смерти моба, но сам не бил его при этом?
                1lvl арч в мск всё-равно дохнет от мантисов даже если прикрывать его забеганием химика и приоритетом атаки гома, а вот копейщик - держит и хп реген у него поприличнее ,да вот только подходит к лесавкам вплотную и они на него переагриваются.
                Подозреваю что через сочетание TACT_REACT + KITE_ALWAYS, но KITE вообще не пашет почему-то.

                1 ответ Последний ответ Ответить Цитировать 0
                • LonelinessL Не в сети
                  Loneliness
                  отредактировано

                  предположение Очень грубая правка - тупо прибить в скрипте то место, где мерку отдаётся команда "ударить"? Тогда мерк будет, так сказать, думать, что бьёт гомункула (и все остальные мозги ему поэтому заведомо не перекосит), но бить не будет...

                  Так-то в Аззи не разбиралась, совсем ><

                  1 ответ Последний ответ Ответить Цитировать 0
                  • LonelinessL Не в сети
                    Loneliness
                    отредактировано

                    предположение Очень грубая правка - тупо прибить в скрипте то место, где мерку отдаётся команда "ударить"? Тогда мерк будет, так сказать, думать, что бьёт гомункула (и все остальные мозги ему поэтому заведомо не перекосит), но бить не будет...

                    Так-то в Аззи не разбиралась, совсем ><

                    1 ответ Последний ответ Ответить Цитировать 0
                    • AgamemnoNA Не в сети
                      AgamemnoN
                      отредактировано

                      Всё проще оказалось:
                      В M_Config.lua
                      SuperPassive =1

                      Соответственно для мск берём спира - он толще.

                      1 ответ Последний ответ Ответить Цитировать 0
                      • AgamemnoNA Не в сети
                        AgamemnoN
                        отредактировано

                        Всё проще оказалось:
                        В M_Config.lua
                        SuperPassive =1

                        Соответственно для мск берём спира - он толще.

                        1 ответ Последний ответ Ответить Цитировать 0
                        • ГеоПакГ Не в сети
                          ГеоПак Заблокирован
                          отредактировано

                          взял 99, осталось джоба 2)
                          не знаю куда пихнуть но всёже. поюзал ёки ии(yokiai)
                          настроил на танкование гома на хаях(все на танкование цели выставлены.) норм, но постояно вылетает ошибка.

                          http://cs9777.vkontakte.ru/u7332929/13645618/x_d71124fd.jpg
                          вылетает в таком случае - гом танкует одного моба, а я бью другого. что делать? отказатьсяо т идеи танкования гома в принципе?
                          пысы - оффтоп - куда можно кроме од пойти автокастеру качать джоб?)

                          1 ответ Последний ответ Ответить Цитировать 0
                          • ГеоПакГ Не в сети
                            ГеоПак Заблокирован
                            отредактировано

                            взял 99, осталось джоба 2)
                            не знаю куда пихнуть но всёже. поюзал ёки ии(yokiai)
                            настроил на танкование гома на хаях(все на танкование цели выставлены.) норм, но постояно вылетает ошибка.

                            http://cs9777.vkontakte.ru/u7332929/13645618/x_d71124fd.jpg
                            вылетает в таком случае - гом танкует одного моба, а я бью другого. что делать? отказатьсяо т идеи танкования гома в принципе?
                            пысы - оффтоп - куда можно кроме од пойти автокастеру качать джоб?)

                            1 ответ Последний ответ Ответить Цитировать 0
                            • LisandreLL Не в сети
                              LisandreL
                              отредактировано

                              @ГеоПак:
                              вылетает в таком случае - гом танкует одного моба, а я бью другого. что делать? отказатьсяо т идеи танкования гома в принципе?Исправить ошибку в ИИ или воспользоваться другим.
                              Если выложите куда-нибудь ИИ именно в том виде, в котром оно у вас, - можно поковырять общими силами.

                              @ГеоПак:
                              пысы - оффтоп - куда можно кроме од пойти автокастеру качать джоб?)Хилл винды.
                              Если не боитесь небольшого экстрима - кнокеры. Хотя по их мдефу...

                              1 ответ Последний ответ Ответить Цитировать 0
                              • LisandreLL Не в сети
                                LisandreL
                                отредактировано

                                @"ГеоПак":
                                вылетает в таком случае - гом танкует одного моба, а я бью другого. что делать? отказатьсяо т идеи танкования гома в принципе?Исправить ошибку в ИИ или воспользоваться другим.
                                Если выложите куда-нибудь ИИ именно в том виде, в котром оно у вас, - можно поковырять общими силами.

                                @"ГеоПак":
                                пысы - оффтоп - куда можно кроме од пойти автокастеру качать джоб?)Хилл винды.
                                Если не боитесь небольшого экстрима - кнокеры. Хотя по их мдефу...

                                1 ответ Последний ответ Ответить Цитировать 0
                                • ГеоПакГ Не в сети
                                  ГеоПак Заблокирован
                                  отредактировано

                                  <!-- m --><a class="postlink" href="http://ifolder.ru/18856210">http://ifolder.ru/18856210</a><!-- m -->

                                  1 ответ Последний ответ Ответить Цитировать 0
                                  • ГеоПакГ Не в сети
                                    ГеоПак Заблокирован
                                    отредактировано

                                    <!-- m --><a class="postlink" href="http://ifolder.ru/18856210">http://ifolder.ru/18856210</a><!-- m -->

                                    1 ответ Последний ответ Ответить Цитировать 0
                                    • LisandreLL Не в сети
                                      LisandreL
                                      отредактировано

                                      Ну, исходя из ошибки косяк в том, что где-то function GetTact(id, tact) вызывается с id равным nil.
                                      Можно поразбираться где это происходит...
                                      Ну а пока предложу быстрый костыль - в ai.lua вносим следующее изменение:
                                      в функцию[code:2fqvo54e]function GetTact(id, tact)
                                      local type = GetV(V_HOMUNTYPE,id)

                                      if (mtact[type] ~= nil and mtact[type][tact] ~= nil) then
                                      	return mtact[type][tact]
                                      else
                                      	return mtact[0][tact]
                                      end
                                      

                                      end[/code:2fqvo54e]добавляем 3 строки:[code:2fqvo54e]if (id == nil) then
                                      return mtact[0][tact]
                                      end[/code:2fqvo54e]
                                      И в итоге получаем:[code:2fqvo54e]function GetTact(id, tact)
                                      if (id == nil) then
                                      return mtact[0][tact]
                                      end
                                      local type = GetV(V_HOMUNTYPE,id)

                                      if (mtact[type] ~= nil and mtact[type][tact] ~= nil) then
                                      	return mtact[type][tact]
                                      else
                                      	return mtact[0][tact]
                                      end
                                      

                                      end[/code:2fqvo54e]

                                      Можете попробовать: Attached image ai.rar

                                      1 ответ Последний ответ Ответить Цитировать 0
                                      • LisandreLL Не в сети
                                        LisandreL
                                        отредактировано

                                        Ну, исходя из ошибки косяк в том, что где-то function GetTact(id, tact) вызывается с id равным nil.
                                        Можно поразбираться где это происходит...
                                        Ну а пока предложу быстрый костыль - в ai.lua вносим следующее изменение:
                                        в функцию[code:2fqvo54e]function GetTact(id, tact)
                                        local type = GetV(V_HOMUNTYPE,id)

                                        if (mtact[type] ~= nil and mtact[type][tact] ~= nil) then
                                        	return mtact[type][tact]
                                        else
                                        	return mtact[0][tact]
                                        end
                                        

                                        end[/code:2fqvo54e]добавляем 3 строки:[code:2fqvo54e]if (id == nil) then
                                        return mtact[0][tact]
                                        end[/code:2fqvo54e]
                                        И в итоге получаем:[code:2fqvo54e]function GetTact(id, tact)
                                        if (id == nil) then
                                        return mtact[0][tact]
                                        end
                                        local type = GetV(V_HOMUNTYPE,id)

                                        if (mtact[type] ~= nil and mtact[type][tact] ~= nil) then
                                        	return mtact[type][tact]
                                        else
                                        	return mtact[0][tact]
                                        end
                                        

                                        end[/code:2fqvo54e]

                                        Можете попробовать: Attached image ai.rar

                                        1 ответ Последний ответ Ответить Цитировать 0
                                        • ГеоПакГ Не в сети
                                          ГеоПак Заблокирован
                                          отредактировано

                                          nil это что? приоритет?(ну правда я хз в луа. я могу разработать алгоритм а не напистаь его)

                                          1 ответ Последний ответ Ответить Цитировать 0
                                          • ГеоПакГ Не в сети
                                            ГеоПак Заблокирован
                                            отредактировано

                                            nil это что? приоритет?(ну правда я хз в луа. я могу разработать алгоритм а не напистаь его)

                                            1 ответ Последний ответ Ответить Цитировать 0
                                            • Первое сообщение
                                              Последнее сообщение