• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Poi Thrones Help

destroyer667

Member
Joined
Nov 21, 2007
Messages
290
Reaction score
6
I have this script and when i step on the throne id "1654" it gives me the message like "You have touched Verminor´s throne and absorbed some of his spirit" but when i go to the door and open it i can open it. It's supost to say "you have no absorbed enough energy"

i have set the door(1210) uid to 10281


idk why it doesn't work has to do something with the door part of the script.

Server: Avesta 7.6

LUA:
<movevent event="StepIn" itemid="1654" script="poi/thronespoi.lua" />



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 == 1210 and pos == {x=32826, y=32246, z=10} 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
 
wait, try this:
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 == 1210 and pos == {x=32826, y=32246, z=10} 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
            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
 
kk trying now, Nah it didn't work maybe it just doesn't work with 7.6 would of been nice to have working thrones like in rl tibia :D ill just have to setup 7 stones blocking the way and make them reset every 50 minutes or something have players pull a lever in throne room




Something i noticed on the door 1210 is supost to be a locked door when i view it on a normal character it says "closed door. Its locked" but i can open it. maybe that could be a problem?
 
Last edited:
LUA:
local t = {
	[10274] = {'Verminor', CONST_ME_POISONAREA, 3},
	[10275] = {'Infernatil', CONST_ME_HITBYFIRE, 4},
	[10276] = {'Tafariel', CONST_ME_POFF, 4},
	[10277] = {'Apocalypse', CONST_ME_EXPLOSIONAREA, 3},
	[10278] = {'Pumin', CONST_ME_YELLOW_RINGS, 4},
	[10279] = {'Bazir', CONST_ME_ENERGYHIT, 4},
	[10280] = {'Ashfalor', CONST_ME_MORTAREA, 5}
}

function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) == TRUE then
		local f = t[item.uid]
		if getPlayerStorageValue(cid, item.uid) == -1 then
			setPlayerStorageValue(cid, item.uid, 1)
			doSendMagicEffect(pos, f[2])
			doCreatureSay(cid, 'You have touched '..f[1]..'\'s throne and absorbed some of his spirit.', TALKTYPE_ORANGE_1)
		else
			if item.itemid == 1654 then
				pos.y = pos.y + f[3]
			elseif item.itemid == 1656 then
				pos.x = pos.x + f[3]
			end
			doTeleportThing(cid, pos)
			doSendMagicEffect(pos, CONST_ME_MORTAREA)
			doCreatureSay(cid, 'Begone!', TALKTYPE_ORANGE_1)
		end
	end
end
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1227 then
		for i = 10274, 10280 do
			if getPlayerStorageValue(cid, i) == -1 then
				return TRUE, doPlayerSendCancel(cid, 'You didn\'t absorb enough energy.')
			end
		end
		doTransformItem(item.uid, 1228)
		doTeleportThing(cid, toPosition)
	end
	return TRUE
end
(unregister 10280 from movements, register in actions, change door id to 1227)
 
Back
Top