Eaglesight
donated 4 teh luls
- Joined
- Aug 18, 2007
- Messages
- 100
- Reaction score
- 0
I have a problem with opening certain containers, the ones im sure about is the box & crate. the item "Drawers" work fine.
Does anyone know what could be the problem with this?
I'm using Crying Damson distro.
Thanks in advance!
EDIT:
I found that I have a script attached to those items, how do I change this script to allow boxes/crates to be opened if it doesn't have an unique id? Thanks!
EDIT2: Solved! ^^
Does anyone know what could be the problem with this?
I'm using Crying Damson distro.
Thanks in advance!
EDIT:
I found that I have a script attached to those items, how do I change this script to allow boxes/crates to be opened if it doesn't have an unique id? Thanks!
-- simple quests based on uniqueId
-- to make quest create chest on map and set its uniqueId to id of quest item
function onUse(cid, item, frompos, item2, topos)
prize = item.uid
if prize > 1000 and prize < 5000 then
queststatus = getPlayerStorageValue(cid,prize)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'You have found a ' .. getItemName(prize) .. '.')
doPlayerAddItem(cid,prize,1)
setPlayerStorageValue(cid,prize,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
return 1
else
return 0
end
end
EDIT2: Solved! ^^
-- simple quests based on uniqueId
-- to make quest create chest on map and set its uniqueId to id of quest item
function onUse(cid, item, frompos, item2, topos)
prize = item.uid
if prize > 1000 and prize < 5000 then
queststatus = getPlayerStorageValue(cid,prize)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,'You have found a ' .. getItemName(prize) .. '.')
doPlayerAddItem(cid,prize,1)
setPlayerStorageValue(cid,prize,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
end
Last edited: