-
Notifications
You must be signed in to change notification settings - Fork 774
Add F_MesItemInfo function to show item name with description link #2068
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -434,7 +434,7 @@ function script F_ShuffleNumbers { | |
| //== Function F_MesColor =================================== | ||
| // Function to colorize npc dialog without having to memorize the color code | ||
| // Examples: | ||
| // mes callfunc("F_MesColor", C_BLUE) +"This message is now in BLUE"; | ||
| // mesf("%sThis message is now in BLUE.", F_MesColor(C_BLUE)); | ||
| function script F_MesColor { | ||
| return sprintf("^%06X", min(getarg(0), 0xFFFFFF)); | ||
| } | ||
|
|
@@ -475,3 +475,24 @@ function script F_GetTradeRestriction { | |
| .@trade$ += "NoAuction|"; | ||
| } | ||
| } | ||
|
|
||
| //== Function F_MesItemInfo =================================== | ||
| // Show the item name and a clickable link for the item description | ||
| // Only works with mes and mesf, does not work in menu/select | ||
| function script F_MesItemInfo { | ||
| .@item = getarg(0); | ||
| .@itemname$ = getitemname(.@item); | ||
| if (.@itemname$ != "null") { | ||
| .@itemslot = getitemslots(.@item); | ||
| if (.@itemslot) | ||
| .@itemname$ = sprintf("%s [%d]", .@itemname$, .@itemslot); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the equipment slot should check for item type is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I knew you going to say this, I have tested this in my getitemname2 function and no, items with [0] slot doesn't show in-game and WHY the fuck I have to upload a screenshot every time ???? |
||
| } | ||
| else | ||
| .@itemname$ = "Unknown Item"; | ||
| if (PACKETVER >= 20150729) | ||
AnnieRuru marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", .@itemname$, .@item); | ||
| else if (PACKETVER >= 20130130) | ||
| return sprintf("<ITEMLINK>%s<INFO>%d</INFO></ITEMLINK>", .@itemname$, .@item); | ||
| else | ||
| return .@itemname$; | ||
| } | ||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line shall be removed, since not every client version support the
<ITEM>tag. It could be confusing.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hard to define this, many members said its harder and harder to use older hex client
because client translation project always keep itself up to date with no backward compatibility
I have some older hexed client just simply because when I inactive, and active back
I always install newer stuffs, and the old stuffs just kept inside external harddisk
we should always encourage members to use latest client revision ... isn't it ?
and removing that line ... is just like hide this method from public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I mean we should encourage them to use the
F_ItemMesInfoand not<ITEM>or<ITEMLINK>.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my opinion is show them both methods ...
ok 1 vote for showing 1 method (Emistry)
1 vote for showing both methods (AnnieRuru)
any one else vote for showing 1 method or showing both ?