It is a quest, when you click on the uid 10517 (The Dark mage asleep) you reward an skull staff, and awake the Dark mage.. All this works in the script, but i don't know how i can do that after X minutes the empty bed back to an occupied bed, and while the bed is empty, nobody will can "wake up" the dark mage (because he is not sleeping!)
And..
How i can change the read "Nobody is sleeping there" to "Dark mage is sleeping there"? (Dark mage is a monster)
PS: Don't worry for the items id, i only need the functions
Kind regards
Xapuur
Code:
local pos = {x=1119, y=1036, z=6}
local pos2 = {x=1121, y=1036, z=6}
local pos3 = {x=1120, y=1041, z=6}
function onUse(cid, item, frompos, item2, topos)
if item.uid == 10517 then
queststatus = getPlayerStorageValue(cid,10507)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have awakened the dark mage!")
doPlayerAddItem(cid,2436,1)
setPlayerStorageValue(cid,10507,1)
doSummonCreature("Dark mage", pos3)
doSummonCreature("Witch", pos)
doSummonCreature("Witch", pos2)
doTransformItem(10517, 1758)
doTransformItem(10518, 1759)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You can't awake him.")
end
else
return 0
end
return 1
end
And..
How i can change the read "Nobody is sleeping there" to "Dark mage is sleeping there"? (Dark mage is a monster)
PS: Don't worry for the items id, i only need the functions
Kind regards
Xapuur