Jump to content
  • 0

Mushroom Doesnt Appear?


Ninjamon

Question


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

Any Idea why is it that the mushroom doesn't appear?

farebury,149,176,1	script	Counting Game	437,{
mes "This is a Monsters Counting Game";
mes "I will summon some Monsters here, and you have to count the Correct Amount of Monsters i summoned.";
mes "^FF0000Only Count for the Monsters i mentioned^000000";
next;
switch( select( "Information",
				( getgmlevel() < .GMLevel || .Event )?"":"^FF0000[GM]^000000 Start Game",
				( getgmlevel() < .GMLevel || !.Event )?"":"^FF0000[GM]^000000 End Game" )){
				
Case 1:
	mes "When the Event Start, i will summon some Monsters at a small area, and players have to count the amount of the flowers.";
	mes "Whoever tell me the correct amount of Monsters i mentioned, he/she win the game.";
	break;
	
Case 2:
	mes "Event will begin right now.";
	close2;
	donpcevent strnpcinfo(0)+"::OnStartGame";
	end;

Case 3:
	set .Event,0;
	set .Round,0;
	deletepset 1;
	delwaitingroom;
	set .Winner[0],0;
	set .Winner[1],0;
	npctalk "Counting Game Cancelled.";
	killmonster .Map$,"All";
	mes "Game Cancelled.";
	break;
}
close;

OnSpammed:
	set @Spam,0;
	end;
	
iSpam:
	if( getgmlevel() > 90 ) end;
	set @Spam,@Spam + 1;
	if( @Spam >= .Spam ){	// 3 Continuos Answer will trigger...
		set @SpamDelay,gettimetick(2) + .Spam;
		dispbottom "SPAM Detected, your answer within next "+.Spam+" Seconds will be Ignored.";
	}
	deltimer strnpcinfo(0)+"::OnSpammed";
	addtimer ( .Spam * 1000 ),strnpcinfo(0)+"::OnSpammed";
	end;
	
iRight:
set @Spam,0;
deltimer strnpcinfo(0)+"::OnSpammed";
if( !.Event ){
	message strcharinfo(0),"Sorry, there is no Event right now.";
}else if( @SpamDelay > gettimetick(2) ){
	message strcharinfo(0),"SPAM Protection : Remain "+( @SpamDelay - gettimetick(2) )+" seconds.";
}else if( getcharid(0) == .Winner[0] && gettimetick(2) < .Winner[1] ){
	message strcharinfo(0),"Sorry, Winner Time Penalty : Remain "+( .Winner[1] - gettimetick(2) )+" seconds.";
}else{
	delwaitingroom;
	set .Event,0;
	set .Round,.Round - 1;
	set .Winner[0],getcharid(0);
	set .Winner[1],gettimetick(2) + .Delay;
	npctalk "[ "+strcharinfo(0)+" ] , You're Correct.";
	killmonster .Map$,"All";
	deletepset 1;
	if( getarraysize( .Reward$ ) > 1 )
		for( set .@i,0; .@i < getarraysize( .Reward$ ) - 1; set .@i,.@i + 2 )
			if( getitemname( atoi( .Reward$[.@i] ) ) == "null" ){
				set getd( .Reward$[.@i] ),getd( .Reward$[.@i] ) + atoi( .Reward$[.@i+1] );
				dispbottom "Reward : "+.Reward$[.@i]+" + "+.Reward$[.@i+1];
			}else{
				getitem atoi( .Reward$[.@i] ),atoi( .Reward$[.@i+1] );
				dispbottom "Reward : "+getitemname( atoi( .Reward$[.@i] ) )+" x "+.Reward$[.@i+1];
			}
if( .Round ) donpcevent strnpcinfo(0)+"::OnStartGame";
}
end;


OnInit:
//	Min. GM Level to access GM Panel
set .GMLevel,80;
//	Game Location
set .Map$,"farebury";
//	Monster ID Lists
setarray .MonsterList[0],1084,1085;
//	Winners Answer Delay ( Not advised for High Value )
set .Delay,10;
//	Spam Prevention ( Not advised for High Value )
set .Spam,3;
//	How many rounds
set .MaxRound,5;
//	Area Coordination	<x1>,<y1>,<x2>,<y2>;
setarray .Coordinate,144,174,149,169;
//	Rewards ...
setarray .Reward$[0],
			"7711","1",
		//	"CustomVariable","100000",
		//	"#CustomVariable","100000",
			"7037","1";
end;


OnMinute30:
for( set .@i,60; .@i > 0; set .@i,.@i - 10 ){
	announce "Flower Counting Game : start within "+.@i+" Seconds in "+.Map$,0;
	sleep 10000;
}	

OnStartGame:
	if( !.Round ) set .Round,.MaxRound;
	announce "Counting Game has started in "+.Map$,0;
	deletearray .MobCount[0],getarraysize( .MobCount );
	for( set .@x,.Coordinate[0]; .@x <= .Coordinate[2]; set .@x,.@x + 1 )
		for( set .@y,.Coordinate[1]; .@y <= .Coordinate[3]; set .@y,.@y + 1 ){
			set .@Summon,rand( getarraysize( .MonsterList ) );
			monster .Map$,.@x,.@y,"Count Me",.MonsterList[.@Summon],1,strnpcinfo(0)+"::OnKilled";
			set .MobCount[.@Summon],.MobCount[.@Summon] + 1;
			sleep2 1;
		}
	set .@Target,rand( getarraysize( .MonsterList ) );
	deletepset 1;
	defpattern 1, "([^:]+): (\\|\\d{2})?"+.MobCount[.@Target]+ ".$", "iRight";
	// defpattern 1,"([^:]+): "+.MobCount[.@Target], "iRight";
	defpattern 1,"([^:]+):.*.*", "iSpam";
	activatepset 1;
	delwaitingroom;
	waitingroom getmonsterinfo( .MonsterList[.@Target],0 ),0;
	npctalk "Count for the Targeted Monster's Amount to Win the Game.";
	set .Event,1;
	end;
	
OnKilled:
	mes "You will be punished upon killing these Monsters and interupt the Game.";
	set @Spam,30;
	close2;
	npctalk "Round Restarted due to interruption.";
	donpcevent strnpcinfo(0)+"::OnStartGame";
	end;
}

 

 



Upppp



uppppppppp

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


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

//	Area Coordination	<x1>,<y1>,<x2>,<y2>;
setarray .Coordinate,144,174,149,169;

The script make a loop +1 x then +1 y

 

	for( set .@x,.Coordinate[0]; .@x <= .Coordinate[2]; set .@x,.@x + 1 )
		for( set .@y,.Coordinate[1]; .@y <= .Coordinate[3]; set .@y,.@y + 1 ){

so x1 must be < x2 and y1 < y2 in the setting

Edited by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

Now the mushroom is can be seen now but the problem now is it keeps on spawning till the end of the map. :(



upp

Link to comment
Share on other sites


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

What did you do to fix your previous error ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

//    Area Coordination    <x1>,<y1>,<x2>,<y2>;
setarray .Coordinate,144,174,149,169;

 

I fix this but it continuously spawn on my map. 

Link to comment
Share on other sites


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

What did you do to fix your previous error ? I know the error I point it lol

or post your current script

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

I change this

 

//    Area Coordination    <x1>,<y1>,<x2>,<y2>;

setarray .Coordinate,147,147,174,171;
Link to comment
Share on other sites


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

/swt

 

please follow the structure given...

//	Area Coordination	<x1>,<y1>,<x2>,<y2>;
setarray .Coordinate,100,100,200,00;

B3aOrsZ.jpg

 

Example from above area :

 

x1 = 100
y1 = 100

x2 = 200
y2 = 200
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

How many cells? 5x5?



upppppppppp



upppppppp

Link to comment
Share on other sites


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

7x8 in the release

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