<action uniqueid="7917" script="other/secretbook.lua"/>
function onUse(cid, item, frompos, item2, topos)
if item.uid == 7917 then
queststatus = getPlayerStorageValue(cid,5020227)
if queststatus == -1 then
doSetItemText(doPlayerAddItem(cid, 1950),"Warfare Secret:We know one of warfare secrets! Go To Jungle And Find Hero Statue , from statue go 1 south 6 west 3 south 1 west. Here Is A Secret Passage , But we dont know where it leads cuz we dont know secret words to enter it! Find Another Secret Somewhere in Warfare City...")
setPlayerStorageValue(cid,5020227,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
else
return 0
end
return 1
end
lol what tfs your using ? i using 0.3.6
function onUse(cid, item, frompos, item2, topos)
local config = {
storage = 50012, -- change to your own storage value :)
item = 1955, -- change to id of book
}
if getPlayerStorageValue(cid, config.storage) == -1 then
setPlayerStorageValue(cid, config.storage, 1)
doPlayerSendTextMessage(cid,25,"You have found a book.")
item = doPlayerAddItem(cid, config.item, 1)
doSetItemText(item,"Text\n(break line)Text\n Text")
else
doPlayerSendTextMessage(cid,25,"The chest is empty.")
end
return TRUE
end