Postado Julho 5, 2015 9 anos Pessoal, boa noite! Eu tenho um script baseado em uma porta Vip, onde o player só pode passar se tiver a storage de vip! Estou adaptando este script pra uma porta onde o player só pode passar se tiver terminado uma quest, porém, quando eu clico na porta (mesmo tendo feito essa quest) continua aparecendo a msg de que precisa fazer a quest! Alguém poderia me ajudar? Segue o script! local str = 2215 -- storage function onUse(cid, item, frompos, item2, topos) local pos = getCreaturePosition(cid) if getPlayerStorageValue(cid, str) - os.time() < 1 then return doPlayerSendCancel(cid, "Voce precisa terminar anihilator quest!") end 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 doPlayerSendCancel(cid, "Fique em frente a porta.") return true end doTeleportThing(cid, pos) doSendMagicEffect(topos, CONST_ME_MAGIC_BLUE) return true end Desde já eu agradeço!
Postado Julho 5, 2015 9 anos Solução Não mexi na sua gambiarra: local str = 2215 -- storage function onUse(cid, item, frompos, item2, topos) local pos = getCreaturePosition(cid) if getPlayerStorageValue(cid, str) < 1 then return doPlayerSendCancel(cid, "Voce precisa terminar anihilator quest!") end 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 doPlayerSendCancel(cid, "Fique em frente a porta.") return true end doTeleportThing(cid, pos) doSendMagicEffect(topos, CONST_ME_MAGIC_BLUE) return true end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.