i downloaded this code here in hercules and edit it a bit. but i have a problem in spawning the three monster ..when the event starts and it choose "izlude" the monster are in there correct position.. but if the map is different it will spawn the monster randomly..and i want the final boss to spawn randomly in the map also after defeating all the first three...can anyone help me..
- script invasion -1,{OnInit://MapListssetarray.Map$[0],"izlude","geffen","morocc","alberta","payon","prontera";//CashReward(Normal|Boss)setarray.Cash[0],1,25;//NormalMobID+Countsetarray.MobCount[0],1901,1,1902,1,1900,1;//BOSSMobID+Count//setarray.BossCount[0],1900,1;setarray.MVP[0],1903;//,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912;//InvasionDuration(Minutes)set.Duration,60;end;OnWhisperGlobal:OnMinute00://OnPCLoginEvent:awake strnpcinfo(0);set.RandomMap$,.Map$[rand(getarraysize(.Map$))];killmonster.RandomMap$,"All";announce"INVASION has started at "+.RandomMap$+".",0;//for(set.@i,0;.@i<getarraysize(.MobCount)-1;set.@i,.@i+1)if(.Map$[.@i]==.Map$[.@i]){monster.RandomMap$,107,162,"Final Boss Minion",.MobCount[.@i],.MobCount[.@i+1],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,147,162,"Final Boss Minion",.MobCount[.@i+2],.MobCount[.@i+3],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,128,181,"Final Boss Minion",.MobCount[.@i+4],.MobCount[.@i+5],strnpcinfo(0)+"::OnKilled";}else if(.Map$[.@i]==.Map$[.@i+1]){monster.RandomMap$,99,120,"Final Boss Minion",.MobCount[.@i],.MobCount[.@i+1],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,139,120,"Final Boss Minion",.MobCount[.@i+2],.MobCount[.@i+3],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,119,142,"Final Boss Minion",.MobCount[.@i+4],.MobCount[.@i+5],strnpcinfo(0)+"::OnKilled";}else if(.Map$[.@i]==.Map$[.@i+2]){monster.RandomMap$,63,166,"Final Boss Minion",.MobCount[.@i],.MobCount[.@i+1],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,261,166,"Final Boss Minion",.MobCount[.@i+2],.MobCount[.@i+3],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,160,248,"Final Boss Minion",.MobCount[.@i+4],.MobCount[.@i+5],strnpcinfo(0)+"::OnKilled";}else if(.Map$[.@i]==.Map$[.@i+3]){monster.RandomMap$,95,57,"Final Boss Minion",.MobCount[.@i],.MobCount[.@i+1],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,146,57,"Final Boss Minion",.MobCount[.@i+2],.MobCount[.@i+3],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,117,73,"Final Boss Minion",.MobCount[.@i+4],.MobCount[.@i+5],strnpcinfo(0)+"::OnKilled";}else if(.Map$[.@i]==.Map$[.@i+3]){monster.RandomMap$,129,217,"Final Boss Minion",.MobCount[.@i],.MobCount[.@i+1],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,186,217,"Final Boss Minion",.MobCount[.@i+2],.MobCount[.@i+3],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,156,239,"Final Boss Minion",.MobCount[.@i+4],.MobCount[.@i+5],strnpcinfo(0)+"::OnKilled";}else if(.Map$[.@i]==.Map$[.@i+4]){monster.RandomMap$,133,203,"Final Boss Minion",.MobCount[.@i],.MobCount[.@i+1],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,172,203,"Final Boss Minion",.MobCount[.@i+2],.MobCount[.@i+3],strnpcinfo(0)+"::OnKilled";monster.RandomMap$,155,224,"Final Boss Minion",.MobCount[.@i+4],.MobCount[.@i+5],strnpcinfo(0)+"::OnKilled";}sleep(.Duration*10000);killmonster.RandomMap$,"All";announce"The Invasion conquered "+.RandomMap$+".",0;end;OnKilled:if(!mobcount(.RandomMap$,strnpcinfo(0)+"::OnKilled")){announce"ALERT:Final Boss Arrived.",0;set.RandMVP,rand(getarraysize(.MVP));monster.RandomMap$,0,0,"Final Boss",.MVP[.RandMVP],1,strnpcinfo(0)+"::OnBossKilled";}elseannounce"Monster Remaining:"+mobcount(.RandomMap$,strnpcinfo(0)+"::OnKilled"),0;end;OnBossKilled:getitem 32328,1;announce strcharinfo(0)+" killed Invasion Boss",0;if(!mobcount(.RandomMap$,strnpcinfo(0)+"::OnBossKilled")){announce"INVASION has ended.",0;awake strnpcinfo(0);}end;}
i downloaded this code here in hercules and edit it a bit. but i have a problem in spawning the three monster ..when the event starts and it choose "izlude" the monster are in there correct position.. but if the map is different it will spawn the monster randomly..and i want the final boss to spawn randomly in the map also after defeating all the first three...can anyone help me..
Share this post
Link to post
Share on other sites