Jump to content
Ximboliex

[QUESTION] Boss Announcement

Recommended Posts

Hi Guys,

 

I want to make the system to announce when a boss respawn

 

Ex: 

If CheckMonsterDead(mobid) ==false then

 

local BNotice = "the black dragon is Destroying icicle city in 2369,2653"

GMNotice(BNotice)

 

 

I know how to make the system announces the death of a mob but I find it a bit difficult to make the system to announce when revives, not if the example illustrate a little what I want to do.

 


xbx3.png

Share this post


Link to post
Share on other sites

You can remove the monster from that and summon it through a function and use variables to record its state, check when it's dead and when it should revive according to your timer.

  • Like 1

Share this post


Link to post
Share on other sites

Thank's @Angelix you refresh my memory, i Need Coffee:morning1:

 

I made this function

function BossRespawn(role, freq, time)    

	    local now_ticking = GetChaParam(role, 1)

	    local BOSS_01 = CreateCha(1340, 11900, 12100, 90,150)

	    local BOSS_02 = CreateCha(1320, 13600, 13900, 90,150)



	    if math.mod(now_ticking, 3600) == 0 and now_ticking > 0 and CheckMonsterDead(BOSS_01) == true then

	    SetChaLifeTime(BOSS_01,97000000)

	    GMNotice("Black Dragon Is Reborn !")



	    elseif math.mod(now_ticking, 3600) == 0 and now_ticking > 0 and CheckMonsterDead(BOSS_02) == true then

	    SetChaLifeTime(BOSS_02,97000000)

	    GMNotice("Goddess Is Reborn !")
	    end
end

Hook:AddPostHook("cha_timer",BossRespawn)
Edited by Ximboliex

xbx3.png

Share this post


Link to post
Share on other sites

@Ximboliex Better to hook it into Player_timer function by @KONG or into a map_copy.

 

Especially with Notice or GMNotice functions, it's very effortful. You will be executing this script (check math mod) of every single creature.

  • Like 1

logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...