Jump to content
  • 0

About NEMO iteminfo.lub per char-server


Question

9 answers to this question

Recommended Posts

  • 0
Posted
On 20.02.2017 at 10:51 AM, Limestone said:

Does someone tried this patch? How can i make it work? Thanks!

Code of this patch passes name of selected "char server" as parameter to "main" function in the file iteminfo.lub iteminfo.lua

How do you want to use it?

  • 0
Posted
5 minutes ago, Functor said:

Code of this patch passes name of selected "char server" as parameter to "main" function in the file iteminfo.lub iteminfo.lua

How do you want to use it?

actually, i don't know how to use it, maybe you can teach me how to make it work? xD

  • 0
Posted

In any case you need to modify iteminfo.lub / iteminfo.lua after applying patch to EXE.

I will show you simple example. We will add name of selected "char server" to all identified item's names.

Open iteminfo.lub / iteminfo.lua and change:

main = function()
    for ItemID,DESC in pairs(tbl) do
        result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)

to:

main = function(server_name)
    for ItemID,DESC in pairs(tbl) do
        result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName.." "..server_name, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)

P.S. You can use it to set different item's descriptions for different char servers.

  • 0
Posted (edited)
9 minutes ago, Functor said:

In any case you need to modify iteminfo.lub / iteminfo.lua after applying patch to EXE.

I will show you simple example. We will add name of selected "char server" to all identified item's names.

Open iteminfo.lub / iteminfo.lua and change:


main = function()
    for ItemID,DESC in pairs(tbl) do
        result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)

to:


main = function(server_name)
    for ItemID,DESC in pairs(tbl) do
        result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName.." "..server_name, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)

P.S. You can use it to set different item's descriptions for different char servers.

About the item description, how can i make it different from other char servers?

Edited by Limestone
  • 0
Posted

Open iteminfo.lub / iteminfo.lua and after:

		identifiedDescriptionName = {
			"An orange root that is supposedly good for your vision. Despite the Beta Carotene, kids don't care much for it.",
			"^000088Recovers a small amount of HP^000000.",
			"^ffffff_^000000",
			"Weight :^777777 2^000000",
		},

add:

		identifiedDescriptionName2 = {
			"Second version of description for Carrot",
		},

change:

        for k,v in pairs(DESC.identifiedDescriptionName) do
            result, msg = AddItemIdentifiedDesc(ItemID, v)
            if not result then
                return false, msg
            end
        end

to:

	if server_name ~= "rAthena" and DESC.identifiedDescriptionName2 ~= nill then
            for k,v in pairs(DESC.identifiedDescriptionName2) do
                result, msg = AddItemIdentifiedDesc(ItemID, v)
                if not result then
                    return false, msg
                end
            end
	else
            for k,v in pairs(DESC.identifiedDescriptionName) do
                result, msg = AddItemIdentifiedDesc(ItemID, v)
                if not result then
                    return false, msg
                end
            end
	end

If selected server is not "rAthena" and item has second version of description - we will see it.

  • 0
Posted
46 minutes ago, Functor said:

Open iteminfo.lub / iteminfo.lua and after:


		identifiedDescriptionName = {
			"An orange root that is supposedly good for your vision. Despite the Beta Carotene, kids don't care much for it.",
			"^000088Recovers a small amount of HP^000000.",
			"^ffffff_^000000",
			"Weight :^777777 2^000000",
		},

add:


		identifiedDescriptionName2 = {
			"Second version of description for Carrot",
		},

change:


        for k,v in pairs(DESC.identifiedDescriptionName) do
            result, msg = AddItemIdentifiedDesc(ItemID, v)
            if not result then
                return false, msg
            end
        end

to:


	if server_name ~= "rAthena" and DESC.identifiedDescriptionName2 ~= nill then
            for k,v in pairs(DESC.identifiedDescriptionName2) do
                result, msg = AddItemIdentifiedDesc(ItemID, v)
                if not result then
                    return false, msg
                end
            end
	else
            for k,v in pairs(DESC.identifiedDescriptionName) do
                result, msg = AddItemIdentifiedDesc(ItemID, v)
                if not result then
                    return false, msg
                end
            end
	end

If selected server is not "rAthena" and item has second version of description - we will see it.

I got a error

"System/ItemInfo.lua:116484: unexpected symbol near '='"

this is the line that the error indicates: "main = function(server_name)"

  • 0
Posted (edited)

You should upload original and modified files to the file hosting and show a link.

P.S. It is better to not quote big messages. ;)

Edited by Functor

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...