Jump to content
  • 0

help Automatic Monster Invasion


Okumura

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  02/04/12
  • Last Seen:  

Hi Everyone

Some time ago I worked in an automatic script for my server invasions today, the issue is that updates and lack of time I have not finish it, I will explain what is basically of the event:

----------------------------------------------------------------------------------------------* /

- This event starts at the cities best known of Rune-Midgard (prontera, geffen, Izlude, Morroc, Alberta, payon etc)

- The event itself is guided by a leading MVP, and a group of mobs at random (regardless of the type of mobs)

- The event lasts a certain amount of time and can be any time of day (random), at the end of that time mvp mobs and leave the city and brought the treasures of the city, time is relative, can be a hours, thirty minutes .... etc.

- Mention treasures before? Yeah, I did, these treasures are the prizes that will be released in the city once INVASION is defeated, the default is only five treasures (but can be added more). These treasures have no definite time, are on the map until someone finds them simply.

- This event should have a function where every time you exterminate the MVP of the invasion, display a message, this message must contain the name of the person who killed the mvp, this person is that you will receive an award for this action when finished the invasion, whispering "npc: invasion" to claim their prize, the prize of the invasion, will be ramdom itself.

----------------------------------------------------------------------------------------------* /

Now is where my request comes after more or less been explained as get my event, I ask your help to finish it conditional, what I have so far is about 50% or something more, a number of replicas down with current events, where they are just poring (I have not taken the trouble to change them yet) and Amon Ra MVP is.

I've seen anywhere, if there are good jobs, high quality, something I've been away from the script that if I am in the process of remembering things that are essential for this, but please, I need your help, so, to serve over someone and together we will help :)

Fraternal Greetings! and thanks for reading this huge post :)

Okumura

Ps: sorry for my English basics

InvasionCustom2.0.txt

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

+.+ .......... so long.........and all is duplicated...>.<

well, i dont really get what you want from ur topic.. >.<

to summon a treasure box after the boss monster died..

just create a another special label for that "boss"

when it die..then run that label to summon a treasure box.

Example :

monster .a$,0,0,"Invasor",1511,2,"Invasion::OnMyMVPDead";//AmonRa
........
........
OnMyMVPDead:
set .Winner$,strcharinfo(0); 
monster .a$,0,0,"TreasureBOX",1333,2,"Invasion::OnTreasureBox";
end;

but i think you already done it.

to whisper the NPC to claim prize...

first you have to give a idea / way how the NPC to identify the winner ?

OnWhisperGlobal:
if ( .Winner$ == strcharinfo(0) ) {
   getitem 501,1;
   set .Winner$,"";
}

and some tips...learn to use Array, your script coding could be greatly reduced.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  02/04/12
  • Last Seen:  

yes, it is long, but if would be great if it ends completely, the idea is that someone take it and modify it to improve even more.

the treasures now not a problem of time, because by killing all the mobs of the invasion out automatically, that part is good in itself.

I wanted to start using a template to create the event, to be more exact, of this topic:

---> http://rathena.org/board/topic/64970-hourly-monster-invasion-event/

but if I'm complicated in the use of maps and to assign the mobs, using arrays have to include ID manually or can be called by any category, such as strong or weak mobs, quisas per item?

Greetings!

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you mean something like this ?

Monster Invasion

edit here to configure you have how many "type" of invasion

switch( rand(4) ){

edit the monster list here

// MAX : ~64 Different Monster in each Cases( 1 BOSS + 63 Normal )
// Case <X>: Invasion( <BOSS>,<Amount>,<MOBID>,<AMOUNT>,....,<MOBID>,<AMOUNT> ); break;
Case 0: Invasion( 1511,1,1002,10 ); break;
Case 1: Invasion( 1511,1,1002,10,1002,15 ); break;
Case 2: Invasion( 1511,1,1002,5,1002,25,1002,17 ); break;
Case 3: Invasion( 1511,1,1002,5,1002,25,1002,10,1002,30 ); break;

the rest i think you should know what to do with the rest right ?

just the monster label that will be trigger upon killed these monsters.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  02/04/12
  • Last Seen:  

yep, that script I wanted to go and well, more than anything reorganize mine, do not know who done that, but if I were to know, his name remained in the re-edition of the script :)

Now I see you added something to it that left me there, so I will continue q and when you leave something more decent, we will come back here ^^

I follow your instructions and see what it is :D

Greetings and thanks;)

Ps: if you want to work it or improve it, there is no problem :)

you mean something like this ?

Monster Invasion

edit here to configure you have how many "type" of invasion

switch( rand(4) ){

edit the monster list here

// MAX : ~64 Different Monster in each Cases( 1 BOSS + 63 Normal )
// Case <X>: Invasion( <BOSS>,<Amount>,<MOBID>,<AMOUNT>,....,<MOBID>,<AMOUNT> ); break;
Case 0: Invasion( 1511,1,1002,10 ); break;
Case 1: Invasion( 1511,1,1002,10,1002,15 ); break;
Case 2: Invasion( 1511,1,1002,5,1002,25,1002,17 ); break;
Case 3: Invasion( 1511,1,1002,5,1002,25,1002,10,1002,30 ); break;

the rest i think you should know what to do with the rest right ?

just the monster label that will be trigger upon killed these monsters.

sorry to re-edit, but how could I add a global function which have to whisper to configure the script that you left in the game, something like "NPC: invasion"?

modify some things, but when the time comes "onminute00" or "onminute30" nothing happens D:!?

help: c

Monsterinvasion_es.txt

Edited by Okumura
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

hmm...what you want to configure by using the pm ?

and there is 1 line i forget to add

announce "Invasion Event end Successfully.",0;
stopnpctimer;
set .Invasion,0;   <--------------------------------------------

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  12/15/12
  • Last Seen:  

emistry , what i only wants to have a Monster Invasion .. llike Poring only.. no MVP mobs.. and when the Porings all killed / when the times up . the event finished.. if the times up it will automaticly use @killmonster on the map , also @cleanmap on the map? how do i do it?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

// Case <X>: Invasion( <BOSS>,<Amount>,<MOBID>,<AMOUNT>,....,<MOBID>,<AMOUNT> ); break;
Case 0: Invasion( 1511,1,1002,10 ); break;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   0
  • Joined:  12/15/12
  • Last Seen:  

// Case <X>: Invasion( <BOSS>,<Amount>,<MOBID>,<AMOUNT>,....,<MOBID>,<AMOUNT> ); break;
Case 0: Invasion( 1511,1,1002,10 ); break;

how to make the event to be automated??

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

2YUgJIP.jpg

it's automated event....every 30 minutes...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  07/01/12
  • Last Seen:  

-    script    Sample    -1,{
function Invasion;
OnInit:
setarray .Maps$[0],"alberta","aldebaran","amatsu","ayothaya","comodo","einbroch","geffen","gonryun","hugel","jawaii","lighthalzen","louyang","morocc","moscovia","niflheim","payon","rachel","veins","umbala","xmas","yuno";
end;
OnWhisperGlobal:
if( getgmlevel() < 90 ) end;
OnMinute00:
OnMinute30:
if( .Invasion ) end;
set .Invasion,1;
set .SelectedMap$,.Maps$[ rand( getarraysize(.Maps$) ) ];
switch( rand(4) ){
    default: end;
    // MAX : ~64 Different Monster in each Cases( 1 BOSS + 63 Normal )
    // Case <X>: Invasion( <BOSS>,<Amount>,<MOBID>,<AMOUNT>,....,<MOBID>,<AMOUNT> ); break;
    Case 0: Invasion( 1511,1,1002,10 ); break;
    Case 1: Invasion( 1511,1,1002,10,1002,15 ); break;
    Case 2: Invasion( 1511,1,1002,5,1002,25,1002,17 ); break;
    Case 3: Invasion( 1511,1,1002,5,1002,25,1002,10,1002,30 ); break;
}
initnpctimer;
end;
OnTimer3600000:
set .Invasion,0;
announce "Time's Up !!  Invasion End.",0;
killmonster .SelectedMap$,"All";
end;
function    Invasion    {
    monster .SelectedMap$,0,0,"INVASION BOSS",getarg(0),getarg(1),strnpcinfo(0)+"::OnBossKilled";
    for( set .@i,2; getarg( .@i,0 ); set .@i,.@i + 2 )
        monster .SelectedMap$,0,0,"INVASION MOB",getarg(.@i),getarg(.@i+1),strnpcinfo(0)+"::OnMobKilled";
    announce "Invasion STARTED at "+.SelectedMap$+" .. Hurry Up !!.",0;
}
OnBossKilled:
// getitem 512,100;
if( mobcount( .SelectedMap$,strnpcinfo(0)+"::OnBossKilled" ) ){
    mapannounce .SelectedMap$,"MAIN BOSS - Remain : "+mobcount( .SelectedMap$,strnpcinfo(0)+"::OnBossKilled" ),0;
}else{
    killmonster .SelectedMap$,"All";
    mapannounce .SelectedMap$,"ALL Boss has been Killed, Treasure BOX has been Summoned",0;
    monster .SelectedMap$,0,0,"TREASURE BOX",1333,10,strnpcinfo(0)+"::OnBoxKilled";
}
end;
OnMobKilled:
// getitem 512,1;
if( mobcount( .SelectedMap$,strnpcinfo(0)+"::OnMobKilled" ) ){
    mapannounce .SelectedMap$,"Monsters Remain : "+mobcount( .SelectedMap$,strnpcinfo(0)+"::OnMobKilled" ),0;
}
end;
OnBoxKilled:
// getitem 607,1;
if( mobcount( .SelectedMap$,strnpcinfo(0)+"::OnBoxKilled" ) ){
    mapannounce .SelectedMap$,"Treasure Box Remain : "+mobcount( .SelectedMap$,strnpcinfo(0)+"::OnBoxKilled" ),0;
}else{
    announce "Invasion Event end Successfully.",0;
    stopnpctimer;
    set .Invasion,0;
}
end;
}

 

 
 
=========is this ready to load?? ready to put on my npc and to be loaded? ready to use i mean?
Edited by Capuche
Code
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...