Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kolor NPC ze względu na rutynę Follow lub Guide #5

Closed
pawbuj1981 opened this issue Nov 1, 2021 · 2 comments
Closed

kolor NPC ze względu na rutynę Follow lub Guide #5

pawbuj1981 opened this issue Nov 1, 2021 · 2 comments
Labels
request New feature or request

Comments

@pawbuj1981
Copy link

pawbuj1981 commented Nov 1, 2021

Pomyśl o dodatkowym kolorze dla NPC (np blue) jeżeli znajdują w rutynie Follow lub Guide. Nie podpowiem jak zrobić to na Unionie, mam to jednak zrobione jako pakiet Ninja.
EDIT
Można rozważyć czy nie zmienić kolor kluczowych itemów typu "koło zębate w kopalni" czy " kamienie ogniskujące" (najważniejsze mission items !)

@Franisz Franisz added the request New feature or request label Nov 1, 2021
@Franisz
Copy link
Owner

Franisz commented Nov 1, 2021

Kolor dla partymemberów dodam, koloru itemów raczej nie ma sensu, bo jak ktoś coś już coś znalazł to raczej to zbiera tak czy siak. Mogę jak już dodać osobną ikonkę w eq aby ktoś przez przypadek się takiego itemu nie pozbył. Większym problemem jest raczej to, że flagę ITEM_MISSION nadawano przedmiotom bez większego ładu i składu, zwykłe śmieci potrafiły to mieć. Z mojego doświadczenia też wynika, że moderzy nie używają w ogóle tej flagi ale może dodam jako osobną opcję.

@pawbuj1981
Copy link
Author

pawbuj1981 commented Nov 2, 2021

Super wielkie dzięki. Tak to jest rozwiązane w pakiecie Ninja .

if (Hlp_Is_oCNpc(her.focus_vob)) {
    var C_Npc oth; oth = _^(her.focus_vob);
    var int att; att = Npc_GetPermAttitude(oth, hero);                          // Modified by Pawbuj

    var int party; party = Ninja_ColorFocusVobs_GetAIVarSafe(oth, "AIV_PARTYMEMBER", FALSE);
    var int friendly; friendly = ((att == ATT_FRIENDLY || oth.npctype == NPCTYPE_FRIEND)
                                  && (!Ninja_ColorFocusVobs_GetNpcGuild(oth, "GIL_ORCSLAVE")));

    if      (Npc_IsDead(oth))    { col = Focusnames_Color_Neutral();         }  // New by Pawbuj
    else if (party)              { col = Ninja_ColorFocusVobs_Partymember(); }  // New by Pawbuj
    else if (friendly)           { col = Focusnames_Color_Friendly();        }  // New by Pawbuj
    else if (att == ATT_NEUTRAL) { col = Focusnames_Color_Neutral();         }
    else if (att == ATT_ANGRY)   { col = Focusnames_Color_Angry();           }
    else if (att == ATT_HOSTILE) { col = Focusnames_Color_Hostile();         };
} else if (Hlp_Is_oCMobLockable(her.focus_vob)) {
    // Case for chests, doors and any other lockable mob
    var oCMobLockable lockable; lockable = _^(her.focus_vob);

    if (lockable.bitfield & oCMobLockable_bitfield_locked) { // Check if mob is locked
        if      (STR_Len(lockable.keyInstance)) { col = Focusnames_Color_Hostile();  }  // Need to use a key
        else if (STR_Len(lockable.pickLockStr)) { col = Focusnames_Color_Angry();    }  // Can use lockpick
        else                                    { col = Focusnames_Color_Neutral();  }; // Should never happen
    } else { // Lockable is not locked
        if (Hlp_Is_oCMobContainer(her.focus_vob)) { // Mob is an container
            var oCMobContainer chest; chest = _^(her.focus_vob);
            if (chest.containList_next)         { col = Focusnames_Color_Friendly(); }  // Chest unlocked and has goods
            else                                { col = Focusnames_Color_Neutral();  }; // Chest unlocked but empty
        } else {
            col = Focusnames_Color_Neutral(); // Lockable is unlocked
        };
    };
} else {
    col = Focusnames_Color_Neutral();
};

@Franisz Franisz closed this as completed Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants