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

Quests.

ZeeBeast

Preferable Beta Tester
Joined
Dec 5, 2013
Messages
206
Reaction score
10
Location
United States
My chests for quests aren't exactly working. For example: I have the uniqueid and actionid set to 2492 and I have the item inside set to a Dragon Scale mail (ID: 2492).
When someone tries to open the chest, it is like a normal chest with a Dragon scale mail inside. But once someone takes the item inside, it is gone.
Can anybody help me with this problem?
 
Set UID to the Chest for example 12345
Code:
function onUse(cid, item, frompos, item2, topos)


if item.uid == 12345 then ----------Any UID here
if getPlayerStorageValue(cid,12345) == -1 then ----------Same UID here
doPlayerSendTextMessage(cid,25,"You have found a Dragon Scale Legs.")
doPlayerAddItem(cid,2492,1) ----------Whatever itemID here
setPlayerStorageValue(cid,12345,1) ----------Same UID here
else
doPlayerSendTextMessage(cid,25,"The chest is empty.")
end

end
return TRUE
end
 
Okay. So I'm using scripts like these for every quest.
Code:
function onUse(cid, item, frompos, item2, topos)


if item.uid == 1996 then ----------Any UID here
if getPlayerStorageValue(cid,1996) == -1 then ----------Same UID here
doPlayerSendTextMessage(cid,25,"You have found a bag.")
doPlayerAddItem(cid,1996,1) ----------Whatever itemID here
setPlayerStorageValue(cid,1996,1) ----------Same UID here
else
doPlayerSendTextMessage(cid,25,"The chest is empty.")
end

end
return TRUE
end
I was wondering how I can put items inside the bag. Any ideas?
 
You can just use the system.lua, like dominique posted with the link to the tutorial.
Add actionid 2000 to a chest and an uniqueid, then add the items in the chest. If you add more items to 1 chest, people will get them in a bag.
 
Back
Top