Jump to content
  • 0
Louis T Steinhil

Item icons on NPC Dialogue

Question

1 answer to this question

Recommended Posts

  • 0
On 6/19/2024 at 7:20 PM, Louis T Steinhil said:

Hello guys, I don't know if this is a client version or script but how to add that item icon in dialogue?

image.png.86182449a5a2682ca8a4cec8871bdc54.png

 

[ Q ] How to show item ICONS inside NPC dialogue (Hercules)?
[ A ] Use item *links* in your messages: getitemlink(<item_id>)

────────────────────────────────────────────────────────
REQUIREMENTS (client-side)
────────────────────────────────────────────────────────
1) A client that supports item links (any modern 2014+ client is fine).
2) When diffing your client (e.g. NEMO), enable:
   - “Enable Item Link” (sometimes named “Enable Monster & Item Link”).
   That’s it — no custom LUA needed.
 

Note: Zeny does not have a built-in icon in dialogue; only items do.
 

────────────────────────────────────────────────────────
MINIMAL HERCULES NPC EXAMPLE
────────────────────────────────────────────────────────

prontera,155,180,4    script    ItemIconDemo    4_F_KAFRA1,{
    mes "Required materials:";
    mes "  ^000000* 100,000 Zeny^000000";
    mesf("  ^000000* %d x %s^000000", 10, getitemlink(984));  // Oridecon
    mesf("  ^000000* %d x %s^000000", 50, getitemlink(7063)); // Lower Weapon Stone (example id)
    mesf("  ^000000* %d x %s^000000", 25, getitemlink(7064)); // High Weapon Stone (example id)
    mes "Would you like to salvage it?";
    next;
    switch(select("Yes:No")) {
        case 1:
            mes "You chose ^00AAFFYes^000000.";
            close;
        default:
            mes "Come back later.";
            close;
    }
}

/// NOTES:
/// - Replace 7063/7064 with your server’s real item IDs.
/// - getitemlink() renders the item name clickable and shows its small icon
///   automatically in the dialogue window.
/// - You can also use it inside mesf/select strings anywhere you print text.

────────────────────────────────────────────────────────
COMMON PITFALLS
────────────────────────────────────────────────────────
• Using getitemname() — this prints only text (no icon). Use getitemlink().
• Old client or diff without “Item Link” → icons won’t show.
• Expecting Zeny icon → not supported natively; print plain text for Zeny.

────────────────────────────────────────────────────────
 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.