Jump to content
  • 0
Sign in to follow this  
minx123

Monster-Counting-Game script

Question

hello.. i need some help.. how to change the coordinate?

how many space i need each x,y?

 

//##Original Script by Emistry ##//##eAthena Compatibility by Hirasu##prontera,155,181,5	script	Monster-Counting-Game	757,{	goto OnStartEvent;	end;		OnInit:		set .max_round,3;		set .max_duration,3;		set .wall_mob_id,1085;		setarray .monster,1002,1113,1242,1031;		set .monster_size,getarraysize( .monster );		set .npc_name$,"Monster-Counting-Game";		getmapxy( .map$,.npc_x,.npc_y,1 );		setmapflag .map$,mf_monster_noteleport;		setarray .xy_area,151,169,161,179;		setarray .xy_area2,153,177,160,171;		end;			OnMinute00:	OnStartEvent:		if ( !.status ) {			areawarp .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],.map$,.npc_x,.npc_y;			killmonster .map$,.npc_name$+"::OnDied";			killmonster .map$,.npc_name$+"::OnWallDied";			setcell .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],cell_basilica,1;			setcell .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],cell_walkable,1;			set .status,1;						for( set .@i, .xy_area[0]; .@i <= .xy_area[2]; set .@i,.@i+1 ){				callfunc "xy_wall",.@i,.xy_area[1],.wall_mob_id,.npc_name$,.map$;				callfunc "xy_wall",.@i,.xy_area[3],.wall_mob_id,.npc_name$,.map$;				//xy_wall( .@i,.xy_area[1] );				//xy_wall( .@i,.xy_area[3] );			}			for( set .@i, .xy_area[1]; .@i <= .xy_area[3]; set .@i,.@i+1 ){				callfunc "xy_wall",.xy_area[0],.@i,.wall_mob_id,.npc_name$,.map$;				callfunc "xy_wall",.xy_area[2],.@i,.wall_mob_id,.npc_name$,.map$;			}						do{				set .@round,.@round+1;				npctalk "Round # "+.@round;				sleep 5000;								set .status,2;				set .@mob,.monster[ rand( .monster_size ) ];				set .@amount,rand( 5,15 );				// add-on size influence ?				areamonster .map$,.xy_area2[0],.xy_area2[1],.xy_area2[2],.xy_area2[3],"",.@mob,.@amount,.npc_name$+"::OnDied";							deletepset 1;				defpattern 1,"([^:]+):.*"+.@amount+".$", "OnRight";				activatepset 1;				waitingroom "How many's there?",0;				npctalk "Tell me the correct amount of monster in there.";				// debugmes " > "+.@amount+" "+getmonsterinfo( .@mob,MOB_NAME );								sleep ( .max_duration * 60000 );								killmonster .map$,.npc_name$+"::OnDied";				delwaitingroom;				deletepset 1;				set .status,0;				sleep 5000;							}while( .@round < .max_round );						npctalk "That's the Last, thank you for participating.";			emotion e_thx;						killmonster .map$,.npc_name$+"::OnDied";			killmonster .map$,.npc_name$+"::OnWallDied";			setcell .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],cell_basilica,0;			setcell .map$,.xy_area[0],.xy_area[1],.xy_area[2],.xy_area[3],cell_walkable,1;			set .status,0;		}		end;			OnDied: 	OnWallDied: 		end;	OnRight:		getmapxy( .@map$,.@x,.@y,0 );		if ( .status == 0 ) {			dispbottom "[Counting Game] Event isnt running.";		}		else if ( .status == 1 ) {			dispbottom "[Counting Game] Please wait for the round to start.";		}		else if ( distance( .npc_x,.npc_y,.@x,.@y ) > 14 ) {			dispbottom "[Counting Game] You're too far away.";		}		else {			npctalk "Bravo!! "+strcharinfo(0)+" is correct!!";						// rewards			getitem 512,1;			getitem 512,2;			getitem 512,3;						specialeffect2 EF_POTION_CON;			awake .npc_name$;		}		end;}function	script	xy_wall	{		set .@x,getarg(0); 		set .@y,getarg(1);		set .wall_mob_id,getarg(2);		monster ""+getarg(4)+"",.@x,.@y,"",.wall_mob_id,1,""+getarg(3)+"::OnWallDied";		setcell ""+getarg(4)+"",.@x,.@y,.@x,.@y,cell_walkable,0;		// setcell .map$,.@x,.@y,.@x,.@y,cell_basilica,1;		return;	}

 

		setarray .xy_area,151,169,161,179;		setarray .xy_area2,153,177,160,171;

 how much i need each coordinate for changing map?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

ah ... hahaha don't use that script

I already told emistry in PM that script doesn't use the random probability properly

the answer always fall within +-25

 

when I have time I'll redo this stuff

Share this post


Link to post
Share on other sites
  • 0

ah ... hahaha don't use that scriptI already told emistry in PM that script doesn't use the random probability properlythe answer always fall within +-25when I have time I'll redo this stuff

Oh.. Thank you. I will wait..

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.