I have a problem with one script at war ots,Tibia 10.10, and as you know this is not a function tfs doSentAnimatedText and I would like to turn to something else.
script:
script:
Code:
local expRate = 10
function onDeath(cid, corpse, deathList)
local a, b, c, d, e = math.floor(getPlayerLevel(cid) * 1.1), 0, getPlayerLevel(cid), math.floor(getPlayerExperience(cid) * 0.05), 0
for i = 1, #deathList do
if isPlayer(deathList[i]) then
b = getPlayerLevel(deathList[i])
e = math.floor(((a - b) / c) * d)
if e > 0 then
if getPlayerLevel(deathList[i]) >= 400 then
doPlayerAddExp(deathList[i], ((e * expRate)/100 * 50))
else
doPlayerAddExp(deathList[i], e * expRate)
end
doPlayerAddItem(deathList[i],2152,25)
setPlayerStorageValue(deathList[i],19999,getPlayerStorageValue(deathList[i],19999)+1)
doPlayerSendTextMessage(deathList[i],MESSAGE_EVENT_ORANGE,"You have already "..(getPlayerStorageValue(deathList[i],19999) + 1).." frags.")
doSendMagicEffect(getThingPos(deathList[i]), 72)
doSendAnimatedText(getCreaturePosition(deathList[i]),"FRAG!",math.random(1,255))
end
end
end
return true
end