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

npc who give key with action id

tim26

Member
Joined
Aug 12, 2008
Messages
618
Reaction score
11
Location
Poland
i want make npc who give key with action id when i give him 800gp

i have that lines

local key = doPlayerAddItem(cid, 2087, 1)
doSetItemActionId(key, 3940)

and error in console


[23/10/2008 13:37:25] luaDoSetItemActionId(). Item not found
 
Doesn't work and I have the same problem.

Code:
if msgcontains(msg, 'yes') then
selfSay('Alright, take this key to unlock the chest.', cid)
doSetItemActionId(doPlayerAddItem(cid, 2090, 1), 5006)
--setPlayerStorageValue(cid, 50006, 1)

::: EDIT :::

I found a way to bypass this :

Code:
if getPlayerSlotItem(cid, 6).itemid == 0 then
  selfSay('Alright, take this key to unlock the chest.', cid)
  doPlayerAddItem(cid, 2090, 1)
  doSetItemActionId(getPlayerSlotItem(cid, 6).uid, 5006)
  setPlayerStorageValue(cid, 50006, 1)
else		
  doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, 'Please, free up your right hand. (Below amulet slot).')
  doSendMagicEffect(cid, CONST_ME_POFF)
end
 
Last edited:
Back
Top