Jump to content
  • 0

Event Invasion


ZelosAvalon

Question


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   33
  • Joined:  11/11/12
  • Last Seen:  

i have this event : 

 

//===== rAthena Script ================================================================================================================

//= Goblin Invasion
//===== Created By: ===================================================================================================================
//= Mysterious
//===== Current Version: ==============================================================================================================
//= v1.3
//===== Compatible With: ==============================================================================================================
//= TXT & SQL
//===== Credits: ==============================================================================================================
//= Mysterious
//==== Information: =====================================================================================================
// Keep in mind that the prize amount that is given out is 5 <of the item ID you input> in the NPC.
// With knowledge, you can change it to whatever you want the prize to be (I.e. cashpoints, etc.).
//===================================================================================================================
 
jupe_ele,36,53,6 script Event Goblin Invasion 105,{
 
set .gm,50;//GM Level to access the GM Menu. Default: 50
 
// GM menu 
//It allows GMs Level 50 or more to Start and Stop invasions.
if (getgmlevel()>.gm) {
if (.mobs_left) {
mes "[Event Goblin Invasion]";
mes "An invasion is in progress..";
mes "Location: " + .Map$;
mes "^FF0000"+.mobs_left+"^000000 Goblins left";
mes " ";
mes "Stop invasion?";
if(select("No:Yes")==1) close;
donpcevent "Event Goblin Invasion::OnTimer1805000";
mes "Invasion stopped";
announce "The Invasion has been stopped by "+strcharinfo(0),bc_all;
close;
}
mes "[Event Goblin Invasion]";
mes "Please customize the Invasion event before starting it.";
mes "Note - The Goblin Leader drops x5 of the prize.";
Main:
next;
mes "[Event Goblin Invasion]";
switch(select("Item [" + getitemname(.ItemID) + "]:Start Event")) {
case 1:
mes "Which item would you like the Goblin Leader to drop?";
mes "Please input the item ID:";
input .ItemID;
goto Main;
case 2:
mes "Starting the event now...";
close2;
goto OnStart;
}
 
// If a player clicks the NPC, it displays:
 
mes "[Event Goblin Invasion]";
mes .mobs_left+" have invaded "+.Map$[.rand_map]+"!";
close;
 
/////////////////////////
//The actual NPC Script//
/////////////////////////
OnMinute50: // Change this to your liking
OnStart:
set .mobs_left, 1;
sleep2 1000;
set $@ran, rand(1,6);
if ($@ran == 6) set .Map$,"splendide";
if ($@ran == 5) set .Map$,"izlude";
if ($@ran == 4) set .Map$,"payon";
if ($@ran == 3) set .Map$,"geffen";
if ($@ran == 2) set .Map$,"morocc";
if ($@ran == 1) set .Map$,"prontera";
sleep2 1000;
announce "[ Rune-Midgard Guard ]: We have trouble here in the town " + .Map$ + "!", bc_all;
sleep2 5000;
announce "[ Rune-Midgard Guard ]: Everyone, we need your help to get rid of these Goblins!", bc_all;
monster .Map$,0,0,"Goblin",1258,250,"Event Goblin Invasion::OnMyMobDead";
set .mobs_left, 250;
end;
 
 
OnTimer1805000: // 30 minutes later, kills all the mobs.
killmonster .Map$,"Event Goblin Invasion::OnMyMobDead";
set .mobs_left, 0;
 
killmonster .Map$,"Event Goblin Invasion::OnMyMobDead";
killmonster .Map$,"Event Goblin Invasion::OnSpecialMobDead";
announce "It seems that "+strcharinfo(0)+" has ended the Invasion!",bc_all;
end;
 
OnMyMobDead: //When a Goblin is killed
set .mobs_left, .mobs_left-1;
if (.mobs_left==0) {
announce "[ Rune-Midgard Guard ]: The Goblin Leader has spawned in " + .Map$ + "!", bc_all;
monster .Map$,0,0,"Goblin Leader",1299,1,"Event Goblin Invasion::OnSpecialMobDead";
 
} else {
announce "["+.mobs_left+"/250] Goblins left.",bc_map;
}
end;
 
OnSpecialMobDead:
announce strcharinfo(0)+" has fought off the Goblin Invasion and has been awarded a worthy prize!", bc_all;
getitem .ItemID,1; //Change the [5] to the amount you wish to hand out.
donpcevent "Event Goblin Invasion::OnStop";
}
end;
 
}

 

i want to change it, to choose what monster will appear in the invasion and what MVP, 

in the invasion of every monster kill for a player, this player will got 1 Event Point, and who killing MVP got 10!

 

and i need a NPC for trade this Event Point, any1 can help me ? I had this NPC, but I lost when I formated my machine, and has it been 3 years that didn't work with scripts, I went back 1 week ago!

 

ty anyway, I hope some help!

 

 


I need something like this, is just one example, does not work!

 

 

jupe_ele,36,53,6 script Event Goblin Invasion 105,{

 
set .gm,50;//GM Level to access the GM Menu. Default: 50
 
// GM menu 
//It allows GMs Level 50 or more to Start and Stop invasions.
if (getgmlevel()>.gm) {
if (.mobs_left) {
mes "[Event Invasion]";
mes "An invasion is in progress..";
mes "Location: " + .Map$;
mes "^FF0000"+.mobs_left+"^000000 "getmonstername(.MonsterID)" left";
mes " ";
mes "Stop invasion?";
if(select("No:Yes")==1) close;
donpcevent "Event Invasion::OnTimer1805000";
mes "Invasion stopped";
announce "The Invasion has been stopped by "+strcharinfo(0),bc_all;
close;
}
mes "[Event Invasion]";
mes "Please customize the Invasion event before starting it.";
Main:
next;
mes "[Event Invasion]";
switch(select("Item [" + getitemname(.ItemID) + "]:Monster [" + getmonstername(.MonsterID) + "]:MVP[" + getmvpname(.MvpID) + "]:Town[" + "town name" + "]Start Event")) {
case 1:
mes "Which item would you like the MVP to drop?";
mes "Please input the item ID:";
input .ItemID;
next
mes "Please input the quantite:";
input .qnt1
goto Main;
 
case 2:
mes "what monster you want to summon?";
mes "Please input the monster ID:";
input .MonsterID;
next
mes "Please input the amount of monster u'll summom:";
input .qnt2
goto Main;
 
case 3:
mes "what MVP you want to summon?";
mes "Please input the MVP ID:";
input .MvpID;
goto Main;
 
case 4:
mes "what town you want to monster invader?";
mes "Select the town:";
 
select menu with:
prontera, payon, geffen, aldebaran, morocc ... ( all towns)
goto Main;
 
case 5:
mes "Starting the event now...";
close2;
goto OnStart;
}
 
// If a player clicks the NPC, it displays:
 
mes "[Event Invasion]";
mes .mobs_left+" have invaded "+.Map$[.rand_map]+"!";
close;
 
/////////////////////////
//The actual NPC Script//
/////////////////////////
OnMinute50: // Change this to your liking
OnStart:
set .mobs_left, 1;
sleep2 1000;
announce "[ Rune-Midgard Guard ]: We have trouble here in the town " + .Map$ + "!", bc_all;
sleep2 5000;
announce "[ Rune-Midgard Guard ]: Everyone, we need your help to get rid of these monsters!", bc_all;
monster .Map$,0,0,"getmonstername(.MonsterID)",.MonsterID,.qtd2,"Event Invasion::OnMyMobDead";
set .mobs_left, .qtd2;
end;
 
 
OnTimer1805000: // 30 minutes later, kills all the mobs.
killmonster .Map$,"Event Invasion::OnMyMobDead";
set .mobs_left, 0;
 
killmonster .Map$,"Event Invasion::OnMyMobDead";
killmonster .Map$,"Event Invasion::OnSpecialMobDead";
announce "It seems that "+strcharinfo(0)+" has ended the Invasion!",bc_all;
end;
 
OnMyMobDead: //When a monster is killed
set .mobs_left, .mobs_left-1;
if (.mobs_left==0) {
announce "[ Rune-Midgard Guard ]: The "getmvpname(.MvpID)" has spawned in " + .Map$ + "!", bc_all;
monster .Map$,0,0,"getmvpname(.MvpID)",.MvpID,1,"Event Invasion::OnSpecialMobDead";
 
} else {
announce "["+.mobs_left+"/.qtd2] "getmonstername(.MonsterID)" left.",bc_map;
}
end;
 
OnSpecialMobDead:
announce strcharinfo(0)+" has fought off the Invasion and has been awarded a worthy prize!", bc_all;
getitem .ItemID,qnt1; //Change the [5] to the amount you wish to hand out.
donpcevent "Event Invasion::OnStop";
}
end;
 
}
 
on player kill monster strcharinfo(0)+ get 1 Event POint for each kill
on player kill MVP strcharinfo(0)+ get + 10 event points
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   431
  • Joined:  01/26/16
  • Last Seen:  

2 hours ago, AngelaKiss said:

this forum is dead nobody helps

do you realize you replied to a thread from 2014?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   33
  • Joined:  11/11/12
  • Last Seen:  

i miss the old ppl on this forum, always helped me when I needed it!

Edited by ZelosAvalon
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...