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

Solved [Need] Script for ,,belongs to..."

DrComet

New Member
Joined
Nov 25, 2014
Messages
63
Reaction score
3
Like a trophy system. I need some script just for example, cuz I'm trying to fix another one. I need function which adds special destription to item, cuz doSetItemSpecialDescription doesn't work on my TFS 0.3.6 and I have to use getItemAttribute, but well... I'm not sure where to place Item ID there... So I just need some script or just fragment for ,,belongs to.." description with ID of item.

Actually script fragment:

Code:
doSetItemSpecialDescription(doPlayerAddItem(itemOwner, 12609, 1), 'It is a ' ..itemType.. ' of '..getCreatureName(itemBlacksmith).. ' and it belongs to ' ..getCreatureName(itemOwner)..'.')

Script almost works good... But just description isn't show up and I'm getting an error in console about doSetSpecialDescription... So just seems like I have to use getItemAttribute one but I don't know how to remake it :/

Best regards,
Dr Comet
 
I think I used wrong function... I should use doItemSetAttribute, but still I'm not sure how to remake it cuz it would looks like this:
Code:
doItemSetAttribute(item.uid, "description", "This item belongs to " .. getCreatureName(cid))
So I'm confused when I'm trying to remake it... Also when I have doPlayerAddItem yet.
 
Last edited:
Code:
local thing = doPlayerAddItem(cid, 12609, 1)
doItemSetAttribute(thing, "description", "This item belongs to " .. getCreatureName(cid)..".")
 
Back
Top