Jump to content
  • 0
Sign in to follow this  
dungpt8782

NPCNAME:OnEVENT

Question

I just modified Towninvasion script to:

OnMinute00:	if((gettime(3)== 12) || (gettime(3)== 20) || (gettime(3)== 21) || (gettime(3)== 22) || (gettime(3)== 23) || (gettime(3)== 0) || (gettime(3)== 1) || (gettime(3)== 2))	{		for(.@i = 0; .@i < 1; .@i++) { //Spawn on n towns			do {				.@index = rand(.num_towns);			} while (.@temp_check[.@index]);			.@temp_check[.@index] = 1;		set .MVPs,.MvP[rand(getarraysize(.MvP))];		announce getmonsterinfo((.MVPs),0)+ " in "+.Town$[.@index]+", Let's go!",bc_blue|bc_all;		for(.@ix = 0; .@ix < 1; .@ix++) { //MvP spawner				monster .Town$[.@index],0,0,"--ja--",.MVPs,1,strnpcinfo(1)+"::OnInvadeDeath";				}		}	}	end;OnInvadeDeath:		goto CheckWipe;	end;CheckWipe:	if(mobcount(strcharinfo(3),"OnInvadeDeath") < 1)		announce getmonsterinfo((.MVPs),0)+" died "+strcharinfo(3)+", Good job!",bc_blue|bc_all;	end;OnInit:	//Towns to Invade	setarray .Town$[0],"prontera","izlude","geffen","payon","alberta","aldebaran","morocc","comodo";	set .num_towns, getarraysize(.Town$);	//MvPs to summon	setarray .MvP[0],1511,1647,1785,1630,1039,1874,2068,2238,2240,2236,1272,1719;	end;

and i got warning on killed MVP: post-5314-0-77761900-1407736577_thumb.jpg

 

it still working fine but, how can i make this script is better?

Share this post


Link to post
Share on other sites

1 answer 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.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.