Cara, acho que a seção de pedidos e dúvidas em servidores derivados pode te ajudar melhor em relação a esses problemas. Mas acho que isso deve resolver seu problema:
function adjustWildPoke(cid)
if ehMonstro(cid) then
local teste = getPokemonLevel(cid) * pokesTable[getCreatureName(cid)].cons
if getCreatureMaxHealth(cid) ~= teste then
setCreatureMaxHealth(cid, teste)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
end
end
return true
end
function onThink(cid)
if ehMonstro(cid) then
addEvent(adjustWildPoke, 1, cid)
end
return true
end





info
Grupo: Conde
Registrado: 04/02/13
Posts: 541
Reputação: +90
Gênero: Masculino
Bom depois de muito tempo consegui um script que coloca life nos pokemon selvagem sem ser pelo .xml mais ai tem um erro toda vez que o pokemon leva dano a life volta full alguem pode me ajudar nisso?
Script:
function adjustWildPoke(cid)
if ehMonstro(cid) then
local teste = getPokemonLevel(cid) * pokesTable[getCreatureName(cid)].cons
setCreatureMaxHealth(cid, teste)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
end
return true
end
function onThink(cid)
if ehMonstro(cid) then
addEvent(adjustWildPoke, 1, cid)
end
return true
end
Xml - <event type="think" name="SpawnMonster" event="script" value="spawn.lua"/>