• 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!

[TFS 0.3.6:3293] Having problems with thrones in PoI!

jonasu

Well-Known Member
Joined
Nov 3, 2009
Messages
147
Solutions
2
Reaction score
59
Location
Stockholm, Sweden
Hey all otlanders!
I have recently started a project where I'm using frankfarmers real tibia project. This project however had some quests that were not working. I have fixed most of the quests, but PoI is not working.

Everything is working except thrones (its a short poi so thats all that is supposed to work), i am using this script:
Code:
function onStepIn(cid, item, pos)

    if item.uid == 10274 then
        if getPlayerStorageValue(cid,10274) == -1 then
            setPlayerStorageValue(cid,10274,1)
			doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
            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)
			doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
            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)
			doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
            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)
			doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
            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)
			doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
            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)
			doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
            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)
			doSendMagicEffect(getPlayerPosition(cid),CONST_ME_BIGCLOUDS)
            doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have touched Ashfalor´s throne and absorbed some of his spirit.')
						
        else
			doTeleportThing(cid,{x=540, y=1526, z=14})
			doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MORTAREA)
							doCreatureSay(cid, "Begone!", TALKTYPE_ORANGE_1)
        end

    end
    return 1
end

And this in movements.xml:
Code:
	<movevent event="StepIn" itemid="5915" script="AllThrones.lua" />
<movevent event="StepIn" itemid="5916" script="AllThrones.lua" />

All the unique ID's are right but when i try to step on the throne (tried with my god and a regular player) it doesnt say anything and is not working at all.

I really need help for this, i have tried my best but i can't seem to figure it out!

Regards,
Xitobuh
 
I would write in movements this:
XML:
<movevent type="StepIn" uniqueid="10274" event="script" value="AllThrones.lua" />
<movevent type="StepIn" uniqueid="10275" event="script" value="AllThrones.lua" />
<movevent type="StepIn" uniqueid="10276" event="script" value="AllThrones.lua" />
<movevent type="StepIn" uniqueid="10277" event="script" value="AllThrones.lua" />
<movevent type="StepIn" uniqueid="10278" event="script" value="AllThrones.lua" />
<movevent type="StepIn" uniqueid="10279" event="script" value="AllThrones.lua" />
<movevent type="StepIn" uniqueid="10280" event="script" value="AllThrones.lua" />
but I am not a good scripter at all :p
EDIT:
XML:
<movevent event="StepIn" itemid="5915" script="AllThrones.lua" />
<movevent event="StepIn" itemid="5916" script="AllThrones.lua" />
uhm, movement looks like this for example :p
XML:
<movevent type="StepIn" itemid="5915" event="script" value="AllThrones.lua" />
       <movevent type="StepIn" itemid="5916" event="script" value="AllThrones.lua" />
 
Last edited:
Back
Top