Check if Mob was Beastman on Death
Posted: Thu Jun 02, 2016 12:10 pm
I want to have certain items drop from beastmen only in various regions. But first, I need to differentiate between beastman and non-beastman. How would I do this through mobs.lua?
Since mob is passed into the onMobDeathEx function, I thought I'd use this as a test at the end of the mobs.lua file. No matter the type of mob, it always reverts to else (not beastman). Is 'BEASTMEN' an invalid argument for isMobType()? Oddly when I change it to 'BEASTMAN' the client crashes, indicating to me that 'BEASTMEN' is a valid input.
Since mob is passed into the onMobDeathEx function, I thought I'd use this as a test at the end of the mobs.lua file. No matter the type of mob, it always reverts to else (not beastman). Is 'BEASTMEN' an invalid argument for isMobType()? Oddly when I change it to 'BEASTMAN' the client crashes, indicating to me that 'BEASTMEN' is a valid input.
Code: Select all
if (mob:isMobType(BEASTMEN) == true) then
player:PrintToPlayer("Beastman!", 0xD)
else
player:PrintToPlayer("Not beastman", 0xD)
end