Jump to content
  • 0

Regarding Mushroom Event


Gidz Cross

Question


  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

Hi! Can i request something about the default Mushroom Event that comes in our git? Can i request to put time duration? Because the event wont re start if there is still some mushroom left. Imagine having 1 mushroom left in prontera. Let's say its very impossible to find. The event will not end until the mushroom is fully killed. Thanks in advance guys!

 

This is the script

Trunk\npc\custom\events\mushroom_event.txt

//===== rAthena Script ======================================= 
//= Find the Mushroom
//===== By: ================================================== 
//= Mysterious
//===== Current Version: ===================================== 
//= 3.6a
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: ========================================= 
//= Find the Mushroom - random amount of Mushrooms spawns in random maps.
//= Players need to find these mushrooms and kill them to gain prizes!
//===== Additional Comments: =================================
//= 3.0 Fully Functional with Rewritten script. [Mysterious]
//= 3.6a Slightly edited. [Euphy]
//============================================================ 

prontera,142,228,6	script	Find the Mushroom	1084,{
	mes "[ Find The Mushroom ]";
	if (.status == 1) {
		.@count = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
		if (.@count > 0) {
			mes "There are " + .@count + " Mushrooms left in " + .event_map$ + "!";
			mes "Find and kill the mushrooms to gain " + getitemname(.prize) + "!";
			close;
		}
		.event_map$ = "";
		.status = 0;
		mes "All the mushrooms are killed?";
	}
	mes "There is no event at the moment!";
	if (.status || getgmlevel() < .GM) close;
	mes "Start the event?";
	next;
	if (select("- No:- Yes") == 1) close;
	donpcevent strnpcinfo(0) + "::OnMinute30";
	mes "[ Find The Mushroom ]";
	mes "Event started!";
	close;

OnInit:
	.prize = 30000;	// Reward item ID
	.amount = 1;	// Reward item amount
	.GM = 60;		// GM level required to access NPC
	setarray .maps_list$[0],"izlude","geffen","morocc","prontera"; // Possible maps
	end;

OnMinute30:	// Start time (every hour)
	if (.status) end;
	if (agitcheck() || agitcheck2() || agitcheck3()) end;
	.status = 1;
	.@spawn = rand(1,50);	// How many Mushrooms should spawn?
	.event_map$ = .maps_list$[ rand(getarraysize(.maps_list$)) ];
	.@label$ = strnpcinfo(0) + "::OnMobKilled";
	killmonster .event_map$, .@label$;
	monster .event_map$,0,0,"Please don't kill me!",1084,.@spawn, .@label$;
	announce "We will be having Find Mushroom Event!",0;
	sleep 5000;
	announce "Total of " + .@spawn + " Mushrooms have been spawned in " + .event_map$ + ".",0;
	sleep 2500;
	announce "Every Mushroom you kill will give you 1 " + getitemname(.prize) + " and 1 Activity Point.",0;
	sleep 2500;
	announce "Now lets do this! Goodluck!",0;
	end;

OnMobKilled:
	dispbottom "You got 1 Activity Point for Killing the Mushroom";
	set #ACTIVITYPOINTS, #ACTIVITYPOINTS += 1;
	if (playerattached() == 0)
		end;
	getitem .prize, .amount;
	.@spawn = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
	if (.@spawn > 0)
		announce "[ " + strcharinfo(0) + " ] has killed a Mushroom. There are now " + .@spawn + " Mushroom(s) left.",bc_map;
	else {
		announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
		.status = 0;
		.event_map$ = "";
	}
	end;
}

 

Edited by gidzdlcrz
Adds info
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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

//===== rAthena Script ======================================= 
//= Find the Mushroom
//===== By: ================================================== 
//= Mysterious
//===== Current Version: ===================================== 
//= 3.6a
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: ========================================= 
//= Find the Mushroom - random amount of Mushrooms spawns in random maps.
//= Players need to find these mushrooms and kill them to gain prizes!
//===== Additional Comments: =================================
//= 3.0 Fully Functional with Rewritten script. [Mysterious]
//= 3.6a Slightly edited. [Euphy]
//============================================================ 

prontera,142,228,6	script	Find the Mushroom	1084,{
	mes "[ Find The Mushroom ]";
	if (.status == 1) {
		.@count = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
		if (.@count > 0) {
			mes "There are " + .@count + " Mushrooms left in " + .event_map$ + "!";
			mes "Find and kill the mushrooms to gain " + getitemname(.prize) + "!";
			close;
		}
		.event_map$ = "";
		.status = 0;
		mes "All the mushrooms are killed?";
	}
	mes "There is no event at the moment!";
	if (.status || getgmlevel() < .GM) close;
	mes "Start the event?";
	next;
	if (select("- No:- Yes") == 1) close;
	donpcevent strnpcinfo(0) + "::OnMinute30";
	mes "[ Find The Mushroom ]";
	mes "Event started!";
	close;

OnInit:
	.prize = 30000;	// Reward item ID
	.amount = 1;	// Reward item amount
	.GM = 60;		// GM level required to access NPC
	setarray .maps_list$[0],"izlude","geffen","morocc","prontera"; // Possible maps
	end;

OnMinute30:	// Start time (every hour)
	if (.status) end;
	if (agitcheck() || agitcheck2() || agitcheck3()) end;
	.status = 1;
	.@spawn = rand(1,50);	// How many Mushrooms should spawn?
	.event_map$ = .maps_list$[ rand(getarraysize(.maps_list$)) ];
	.@label$ = strnpcinfo(0) + "::OnMobKilled";
	killmonster .event_map$, .@label$;
	monster .event_map$,0,0,"Please don't kill me!",1084,.@spawn, .@label$;
	announce "We will be having Find Mushroom Event!",0;
	sleep 5000;
	announce "Total of " + .@spawn + " Mushrooms have been spawned in " + .event_map$ + ".",0;
	sleep 2500;
	announce "Every Mushroom you kill will give you 1 " + getitemname(.prize) + " and 1 Activity Point.",0;
	sleep 2500;
	announce "Now lets do this! Goodluck!",0;
	initnpctimer;
	end;
	
OnTimer1800000: // max 1800 seconds.
OnEnd:
	.status = 0;
	.event_map$ = "";
	killmonster .event_map$, strnpcinfo(0) + "::OnMobKilled";
	announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
	end;

OnMobKilled:
	dispbottom "You got 1 Activity Point for Killing the Mushroom";
	set #ACTIVITYPOINTS, #ACTIVITYPOINTS += 1;
	if (playerattached() == 0)
		end;
	getitem .prize, .amount;
	.@spawn = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
	if (.@spawn > 0)
		announce "[ " + strcharinfo(0) + " ] has killed a Mushroom. There are now " + .@spawn + " Mushroom(s) left.",bc_map;
	else {
		donpcevent strnpcinfo(0) + "::OnEnd";
	}
	end;
}

try

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  123
  • Topics Per Day:  0.03
  • Content Count:  640
  • Reputation:   82
  • Joined:  04/07/14
  • Last Seen:  

Thank you so much @Emistry. Will give feedback after i test this. 

On 7/19/2020 at 8:24 PM, Emistry said:

//===== rAthena Script ======================================= 
//= Find the Mushroom
//===== By: ================================================== 
//= Mysterious
//===== Current Version: ===================================== 
//= 3.6a
//===== Compatible With: ===================================== 
//= rAthena Project
//===== Description: ========================================= 
//= Find the Mushroom - random amount of Mushrooms spawns in random maps.
//= Players need to find these mushrooms and kill them to gain prizes!
//===== Additional Comments: =================================
//= 3.0 Fully Functional with Rewritten script. [Mysterious]
//= 3.6a Slightly edited. [Euphy]
//============================================================ 

prontera,142,228,6	script	Find the Mushroom	1084,{
	mes "[ Find The Mushroom ]";
	if (.status == 1) {
		.@count = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
		if (.@count > 0) {
			mes "There are " + .@count + " Mushrooms left in " + .event_map$ + "!";
			mes "Find and kill the mushrooms to gain " + getitemname(.prize) + "!";
			close;
		}
		.event_map$ = "";
		.status = 0;
		mes "All the mushrooms are killed?";
	}
	mes "There is no event at the moment!";
	if (.status || getgmlevel() < .GM) close;
	mes "Start the event?";
	next;
	if (select("- No:- Yes") == 1) close;
	donpcevent strnpcinfo(0) + "::OnMinute30";
	mes "[ Find The Mushroom ]";
	mes "Event started!";
	close;

OnInit:
	.prize = 30000;	// Reward item ID
	.amount = 1;	// Reward item amount
	.GM = 60;		// GM level required to access NPC
	setarray .maps_list$[0],"izlude","geffen","morocc","prontera"; // Possible maps
	end;

OnMinute30:	// Start time (every hour)
	if (.status) end;
	if (agitcheck() || agitcheck2() || agitcheck3()) end;
	.status = 1;
	.@spawn = rand(1,50);	// How many Mushrooms should spawn?
	.event_map$ = .maps_list$[ rand(getarraysize(.maps_list$)) ];
	.@label$ = strnpcinfo(0) + "::OnMobKilled";
	killmonster .event_map$, .@label$;
	monster .event_map$,0,0,"Please don't kill me!",1084,.@spawn, .@label$;
	announce "We will be having Find Mushroom Event!",0;
	sleep 5000;
	announce "Total of " + .@spawn + " Mushrooms have been spawned in " + .event_map$ + ".",0;
	sleep 2500;
	announce "Every Mushroom you kill will give you 1 " + getitemname(.prize) + " and 1 Activity Point.",0;
	sleep 2500;
	announce "Now lets do this! Goodluck!",0;
	initnpctimer;
	end;
	
OnTimer1800000: // max 1800 seconds.
OnEnd:
	.status = 0;
	.event_map$ = "";
	killmonster .event_map$, strnpcinfo(0) + "::OnMobKilled";
	announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
	end;

OnMobKilled:
	dispbottom "You got 1 Activity Point for Killing the Mushroom";
	set #ACTIVITYPOINTS, #ACTIVITYPOINTS += 1;
	if (playerattached() == 0)
		end;
	getitem .prize, .amount;
	.@spawn = mobcount( .event_map$, strnpcinfo(0) + "::OnMobKilled" );
	if (.@spawn > 0)
		announce "[ " + strcharinfo(0) + " ] has killed a Mushroom. There are now " + .@spawn + " Mushroom(s) left.",bc_map;
	else {
		donpcevent strnpcinfo(0) + "::OnEnd";
	}
	end;
}

try

Having debug messages and some bugs

image.thumb.png.401985d06f4d52960f60e0d2faab918e.png

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