Code Monkey home page Code Monkey logo

Comments (2)

Franisz avatar Franisz commented on June 20, 2024

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ę.

from zutilities.

pawbuj1981 avatar pawbuj1981 commented on June 20, 2024

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();
};

from zutilities.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.