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

Give x item to npc for access to door

D_Evans89

Member
Joined
Dec 3, 2014
Messages
175
Reaction score
12
As the title states I need a script that does that.

I have a npc and I want to make it so you talk to him and he asks you to find him x item, and when he receives the item you now have access to the door.

TFS 0.2.13

DoorID: 1225
Item: xxxx

I tried searching for it for the past hour and couldn't find anything
 
This is also explained in the post I linked.
Code:
doPlayerAddItem(cid, 2160, 3) -- You can add for example items as reward.
doPlayerAddExp(cid, 5000) -- or experience
setPlayerStorageValue(cid, 3843, 1) -- or storage, for example to open a quest door (I will not add this to the in total part, since most of the time you don't need it).

For the quest door, add the storage number as actionid to the door (questDoors, if you are not sure which ones they are, you can find the ids in global.lua).
 
Last edited:
Back
Top