• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua script tfs 1.2

jackl90

Member
Joined
Jul 25, 2017
Messages
249
Reaction score
12
Hello guys, i'm looking for script startup to look change name item in x cordenate

Example: You see a knight armor (Arm:12) .It weighs 120.00 oz.
i have this item on map, 38392,2334,6 cordenate, i want only change this name of item in x cordenate.
 
Solution
LUA:
function onStartup()
    local tile = Tile(38392,2334,6)
    if tile then
        local item = tile:getItemById(2476)
        if item then
            item:setAttribute(ITEM_ATTRIBUTE_NAME, "other name")
        end
    end
end
Can you explain it better?
So you say that this knight armor is located at xyz and you want to edit his name to another one. You mean forever? can you (as a player) move the item somehow? or just a visual change
 
Can you explain it better?
So you say that this knight armor is located at xyz and you want to edit his name to another one. You mean forever? can you (as a player) move the item somehow? or just a visual change
Yes, edit his name to another one, forever, but only in xyz cordenate... is just a visual xD
 
LUA:
function onStartup()
    local tile = Tile(38392,2334,6)
    if tile then
        local item = tile:getItemById(2476)
        if item then
            item:setAttribute(ITEM_ATTRIBUTE_NAME, "other name")
        end
    end
end
 
Solution
LUA:
function onStartup()
    local tile = Tile(38392,2334,6)
    if tile then
        local item = tile:getItemById(2476)
        if item then
            item:setAttribute(ITEM_ATTRIBUTE_NAME, "other name")
        end
    end
end
if my item have a Description for example... can i remove this description on look?
 
using item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, "") no work :/ the description appear normally, if i use item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, " ")
with a space between "" the name of item appear a little bit up, because have a "invisible" description
 
Back
Top