• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Boss Summon problem tfs 1.2

Code:
local boss = Creature(config.name)
if boss and boss:isMonster() then
    print('The creature ' .. config.name .. ' is already spawned.')
    return true
end

Game.createMonster(config.name, config.position, false, true)
boss = Creature(config.name)
if not boss then
    print('Unable to create the monster ' .. config.name .. '.')
    return true
end

If you wanted to shorten it you could leave out the last part as the first part kind of already checks the boss; The last few lines I think were more just for your own testing right?

Code:
local boss = Creature(config.name)
if boss and boss:isMonster() then
    print('The creature ' .. config.name .. ' is already spawned.')
    return true
end
Game.createMonster(config.name, config.position, false, true)
 
Back
Top