Mateus Robeerto
Excellent OT User
I would like to know if it's possible here as well to display the description of each item, as you mentioned it requires something in the source code, right? And will this code be compatible with my modal craft? See here what I'm using.I give you the tip how to do it,
Now if you search you find itemType:getDescription, this one obtains Description from an item:
Lua:int LuaScriptInterface::luaItemTypeGetDescription(lua_State* L) { // itemType:getDescription() const ItemType* itemType = getUserdata<const ItemType>(L, 1); if (itemType) { pushString(L, itemType->description); } else { lua_pushnil(L); } return 1; }
So now you know you can do it something like this:
Code:local itemId = config.system[lastChoice].items[choice.id].itemID local itemType = ItemType(itemId) if itemType then local attributeValue = itemType:getDescription() if attributeValue then details = details .."\n- Description:" .. attributeValue end end
[TFS 1.x] Crafting System
First of all, I didn't make the entire system by myself, I took some functions/ideas from other people who posted them here on OtLand (credits on the functions itself). Special thanks to @Ninja for the help with the table config. This system is/was based on TERA's crafting system (NA), this...
otland.net