Hi,
I'm trying to fix this about a hour but I can't do this by my self.
This is code for AllThrones:
I did double check storage of thrones in this file:
poi_last.lua
Pos of a door is:
{x=5372, y=5484, z=5}
a tile on the right is:
{x = 5373, y = 5484, z = 5}
and tile on the left is:
{x = 5371, y = 5484, z = 5}
I don't have any errors in console.
after done all thrones (touched them) when I'm trying to use the door (last_poi) with uid:
10:46 You see a closed door.
ItemID: [1223], UniqueID: [10281].
Position: [X: 5372] [Y: 5484] [Z: 5].
nothing happen.
In actions.xml I have this:
<action uniqueid="10281" event="script" value="doors/poi_last.lua"/>
and in movements.lua:
<movevent event="StepIn" itemid="5915" script="PitsOfInferno/AllThrones.lua" />
<movevent event="StepIn" itemid="5916" script="PitsOfInferno/AllThrones.lua" />
My PoI is only with the sales, thrones and room with rewards.
No holy tibia, no vial, no blood etc.
distro OTX 2.5 for 8.6 tibia
I'm trying to fix this about a hour but I can't do this by my self.
This is code for AllThrones:
LUA:
function onStepIn(cid, item, pos)
if item.uid == 10274 then
if getPlayerStorageValue(cid,10274) == -1 then
setPlayerStorageValue(cid,10274,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Verminor´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Veminor´s spirit.')
end
elseif item.uid == 10275 then
if getPlayerStorageValue(cid,10275) == -1 then
setPlayerStorageValue(cid,10275,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Infernatil´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Infernatil´s spirit.')
end
elseif item.uid == 10276 then
if getPlayerStorageValue(cid,10276) == -1 then
setPlayerStorageValue(cid,10276,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Tafariel´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Tafariel´s spirit.')
end
elseif item.uid == 10277 then
if getPlayerStorageValue(cid,10277) == -1 then
setPlayerStorageValue(cid,10277,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Apocalypse´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Apocalypse´s spirit.')
end
elseif item.uid == 10278 then
if getPlayerStorageValue(cid,10278) == -1 then
setPlayerStorageValue(cid,10278,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Pumin´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Pumin´s spirit.')
end
elseif item.uid == 10279 then
if getPlayerStorageValue(cid,10279) == -1 then
setPlayerStorageValue(cid,10279,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Bazir´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Bazir´s spirit.')
end
elseif item.uid == 10280 then
if getPlayerStorageValue(cid,10280) == -1 then
setPlayerStorageValue(cid,10280,1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Ashfalor´s throne and absorbed some of his spirit.')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have already absorbed some of Ashfalor´s spirit.')
end
elseif item.uid == 10281 and item.itemid == 1223 and pos == {x=5372, y=5484, z=5} then
if getPlayerStorageValue(cid,10274) == -1 or getPlayerStorageValue(cid,10275) == -1 or getPlayerStorageValue(cid,10276) == -1 or getPlayerStorageValue(cid,10277) == -1 or getPlayerStorageValue(cid,10278) == -1 then
doTransformItem(item.uid,item.itemid+1)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'Sorry, but you did not absorb enough energy!')
else
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You absorbed enough energy! You may pass.')
end
end
return 1
end
I did double check storage of thrones in this file:
poi_last.lua
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local charpos = getPlayerPosition(cid)
if item.uid == 10281 and charpos.x == 5573 and (charpos.y == 5484 or charpos.y == 5483) and charpos.z == 5 then
if getPlayerStorageValue(cid,10274) == -1 or getPlayerStorageValue(cid,10275) == -1 or getPlayerStorageValue(cid,10276) == -1 or getPlayerStorageValue(cid,10277) == -1 or getPlayerStorageValue(cid,10278) == -1 or getPlayerStorageValue(cid,10279) == -1 or getPlayerStorageValue(cid,10280) == -1 then
doPlayerSendTextMessage(cid,25,"You did not absorb enough energy!")
else
local newPos = {x=5573, y=5484, z=5}
doTeleportThing(cid, newPos)
doSendMagicEffect(newPos, 10)
end
elseif item.uid == 10281 and charpos.x == 5571 and (charpos.y == 5484 or charpos.y == 5485) and charpos.z == 5 then
local newPos = {x=5575, y=5484, z=5}
doSendMagicEffect(getPlayerPosition(cid), 2)
doTeleportThing(cid, newPos)
doSendMagicEffect({x=5575, y=5484, z=5}, 10)
end
return TRUE
end
Pos of a door is:
{x=5372, y=5484, z=5}
a tile on the right is:
{x = 5373, y = 5484, z = 5}
and tile on the left is:
{x = 5371, y = 5484, z = 5}
I don't have any errors in console.
after done all thrones (touched them) when I'm trying to use the door (last_poi) with uid:
10:46 You see a closed door.
ItemID: [1223], UniqueID: [10281].
Position: [X: 5372] [Y: 5484] [Z: 5].
nothing happen.
In actions.xml I have this:
<action uniqueid="10281" event="script" value="doors/poi_last.lua"/>
and in movements.lua:
<movevent event="StepIn" itemid="5915" script="PitsOfInferno/AllThrones.lua" />
<movevent event="StepIn" itemid="5916" script="PitsOfInferno/AllThrones.lua" />
My PoI is only with the sales, thrones and room with rewards.
No holy tibia, no vial, no blood etc.
distro OTX 2.5 for 8.6 tibia