Boss Tanjis

Dorianek

Member
Joined
Nov 29, 2018
Messages
212
Best answers
0
Reaction score
8
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:
OP
D

Dorianek

Member
Joined
Nov 29, 2018
Messages
212
Best answers
0
Reaction score
8
Location
Poland
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
 

Fortera Global

Premium User
Premium User
Joined
Nov 20, 2015
Messages
1,063
Best answers
0
Reaction score
47
Maybe missing a flag inside Tanjis.xml

<flag rewardboss="1" />
 
OP
D

Dorianek

Member
Joined
Nov 29, 2018
Messages
212
Best answers
0
Reaction score
8
Location
Poland
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:
Top