Altera a posição dos valores do math.random.
Ex:
De
local hit1 = math.random(10, 5)
Para:
local hit1 = math.random(5, 10)
info
Group: Marquês
Joined: 22/07/12
Posts: 1.1k
Reputation: +400
Gender: Masculino
Tibia Character: Luck Oake

Altera a posição dos valores do math.random.
Ex:
De
local hit1 = math.random(10, 5)
Para:
local hit1 = math.random(5, 10)
Edited Agosto 29 by LuckOake
Vlw, resolveu, mas agora ta dando outro erro

e mudei o script para
function onThink(cid, interval) local booststorage = 159951 if getPlayerStorageValue(cid, booststorage) == 1 then addEvent(doTargetCombatHealth, 1000, cid, getCreatureTarget(cid), 512, - 5, - 10, 43) doSendAnimatedText(getCreaturePosition(getCreatureTarget(cid)), hit1, 144) elseif getPlayerStorageValue(cid, booststorage) == 2 then addEvent(doTargetCombatHealth, 1000, cid, getCreatureTarget(cid), 512, - 549, - 550, 43) doSendAnimatedText(getCreaturePosition(getCreatureTarget(cid)), hit2, 144) elseif getPlayerStorageValue(cid, booststorage) == 3 then addEvent(doTargetCombatHealth, 1000, cid, getCreatureTarget(cid), 512, - 799, - 800, 43) doSendAnimatedText(getCreaturePosition(getCreatureTarget(cid)), hit3, 144) end return true end
Edited Agosto 29 by Snowsz
info
Group: Marquês
Joined: 22/07/12
Posts: 1.1k
Reputation: +400
Gender: Masculino
Tibia Character: Luck Oake

Cara, você tava com target na hora que executou o script?
tipo assim, desliguei o sv ai loguei o char, como tava registrado no login.lua automaticamente executa o script mesmo sem target ai fica assim :S
info
Group: Marquês
Joined: 22/07/12
Posts: 1.1k
Reputation: +400
Gender: Masculino
Tibia Character: Luck Oake

function onThink(cid, interval)
local booststorage = 159951
if getCreatureTarget(cid) < 1 then
return true
end
if getPlayerStorageValue(cid, booststorage) == 1 then
addEvent(doTargetCombatHealth, 1000, cid, getCreatureTarget(cid), 512, - 5, - 10, 43)
doSendAnimatedText(getCreaturePosition(getCreatureTarget(cid)), hit1, 144)
elseif getPlayerStorageValue(cid, booststorage) == 2 then
addEvent(doTargetCombatHealth, 1000, cid, getCreatureTarget(cid), 512, - 549, - 550, 43)
doSendAnimatedText(getCreaturePosition(getCreatureTarget(cid)), hit2, 144)
elseif getPlayerStorageValue(cid, booststorage) == 3 then
addEvent(doTargetCombatHealth, 1000, cid, getCreatureTarget(cid), 512, - 799, - 800, 43)
doSendAnimatedText(getCreaturePosition(getCreatureTarget(cid)), hit3, 144)
end
return true
end
Isso deve evitar o erro.
Edited Agosto 29 by LuckOake
aee vei rep+ pra ti resolveu o erro
(todos kk).
info
Group: Herói
Joined: 20/05/10
Posts: 3.4k
Reputation: +1.5k
Gender: Masculino

boa luck, rep +
reportado para moverem
info
Group: Artesão
Joined: 22/01/12
Posts: 121
Reputation: +23
Tibia Character: Not...
Bem estou com uma dúvida, se relaciona ao script que fiz
está dando esse erro
no creaturescripts.xml está assim a tag
e não esqueci de registrar no login.lua
alguem me ajuda por favor.
Edited Agosto 29 by Snowsz