Você avisou que não consegue por exausted mas está postando assim mesmo ou espera suporte? Por que se não não ta na seção correta rs
Não ficou claro, abç.
info
Group: Administrador
Joined: 08/07/05
Posts: 5.8k
Reputation: +1.4k
Gender: Outro

Você avisou que não consegue por exausted mas está postando assim mesmo ou espera suporte? Por que se não não ta na seção correta rs
Não ficou claro, abç.
info
Group: Cavaleiro
Joined: 18/12/12
Posts: 158
Reputation: +14
Gender: Masculino
Tibia Character: Lestat

deve ser por isso que ninguém me ajudou kk não me expressei bem, agora editei esta mais direto. eu gostaria de por tempo entre usos do script, tenho noção de scipt mas não ser fazer códigos, acho que daria pra fazer adicionando storage por x tempo, não sei :x
info
Group: Diretor
Joined: 12/05/12
Posts: 818
Reputation: +578
Gender: Masculino
Tibia Character: [ADM] Night

Cara so acho que você deveria organizar mais o tópico e a script para facilitar kkkk
Bom estou meio com pressa aqui, então editei a script aqui para você rapidão. Teste ai...
--[[script By Vodkart]]--function onSay(cid, words, param)if getPlayerStorageValue(cid, 212193) > os.time() then return doPlayerSendCancel(cid, "Espere " .. getPlayerStorageValue(cid, 212193) - os.time() .. " segundos.") endlocal config = {pz = False, -- players precisam estar em protection zone para usar? (true or false)battle = true, -- players deve estar sem battle (true or false)custo = true, -- se os teleport irão custa (true or false)need_level = true, -- se os teleport irão precisar de level (true or false)premium = true -- se precisa ser premium account (true or false)}--[[ Config lugares]]--local lugar = {["depot"] = { -- nome do lugarpos = {x=129, y=54, z=6},level = 5,price = 1000},["templo"] = { -- nome do lugarpos = {x=160, y=54, z=7},level = 10, price = 2000},["arena"] = { -- nome do lugarpos = {x=125, y=351, z=9},level = 15,price = 3000},["area vip"] ={ -- nome do lugarpos = {x=280, y=87, z=4},level = 20,price = 4000}}--[[ Lista de Viagem (Não mexa) ]]--if (param == "lista") thenlocal str = ""str = str .. "lista de viagem :\n\n"for name, pos in pairs(lugar) dostr = str..name.."\n"endstr = str .. ""doShowTextDialog(cid, 6579, str)return TRUEendlocal a = lugar[param]if not(a) thendoPlayerSendTextMessage(cid, 22, "desculpe,este lugar não existe")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEelseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.")return TRUEelseif config.premium == true and not isPremium(cid) thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas players com premium account podem teleportar.")return TRUEelseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder teleportar.")return TRUEelseif config.need_level == true and getPlayerLevel(cid) < a.level thendoPlayerSendTextMessage(cid, 22, "Desculpe,Voce não tem level. voce precisa "..a.level.." level ou mais para ser teleportado.")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEelseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE thendoPlayerSendTextMessage(cid, 22, "Desculpe,voce nao tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEenddoTeleportThing(cid, a.pos)doSendMagicEffect(a.pos, CONST_ME_TELEPORT)doPlayerSendTextMessage(cid, 22, "" .. getPlayerName(cid) .. " foi teleportado para: \n " .. param .. ".")setPlayerStorageValue(cid, 212193, os.time() + 30) -- tempo em segundos.return TRUEend
Edited Abril 24 by nedroesdoksdja
info
Group: Cavaleiro
Joined: 18/12/12
Posts: 158
Reputation: +14
Gender: Masculino
Tibia Character: Lestat

Muito obrigado, perfeito! ultima duvida, como seria a formula em minutos?
info
Group: Diretor
Joined: 12/05/12
Posts: 818
Reputation: +578
Gender: Masculino
Tibia Character: [ADM] Night

Só tu por 60 = 1 minuto. 120 = 2 minutos etc... kkkk
Coloque o meu comentário da script que te mandei como melhor resposta se realmente te ajudei.
info
Group: Cavaleiro
Joined: 18/12/12
Posts: 158
Reputation: +14
Gender: Masculino
Tibia Character: Lestat

Esta na area errada, não tem como dar melhor resposta, gostaria de saber como fazer para aparecer espere x minutos para usar novamente do que "300 segundos" de qualquer forma obrigado, reportado para que movam para a area certa.
info
Group: Marquês
Joined: 25/09/10
Posts: 1.3k
Reputation: +446
Gender: Masculino

Tópico Movido
Este tópico foi movido de "OTServ → Scripting → Downloads Scripts → Actions, talkactions e moveevents"
para "OTServ → Scripting → Suporte Scripting".
info
Group: Conde
Joined: 07/04/15
Posts: 926
Reputation: +335
Gender: Masculino

Tópico movido para dúvidas / pedidos resolvidos.
info
Group: Diretor
Joined: 12/05/12
Posts: 818
Reputation: +578
Gender: Masculino
Tibia Character: [ADM] Night

Putz ai você quer forçar a amizade né amigo?
Estou viajando e não tenho um servidor para testar, pois não sei a forma correta de por em minutos por isso precisaria de um servidor para testar antes de mandar para você.
Você poderia mudar a mensagem também para ficar mais fácil "Você pode usar este comando apenas uma vez por 3 minutos." rsrs
Mais creio que adicionando um +param*60... Daria certo.
info
Group: Cavaleiro
Joined: 18/12/12
Posts: 158
Reputation: +14
Gender: Masculino
Tibia Character: Lestat
Preciso de ajuda para adicionar tempo entre usos dessa talkaction.
Script:
--[[Script By Vodkart]]--function onSay(cid, words, param)local config = {pz = False, -- players precisam estar em protection zone para usar? (true or false)battle = true, -- players deve estar sem battle (true or false)custo = true, -- se os teleport irão custa (true or false)need_level = true, -- se os teleport irão precisar de level (true or false)premium = true -- se precisa ser premium account (true or false)}--[[ Config lugares]]--local lugar = {["depot"] = { -- nome do lugarpos = {x=129, y=54, z=6},level = 5,price = 1000},["templo"] = { -- nome do lugarpos = {x=160, y=54, z=7},level = 10, price = 2000},["arena"] = { -- nome do lugarpos = {x=125, y=351, z=9},level = 15,price = 3000},["area vip"] ={ -- nome do lugarpos = {x=280, y=87, z=4},level = 20,price = 4000}}--[[ Lista de Viagem (Não mexa) ]]--if (param == "lista") thenlocal str = ""str = str .. "lista de viagem :\n\n"for name, pos in pairs(lugar) dostr = str..name.."\n"endstr = str .. ""doShowTextDialog(cid, 6579, str)return TRUEendlocal a = lugar[param]if not(a) thendoPlayerSendTextMessage(cid, 22, "desculpe,este lugar não existe")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEelseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.")return TRUEelseif config.premium == true and not isPremium(cid) thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas players com premium account podem teleportar.")return TRUEelseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE thendoPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder teleportar.")return TRUEelseif config.need_level == true and getPlayerLevel(cid) < a.level thendoPlayerSendTextMessage(cid, 22, "Desculpe,Voce não tem level. voce precisa "..a.level.." level ou mais para ser teleportado.")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEelseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE thendoPlayerSendTextMessage(cid, 22, "Desculpe,voce nao tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.")doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)return TRUEenddoTeleportThing(cid, a.pos)doSendMagicEffect(a.pos, CONST_ME_TELEPORT)doPlayerSendTextMessage(cid, 22, "" .. getPlayerName(cid) .. " foi teleportado para: \n " .. param .. ".")return TRUEendProtocolo: 0.3.6up
Edited Janeiro 27 by narutomaniacos