• 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 Action ID - description Keys.

Dibis

Member
Joined
Dec 1, 2022
Messages
73
Reaction score
16
Location
POLAND
Hello.
I need script who create description for key in quest.
ETC:

If item.actionid = 2022 then
set this item description "Key for door to desert quest room."

Best option is:

local config {

aid = 2022 desc = "blabla1'
aid = 2023 desc = "blabla2'
aid = 2024 desc = "blabla3'

Thanks for answer !
 
Lua:
local config = {
    [1] = { actionId = 2022, description = "A cool description." },
    [2] = { actionId = 2023, description = "This item is bizarre." },
    [3] = { actionId = 2024, description = "Teddy bear of a lonely child." },
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    for i = 1, #config, 1 do
        if item.actionid == config[i].actionId then
            doItemSetAttribute(item.uid, "description", config[i].description)
        end
    end

    return true
end
 
Lua:
local config = {
    [1] = { actionId = 2022, description = "A cool description." },
    [2] = { actionId = 2023, description = "This item is bizarre." },
    [3] = { actionId = 2024, description = "Teddy bear of a lonely child." },
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    for i = 1, #config, 1 do
        if item.actionid == config[i].actionId then
            doItemSetAttribute(item.uid, "description", config[i].description)
        end
    end

    return true
end
Thank you. I check this!
 
Back
Top