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

Distable write window in book

Szafi

www.rookwar.pl
Joined
Mar 2, 2009
Messages
165
Reaction score
10
Location
Poland
Hello. I use book and show me writeable window. How to discable window to click this?
book.png
Item ID: 8983
sorry for my english. Thanks for help.

script
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 8983 then
doPlayerAddPremiumDays(cid, 31)
doRemoveItem(item.uid,8983)
doSendMagicEffect(getPlayerPosition(cid),3)

doCreatureSay(cid, 'Ksiega dodala 30 dni premium do Twojego konta!', TALKTYPE_ORANGE_1) 
end
end
 
Last edited:
I'm not sure if you can do that in XML, but look up the book's ID in items.xml
If there is something like:
<item attribute="writable" value="1"/>

Delete that line.

If not, you need to edit the book in tibia.dat and items.otb file and remove the "Writable/Readable" flag from it.
 
I'm not sure if you can do that in XML, but look up the book's ID in items.xml
If there is something like:
<item attribute="writable" value="1"/>

Delete that line.

If not, you need to edit the book in tibia.dat and items.otb file and remove the "Writable/Readable" flag from it.
This is what I intended to write on my phone, however my break had just ended so I wrote something quick and barely legible. Thank you for expanding. :P
 
Just add a return true at the end:
Code:
function onUse(cid, item, frompos, item2, topos)
    if item.itemid == 8983 then
        doPlayerAddPremiumDays(cid, 31)
        doRemoveItem(item.uid,8983)
        doSendMagicEffect(getPlayerPosition(cid),3)
        doCreatureSay(cid, 'Ksiega dodala 30 dni premium do Twojego konta!', TALKTYPE_ORANGE_1)
    end
return true
end
 
Just add a return true at the end:
Code:
function onUse(cid, item, frompos, item2, topos)
    if item.itemid == 8983 then
        doPlayerAddPremiumDays(cid, 31)
        doRemoveItem(item.uid,8983)
        doSendMagicEffect(getPlayerPosition(cid),3)
        doCreatureSay(cid, 'Ksiega dodala 30 dni premium do Twojego konta!', TALKTYPE_ORANGE_1)
    end
return true
end

Thanks, im newbie lua programming. Make first scripts. Thanks
 
Back
Top