Jump to content
  • 0

need help with invasion script


Question

Posted

how to make boss spawn only 1 after all the mvp is kill??

thank in advance

here my script

- script invasion -1,{

OnInit:
setarray .Map$[0],"prontera","payon","izlude","dicastes01";
end;
//OnMinute00:
OnWhisperGlobal:
set .RandMap,rand( getarraysize( .Map$ ) );
set .mvp1,1658;
set .mvp2,1648;
set .mvp3,1751;
set .mvp4,1312;
set .boss,2600;
set .ItemID,12484;
announce "[ Rune-Midgard Guard ]: We have trouble here in the town " + .Map$[.RandMap] +"!", bc_all;
sleep2 5000;
announce "[ Rune-Midgard Guard ]: Everyone, we need your help to get rid of these monsters!", bc_all;
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp1,10,;
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp2,10,;
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp3,10,;
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp4,10,"::OnKilled";
end;

OnKilled:
if (mobcount("+.Map$[.RandMap]+", "Invasion Soldier") > 0) {
mes "^008000 The Invasion Soldier is still alive! ^000000";
}
else {
announce "[ Rune-Midgard Guard ]: The " + strmobinfo(1,.boss) + " has spawned in " + .Map$[.RandMap] + "!", bc_all;
monster .Map$[ .RandMap ],0,0,"Invasion Boss",.boss,1,strnpcinfo(0)+"::OnSpecialMobDead:";
}
OnSpecialMobDead:
announce strcharinfo(0)+" has fought off the Invasion and has been awarded a worthy prize!", bc_all;
getitem .ItemID,3;
end;
}

7 answers to this question

Recommended Posts

Posted

-    script    Sample    -1,{
OnInit:
setarray .Map$[0],"prontera","payon","izlude","lighthalzen","louyang","comodo","xmas","aldebaran","geffen","morocc";
setarray .MVP[0],1658,1648,1751,1312,1511,1647,1785,1630,1399,1874,2068,1272,1719,1046,1389,1112,1115,1418,1871,1252,1768,1086,1885,1649,1651,1832,1734,1779,1688,1646,1623,1650,1583,1708,1685,1648,1658;
end;

OnTimer3300000:
killmonster .Map$[ .RandMap ],"All";
set .RandMap,rand( getarraysize( .Map$ ) );
set .RandMVP,rand( getarraysize( .MVP ) );
monster .Map$[ .RandMap ],0,0,"MVP Event",.MVP[ .RandMVP ],1,strnpcinfo(0)+"::OnKilled";
announce "MVP Event : "+getmonsterinfo( .MVP[ .RandMVP ],0 )+" occur in "+.Map$[ .RandMap ]+" .",0;
end;

OnKilled:
announce "MVP Event : End...MVP Died",0;
end;
}

here btw this is just mvp invasion with normal drops

Posted (edited)

- script invasion -1,{
OnInit:
setarray .Map$[0],"prontera","payon","izlude","dicastes01";
end;
//OnMinute00:
OnWhisperGlobal:
set .RandMap,rand( getarraysize( .Map$ ) );
set .mvp1,1658;
set .mvp2,1648;
set .mvp3,1751;
set .mvp4,1312;
set .boss,2600;
set .ItemID,12484;
announce "[ Rune-Midgard Guard ]: We have trouble here in the town " + .Map$[.RandMap] +"!", bc_all;
sleep2 5000;
announce "[ Rune-Midgard Guard ]: Everyone, we need your help to get rid of these monsters!", bc_all;
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp1,10,"::OnKilled";
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp2,10,"::OnKilled";
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp3,10,"::OnKilled";
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp4,10,"::OnKilled";
end;
OnKilled:
if( mobcount( .Map$[.RandMap],strnpcinfo(0)+"::OnKilled" ) > 0 ){
mes "^008000 The Invasion Soldier is still alive! ^000000";
}
else {
announce "[ Rune-Midgard Guard ]: The " + strmobinfo(1,.boss) + " has spawned in " + .Map$[.RandMap] + "!", bc_all;
monster .Map$[ .RandMap ],0,0,"Invasion Boss",.boss,1,strnpcinfo(0)+"::OnSpecialMobDead:";
}
OnSpecialMobDead:
announce strcharinfo(0)+" has fought off the Invasion and has been awarded a worthy prize!", bc_all;
getitem .ItemID,3;
end;
}

like this??. but it still spawn many boss..

Capture.png

and error

Capture.png

Edited by ewanjeli
Posted

monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp1,10,strnpcinfo(0)+"::OnKilled";
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp2,10,strnpcinfo(0)+"::OnKilled";
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp3,10,strnpcinfo(0)+"::OnKilled";
monster .Map$[ .RandMap ],0,0,"Invasion Soldier",.mvp4,10,strnpcinfo(0)+"::OnKilled";

and your screenshot =='' cant understand what is it.... can you ??/swt

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...