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

Quest chest & capacity

atomic chavez

Hi there
Joined
Mar 8, 2009
Messages
84
Reaction score
0
Location
Mexico Monterrey
Im having some troubles since some of my quests use this kind of coding when there is more than one prize to choose from:

PHP:
if item.uid == 5001 then
   
        queststatus = getPlayerStorageValue(cid,5000)
       
        if queststatus == -1 then
            doPlayerSendTextMessage(cid,25,"You have found a spellbook of lost souls.")
            doPlayerAddItem(cid,8903,1)
            setPlayerStorageValue(cid,5000,1)
        else
            doPlayerSendTextMessage(cid,25,"It is empty.")
        end


The problem is that, if the player opening the chest has NO CAPACITY he will get the "you do not have enough cap..." and setPlayerStorageValue will go true regardless if the player took the prize or not, so he will not be able to open the chest again.

Thanks in advance I will rep you if you help me ;D
 
Back
Top