Jump to content
  • 0

Mushroom.


Lenya

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  01/25/13
  • Last Seen:  

Hi,

 

I need a announcer how much mushrooms are left and if all Mushrooms are killed the Event should end.

 

Something like this from my old script:

 

prt_vilg,122,128,5    script    Mushroom    1084,{

mes "[ Find The Mushroom ]";

if (!.Status)

mes "Im moment ist kein Event!";

else {

mes "Es sind "+.Spawn+" Mushrooms übrig "+.Map$+"!";

mes "Finde und töte die mushrooms um "+getitemname(.Prize)+" zu gewinnen!";

}

if (.Status || getgmlevel() < .GM) close;

mes "Event starten?";

next;

if(select("- Nein:- Ja") == 1) close;

donpcevent strnpcinfo(0)+"::OnMinute10";

mes "[ Find The Mushroom ]";

mes "Event wurde gestartet!";

close;



OnInit:

set .Prize,7539; // Reward item ID

set .Amount,1; // Reward item amount

set .GM,99; // GM level required to access NPC

setarray .Maps$[0],"morocc","prt_vilg","prontera","aldebaran"; // Possible maps

end;



OnMinute10: // Start time (every hour)

if (.Status) end;

set .Status,1;

set .Spawn,rand(4,8); // How many Mushrooms should spawn?

set .Map$,.Maps$[rand(getarraysize(.Maps$))];

killmonster .Map$,"All";

monster .Map$,0,0,"Töte mich!",1084,.Spawn,strnpcinfo(0)+"::OnMobKilled";

announce "Finde den Mushroom : Es wurdem insgesamt "+.Spawn+" Mushrooms in "+.Map$+" gespawnt!",0;

sleep 2500;

announce "Finde den Mushroom : Für jeden Mushroom, den du tötest erhälst du einen "+getitemname(.Prize)+"!",0;

end;



OnMobKilled:

set .Spawn, .Spawn - 1;

getitem .Prize, .Amount;

if (.Spawn) announce "[ "+strcharinfo(0)+" ] killed a Mushroom. "+.Spawn+" Mushrooms are left.",bc_map;

else {

announce "The Find the Mushroom Event is over. All Mushrooms are killed.",0;

set .Status,0;

}

end;

}

 

 

Here is the up to date script:

 

prt_vilg,122,128,5	script	Find the Mushroom	1084,{
	mes "[ Find The Mushroom ]";
	if(getgmlevel() <99) {
		if(.mushroomEvent==0) mes "Im moment ist kein Event!";
		else {
			mes "Das Find the Mushroom Event läuft gerade.";
			mes "Ort: "+ .Map$;
			mes "Preis: " + getitemname(.itemID);
			mes "Anzahl der Mushrooms: " + .Mushrooms;
		}
		close;
	}

	mes "Hallo "+strcharinfo(0)+"! Bitte bitte nehmen sie ihre Einstellungen vor:";

	Main:
		next;
		mes "[ Find The Mushroom ]";
			switch(select("Event starten:Event beenden")) {
				case 1:
					mes "Das Event wird nun gestartet...";
					set .mushroomEvent,1;
					close2;
					goto OnStart;

				case 2:
					mes "Das Event wird nun beendet...";
					if(.mushroomEvent) announce "Find the Mushroom : Das Find the Mushroom Event wurde beendet!",bc_all,0xcc99ff;
					killmonster  .Map$,"All";
					stopnpctimer;
					set .mushroomEvent,0;
				close;
		}

	//OnMinute01: //means the event will be active in @time result is hh:01:ss
	//OnMinute31: //means the event will be active in @time result is hh:31:ss
	//OnMinute01:
	//OnMinute06:
	//OnMinute11:
	//OnMinute16:
	//OnMinute21:
	//OnMinute26:
	OnMinute31:
	//OnMinute36:
	//OnMinute41:
	//OnMinute46:
	//OnMinute51:
	//OnMinute56:
	OnStart:
		announce "Find the Mushroom : Es ist wieder Zeit Find the Mushroom zu Spielen und "+getitemname(.ItemID)+"s zu gewinnen!",bc_all,0xcc99ff;
		sleep2 1000;

		set $@ran, rand(1,22);
		if ($@ran == 22) set .Map$,"lighthalzen";
		if ($@ran == 21) set .Map$,"amatsu";
		if ($@ran == 20) set .Map$,"rachel";
		if ($@ran == 19) set .Map$,"veins";
		if ($@ran == 18) set .Map$,"amatsu";
		if ($@ran == 17) set .Map$,"gonryun";
		if ($@ran == 16) set .Map$,"louyang";
		if ($@ran == 15) set .Map$,"niflheim";
		if ($@ran == 14) set .Map$,"aldebaran";
		if ($@ran == 13) set .Map$,"umbala";
		if ($@ran == 12) set .Map$,"jawaii";
		if ($@ran == 11) set .Map$,"ayothaya";
		if ($@ran == 10) set .Map$,"hugel";
		if ($@ran == 9) set .Map$,"yuno";
		if ($@ran == 8) set .Map$,"comodo";
		if ($@ran == 7) set .Map$,"xmas";
		if ($@ran == 6) set .Map$,"aldebaran";
		if ($@ran == 5) set .Map$,"izlude";
		if ($@ran == 4) set .Map$,"prt_vilg";
		if ($@ran == 3) set .Map$,"geffen";
		if ($@ran == 2) set .Map$,"morocc";
		if ($@ran == 1) set .Map$,"prontera";
		sleep2 1000;
		set $@ran2, rand(1,11);
		if ($@ran2 == 11) set .Mushrooms,"15";
		if ($@ran2 == 10) set .Mushrooms,"14";
		if ($@ran2 == 9) set .Mushrooms,"13";
		if ($@ran2 == 8) set .Mushrooms,"12";
		if ($@ran2 == 7) set .Mushrooms,"11";
		if ($@ran2 == 6) set .Mushrooms,"10";
		if ($@ran2 == 5) set .Mushrooms,"9";
		if ($@ran2 == 4) set .Mushrooms,"8";
		if ($@ran2 == 3) set .Mushrooms,"7";
		if ($@ran2 == 2) set .Mushrooms,"6";
		if ($@ran2 == 1) set .Mushrooms,"5";
		sleep2 1000;
		announce "Find the Mushroom : Ihr habt 20 Minuten um " + .Mushrooms + " Mushrooms in "+ .Map$ +" zu töten!",bc_all,0xcc99ff;
		sleep2 1000;
		monster .Map$,0,0,"Bitte töte mich nicht!",1084,.Mushrooms,"Find the Mushroom::OnMobKilled";
		setnpctimer 0;
		initnpctimer;
		end;

	OnTimer900000: //5 minutes before end
	//OnTimer5000:
		announce "Find the Mushroom : Ihr habt noch 5 Minuten um die Mushrooms in "+ .Map$ +" zu töten!",bc_all,0xcc99ff;
		end;

	OnTimer1200000: //Event active in 20 minutes
	//OnTimer10000:
		killmonster ""+.Map$+"","Find the Mushroom::OnMobKilled";
		announce "Find the Mushroom : Alle verbleibenden Mushrooms in "+ .Map$ +" wurden getötet.!",bc_all,0xcc99ff;
		set .mushroomEvent,0;
		stopnpctimer;
		end;

	OnMobKilled:
		mapannounce .Map$,"Find the Mushroom: " + strcharinfo(0) + " hat ein Mushroom getötet. Glückwunsch! Weiter suchen!",bc_all,0xcc99ff;
		set zeny,zeny+100000;

		getitem .ItemID,.ItemAmt;
		set .mushroomEvent,1;
		end;

	OnInit:
		set .ItemID,7539;
		set .ItemAmt,1;
		// auto announcement
		while(1) {
			npctalk "Das Find the Mushroom Preis ist "+.ItemAmt+" x "+getitemname(.ItemID)+"";
				sleep 	3600000;
		}
		end;
}
Edited by Lenya
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

prt_vilg,122,128,5	script	Find the Mushroom	1084,{
	mes "[ Find The Mushroom ]";
	if( getgmlevel() < 99 ) {
		if( .mushroomEvent == 0 )
			mes "Im moment ist kein Event!";
		else {
			mes "Das Find the Mushroom Event läuft gerade.";
			mes "Ort: "+ .Map$;
			mes "Preis: " + getitemname(.itemID);
			mes "Anzahl der Mushrooms: " + .Mushrooms;
		}
		close;
	}

	mes "Hallo "+strcharinfo(0)+"! Bitte bitte nehmen sie ihre Einstellungen vor:";
Main:
	next;
	mes "[ Find The Mushroom ]";
	switch( select( "Event starten:Event beenden" ) ) {
	case 1:
		mes "Das Event wird nun gestartet...";
		set .mushroomEvent, 1;
		close2;
		goto OnStart;
	case 2:
		mes "Das Event wird nun beendet...";
	L_end:
		if(.mushroomEvent) announce "Find the Mushroom : Das Find the Mushroom Event wurde beendet!",bc_all,0xcc99ff;
		killmonster .Map$,"Find the Mushroom::OnMobKilled";
		stopnpctimer;
		set .mushroomEvent,0;
		close;
	}

//OnMinute01: //means the event will be active in @time result is hh:01:ss
//OnMinute31: //means the event will be active in @time result is hh:31:ss
//OnMinute01:
//OnMinute06:
//OnMinute11:
//OnMinute16:
//OnMinute21:
//OnMinute26:
OnMinute31:
//OnMinute36:
//OnMinute41:
//OnMinute46:
//OnMinute51:
//OnMinute56:
OnStart:
	announce "Find the Mushroom : Es ist wieder Zeit Find the Mushroom zu Spielen und "+getitemname(.ItemID)+"s zu gewinnen!",bc_all,0xcc99ff;
	sleep2 1000;

	set .@ran, rand(1,22);
	if (.@ran == 22) set .Map$,"lighthalzen";
	else if (.@ran == 21) set .Map$,"amatsu";
	else if (.@ran == 20) set .Map$,"rachel";
	else if (.@ran == 19) set .Map$,"veins";
	else if (.@ran == 18) set .Map$,"amatsu";
	else if (.@ran == 17) set .Map$,"gonryun";
	else if (.@ran == 16) set .Map$,"louyang";
	else if (.@ran == 15) set .Map$,"niflheim";
	else if (.@ran == 14) set .Map$,"aldebaran";
	else if (.@ran == 13) set .Map$,"umbala";
	else if (.@ran == 12) set .Map$,"jawaii";
	else if (.@ran == 11) set .Map$,"ayothaya";
	else if (.@ran == 10) set .Map$,"hugel";
	else if (.@ran == 9) set .Map$,"yuno";
	else if (.@ran == 8) set .Map$,"comodo";
	else if (.@ran == 7) set .Map$,"xmas";
	else if (.@ran == 6) set .Map$,"aldebaran";
	else if (.@ran == 5) set .Map$,"izlude";
	else if (.@ran == 4) set .Map$,"prt_vilg";
	else if (.@ran == 3) set .Map$,"geffen";
	else if (.@ran == 2) set .Map$,"morocc";
	else if (.@ran == 1) set .Map$,"prontera";
	sleep2 1000;
	set .@ran2, rand(1,11);
	if (.@ran2 == 11) set .Mushrooms,"15";
	else if (.@ran2 == 10) set .Mushrooms,"14";
	else if (.@ran2 == 9) set .Mushrooms,"13";
	else if (.@ran2 == 8) set .Mushrooms,"12";
	else if (.@ran2 == 7) set .Mushrooms,"11";
	else if (.@ran2 == 6) set .Mushrooms,"10";
	else if (.@ran2 == 5) set .Mushrooms,"9";
	else if (.@ran2 == 4) set .Mushrooms,"8";
	else if (.@ran2 == 3) set .Mushrooms,"7";
	else if (.@ran2 == 2) set .Mushrooms,"6";
	else if (.@ran2 == 1) set .Mushrooms,"5";
	sleep2 1000;
	announce "Find the Mushroom : Ihr habt 20 Minuten um " + .Mushrooms + " Mushrooms in "+ .Map$ +" zu töten!",bc_all,0xcc99ff;
	sleep2 1000;
	monster .Map$,0,0,"Bitte töte mich nicht!",1084,.Mushrooms,"Find the Mushroom::OnMobKilled";
	setnpctimer 0;
	initnpctimer;
	end;

OnTimer900000: //5 minutes before end
//OnTimer5000:
	announce "Find the Mushroom : Ihr habt noch 5 Minuten um die Mushrooms in "+ .Map$ +" zu töten!",bc_all,0xcc99ff;
	end;

OnTimer1200000: //Event active in 20 minutes
//OnTimer10000:
	killmonster ""+.Map$+"","Find the Mushroom::OnMobKilled";
	announce "Find the Mushroom : Alle verbleibenden Mushrooms in "+ .Map$ +" wurden getötet.!",bc_all,0xcc99ff;
	set .mushroomEvent,0;
	stopnpctimer;
	end;

OnMobKilled:
	mapannounce .Map$,"Find the Mushroom: " + strcharinfo(0) + " hat ein Mushroom getötet. Glückwunsch! Weiter suchen!",bc_all,0xcc99ff;
	set .Mushrooms, .Mushrooms - 1;
	set zeny,zeny+100000;

	getitem .ItemID,.ItemAmt;
	set .mushroomEvent,1;
	if( .Mushrooms == 0 )
		goto L_end;
	else
		mapannounce .Map$,"Find the Mushroom : " + .Mushrooms + " Mushrooms left!",bc_all,0xcc99ff;
	end;

OnInit:
	set .ItemID,7539;
	set .ItemAmt,1;
	// auto announcement
	while(1) {
		npctalk "Das Find the Mushroom Preis ist "+.ItemAmt+" x "+getitemname(.ItemID)+"";
		sleep 3600000;
	}
	end;
}

I need a announcer how much mushrooms are left and if all Mushrooms are killed the Event should end.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  59
  • Reputation:   0
  • Joined:  01/25/13
  • Last Seen:  

Thank you, I hope it will work :)

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

I hope too lol

I made some test before posting don't worry

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