dungpt8782 0 Posted August 11, 2014 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: it still working fine but, how can i make this script is better? Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted August 11, 2014 if(mobcount(strcharinfo(3),"OnInvadeDeath") < 1) change to... if(mobcount(strcharinfo(3),strnpcinfo(1)+"::OnInvadeDeath") < 1) Quote Share this post Link to post Share on other sites
I just modified Towninvasion script to:
and i got warning on killed MVP:
it still working fine but, how can i make this script is better?
Share this post
Link to post
Share on other sites