Показать сообщение отдельно
Непрочитано 05.07.2012, 19:42   #1
Пользователь

Автор темы (Топик Стартер) ERROR threading.RunnableImpl: Exception: RunnableImpl.run():

перенес квест и чтото еще надо либо переписать либо добавит но не могу понять что упустил вот ошибка:
PHP код:
[05.07.12 20:16:54:755]  INFO instancemanager.SpawnManagerSpawnManagerspawned 1000 npc for groupNONE
[05.07.12 20:16:55:173]  INFO instancemanager.SpawnManagerSpawnManagerspawned 2000 npc for groupNONE
[05.07.12 20:16:55:507]  INFO instancemanager.SpawnManagerSpawnManagerspawned 3000 npc for groupNONE
[05.07.12 20:16:55:519ERROR threading.RunnableImplExceptionRunnableImpl.run(): java.lang.NullPointerException
java
.lang.NullPointerException
    at ai
.groups.TalkinIslandGuides.config(TalkinIslandGuides.java:202)
    
at ai.groups.TalkinIslandGuides.thinkActive(TalkinIslandGuides.java:250)
    
at l2p.gameserver.ai.DefaultAI.onEvtThink(DefaultAI.java:861)
    
at l2p.gameserver.ai.DefaultAI.onIntentionActive(DefaultAI.java:514)
    
at l2p.gameserver.ai.AbstractAI.setIntention(AbstractAI.java:72)
    
at l2p.gameserver.ai.AbstractAI.setIntention(AbstractAI.java:41)
    
at l2p.gameserver.ai.DefaultAI.onEvtSpawn(DefaultAI.java:613)
    
at l2p.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:168)
    
at l2p.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:110)
    
at l2p.gameserver.model.GameObjectTasks$NotifyAITask.runImpl(GameObjectTasks.java:431)
    
at l2p.commons.threading.RunnableImpl.run(RunnableImpl.java:21)
    
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    
at java.lang.Thread.run(Thread.java:619)
[
05.07.12 20:16:55:556ERROR threading.RunnableImplExceptionRunnableImpl.run(): java.lang.NullPointerException
java
.lang.NullPointerException
    at ai
.groups.TalkinIslandGuides.config(TalkinIslandGuides.java:202)
    
at ai.groups.TalkinIslandGuides.thinkActive(TalkinIslandGuides.java:250)
    
at l2p.gameserver.ai.DefaultAI.onEvtThink(DefaultAI.java:861)
    
at l2p.gameserver.ai.DefaultAI.onIntentionActive(DefaultAI.java:514)
    
at l2p.gameserver.ai.AbstractAI.setIntention(AbstractAI.java:72)
    
at l2p.gameserver.ai.AbstractAI.setIntention(AbstractAI.java:41)
    
at l2p.gameserver.ai.DefaultAI.onEvtSpawn(DefaultAI.java:613)
    
at l2p.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:168)
    
at l2p.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:110)
    
at l2p.gameserver.model.GameObjectTasks$NotifyAITask.runImpl(GameObjectTasks.java:431)
    
at l2p.commons.threading.RunnableImpl.run(RunnableImpl.java:21)
    
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    
at java.lang.Thread.run(Thread.java:619)
[
05.07.12 20:16:55:571ERROR threading.RunnableImplExceptionRunnableImpl.run(): java.lang.NullPointerException
java
.lang.NullPointerException
    at ai
.groups.TalkinIslandGuides.config(TalkinIslandGuides.java:202)
    
at ai.groups.TalkinIslandGuides.thinkActive(TalkinIslandGuides.java:250)
    
at l2p.gameserver.ai.DefaultAI.onEvtThink(DefaultAI.java:861)
    
at l2p.gameserver.ai.DefaultAI.onIntentionActive(DefaultAI.java:514)
    
at l2p.gameserver.ai.AbstractAI.setIntention(AbstractAI.java:72)
    
at l2p.gameserver.ai.AbstractAI.setIntention(AbstractAI.java:41)
    
at l2p.gameserver.ai.DefaultAI.onEvtSpawn(DefaultAI.java:613)
    
at l2p.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:168)
    
at l2p.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:110)
    
at l2p.gameserver.model.GameObjectTasks$NotifyAITask.runImpl(GameObjectTasks.java:431)
    
at l2p.commons.threading.RunnableImpl.run(RunnableImpl.java:21)
    
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    
at java.lang.Thread.run(Thread.java:619)
[
05.07.12 20:16:55:578ERROR threading.RunnableImplExceptionRunnableImpl.run(): java.lang.NullPointerException
java
.lang.NullPointerException
    at ai
.groups.TalkinIslandGuides.config(TalkinIslandGuides.java:202)
    
at ai.groups.TalkinIslandGuides.thinkActive(TalkinIslandGuides.java:250)
    
at l2p.gameserver.ai.DefaultAI.onEvtThink(DefaultAI.java:861)
    
at l2p.gameserver.ai.DefaultAI.onIntentionActive(DefaultAI.java:514)
    
at l2p.gameserver.ai.AbstractAI.setIntention(AbstractAI.java:72)
    
at l2p.gameserver.ai.AbstractAI.setIntention(AbstractAI.java:41)
    
at l2p.gameserver.ai.DefaultAI.onEvtSpawn(DefaultAI.java:613)
    
at l2p.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:168)
    
at l2p.gameserver.ai.AbstractAI.notifyEvent(AbstractAI.java:110)
    
at l2p.gameserver.model.GameObjectTasks$NotifyAITask.runImpl(GameObjectTasks.java:431)
    
at l2p.commons.threading.RunnableImpl.run(RunnableImpl.java:21)
    
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    
at java.lang.Thread.run(Thread.java:619
Она появляется после добавления файла :
PHP код:
package ai.groups;

import l2p.commons.util.Rnd;
import l2p.gameserver.ai.DefaultAI;
import l2p.gameserver.model.Creature;
import l2p.gameserver.model.Player;
import l2p.gameserver.model.instances.NpcInstance;
import l2p.gameserver.scripts.Functions;
import l2p.gameserver.network.serverpackets.ExRotation;
import l2p.gameserver.network.serverpackets.components.ChatType;

import quests._10365_SeekerEscort;

public class 
TalkinIslandGuides extends DefaultAI implements OnTeleportListener
{
    private final static 
int SEARCHING_MYST_POWER_SOLDIER 33014;
    private final static 
int GOING_INTO_REAL_WAR_SOLDIER 33016
    private final static 
int BACKUP_SEEKERS_ASSASSIN 33204;
    private final static 
int SEEKER_ESCORT_BLOODHOUND 32988;
    
    private final static 
NpcString SEARCHING_MYST_POWER_STRING NpcString.COME_FOLLOW_ME;
    private final static 
NpcString GOING_INTO_REAL_WAR_STRING NpcString.COME_FOLLOW_ME;
    private final static 
NpcString BACKUP_SEEKERS_STRING NpcString.HEY_KID_HARRY_UP_AND_FOLLOW_ME;
    private final static 
NpcString SEEKER_ESCORT_BLOODHOUND_STRING NpcString.CATCH_UP_TO_KING_HE_IS_WAITING;
    private final static 
NpcString SEEKER_ESCORT_TELETO_STRING NpcString.YOU_MUST_MOVE_TO_EXPLORATION_AREA5_IN_ORDER_TO_CONTINUE;
    private final static 
NpcString SEEKER_ESCORT_FAIL NpcString.KING_HAS_RETURNED_TO_DEF_RETURN_TO_DEF_AND_START_AGAIN;
    
    
/**
     * "Searching for the Mysterious Power" soldier coords
     */
    
private final static int[][] SMP_COORDS = {
            {-
111416255864, -1469},
            {-
111915255335, -1432},
            {-
112271254838, -1504},
            {-
112209254385, -1504},
            {-
111527254007, -1696},
            {-
110773253754, -1784}
        };
    
/**
     * In "Going into the Real War" quest guides can move by left or by right side.
     * Side is choosen by distance between player location and first coord in set.
     */
    
private final static int[][] GRW_COORDS_LEFT = {
            {-
110885253533, -1776},
            {-
111050253183, -1776},
            {-
111007252706, -1832},
            {-
110957252400, -1928},
            {-
110643252365, -1976}
        };
    private final static 
int[][] GRW_COORDS_RIGHT = {
            {-
110618253655, -1792},
            {-
110296253160, -1848},
            {-
110271253163, -1816},
            {-
110156252874, -1888},
            {-
110206252422, -1984}
        };
    
    
/**
     * "Backup Seekers" assassin coords
     */
    
private final static int[][] BS_COORDS = {
            {-
117996255845, -1320},
            {-
117103255538, -1296},
            {-
115719254792, -1504},
            {-
114695254741, -1528},
            {-
114589253517, -1528}
        };
    
    
/**
     * "Seeker Escort" bloodhound coords
     */
    
private final static int[][] SE_COORDS = {
            {-
110628238359, -2920},
            {-
110581238930, -2920},
            {-
110711239262, -2920},
            {-
110958239505, -2920},
            {-
111022239669, -2920},
            {-
110989239911, -2920},
            {-
110780240165, -2920},
            {-
110790240522, -2920},
            {-
110999240602, -2920},
            {-
111297240382, -2920},
            {-
111642239879, -2920},
            {-
111975239699, -2920},
            {-
112280239783, -2920},
            {-
112645239914, -2920},
            {-
112705240236, -2920},
            {-
112483240516, -2920},
            {-
112126240498, -2920},
            {-
112027240300, -2920},
            {-
112228240123, -2920},
        };
    
/**
     * Into 5th exploration zone for Bloodhound
     */
    
private final static int[][] SE_COORDS2 = {
            {-
111066233798, -3200},
            {-
112436233701, -3096},
            {-
112182233490, -3120},
            {-
112124233130, -3136},
            {-
112389232931, -3096},
            {-
112689232566, -3072},
            {-
112716232359, -3072},
            {-
112533232054, -3080},
            {-
112308232084, -3104},
            {-
112071232359, -3136},
            {-
111766232566, -3160},
            {-
111219232723, -3224},
            {-
110813232482, -3256},
            {-
110764232124, -3256},
            {-
111152231842, -3224},
            {-
111472231976, -3200},
            {-
111666231951, -3168},
            {-
111723231830, -3168}
        };
    
    private 
NpcString currentString null;
    private 
int[][] currentCoords = {};
    
/**
     * This npc state identifies what coords to use
     */
    
private int currentState;
    
/**
     * If true, creature will be despawned when user reaches last loc
     */
    
private boolean autounspawn true;
    
/**
     * If is NPC_SAY, then NPC will "say words", if is SCREEN, then message will appear on center screen
     */
    
private String displayMessageType "NPC_SAY";
    
/**
     * When last message was sent?
     */
    
private long lastMessage 0;
    
/**
     * When last player was around NPC
     */
    
private long lastVisit 0;
    private 
boolean configured false;
    
/**
     * How many set of coords was covered by NPC
     */
    
private int coordsCovered 0;
    
    public 
TalkinIslandGuides(NpcInstance actor)
    {
        
super(actor);
        
currentState 0;
    }
    
    @
Override
    
protected void finalize() throws Throwable
    
{
        
super.finalize();
        
NpcInstance actor getActor();
        if (
actor != null)
        {
            
Creature target actor.getFollowTarget();
            if (
target != null)
                
target.removeListener(this);
        }
    }
    
    @
Override
    
public void onTeleport(Player playerint xint yint zReflection reflection)
    {
        
// Yes, we approve any teleportation action from player. 
        // Btw, is very small chance that player will use another teleport than 5th Exploration Area.
        
playerTeleported();
        
Creature target getActor().getFollowTarget();
        if (
target != null)
            
target.removeListener(this);
    }
    
    
/**
     * This is used to detect what coods/message should be used.
     */
    
private void config()
    {
        if (
configured)
            return;
        
        
configured true;
        
        
NpcInstance actor getActor();
        
Creature target actor.getFollowTarget();
        
        if (
target == null)
        {
            
stopAITask();
            
actor.deleteMe();
        }
        
        
target.addListener(this);
            
        
int npcId actor.getNpcId();
        
// Select coords
        
switch (npcId)
        {
            case 
SEARCHING_MYST_POWER_SOLDIER:
                
currentCoords SMP_COORDS;
                
currentString SEARCHING_MYST_POWER_STRING;
                break;
            case 
BACKUP_SEEKERS_ASSASSIN:
                
currentCoords BS_COORDS;
                
currentString BACKUP_SEEKERS_STRING;
                break;
            case 
GOING_INTO_REAL_WAR_SOLDIER:
                
double distLeft target.getDistance(GRW_COORDS_LEFT[0][0], GRW_COORDS_LEFT[0][1], GRW_COORDS_LEFT[0][2]);
                
double distRight target.getDistance(GRW_COORDS_RIGHT[0][0], GRW_COORDS_RIGHT[0][1], GRW_COORDS_RIGHT[0][2]);
                if (
distLeft <= distRight)
                    
currentCoords GRW_COORDS_LEFT;
                else
                    
currentCoords GRW_COORDS_RIGHT;
                
currentString GOING_INTO_REAL_WAR_STRING;
                break;
            case 
SEEKER_ESCORT_BLOODHOUND:
                
currentCoords SE_COORDS;
                
currentString SEEKER_ESCORT_BLOODHOUND_STRING;
                
autounspawn false;
                
displayMessageType "SCREEN";
                
actor.setTitle(target.getName());
                break;
            default:
                break;
        }
    }

    @
Override
    
protected boolean thinkActive()
    {
        
NpcInstance actor getActor();
        
Creature target actor.getFollowTarget();
        
int npcId actor.getNpcId();
        
        if (
target == null)
        {
            
stopAITask();
            
actor.deleteMe();
        }
        
        
config();
        
        
// This NPC is running
        
actor.setRunning();
        if (
actor.getDistance(target) < 200 || currentState == 0)
        {
            
lastVisit System.currentTimeMillis();
            if (
currentState == 0)
                ++
coordsCovered;
            if (
currentState currentCoords.length)
            {
                
actor.moveToLocation(currentCoords[currentState][0], currentCoords[currentState][1], currentCoords[currentState][2], Rnd.get(050), true);
                if (
actor.getDestination() == null)
                {
                    
// TODO: We need to set heading to turn NPC to player. Seems this is not work properly
                    
actor.setHeading(target.getHeading());
                    ++
currentState;
                }
            }
            else
            {
                if (
autounspawn)
                    
actor.deleteMe();
                
                
currentString SEEKER_ESCORT_TELETO_STRING;
                switch (
npcId)
                {
                case 
SEEKER_ESCORT_BLOODHOUND:
                    if (
coordsCovered >= 2)
                    {
                        
// Yeah, this is awesome >_< Very bad to set quest states from another classes, but we need that.
                        
QuestState st target.getPlayer().getQuestState(_10365_SeekerEscort.class);
                        if (
st != null)
                            ((
_10365_SeekerEscort)st.getQuest()).bloodhoundEscorted(st);
                    }
                    break;
                }
            }
        }
        else
        {
            
// Remove NPC if player not visit it during 1 minute
            
if (System.currentTimeMillis() - lastVisit 60000)
            {
                switch (
npcId)
                {
                case 
SEEKER_ESCORT_BLOODHOUND:
                    
sendMessage(SEEKER_ESCORT_FAIL);
                    break;
                }
                
stopAITask();
                
actor.deleteMe();
            }
            
// Don't spam messages
            
if (System.currentTimeMillis() - lastMessage 2000)
            {
                
sendMessage(currentString);
                
lastMessage System.currentTimeMillis();
            }
        }
        
        return 
true;
    }
    
    private 
void sendMessage(NpcString message)
    {
        
NpcInstance actor getActor();
        
Creature target actor.getFollowTarget();
        
        if (
displayMessageType.equals("NPC_SAY"))
            
actor.broadcastPacket(new NpcSay(actorChatType.ALLmessagetarget.getName()));
        else if (
displayMessageType.equals("SCREEN"))
            
target.sendPacket(new ExShowScreenMessage(message2000ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER));
    }
    
    public 
void playerTeleported()
    {
        
/**
         * TODO: We need teleport player to another location.
         * This is strange, but player teleported not to the current 5th area location.
         * He's teleported to upstair, neer teleporter.
         */
        
int npcId getActor().getNpcId();
        switch (
npcId)
        {
        case 
SEEKER_ESCORT_BLOODHOUND:
            if (
coordsCovered >= 1)
            {
                
currentCoords SE_COORDS2;
                
currentString SEEKER_ESCORT_BLOODHOUND_STRING;
                
currentState 0;
                
autounspawn true;
                
getActor().teleToLocation(new Location(SE_COORDS2[0][0], SE_COORDS2[0][1], SE_COORDS2[0][2]));
            }
            break;
        }
    }

    
/**
     * These NPC does not have random walk
     */
    
@Override
    
protected boolean randomWalk()
    {
        return 
false;
    }

в итоге квест на половину работает получаеш квест появляется ищейка но она стоит на месте вмето того чтобы идти к порту в руину 5ур

Добавлено через 44 минуты
как только вписываю в НПС name="ai_type" value="groups.TalkinIslandGuides" вмемто name="ai_type" value="groups.CharacterAI" ошибка опявляестя меняю на CharacterAI ошибка пропадает вот НПС:
PHP код:
<npc id="32988" name="Bloodhound" title="">
        <!-- 
TODO: NEW NPC (AUTOGENERATED!) -->
        <
set name="aggroRange" value="0" />
        <
set name="ai_type" value="groups.TalkinIslandGuides" />
        <
set name="baseAtkRange" value="40" />
        <
set name="baseCON" value="43" />
        <
set name="baseCritRate" value="4" />
        <
set name="baseDEX" value="30" />
        <
set name="baseHpMax" value="680" />
        <
set name="baseHpRate" value="1" />
        <
set name="baseHpReg" value="7.500" />
        <
set name="baseINT" value="21" />
        <
set name="baseMAtk" value="6" />
        <
set name="baseMAtkSpd" value="398" />
        <
set name="baseMDef" value="200000" />
        <
set name="baseMEN" value="20" />
        <
set name="baseMpMax" value="2000" />
        <
set name="baseMpReg" value="2.700" />
        <
set name="basePAtk" value="8" />
        <
set name="basePAtkSpd" value="299" />
        <
set name="basePDef" value="60000" />
        <
set name="baseRunSpd" value="120" />
        <
set name="baseSTR" value="40" />
        <
set name="baseShldDef" value="0" />
        <
set name="baseShldRate" value="0" />
        <
set name="baseWIT" value="20" />
        <
set name="baseWalkSpd" value="8" />
        <
set name="collision_height" value="18.50" />
        <
set name="collision_radius" value="6.50" />
        <
set name="level" value="80" />
        <
set name="rewardExp" value="0" />
        <
set name="rewardRp" value="0" />
        <
set name="rewardSp" value="0" />
        <
set name="shots" value="NONE" />
        <
set name="texture" value="" />
        <
set name="type" value="NpcNotSay" />
    </
npc
Добавлено через 50 минут
Я так понял что фаил не хочет работать совместно с НПС оно почему

Последний раз редактировалось Dante5; 05.07.2012 в 20:33. Причина: Добавлено сообщение
Dante5 вне форума Ответить с цитированием