I have this script for ferumbras quest but i need set setReward for ferumbras mortal,
i tried it
but not success.
Message "you are not owner" i use tfs 1.2
local bossForms = {
['ascending ferumbras'] = {
text = 'IT\'S NOT THAT EASY MORTALS! FEEL THE POWER OF THE GOD!',
newForm = 'ferumbras soul splinter'
},
['ferumbras soul splinter'] = {
text = 'NOOO! NOW YOU HERETICS WILL FACE MY GODLY WRATH!',
newForm = 'destabilized ferumbras'
},
['destabilized ferumbras'] = {
text = 'YOU ... WILL ... PAY WITH ETERNITY ... OF AGONY!',
newForm = 'ferumbras mortal'
}
}
function onKill(player, target)
local targetMonster = target:getMonster()
if not targetMonster then
return true
end
local name = targetMonster:getName():lower()
local bossConfig = bossForms[name]
if not bossConfig then
return true
end
local found = false
for k, v in ipairs(Game.getSpectators(targetMonster:getPosition())) do
if v:getName():lower() == bossConfig.newForm then
found = true
break
end
end
if not found then
Game.createMonster(bossConfig.newForm, targetMonster:getPosition(), false, true)
player:say(bossConfig.text, TALKTYPE_MONSTER_SAY)
end
return true
end
['ascending ferumbras'] = {
text = 'IT\'S NOT THAT EASY MORTALS! FEEL THE POWER OF THE GOD!',
newForm = 'ferumbras soul splinter'
},
['ferumbras soul splinter'] = {
text = 'NOOO! NOW YOU HERETICS WILL FACE MY GODLY WRATH!',
newForm = 'destabilized ferumbras'
},
['destabilized ferumbras'] = {
text = 'YOU ... WILL ... PAY WITH ETERNITY ... OF AGONY!',
newForm = 'ferumbras mortal'
}
}
function onKill(player, target)
local targetMonster = target:getMonster()
if not targetMonster then
return true
end
local name = targetMonster:getName():lower()
local bossConfig = bossForms[name]
if not bossConfig then
return true
end
local found = false
for k, v in ipairs(Game.getSpectators(targetMonster:getPosition())) do
if v:getName():lower() == bossConfig.newForm then
found = true
break
end
end
if not found then
Game.createMonster(bossConfig.newForm, targetMonster:getPosition(), false, true)
player:say(bossConfig.text, TALKTYPE_MONSTER_SAY)
end
return true
end
i tried it
Code:
if targetMonster == "ferumbras mortal shell" then
targetMonster:setReward(true)
end
Message "you are not owner" i use tfs 1.2