Jump to content
  • 0

Broadcast if the dead branch summon a MiniBoss


Question

Posted (edited)

Im looking to check if its possible. I know that is possible do a broadcast directly adding it to the dead branch script, but how to do this only if the monster summoned is a miniboss?

Thank you!

Edited by Vali

5 answers to this question

Recommended Posts

Posted (edited)

Do you wish to broadcast this only to the user who used the dead branch? That way everyone on the server won't be spammed by continuous minibosses dead branch spawn broadcast messages?

Edited by Syouji
Posted

That is just what i want, a global broadcast (but only launched in a certain map, that is easy to know). In the other hand my server only have ~15 players that is not a problem. /no1

Posted (edited)

Note: NOT TESTED

Source: Original Post

To do this you can edit the dead branch item in your item_db so that it calls a function instead of the mob_branch.txt file when it spawns a monster. This will look like this:

{ callfunc "newbranch"; },{},{}

Afterwards make a new script file and in it will be your new mob information. Here you can add the minibosses and normal monsters.

function	script	newbranch	{
setarray .@group[0], //Keep Populating this List
	1001,  // Scorpion - Normal
	1002,  // Poring - Normal
	1004,  // Hornet - Normal
	1005,  // Familiar - Normal
	1120,  // Ghostring - Miniboss
//Set .@i as the starting point for where the miniboss entries are all the way to the end.
set .@chosen, .@group[rand(getarraysize(.@group))];
monster "this",-1,-1,strmobinfo(1,.@chosen),.@chosen,1,"";
for (set @i,4; @i <= getarraysize(.@group); set @i,@i+1){
 if(.@chosen == .@group[.@i]){
   mapannounce "maphere","A miniboss was spawned!",0;
		  }
  }
end;
}

Edited by Syouji

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...