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

OTHire 0.0.3 AID Key in bag

nilaya

New Member
Joined
Dec 29, 2011
Messages
18
Reaction score
0
Hi!

How do i make the key inside the bag get action id 6010 ? When i loot the coffin i get a backpack that contains item: Life ring, 3 Talons and golden key. Problem is that Golden key has ActionID of 0 (Key:0). See image below. How do i make the key so that it get's Action ID 6010 ? I can also loot the coffin several times and get multiple backpacks. Ive set the setPlayerStorageValue(cid,7625,1) the same way i do with all the other quests that work fine.


demonhell.jpg

Here's the code for it.

Lua:
function onUse(cid, item, frompos, item2, topos)


if item.uid ==7525 then
queststatus = getPlayerStorageValue(cid,7625)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a bag.")
local bag = doPlayerAddItem(cid, 2000, 1)
doAddContainerItem(bag, 2151, 3)
doAddContainerItem(bag, 2168, 1)
local key = doAddContainerItem(bag, 2091, 1)
doItemSetAttribute(key, 6010)
setPlayerStorageValue(cid,7625,1)
else
doPlayerSendTextMessage(cid,22,"You already done this quest.")
end
else
return 0
end

return 1
end


And here's the console error

Code:
Lua Script Error: [Action Interface]
data/actions/scripts/quests/parchment.lua:onUse

data/actions/scripts/quests/parchment.lua:12: attempt to call global 'doItemSetAttribute' (a nil value)
stack traceback:
        data/actions/scripts/quests/parchment.lua:12: in function <data/actions/scripts/quests/parchment.lua:1>


I know there is a quest from a NPC that gives you a key with a special Action ID, so i looked it up and found this

Code:
elseif talk_state == 6 and msgcontains(msg, 'yes') or talk_state == 6 and msgcontains(msg, 'Yes') then

    NOBLEARMORKEY = doPlayerAddItem(cid, 2089, 1)

    doSetItemActionId(NOBLEARMORKEY, 3142)

    doSetItemSpecialDescription(NOBLEARMORKEY, "(Key: 3142)")

    npcHandler:say("Here you are.", 1)

    talk_state = 0

What is NOBLEARMORKEY used for ? Does it fetch something from the database or something ?
 
Top