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

Some1 Can Help me to Fix POI THRONE?

Tovar

Brak V
Joined
Jul 26, 2008
Messages
347
Reaction score
8
hello, well friends as say the title, some one can help me to fix this script? this dont have bug in console, but the thrones dont do nothing =/, they have the unique id set. but nothing work...

there is the 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


Thanks in Advance guys.:thumbup:
 
nvm fixed, the problem is that in movements all the stepIn or stepOut are with event=stepIn and in tfs 0.3.5 (CD) the right is with type=stepIn or out~.... thanks!!!!!!!! guys, thread close :p
 
Lua:
local array = {
--	[uid] 	= {"Name", effect, teleport_sqm# / position array}
	[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, {x=406,y=1515,z=14}},
	[10280] = {"Ashfalor", CONST_ME_MORTAREA, 5}
}
function onStepIn(cid, item, position, fromPosition)
	if array[item.uid] and isPlayer(cid) == TRUE then
		local storage = getPlayerStorageValue(cid, item.uid)
		if storage < 1 then
			setPlayerStorageValue(cid, item.uid, 1)
			doSendMagicEffect(position, array[item.uid][2])
			doCreatureSay(cid, "You have touched "..array[item.uid][1].."'s throne and absorbed some of his spirit.")
		elseif storage > 0 then
			if storage == 1 then
				setPlayerStorageValue(cid, item.uid, 2)
			end
			if(type(array[item.uid][3]) == "table") then
				pos = array[item.uid][3]
			else
				local pos = position
				if item.itemid == 5915 then
					pos.y = pos.y + array[item.uid][3]
				elseif item.itemid == 5916 then
					pos.x = pos.x + array[item.uid][3]
				end
			end
			doTeleportThing(cid, pos)
			doSendMagicEffect(position, CONST_ME_MORTAREA)
			doCreatureSay(cid, "Begone!", TALKTYPE_ORANGE_1)
		end
	end
	return TRUE
end
:D
 
thanks cykotitan, I already fixed it, the problem with all the movements scripts is that in movements.xml all are with event=~ and the right is type=~ i dont know why :S
 
Back
Top