miklus
New Member
Hello! i have question ... i dont have script for poi *(or dont working)* and i want to make a script with 7 thrones (can be movements) who gives you pass to 1 doors... Sequence does't matter.
if getPlayerStorageData(cid, idfordoor1) ~= -1 then
if getPlayerStorageData(cid, idfordoor2) ~= -1 then
etc
enter
else
doPlayerCancel(cid, "You did not complete all thrones.")
if getPlayerStorageData(cid, idfordoor1) ~= -1 and getPlayerStorageData(cid, idfordoor2) ~= -1 and getPlayerStorageData(cid, idfordoor3) ~= -1 and getPlayerStorageData(cid, idfordoor4) ~= -1 and getPlayerStorageData(cid, idfordoor5) ~= -1 and getPlayerStorageData(cid, idfordoor6) ~= -1 and getPlayerStorageData(cid, idfordoor7) ~= -1 then
enter
else
doPlayerCancel(cid, "You did not complete all thrones.")
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local storages = {17011, 17012, 17013, 17014, 17015, 17016, 17017}
local fail = FALSE
for i = 1, #storages do
if (getPlayerStorageValue(cid, storages[i]) == -1) then
fail = TRUE
end
end
if (fail == TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to do pits of inferno quest first.")
else
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, fromPosition, TRUE)
end
return TRUE
end
Use doors from my OT, you have to do all thrones before go inq. quest:
Code:function onUse(cid, item, fromPosition, itemEx, toPosition) local storages = {17011, 17012, 17013, 17014, 17015, 17016, 17017} local fail = FALSE for i = 1, #storages do if (getPlayerStorageValue(cid, storages[i]) == -1) then fail = TRUE end end if (fail == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to do pits of inferno quest first.") else doTransformItem(item.uid, item.itemid + 1) doTeleportThing(cid, fromPosition, TRUE) end return TRUE end
It's not for thrones, it's for doors which check you did thrones ^^
I don't think so, this script checks 7 storages, if you have push you to toPosition & transform item to +1, if not send msg. Throne should work onStepIn() -> set storage -> send message & effect, ^^.