- Joined
- Jun 19, 2009
- Messages
- 1,852
- Reaction score
- 5
As the title says. I need a script like this:
when you make a quest, you get a key with action id 2091.
thanks
when you make a quest, you get a key with action id 2091.
thanks
function onUse(cid, item, frompos, item2, topos)
if item.uid == 30014 and getPlayerStorageValue(cid, 50002) == -1 then
doPlayerSendTextMessage(cid,22,"You have found a key.")
key = doPlayerAddItem(cid, 2089, 1)
doSetItemActionId(key,30014)
setPlayerStorageValue(cid, 50002,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
return 1
end
ActionID 2000, UniqueID some unused random number, then add the key into the chest, click on it, and assign ActionID 2091 to the key.
![]()
Didn't work :/ made everything you said, now I can't open the chest :O
@up
will maybe use it after cyko's response![]()
You can't open it with a GM/God~
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 5000) <= 0 then
local key = doPlayerAddItem(cid, 2091)
doItemSetAttribute(key, "aid", 2091)
setPlayerStorageValue(cid, 5000, 1)
doPlayerSendTextMessage(cid, 22, "You have found a key.")
else
doPlayerSendCancel(cid, "It is empty.")
end
return true
end
So how could I make a quest chest to give me a demon shield?