Well I've edited some script already in my ots because I need a book with text in it + you can get it in bookcase.
So I am trying already 2h [cuz I am bad yet in scripting ] to make this script works, and this is what I've done so far:
* I can get a book with ID - 1964, UID - 5559 and even a text in this book but the problem is:
Player "A" can normally take it from bookcase, hes getting it + he can open and see the text I wrote there, but when
Player "B" clicks on bookcase server is getting crashed.
My codes:
Actions.xml:
<action itemid="1962" script="bookinfo.lua" />
bookinfo lua code - \/
<action itemid="1718" script="bookquest.lua" />
bookquest lua code \/
And I am in really please if someone could fix it, or make a new one what works without any problems. If u would try make a new one for me ( I would be so thankful + free beer
) but ye, if someone could do that for me I need a book - 1962 ID with text into it and you have to get this book in bookcase with ID 1718
// Thanks.
So I am trying already 2h [cuz I am bad yet in scripting ] to make this script works, and this is what I've done so far:
* I can get a book with ID - 1964, UID - 5559 and even a text in this book but the problem is:
Player "A" can normally take it from bookcase, hes getting it + he can open and see the text I wrote there, but when
Player "B" clicks on bookcase server is getting crashed.
My codes:
Actions.xml:
<action itemid="1962" script="bookinfo.lua" />
bookinfo lua code - \/
Code:
function onUse (cid, item, frompos, item2, topos)
rw = getItemRWInfo(item.uid)
if (rw and 1) then
if (rw and 2) then
doShowTextWindow(item.uid,1000,1)
else
doShowTextWindow(item.uid,0,0)
end
else
if (item.itemid == 1962) then
doShowTextWindow(item.uid,5559,0)
end
end
return 1
end
<action itemid="1718" script="bookquest.lua" />
bookquest lua code \/
Code:
function onUse (cid, item, frompos, item2, topos)
if (item.uid == 5555) then
queststatus = getPlayerStorageValue(cid,5555)
if (queststatus == -1) then
doPlayerSendTextMessage(cid,22,"You have found a book. The papyrus pages are sewn together with a silver thread.")
doItemSetAttribute(doPlayerAddItem(cid,1962,1), 'uid', 5559)
doSetItemText(5559, "History Of Abduzz")
setPlayerStorageValue(cid,5555,1)
else
doPlayerSendTextMessage(cid,22,"The library is empty.")
end
return 0
end
return 1
end
And I am in really please if someone could fix it, or make a new one what works without any problems. If u would try make a new one for me ( I would be so thankful + free beer
// Thanks.