Skip to content

L2NpcInstance.java error

Featured Replies

private void showQuestChooseWindow(final L2PcInstance player, final Quest[] quests)
    {
        final TextBuilder sb = new TextBuilder();
        
        sb.append("<html><body><title>Talk about:</title><br>");
        
        String state = "";
        
        for (final Quest q : quests)
        {
            
            if (q == null)
            {
                continue;
            }
            
            sb.append("<a action=\"bypass -h npc_").append(getObjectId()).append("_Quest ").append(q.getName()).append("\">[");
            
            final QuestState qs = player.getQuestState(q.getScriptName());
            
            if ((qs == null) || qs.getState().equals(State.ACTIVE))
            {
                state = "In Progress";
                
            }
            else if (qs.isStarted() && (qs.getInt("cond") > 0))
            {
                state = " (In Progress)";
                
            }
            else if (qs.isCompleted())
            {
                state = " (Done)";
            }
            
            sb.append(q.getDescr()).append(state).append("]</a><br>");
        }
        
        sb.append("</body></html>

 

Please, help. Why eclipse, show error?

  • 2 years later...

@WOGEX you found the solution? i have the same problem and i cant know how to solve it

Edited by DaVeOn

if ((qs == null) || qs.getState().equals(State.ACTIVE))
            {
                state = "In Progress";
                
            }
            else if (qs.isStarted() && (qs.getInt("cond") > 0))
            {
                state = " (In Progress)";
                
            }
            else if (qs.isCompleted())
            {
                state = " (Done)";
            }

 

 

change this to

 

state = qs.getState().toString().toLowerCase();

 

 

code is generally trash

@xdem fucking frozen source 😕  tnx for your help

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.