Meu colega recomendamos que o seu sistema seja postado para melhor compreendimento.
Para que o tempo seja alterado mude a variável da exaustão.
info
Grupo: Infante
Registrado: 04/03/11
Posts: 1.6k
Reputação: +393
Char no Tibia: No Have

Meu colega recomendamos que o seu sistema seja postado para melhor compreendimento.
Para que o tempo seja alterado mude a variável da exaustão.
info
Grupo: Campones
Registrado: 16/08/12
Posts: 92
Reputação: 0
Char no Tibia: Sedentaria

Se der pra almentar mais a chance de ficar feliz ?
function onSay(cid, words, param)
if param ~= "" then
return false
end
if string.len(words) ~= 5 then
return false
end
local cd = exhaustion.get(cid, 88727)
if not cd then
cd = 0
end
if cd > 0 then
doPlayerSendCancel(cid, "You have to wait "..cd.." seconds.")
return true
end
if #getCreatureSummons(cid) <= 0 then
doPlayerSendCancel(cid, "You need a pokemon to use this command.")
return true
end
doSendMagicEffect(getThingPos(cid), 180)
local function doLovePokemon(cid)
if not isCreature(cid) then return true end
if #getCreatureSummons(cid) <= 0 then return true end
if exhaustion.get(cid, 88727) and exhaustion.get(cid, 88727) > 3 then return true end
local a = getCreatureSummons(cid)[1]
local b = getPlayerStorageValue(a, 1008)
if b > 250 then
doPlayerSendCancel(cid, "Your pokemon is already so happy.")
return true
end
doSendMagicEffect(getThingPos(a), 180)
setPlayerStorageValue(a, 1008, b + 45)
exhaustion.set(cid, 88727, 180)
end
exhaustion.set(cid, 88727, 3)
addEvent(doLovePokemon, 1150, cid)
return true
end
Editado Setembro 29 por webmasterxd
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

mano n da pra usar spoiler n? .. ;/
function onSay(cid, words, param)
if param ~= "" then
return false
end
if string.len(words) ~= 5 then
return false
end
local cd = exhaustion.get(cid, 88727)
if not cd then
cd = 0
end
if cd > 0 then
doPlayerSendCancel(cid, "You have to wait "..cd.." seconds.")
return true
end
if #getCreatureSummons(cid) <= 0 then
doPlayerSendCancel(cid, "You need a pokemon to use this command.")
return true
end
doSendMagicEffect(getThingPos(cid), 180)
local function doLovePokemon(cid)
if not isCreature(cid) then return true end
if #getCreatureSummons(cid) <= 0 then return true end
if exhaustion.get(cid, 88727) and exhaustion.get(cid, 88727) > 3 then return true end
local a = getCreatureSummons(cid)[1]
local b = getPlayerStorageValue(a, 1008)
if b > 250 then
doPlayerSendCancel(cid, "Your pokemon is already so happy.")
return true
end
doSendMagicEffect(getThingPos(a), 180)
setPlayerStorageValue(a, 1008, b + 45)
exhaustion.set(cid, 88727, 180)
end
exhaustion.set(cid, 88727, 3)
addEvent(doLovePokemon, 1150, cid)
return true
end
em azul = qnt de felicidade q eh aumentada...
em vermelho = o tempo de CD, em segs...
120 = 2min
60 = 1min...
Editado Setembro 29 por Slicer
info
Grupo: Campones
Registrado: 16/08/12
Posts: 92
Reputação: 0
Char no Tibia: Sedentaria

Ainda nao aprendi nao entendi como usava spolier
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

mano faz assim..
[ spoiler] coloca aki teu script [ /spoiler]
sem os espaços entre '['... ;x tpw..
[ spoiler]Ola meu nome eh Slicer
e eu estou no xtibia o/[ /spoiler]
soh tirar os espaços ali entre [ s e [ /s ... ;x
info
Grupo: Campones
Registrado: 16/08/12
Posts: 92
Reputação: 0
Char no Tibia: Sedentaria

Brigadão ai rep+ pra vc
Editado Setembro 29 por webmasterxd
info
Grupo: Campones
Registrado: 16/08/12
Posts: 92
Reputação: 0
Char no Tibia: Sedentaria
Galera queria sber como dimuir o tempo do love pra deixa 30 seg -