• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] Random World boss

Status
Not open for further replies.

lexir

Enthusiast
•Description: Hello everyone can someone help me make an script that : every 24hours an Random Rare boss at an random place spawns and if its killed the announce with the killers name(s)
•Version:3.3.5a

- - - Updated - - -

And the killer (s) get an random reward..
 

Tommy

Founder
Well, we don't really have a request section for specific reasons (look @ the rules), but this is pretty simple, so I'll do it.

Imo, you could just spawn the bosses and give them a high respawn time instead of creating a script. Here's the boss 'death' announcement:

Code:
class npc_boss_died : public CreatureScript
{
public:
    npc_boss_died() : CreatureScript("npc_boss_died") { }
	
    struct npc_boss_diedAI : public ScriptedAI
    {
        npc_boss_diedAI(Creature* creature) : ScriptedAI(creature) { }
		
        void JustDied(Unit* killer)
        {
            std::ostringstream ss;
            if (killer->GetTypeId() == TYPEID_PLAYER)
            {
                ss << killer->ToPlayer()->GetName()
                   << " has killed "
                   << me->GetName()
                   << " a Rare Boss!";
                sWorld->SendGlobalText(ss.str().c_str(), NULL);
            }
        }
   };
	
    CreatureAI* GetAI(Creature* creature) const
    {
        return new npc_boss_diedAI(creature);
    }
};

void AddSC_rare_boss()
{
    new npc_boss_died;
}
 

Tommy

Founder
and what if i wanna that an creature (with an id) spawn's every 24h ?

As I said above:

Imo, you could just spawn the bosses and give them a high respawn time instead of creating a script.

It would deplete the purpose of a script and would save you time. This is how retail does it anyway, rare mobs = high respawn rate.
 

lexir

Enthusiast
yep but idk its safer when i make an script ..
well i am pretty new at this script making etc so i dont get much things .. so idk ....

- - - Updated - - -

But thank you ..
 
Status
Not open for further replies.
Top