D
Deleted member 141899
Guest
Hello guys,
Im using TFS 1.0
I'm trying to make the player just teleport to the boss if the tile face the pedestal, but is not working, are going straight to the doPlayerCancel and ignore the function If getPlayerPosition
Script:
I dont posted the function bosstimer here, the script works 100% if i dont place the function (if getplayerposition) but i want it.
Help !
Im using TFS 1.0
I'm trying to make the player just teleport to the boss if the tile face the pedestal, but is not working, are going straight to the doPlayerCancel and ignore the function If getPlayerPosition
Script:
Code:
local positions = {
[1] = {x = 33603, y = 32394, z = 11}, -- home position
[2] = {x = 33614, y = 32415, z = 12} -- boss room position
}
local coords = {
[1] = 33600, -- upper left corner of room
[2] = 33615, -- upper right corner "
[3] = 32414, -- upper left corner "
[4] = 32429, -- bottom left corner "
[5] = 12 -- z position
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = { {x = 33603, y = 32394, z = 11}, }
if(itemEx.itemid == 22634) and getPlayerPosition(cid) == pos then
doPlayerSendTextMessage(cid, 19, "You have entered an ancient demon prision cell!") -- mensagem que sairá quando ele for teleportado
doPlayerSendTextMessage(cid, 19, "You have fifteen minutes to kill and loot this boss, else you will lose that chance.") -- mensagem que sairá quando ele for teleportado
doTeleportThing(cid, positions[2])
addEvent(bossTimer, 60*1000, cid)
doPlayerRemoveItem(cid, 22605, 1)
doSendMagicEffect(positions[2], CONST_ME_TELEPORT)
else
doPlayerSendCancel(cid, "Use this key in the correct place.")
end
return true
end
I dont posted the function bosstimer here, the script works 100% if i dont place the function (if getplayerposition) but i want it.
Help !