Tyson12302
New Member
- Joined
- Aug 6, 2014
- Messages
- 264
- Reaction score
- 4
I am trying to get these DHQ Quest items in the chest but it doesn't work fully. When i right click on the chest it opens with the items inside. But i want it to appear in my backpack with it say "You have picked "Item". Here's me script. I've put those UID on RME and everything but it still opens it up with the items instead of just giving it to me.
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 3001 then
queststatus = getPlayerStorageValue(cid,6077)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have a demon helmet.")
doPlayerAddItem(cid,2493,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
if item.uid == 3002 then
queststatus = getPlayerStorageValue(cid,6077)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found steel boots.")
doPlayerAddItem(cid,2645,1)
setPlayerStorageValue(cid,6077,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
if item.uid == 3003 then
queststatus = getPlayerStorageValue(cid,6077)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a demon shield.")
doPlayerAddItem(cid,2520,1)
setPlayerStorageValue(cid,6078,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
end
return 1
end
end
end
PHP:
<action actionid="2079" event="script" value="quests/doqchest.lua"/>
<action actionid="2080" event="script" value="quests/dhqchest.lua"/>
<action actionid="2081" event="script" value="quests/dhqchest.lua"/>
<action actionid="2082" event="script" value="quests/dhqchest.lua"/>