Jump to content
  • 0

Looking for an Invasion Scriptwith mob selection


Rivers

Question


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   47
  • Joined:  12/04/13
  • Last Seen:  

good day,

I'm looking for a simple Invasion script that will spawn, either a set or random amount, of a specific monster set. I'm looking to use this for Seasonal Invasions, like Christmas mobs for Christmas season invasions.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

-	script	invasion	-1,{
	
OnInit:
	setarray .map$,"prontera","izlude";
	function add_set;
	function create_set;
	create_set();
end;

OnMinute00:
	function start_set;
	start_set();
end;

OnMobDead:
	if(!mobcount(.current_map$,strnpcinfo(0) + "::OnMobDead")){
OnTimer900000:
		function end_set;
		end_set();
	}
end;
	
//= Add your new set here.
function	create_set	{
	//= add_set("Mob ID:Mob Amount{:Min amount:Max amount},....."); If min/max amount is added mob amount will be ignored. 
	add_set("1001:50,1002:20:70:100");
	add_set("1005:50:10:20,1001:20");
}

function	add_set	{
	.set$[getarraysize(.set$)] = getarg(0);
	return;
}
	
function	start_set	{
	.current_map$ = .map$[rand(getarraysize(.map$))];
	killmonster .current_map$,strnpcinfo(0) + "::OnMobDead";
	explode(.@T$,.set$[rand(getarraysize(.set$))],",");
	for(.@i = 0; .@i < getarraysize(.@T$); .@i++){
		explode(.@TT$,.@T$[.@i],":");
		if(getarraysize(.@TT$) > 2){
			if(atoi(.@TT$[3]) == 0)
				.@amount = atoi(.@TT$[1]);
			else
				.@amount = rand(atoi(.@TT$[2]),atoi(.@TT$[3]));
			
		} else
			.@amount = atoi(.@TT$[1]);
		monster .current_map$,0,0,"--ja--",atoi(.@TT$[0]),.@amount,strnpcinfo(0) + "::OnMobDead";
		deletearray .@TT$[0],getarraysize(.@TT$);
	}
	announce "Invasion : Invasion has started in " + .current_map$ + ".",bc_blue;
	initnpctimer;
	end;
}

function	end_set	{
	announce "Invasion : All monster has been killed.",bc_blue;
	killmonster .current_map$,strnpcinfo(0) + "::OnMobDead";
	end;
}

}

 

Edited by crazyarashi
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   47
  • Joined:  12/04/13
  • Last Seen:  

Thanks so very much. This works more the way I am looking for. You're the best!

Link to comment
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
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.

×
×
  • Create New...