Jump to content
  • 0

MvP invasion


sran

Question


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  56
  • Reputation:   0
  • Joined:  11/19/12
  • Last Seen:  

 

Hello community I found this npc of invasion that is mvps, but I would like for example if it left prontera to be invaded by the mvps, that the mvps are random, so that if afterwards it leaves jawaii they are not the same, and so on ,Thank you

inva.txt

Edited by sran
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   1
  • Joined:  02/01/16
  • Last Seen:  

Not 100% Sure what you are asking here.

It selects a random city - and it seems like it spawns all the mvps on the list for the mode (normal, hard, etc).

Are you asking that it just spawn random mvps instead of all of them?

Here is the script with the added ability to choose the percent chance that each mvp will actually spawn during the event ->

So now, when the event happens, there is only a 50% chance that each individual mvp will appear during the event.


The script pasted below will do this:
picks a random town.
50% chance of spawn for each mvp on the list (50% chance one, 50% chance the 2nd, 50% chance the 3rd mvp, etc)
 

-    script    Ragnarok#Auto    -1,{
 
OnClock1115:// Hora y minuto determinados. En este caso 18:11 horario del servidor
        set .r, rand (getarraysize(.cities$));
                announce "Se ha iniciado una Invasión en "+.cities$[.r]+"!!",bc_all,"0000FF";
       


//set .mobs, (getarraysize(.mvps)); //Mob number now determined by spawn of mob or not resulting in +1
 
 // if(.hardmode == 1){
// set .mobs, .mobs + (getarraysize(.mvps1));
//  }
       
// if(.hardmode == 2){
//              set .mobs, .mobs + (getarraysize(.mvps1)) + (getarraysize(.mvps2));
// }
       
        //set .mode, .mobs; //This doesn't do anything.  Why is it here?
                for(set .@a, 0; .@a <= (getarraysize(.mvps0)); set .@a, .@a + 1){
                        if (rand(1,100) <= .chancetospawn) {monster .cities$[.r],0,0,( strmobinfo(1,.mvps0[.@a]) ),.mvps0[.@a],1,"Ragnarok#Auto::OnMyMobDead";set .mobs, .mobs + 1;}
                }
               
                if(.hardmode == 1){
                        for(set .@b, 0; .@b <= (getarraysize(.mvps1)); set .@b, .@b + 1){
                                if (rand(1,100) <= .chancetospawn) {monster .cities$[.r],0,0,( strmobinfo(1,.mvps1[.@b]) ),.mvps1[.@b],1,"Ragnarok#Auto::OnMyMobDead";set .mobs, .mobs + 1;}
                        }
                }
               
                if(.hardmode == 2){
                        for(set .@c, 0; .@c <= (getarraysize(.mvps2)); set .@c, .@c + 1){
                                if (rand(1,100) <= .chancetospawn) {monster .cities$[.r],0,0,( strmobinfo(1,.mvps2[.@c]) ),.mvps1[.@c],1,"Ragnarok#Auto::OnMyMobDead";set .mobs, .mobs + 1;}
                        }
                }
               
end;
 
OnMyMobDead:
        set .mobs, .mobs - 1;
                announce "Quedan "+.mobs+" monstruos en "+.cities$[.r]+"!!",bc_all,"0x00FF00";
        if (.mobs == 0) {
                announce "Felicidades " + strcharinfo(0) + " que mato al último invasor que quedaba!",bc_all,"008800";
                set .r, 0;
        }
end;
 
OnInit:
        set .hardmode, 3;// 0 = Normal --- 1 = Hard --- 2 = Super Hard
    set .chancetospawn, 50;// percent chance to spawn any given one of the mvps on the list.
        setarray .mvps0[0],1511,//01Amon Ra
                                        1039,//02Baphomet
                                        1272,//03Dark Lord
                                        1719,//04Detale
                                        1389,//05Dracula
                                        1112,//06Drake
                                        1115,//07Eddga
                                        1038,//08Osiris
                                        1159,//09Phreeoni
                                        1623,//10RSX-0806
                                        1583,//11Tao Gunka
                                        1418,//12Evil Snake Lord
                                        1252,//13Garm
                                        1086,//14Golden Thief Bug
                                        1492,//15Incantation Samurai
                                        1251,//16Stormy Knight
                                        1059,//17Mistress
                                        1373,//18Lord of Death
                                        1059,//19Mistress
                                        1150,//20Moonlight Flower
                                        1087,//21Orc Hero
                                        1038,//22Osiris
                                        1157,//23Pharaoh
                                        1159,//24Phreeoni
                                        1583;//25Tao Gunka
                                       
        setarray .mvps1[0],1785,//Atroce
                                                1630,//Bacsojin
                                                2068,//Boitata
                                                1874,//Beelzebub
                                                1871,//Fallen Bishop
                                                1768,//Gloom Under The Night
                                                1832,//Ifrit
                                                1734,//Kiel
                                                1779,//Ktullanux
                                                1708,//Thanatos
                                                1312,//Turtle General
                                                1751,//Randgris
                                                1685;//Vesper
 
        setarray .mvps2[0],1646,//LK
                                                1647,//Cross
                                                1648,//WS
                                                1649,//HP
                                                1650,//Snip
                                                1651,//HW
                                                1956,//Naght Sieger
                                                1957,//Entweihen Crothen
                                                2235,//Pala
                                                2236,//Crea
                                                2237,//Prof
                                                2238,//Champ
                                                2239,//Stalk
                                                2240,//Clown
                                                2241,//Gypsy
                                                1917,//Wounded Morroc
                                                15002;//Pori Pori
                                               
        setarray .cities$[0],"prontera","geffen","payon","ayothaya","jawaii","morocc";
end;
 
}

 

Edited by Skorm
Added Code Box
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...