• 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 Tanjis

Dorianek

Member
Joined
Nov 29, 2018
Messages
247
Reaction score
10
Location
Poland
36963


TFS 1.3

The monster is recovering normally but what's wrong with that? how to fix it?


Code:
local BOSSoo = "Tanjis" -- boss name
local BOSS_POSoo = {x = 33647, y = 31242, z = 11} -- boss spawn coord
local roomoo = {fromx = 33632, tox = 33659, fromy = 31231, toy = 31256, z = 11} -- boss room
local BOSS_GLOBAL_STORAGEoo = 80511 -- dont change
local BOSS_GLOBAL_STORAGE_SUMMONoo = 25002 -- dont change
local TEMPO_RESPoo = 10 * 60 -- em segundos -- respawn time

function onTime()
--function onThink(interval, lastExecution)

local bossoo = 0
for x = roomoo.fromx, roomoo.tox do
for y = roomoo.fromy, roomoo.toy do
for z = roomoo.z, roomoo.z do

creatureoo = {x = x, y = y, z = z}
moboo = getTopCreature(creatureoo).uid

    if getCreatureName(moboo) == BOSSoo then
        bossoo = 1
    end
end
end
end

if bossoo == 1 then
end

if bossoo == 0 then
  local monster2 = Game.createMonster("Tanjis", Position(33647, 31242, 11))
monster2:setReward(true)
end

return true
end



Data/lib/rewardboss
 
Last edited:
I apologize for the double post accidentally.

Code:
Data/lib/rewardboss

Code:
if not globalBosses then
    globalBosses = {}
end

function Monster.setReward(self, enable)
    if enable then
        if not self:getType():isRewardBoss() then
            error("Rewards can only be enabled to rewards bosses.")
            return false
        end
        globalBosses[self:getId()] = {}
        self:registerEvent("BossDeath")  
        self:registerEvent("BossThink")  
    else
        globalBosses[self:getId()] = nil
        self:unregisterEvent("BossDeath")
        self:unregisterEvent("BossThink")
    end
    return true
end
 
Yes, I deleted

<flag rewardboss = "1" />

Edit: From an ordinary account, if he kills the boss, loot falls out. Is it normal that no loot falls out of the Administrator account?
 
Last edited:
Back
Top