• 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!

tfs 1.2 adding the belongs name item when to use

Hidroponica

Member
Joined
Feb 16, 2016
Messages
75
Reaction score
8
local conf = {
maxSlotCount=1,
ignoredIds={}
}

function choose(...)
local arg = {...}
return arg[math.random(1,#arg)]
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray({26040}, itemEx.itemid) then
return false
end
if isCreature(itemEx.uid) then
return false
end
local nam = Item(itemEx.uid):getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)
function getSlotCount(nam)
local c = 0
for _ in nam:gmatch('%[(.-)%]') do
c = c+1
end
return c
end
if getSlotCount(nam) < conf.maxSlotCount then
local l = choose('supreme')
local p = (30)
local armors = {2463,2464,2465,25662,25663,25664,25674,25670,25665,25666,25667,25675,25671}
if isInArray(armors, itemEx.itemid) then
doSendMagicEffect(toPosition,30)
nam = nam..' ['..l..'.+'..p..'%]'
doPlayerSendTextMessage(cid, 20,l..'.+'..p..'%')
doSetItemSpecialDescription(itemEx.uid, nam)
doRemoveItem(item.uid,1)
else
doPlayerSendTextMessage(cid, 20,"Slot limit reached.")
end
end
return true
end

help in this script when the player uses it in x item it looks like this:

You see a dragon scale mail (Arm:15).
It can only be wielded properly by knights and paladins.
It weighs 114.00 oz.
[supreme.+30%]

Iwanted to help the script and add the attribute and also add the belong name

You see a SUPREME dragon scale mail (Arm:15).
It can only be wielded properly by knights and paladins.
Its Belong NOMEDOPLAYER
It weighs 114.00 oz.
 
Last edited:

help in this script when the player uses it in x item it looks like this:

You see a dragon scale mail (Arm:15).
It can only be wielded properly by knights and paladins.
It weighs 114.00 oz.
[supreme.+30%]

Iwanted to help the script and add the attribute and also add the belong name

You see a SUPREME dragon scale mail (Arm:15).
It can only be wielded properly by knights and paladins.
Its Belong NOMEDOPLAYER
It weighs 114.00 oz.
 
how should the owner be set? the person who it drops for? the person who picks it up?

also you need to post ur entire script if you want help
 
bro script in Spoiler
the person who it drops for
im tried It Belongs to ".. getCreatureName(cid) .. but script dont work
 
Last edited:
change
Code:
doSetItemSpecialDescription(itemEx.uid, nam)
to
Code:
doSetItemSpecialDescription(itemEx.uid, nam.."\nBelongs to: "..getCreatureName(cid)..".")
try this
 
yeaah its working :D
u can help me how add new name
You see a demon helmet (Arm:10).
for
You see a SUPREME demon helmet (Arm:10).
Its Belong PLAYERNAME
 
Back
Top