Jump to content
  • 0

Goblin Invasion Count Killed monster


hthuong

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   0
  • Joined:  08/09/12
  • Last Seen:  

Some player not kill Goblin Archer. They wait until Goblin Invasion appear and kill it.

I want count Goblin Archer has been killed by player. And after Goblin Invasion dead npc will give gift for player depend on Goblin Archer

Sorry for my bad english.

Link to comment
Share on other sites

6 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:  

show your script .....

and please read this next time before you post ~

http://rathena.org/board/forum-30/announcement-9-scripting-support-easy-as-1-2-3/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   0
  • Joined:  08/09/12
  • Last Seen:  

my script:

//===== rAthena Script =======================================
//= Goblin Invasion
//===== By: ==================================================
//= Mysterious
//===== Current Version: =====================================
//= 1.6
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
// Goblins spawn randomly in a given town. Once all Goblins are killed
// the Goblin Leader spawns.
//===== TODO: ================================================
// - Change more coding
//===== Additional Comments: =================================
//= v1.0 - First release [Mysterious]
//= v1.1 - Fixed Bugs [Mysterious]
//= v1.2 - Fixed Sentence structures [Mysterious]
//= v1.3 - Added Proper Notes [Mysterious]
//= v1.4 - Made it obvious on what players have to change [Mysterious]
//= v1.5 - Proper Sentence Structures and Typos fixed [Mysterious]
//= v1.6 - Fixed mobs not counting down properly [Mysterious]
//============================================================

mellina,123,78,4    script    Goblin Invasion    459,{

set .gm,40;//GM Level to access the GM Menu. Default: 40

   // GM menu | Game Masters Level 40 or more are allowed to Start and Stop invasions.
   if (getgroupid()>.gm) {
       if (.mobs_left) {
           mes "[invasion]";
           mes "An invasion is already in progress! Details:";
           mes "Location: " + .Map$;
           mes "^FF0000"+.mobs_left+"^000000 Goblins left";
           mes " ";
           mes "Would you like to Stop the invasion?";
           if(select("- No:- Yes")==1) close;
           donpcevent "Goblin Invasion::OnTimer1805000";
           mes "Invasion stopped";
           set .mobs_left,0;
           announce "The Invasion has been stopped by "+strcharinfo(0),bc_all;
           close;
       }
       mes "[invasion]";
       mes "Please customize the Invasion event before starting it.";
       mes "Note - The Goblin Leader drops x5 of the prize.";
       Main:
       next;
       mes "[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 "The event is going to begin shortly.";
           close2;
           goto OnStart;
   }

   //If a player clicks the NPC, the NPC will tell the player how much Mobs are left on the certain map.
   mes "[invasion]";
   mes "Còn "+.mobs_left+" 5 chú Goblins đang long nhong tại "+.Map$[.rand_map]+"!";
   close;

           /////////////////////////
           //The actual NPC Script//
           /////////////////////////
//OnMinute30:

OnMinute50: // Change this to your liking (When you want the event to start)
OnStart:
   killmonster .Map$,"Goblin Invasion::OnMyMobDead"; // delete before start
   killmonster .Map$,"Goblin Invasion::OnSpecialMobDead"; // delete before start
   set .mobs_left, 1;
   sleep2 1000;
   set $@ran, rand(1,5);
   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 ]: Ơ kìa, lũ Goblin đang phá làng phá xóm ở " + .Map$ + "!", bc_all;
   sleep2 5000;
   announce "[ Rune-Midgard Guard ]: Mọi người ơi, hãy đuổi bọn choi choi này giúp chúng mình với!!", bc_all;
   monster .Map$,0,0,"Goblin",1258,250,"Goblin Invasion::OnMyMobDead";
   set .mobs_left, 250;
   startnpctimer;
   end;


OnTimer1800000:    // 30 minutes later, kills all the mobs.
   killmonster .Map$,"Goblin Invasion::OnMyMobDead";
   set .mobs_left, 0;

OnStop://When the event is stopped by a GM, or all monsters dead.
   set .mobs_left,0;
   stopnpctimer;
   killmonster .Map$,"Goblin Invasion::OnMyMobDead";
   killmonster .Map$,"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 ]: Golbin Bé Bự đã xuất hiện tại " + .Map$ + "!", bc_all;
       monster .Map$,0,0,"Goblin Leader",1299,1,"Goblin Invasion::OnSpecialMobDead";

   } else {
       if (.mobs_left > 0)
       {
           announce "Còn ["+.mobs_left+"/250] chú Goblins.",bc_map;
       }
   }
   end;

OnSpecialMobDead:
       announce strcharinfo(0)+" đã đá trúng mông Golbin Bé Bự, cả nhà vỗ tay hoan hô nào!", bc_all;
       getitem .ItemID,10; //Change the [5] to the amount you wish to hand out.
       donpcevent "Goblin Invasion::OnStop";
   }
   end;

}

Edited by hthuong
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  172
  • Reputation:   0
  • Joined:  07/07/12
  • Last Seen:  

Bump! Same question :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

I ignore this topic because I don't understand what she says

can you repeat her question in more understandable way ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  39
  • Reputation:   0
  • Joined:  08/09/12
  • Last Seen:  

solved.

I did it!

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 would like to help.

I would edit the Goblin Invasion NPC:

so I can choose:

which the item, MVP, will give - ok

which Mob will be summoned - i need ( just summom goblins i need to choose )

which MVP will be summoned - i need ( just summom goblin leader i need to choose )

which Map the event will begin - i need ( its randon i need to choose )

and be able to program the weekdays and the hours of the event ( i will be happy )

"same as the NPC WOE"

if anyone can help i'm greatful

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...