ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_20.py
@@ -25,6 +25,7 @@
import BaseAttack
import FBCommon
import AICommon
import GameMap
import random
@@ -76,8 +77,8 @@
        #GameWorld.DebugLog("没有攻击目标,跟随玩家!objID=%s" % curNPC.GetID())
        dist = GameWorld.GetDist(fbPlayer.GetPosX(), fbPlayer.GetPosY(), curNPC.GetPosX(), curNPC.GetPosY())
        if dist > 12:
            posX, posY = npcControl.GetMoveNearPos(fbPlayer.GetPosX(), fbPlayer.GetPosY(), 3)
            curNPC.ResetPos(posX, posY)
            resultPos = GameMap.GetEmptyPlaceInArea(fbPlayer.GetPosX(), fbPlayer.GetPosY(), 3)
            curNPC.ResetPos(resultPos.GetPosX(), resultPos.GetPosY())
        elif dist > 5:
            npcControl.MoveToObj_Detel(fbPlayer, 5)
        return
@@ -92,9 +93,9 @@
        return
    tagDist = GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), curTag.GetPosX(), curTag.GetPosY())
    GameWorld.DebugLog("    与目标距离: %s" % tagDist)
    if tagDist > 12:
        posX, posY = npcControl.GetMoveNearPos(curTag.GetPosX(), curTag.GetPosY(), 3)
        curNPC.ResetPos(posX, posY)
    if tagDist > 20:
        resultPos = GameMap.GetEmptyPlaceInArea(curTag.GetPosX(), curTag.GetPosY(), 3)
        curNPC.ResetPos(resultPos.GetPosX(), resultPos.GetPosY())
        tagDist = GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), curTag.GetPosX(), curTag.GetPosY())
        
    #---优先释放技能---