• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Need a script to write something in a book

raver1234

New Member
Joined
Sep 7, 2012
Messages
12
Reaction score
0
I'm making a quest on which you open a dead body and find a book with some stuff written on it. I'm kinda experienced in scripting but I don't know of any function that writes on books, something like doAddText(), I don't know.
the script should be like
Code:
function onUse(cid)
if getPlayerStorageValue(cid,12010)~=1 then
book=doPlayerAddItem(cid,1955,1) --gray book id
setPlayerStorageValue(cid,12010,1)
[B][COLOR="#FF0000"]doAddText(book,"bla bla bla")[/COLOR][/B]
else
doPlayerSendTextMessage(cid,22,"You found nothing.")
end
end
So, please, what's the correct function? Thanks for your time!
 
Depending on your server version smth like:
doItemSetAttribute(book, "text", "Once there was an ugly barnacle, he was so ugly that everyone died. The end.")
 
I've found this on the sources
static int luaDoSetItemText(lua_State *L);
trying both solutions right now, updating in a few minutes
 
I could tell you the exact method if you had mentioned your server version.
 
I want the book to be obtainable by every player, not only by the first that loots the body. That's like putting a fire sword inside a chest because it's the reward of the quest.
 
Back
Top