kessykins
Intermediate OT User
- Joined
- Mar 15, 2010
- Messages
- 297
- Reaction score
- 105
Ok so I'm trying to make it so when a player has completed part 1 of a quest they can open a quest door<which will change their storage to ###, 3..> and give them access to the chest. Once they open the chest and return to the npc they'll be able to get the next part of the quest
What do I need to change on the door? any char above a certain lvl can open it x.x
I think I mixed up the actionid and uniqueids.. I'm not sure
The door is set to actionid 30000. This is the lua:
The chest is set to uniqueid 29000. This is the chest lua
++REP for help
What do I need to change on the door? any char above a certain lvl can open it x.x
I think I mixed up the actionid and uniqueids.. I'm not sure
The door is set to actionid 30000. This is the lua:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 30000 and item.itemid == 1225 then
if getPlayerStorageValue(cid,30000) == 2 then
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition, TRUE)
setPlayerStorageValue(cid,30000,3)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'The door seems to be sealed against unwanted intruders.')
end
end
end
The chest is set to uniqueid 29000. This is the chest lua
Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 29000 then
queststatus = getPlayerStorageValue(cid,29000)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a special item.")
doPlayerAddItem(cid,10515,1)
setPlayerStorageValue(cid,29000,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
return 1
end
++REP for help