function onStepIn(cid, item, position, fromPosition) local pos = {x = 1037, y = 1034, z = 7} local battlewin = 1 if #getCreatureSummons(cid) >= 1 then return true end addEvent(function() if #getPlayersInArea(battleroyale.area) > 1 then doTeleportThing(cid, pos) local item = doPlayerAddItem(cid, 5805, 1) doItemSetAttribute(item, "description", getCreatureName(cid).." conquistou este trofeu apos vencer uma partida no Battle Royale.") doBroadcastMessage(""..getCreatureName(cid).." Venceu o evento Battle Royale") doPlayerAddItem(cid,12618,1) doPlayerAddItem(cid,2152,30) addTopbattle(cid, battlewin) else doPlaerSendCancel(cid, "Not Win") end end,5*10000) return true end


info
Grupo: Artesão
Registrado: 20/04/18
Posts: 116
Reputação: +30
Pessoal, tenho uma script que o player ganha x item e volta para o cp quando não tem ninguem em x area, mas eu gostaria de fazer com que essa script fosse ativada depois de 5 segundos após o player pisar nesse tile.
Exemplo: Player pisa no tile, da 5 segundos e o script é ativado
Se não tiver ninguem nessa area, o script passa 5 segundos e funciona normal, caso tenha player nessa area, o script não funciona!
A script ja esta ok, só falta adicionar 5 segundos
function onStepIn(cid, item, position, fromPosition) local pos = {x = 1037, y = 1034, z = 7} local battlewin = 1 if #getCreatureSummons(cid) >= 1 then else if #getPlayersInArea(battleroyale.area) > 1 then return true end doTeleportThing(cid, pos) local item = doPlayerAddItem(cid, 5805, 1) doItemSetAttribute(item, "description", getCreatureName(cid).." conquistou este trofeu apos vencer uma partida no Battle Royale.") doBroadcastMessage(""..getCreatureName(cid).." Venceu o evento Battle Royale") doPlayerAddItem(cid,12618,1) doPlayerAddItem(cid,2152,30) addTopbattle(cid, battlewin) return true end end