Jump to content
  • 0

Requesting Real Monster Invasion script!


joelolopez

Question


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

i would like to request a monster invasion that

 

 

-all monsters will appear on a portal, (portal will appear in a random coordinates in a random time)

-invade random town (prontera,morroc,payon,izlude etc..)

-monsters that will appear on the portal must be the "SAME" race for example all monsters that will attack prontera are insects race.

-the race of the invaders in a town is random (demon,undead,insect,formless,angel,demi human,drago etc...)

-the level of the monsters that will invade a town should be <=  the character with the highest level in the town. for example (joelo lv 54, insect monsters who is below 54 will the only monster that will appear)

-the number of the invaders is 50 (configurable?)

-monster with the highest level will be the leader

-players that participated on killing minion monsters will also get a small reward! for example zeny

-invasion will end if the leader has been defeated,

-announce the player who killed the leader(monster) and announce the random reward prize!

-random reward prize can be configured

-if a town has no players invasion is not going to activate

-boss monsters should be configurable if its included in the invasion event or not

 

possible configurable settings are:

- number of invaders

-towns that will be invaded

-race of monsters that can invade a town

-monster level condition (default: <= character with the highest level in town )

-random minion kill reward prize

-random reward prize for the player who killed the leader

-blacklist monsters

=============================================================================

 

here is the sample simulation of my requested script to make it more clear:

 

 

-7:04 PM

-demon monsters are starting to attack the town payon

-payon,231,231 displays a portal where all demon monsters will start to get moving

-since Joelo is the highest level (lvl 78) character in town, all demon monsters <= lvl 78 will appear on the portal

 

monsters <= lvl 78

example of all list of available demon monsters:

invaders should be maximum of 50 including the leader which is the highest level monster:

 

-deviruchi (lvl 49) (24)

-minidemon (lvl 60) (25)

-zealotus (lvl 73) (1)

 

 

-SinX873 killed a minion!

-SinX873 got 13432 zeny!

-SinX873 got ruby!

 

after killing zealotus

all demon minions will die and the portal will disappear

announcement will start

 

Brave Iruga killed zealotus the leader of the demon invaders!, payon is now safe!

Iruga received a old card album as a reward!

 

=================================================================

 

i hope sir capuche read this ahehhe! and also other master scripters here! this will be a different monster invasion experience! a totally new experience! wahhhh real monster invasion style!

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.01
  • Content Count:  164
  • Reputation:   16
  • Joined:  03/15/12
  • Last Seen:  

Hi, sorry to revive this TOPIC but this seems to be useful are you able to re-script this again @Capuche
I tried your script and it has a bug. does not support multiple maps$

That would be awesome suggestions above missing.

Thank you!

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Try

prontera,1,1,0	script	#event_race	45,{
end;

OnKillLeader:
	killmonster .event_map$,strnpcinfo(3) +"::OnKillMob";
	if ( .nodrop ) {
		removemapflag .event_map$, mf_nomobloot;
		removemapflag .event_map$, mf_nomvploot;
	}
// Setting
	setarray .@reward[0],
		501,10,			// reward id, amount
		502,5,
		503,2;
// end setting

	announce "Player "+ strcharinfo(0) +" killed the Monster Leader!",0;
	.@r = rand( getarraysize(.@reward) /2 ) *2;// random reward
	dispbottom "You get "+ .@reward[.@r+1] +" "+ getitemname(.@reward[.@r]) +".";
	getitem .@reward[.@r], .@reward[.@r+1];
	end;
OnKillMob:
	Zeny = Zeny + 1000;
	dispbottom "You get 1000 Zeny.";// zeny to kill minion
	end;

OnInit:
OnHour00:
// Setting
	.@mode = 0;		// no boss 0 - allow boss 1
	.nodrop = 1;	// no mob drop 1 else 0
	.@total = 50;	// number mob (max 128)

	setarray .@town$[0],"prontera";
	setarray .@race$[0],
		RC_Formless,"Formless",// comments line to disable
		RC_Undead,"Undead",
		RC_Brute,"Animal",
		RC_Plant,"Plant",
		RC_Insect,"Insect",
		RC_Fish,"Fish",
		RC_Demon,"Demon",
		RC_DemiHuman,"Demihuman",
		RC_Angel,"Angel",
		RC_Dragon,"Dragon";
// end setting

	.@t = rand( getarraysize( .@town$ ) );
	.@r = rand( getarraysize(.@race$)/2 ) *2;
	.event_map$ = .@town$[.@t];
	do {
		.@x = rand(1,300);
		.@y = rand(1,300);
	} while( !checkcell(.event_map$,.@x,.@y,cell_chkpass) );
	.@x1 = .@x - 5;
	.@x2 = .@x + 5;
	.@y1 = .@y - 5;
	.@y2 = .@y + 5;
	.pc_maxlvl = 0;

// event
	// warpchar .event_map$,.@x,.@y,5;// debug
	donpcevent strnpcinfo(3) +"::OnLevel";
	if ( .pc_maxlvl == 0 ) end;// no player on the map
	sleep 50;
	unitwarp getnpcid(0),.event_map$,.@x,.@y;
	hideoffnpc strnpcinfo(3);
	if ( .nodrop ) {
		setmapflag .event_map$, mf_nomobloot;
		setmapflag .event_map$, mf_nomvploot;
	}
	announce "The event will start in "+ .@town$[.@t] +" against race "+ .@race$[.@r+1] +"!",0;
	sleep 5000;

	if ( .@mode == 0 )
		.@mvp$ = "MEXP = 0 and ~Mode&0x000020 and ";
	query_sql( "select ID,LV from mob_db_re "+
			"where kName not like 'Treasure%' and "+ .@mvp$ +"LV <= "+ .pc_maxlvl +" and Race = "+ .@race$[.@r] +" and Mode&0x000080 and "+
			"( `Drop1id` > 0 or `Drop2id` > 0 or `Drop3id` > 0 or `Drop4id` > 0 or `Drop5id` > 0 or `Drop6id` > 0 or `Drop7id` > 0 or `Drop8id` > 0 or "+
			"`Drop9id` > 0 or DropCardid > 0 ) order by rand() limit "+ .@total, .@mob_id, .@lvl );
	.@size = getarraysize( .@mob_id );
	for ( .@i = 0; .@i < .@size; .@i++ ) {// return index mob max lvl
		if ( .@mob_maxlvl < .@lvl[.@i] ) {
			.@mob_maxlvl = .@lvl[.@i];
			.@index = .@i;
		}
	}
	for ( .@i = 0; .@i < .@size; .@i++ ) {
		if ( .@i == .@index )
			areamonster .event_map$,.@x1,.@y1,.@x2,.@y2,"Leader",.@mob_id[.@i],1,strnpcinfo(3) +"::OnKillLeader";
		else
			areamonster .event_map$,.@x1,.@y1,.@x2,.@y2,"--ja--",.@mob_id[.@i],1,strnpcinfo(3) +"::OnKillMob";
	}
	announce "Monster "+ getmonsterinfo( .@mob_id[.@index],MOB_NAME ) +" is the leader !",0;
	hideonnpc strnpcinfo(3);
	end;
OnLevel:
	addrid 0;
	if ( strcharinfo(3) != .event_map$ || .pc_maxlvl >= BaseLevel ) end;
	.pc_maxlvl = BaseLevel;
	end;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  154
  • Topics Per Day:  0.03
  • Content Count:  493
  • Reputation:   46
  • Joined:  01/24/12
  • Last Seen:  

 

Try

prontera,1,1,0	script	#event_race	45,{
end;

OnKillLeader:
	killmonster .event_map$,strnpcinfo(3) +"::OnKillMob";
	if ( .nodrop ) {
		removemapflag .event_map$, mf_nomobloot;
		removemapflag .event_map$, mf_nomvploot;
	}
// Setting
	setarray .@reward[0],
		501,10,			// reward id, amount
		502,5,
		503,2;
// end setting

	announce "Player "+ strcharinfo(0) +" killed the Monster Leader!",0;
	.@r = rand( getarraysize(.@reward) /2 ) *2;// random reward
	dispbottom "You get "+ .@reward[.@r+1] +" "+ getitemname(.@reward[.@r]) +".";
	getitem .@reward[.@r], .@reward[.@r+1];
	end;
OnKillMob:
	Zeny = Zeny + 1000;
	dispbottom "You get 1000 Zeny.";// zeny to kill minion
	end;

OnInit:
OnHour00:
// Setting
	.@mode = 0;		// no boss 0 - allow boss 1
	.nodrop = 1;	// no mob drop 1 else 0
	.@total = 50;	// number mob (max 128)

	setarray .@town$[0],"prontera";
	setarray .@race$[0],
		RC_Formless,"Formless",// comments line to disable
		RC_Undead,"Undead",
		RC_Brute,"Animal",
		RC_Plant,"Plant",
		RC_Insect,"Insect",
		RC_Fish,"Fish",
		RC_Demon,"Demon",
		RC_DemiHuman,"Demihuman",
		RC_Angel,"Angel",
		RC_Dragon,"Dragon";
// end setting

	.@t = rand( getarraysize( .@town$ ) );
	.@r = rand( getarraysize(.@race$)/2 ) *2;
	.event_map$ = .@town$[.@t];
	do {
		.@x = rand(1,300);
		.@y = rand(1,300);
	} while( !checkcell(.event_map$,.@x,.@y,cell_chkpass) );
	.@x1 = .@x - 5;
	.@x2 = .@x + 5;
	.@y1 = .@y - 5;
	.@y2 = .@y + 5;
	.pc_maxlvl = 0;

// event
	// warpchar .event_map$,.@x,.@y,5;// debug
	donpcevent strnpcinfo(3) +"::OnLevel";
	if ( .pc_maxlvl == 0 ) end;// no player on the map
	sleep 50;
	unitwarp getnpcid(0),.event_map$,.@x,.@y;
	hideoffnpc strnpcinfo(3);
	if ( .nodrop ) {
		setmapflag .event_map$, mf_nomobloot;
		setmapflag .event_map$, mf_nomvploot;
	}
	announce "The event will start in "+ .@town$[.@t] +" against race "+ .@race$[.@r+1] +"!",0;
	sleep 5000;

	if ( .@mode == 0 )
		.@mvp$ = "MEXP = 0 and ~Mode&0x000020 and ";
	query_sql( "select ID,LV from mob_db_re "+
			"where kName not like 'Treasure%' and "+ .@mvp$ +"LV <= "+ .pc_maxlvl +" and Race = "+ .@race$[.@r] +" and Mode&0x000080 and "+
			"( `Drop1id` > 0 or `Drop2id` > 0 or `Drop3id` > 0 or `Drop4id` > 0 or `Drop5id` > 0 or `Drop6id` > 0 or `Drop7id` > 0 or `Drop8id` > 0 or "+
			"`Drop9id` > 0 or DropCardid > 0 ) order by rand() limit "+ .@total, .@mob_id, .@lvl );
	.@size = getarraysize( .@mob_id );
	for ( .@i = 0; .@i < .@size; .@i++ ) {// return index mob max lvl
		if ( .@mob_maxlvl < .@lvl[.@i] ) {
			.@mob_maxlvl = .@lvl[.@i];
			.@index = .@i;
		}
	}
	for ( .@i = 0; .@i < .@size; .@i++ ) {
		if ( .@i == .@index )
			areamonster .event_map$,.@x1,.@y1,.@x2,.@y2,"Leader",.@mob_id[.@i],1,strnpcinfo(3) +"::OnKillLeader";
		else
			areamonster .event_map$,.@x1,.@y1,.@x2,.@y2,"--ja--",.@mob_id[.@i],1,strnpcinfo(3) +"::OnKillMob";
	}
	announce "Monster "+ getmonsterinfo( .@mob_id[.@index],MOB_NAME ) +" is the leader !",0;
	hideonnpc strnpcinfo(3);
	end;
OnLevel:
	addrid 0;
	if ( strcharinfo(3) != .event_map$ || .pc_maxlvl >= BaseLevel ) end;
	.pc_maxlvl = BaseLevel;
	end;
}

sir first of all thanks for paying attention to my script request..

 

everything works perfectly

-prize for killing a minion is working

-group of monsters are spawned with the same race is working

-the level range of monsters that will spawn is working

-leader of the invaders is working

-allow boss configuration working

-random race that will be summon is working

-portal effect appears

 

but as i observe and take a further testing

i encountered this problems

 

-when i set a race of angel monsters attack the town it only spawn 2 monsters (maybe because there are only two angel monsters that are near to the character's level.. in my case im on lvl 99 and cendrawasih ang archangeling are the only monster that spawned. its supposed to be 1 cendrawasih then the rest of the minions can be spawned twice until they reach number of 50 including the leader.. for example  merman is the leader, 13 swordfish , phen 16 , hydra 10 , marina 10 just like settings say 50 monsters)

 

to make it more clearer

 

lets say the the level of character is 60, so fish monsters with level ranges from 60 and below will be summoned

for example

this are list of monsters that are 60 and below, all of these monsters should appear in the event

as we can see, they didnt reach the maximum number of 50 invaders so,  monsters from 2 to 9 will be repeatedly summoned until the number of invaders reach 50.

 

1-merman (leader)(1)

2-swordfish (7)

3-phen (6)

4-marse (6)

5-hydra (6)

6-vadon (6)

7-marina (6)

8-plankton (6)

9-kukre (6)

 

---------------------------------------------------------------------------------------------------------------------

 

-i try to add izlude in the town array but the event didnt trigger when im in the izlude map.. (-if a town has no players, invasion event is not going to activate..)

 

regarding: towns

invasion event is only applicable for towns in the array, the only condition is "if there is no players in the town the event will not activate".. if town morroc, prontera, izlude has both players the script will have a random pick from the qualified towns.

 

 

sir can you call the monsters 1 by 1? (as if they're coming out from the portal  1 by 1? xp and the last that will appear from the portal is the leader)

Edited by joelolopez
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...