Rivers Posted December 5, 2020 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 244 Reputation: 57 Joined: 12/04/13 Last Seen: 7 hours ago Share Posted December 5, 2020 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. Quote Link to comment Share on other sites More sharing options...
1 crazyarashi Posted December 6, 2020 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 776 Reputation: 239 Joined: 02/11/17 Last Seen: 10 hours ago Share Posted December 6, 2020 (edited) - 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 December 6, 2020 by crazyarashi Quote Link to comment Share on other sites More sharing options...
0 Rivers Posted December 6, 2020 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 244 Reputation: 57 Joined: 12/04/13 Last Seen: 7 hours ago Author Share Posted December 6, 2020 Thanks so very much. This works more the way I am looking for. You're the best! Quote Link to comment Share on other sites More sharing options...
Question
Rivers
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.