Jump to content

How to Simply Detect and Notify When a Specific Boss Spawns?


Go to solution Solved by jking,

Recommended Posts

Hi everyone,  

I'm trying to create a quest that announces globally when a specific mob spawns.  

I've been searching for a solution for a long time but haven’t found any concrete answers. I found several ways to announce when the mob is killed, but not when it spawns.

 

I attempted to use this quest but :


quest boss_spawn_notifier begin
    state start begin
        when 1093.spawn with npc.get_map_index() == 21 begin
            notice_all("Whatever the boss name is has spawned somewhere in XXXXXX!")
        end
    end
end


Unfortunately, it doesn't seem to work.  

Can someone guide me on the best approach to achieve this?  
- Is there a way to directly detect mob spawns in the quest system?  
- Would modifying the server source code be necessary?  
- Any examples or alternative solutions would be greatly appreciated!  

Thank you in advance for your help! 

  • Eyes 1
  • Active Member
  • Solution

char_manager.cpp in function:

LPCHARACTER CHARACTER_MANAGER::SpawnMob(...)

just before:

return (ch);

add something like:

if (ch->GetMobRank() >= MOB_RANK_BOSS)
{
    BroadcastNotice("%s has been spawned!", ch->GetName());
}

or if you want by mob vnum:

if (ch->GetRaceNum() == XXX)
{
    BroadcastNotice("%s has been spawned!", ch->GetName());
}

 

Edited by jking
  • Honorable Member
18 hours ago, AgeOfMetin2 said:

Hi everyone,  

I'm trying to create a quest that announces globally when a specific mob spawns.  

I've been searching for a solution for a long time but haven’t found any concrete answers. I found several ways to announce when the mob is killed, but not when it spawns.

 

I attempted to use this quest but :


quest boss_spawn_notifier begin
    state start begin
        when 1093.spawn with npc.get_map_index() == 21 begin
            notice_all("Whatever the boss name is has spawned somewhere in XXXXXX!")
        end
    end
end


Unfortunately, it doesn't seem to work.  

Can someone guide me on the best approach to achieve this?  
- Is there a way to directly detect mob spawns in the quest system?  
- Would modifying the server source code be necessary?  
- Any examples or alternative solutions would be greatly appreciated!  

Thank you in advance for your help! 

By default, there's no spawn trigger for quests, So that won't be possible.

You can spawn bosses via quest, but I assume you are looking for a way to spawn it automatically and periodically, which I don't recommend doing via quest.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

@Syreldar & @jking thank you very much both of you.

5 hours ago, Syreldar said:

By default, there's no spawn trigger for quests, So that won't be possible.

You can spawn bosses via quest, but I assume you are looking for a way to spawn it automatically and periodically, which I don't recommend doing via quest.

No, i don't use any quest to spawn mob or bosses, they spawn like always from the boss.txt. I just wanted a simple announcement that's all. I think I will try the solution from @jking

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.