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

ActionID in quest reward

nips

Da.Nb
Joined
Oct 15, 2009
Messages
152
Reaction score
0
Location
Germany
Code:
 local chests =
{
    [1002] = {prize = 2087}
}

local status = 12346 -- Storage for quest
local questLevel = 30 -- Level to open chest

function onUse(cid, item, fromPosition, itemEx, toPosition)
local name = getItemNameById(chests[item.uid].prize)
local questStatus = getPlayerStorageValue(cid, status)
local playerPos = getCreaturePosition(cid)
    if questStatus == 1 then
        doPlayerSendTextMessage(cid,22, "You have already chosen your reward.")
    return TRUE
    end
    if getPlayerLevel(cid) >= questLevel then
        doPlayerAddItem(cid, chests[item.uid].prize, 1)
        setPlayerStorageValue(cid, status, 1)
        doSendMagicEffect(playerPos, CONST_ME_GIFT_WRAPS)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have found a ".. name ..".")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be atleast level ".. questLevel .." to open this chest.")
    end
    return TRUE
end

This iy my questscript now and could anyone rescript it so that the wooden key which I receive has the action ID 2000?

And does anyone know what the "[1002]" in the begin of the script means?

Thank you for the reading
 
Back
Top