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

Lua SetSpecialDescription

Sun

Knowledge is power - France is bacon
Joined
Jan 26, 2015
Messages
334
Solutions
22
Reaction score
249
Hi,
How would I set a special description on an item with a unique id, visible only for characters with a certain storage? Haven't been able to figure this one out.
 
Well, it would require you to create a special onLook function..
Or you could get a writable object, and make it display a pop-up, depending on what the characters storage id is when used?
 
Well, it would require you to create a special onLook function..
Or you could get a writable object, and make it display a pop-up, depending on what the characters storage id is when used?

I guess you meant something like this with the pop-up? or perhaps you were thinking of pop-up FYI.
Code:
local text = {
    [1] = "I wouldn't leave just yet if I were you.",
    [2] = "Sure you wanna leave?",
    [3] = "Aren't you forgetting something?",
    [4] = "I don\'t think you\'re done here"
}

function onLook(cid, item, position, lookDistance)
    if item.uid == 33881 then
        if(getPlayerStorageValue(cid, 19372) < 0) then
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, " " .. text[math.random(4)] .. " ")
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Exit.")
        end
    end  
end

Either way the one I made now works, ty:)
 
Back
Top