Nesse script:
function onUse(cid, item, frompos, item2, topos)
if hasVip(cid) == TRUE then
pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,"Fique de frente com a porta.")
return true
end
doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,22,'Precisar ser VIP Account para passar por aqui.')
end
return true
end
ele atravessa a porta, queria que a porta abrisse, tem como?
encontrei um script de porta que abre, usando outro sistema:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey
if not player:isVip() then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need vip to access this area.')
return false
end
local doorId = item.itemid
if not item.itemid == doorId then
return true
end
Item(item.uid):transform(item.itemid + 1)
player:teleportTo(toPosition, true)
return true
end
TAMBÉM PRECISO DE AJUDA PRA QUANDO ACABAR A VIP O PLAYER IR PARA O TEMPLO, NÃO ESTA FUNCIONANDO:
function onLogin(cid)
local temple = { x =300, y = 300, z = 6}
if hasVip(cid) == true then
if getPlayerStorageValue(cid,55555) ~= 1 then
setPlayerStorageValue(cid,55555,1)
end
else
if getPlayerStorageValue(cid,55555) == 1 then
doTeleportThing(cid, temple)
doPlayerSendTextMessage(cid, 22, "Your VIP Time over!")
db.executeQuery("UPDATE `accounts` SET `vip_time` = 0 WHERE `id` = ".. getAccountIdByName(getPlayerName(cid)) ..";")
setPlayerPromotionLevel(cid, 1)
setPlayerStorageValue(cid, 55555, 0)
end
end
return true
end
OBS: o sistema que uso é o vip system baseado no do mock TFS 1.0
obrigado