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

Solved Book in a box

Rik123

Into the abyss
Joined
Mar 16, 2010
Messages
890
Reaction score
712
Location
The Netherlands
Hey otland,

I'm not sure if this is the right thread or not, but I couldn't find a better place to ask it so, here it is.

I'm making a quest, and the reward is a book with text written in it. But, when I open the chest ingame, the book is empty. Does anyone knows how I can fix this?

Kind regards,
 
Last edited by a moderator:
Code:
local storage = 13007

function onUse(cid, item, fromPosition, itemEx, toPosition)

     if getPlayerStorageValue(cid, storage) == -1 then
         local book = doPlayerAddItem(cid, 1972, 1)
         doItemSetAttribute(book, "text", "Your book text here.")
         setPlayerStorageValue(cid, storage, 1)
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a book.")
     else
         doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "The chest is empty.")
     end
     return true
end
 
Code:
local storage = 13007

function onUse(cid, item, fromPosition, itemEx, toPosition)

     if getPlayerStorageValue(cid, storage) == -1 then
         local book = doPlayerAddItem(cid, 1972, 1)
         doItemSetAttribute(book, "text", "Your book text here.")
         setPlayerStorageValue(cid, storage, 1)
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a book.")
     else
         doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "The chest is empty.")
     end
     return true
end

Thanks, love you <3 #nohomo
 
Back
Top