omega.scripts = {}
function omega.scripts.onherodeath()
if Game.GetGameDifficulty() >= Game.Difficulty.Legendary then
local player = Game.GetLocalPlayer();
player:GiveItem('records/omega/items/questitems/Omega_Soul_Heroes.dbr', 1, true);
if player:GetQuestState(0x4B25F880) != QuestState.InProgress then
player:GrantQuest(0x4B25F880,0x36BE5A40);
end
omega.scripts.spawnomegaboss();
end
end
function omega.scripts.onbossdeath()
if Game.GetGameDifficulty() >= Game.Difficulty.Legendary then
local player = Game.GetLocalPlayer();
player:GiveItem('records/omega/items/questitems/Omega_Soul_Boss.dbr', 1, true);
end
end
It doesn’t get much simpler than that. Boss souls drop 100%, hero’s 0%. This matches Omega source and I cannot identify any conflicts.
Check the monsters that should trigger the scripts.
Also it might be that there are problems with the quest ids as that’s the only thing I see that could cause the script to jump.
BTW you can also try removing the semicolons ( ; ) since these are not needed in lua. You’re mishmashing lua and c syntax here.
Edit: Usually strings (multiple characters) are introduced by “<string>” while single characters are written in ‘<single character>’, not sure if this applies to lua though but might be worth a try.
I cut the two chunks and put them into their own script file.
omega.souls = {}
function omega.souls.onherodeath()
if Game.GetGameDifficulty() >= Game.Difficulty.Legendary then
local player = Game.GetLocalPlayer()
player:GiveItem("records/omega/items/questitems/Omega_Soul_Heroes.dbr", 1, true)
end
end
function omega.souls.onbossdeath()
if Game.GetGameDifficulty() >= Game.Difficulty.Legendary then
local player = Game.GetLocalPlayer()
player:GiveItem("records/omega/items/questitems/Omega_Soul_Boss.dbr", 1, true)
end
end
Still no hero soul drops but boss does. Hero dbrs are vanilla and they are still classified as HERO.
Only other option I can think of is copy hero dbrs to mod and change entries on the SCRIPT tab. There’s a slot for onDie string. My lua-kung-fu is weak so if anyone knows how to throw that thing together rq, it would be appreciated.