Jump to content
  • 0

Auto Open And Close for Fishing Room


LearningRO

Question


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

hi, all 
 
I have this Script

sec_in02,151,162,0	script	School of Fish#h1-1::fish	844,{
	if (isequipped(2764)) && (isequipped(2775)){
		specialeffect2 EF_BUBBLE;
		set .@fcast,15;
		if (isequipped(2550)) { //Fisher's_Muffler
			set .@fcast,.@fcast - 3;
		}
		if (isequipped(2443)) { //Fish_Shoes
			set .@fcast,.@fcast - 2;
		}
		progressbar "ffffff",.@fcast;
			if (rand(1,70) == 2) {
				getitem 7227,10; //TCG
				specialeffect EF_BUBBLE;
				mapannounce "sec_in02","" + strcharinfo(0) + " has caught a TCG CARD 10X!!!",bc_map,"0xff77ff";
				end;
			}
		set .@rhea_ran,rand(1,70);
		if (.@rhea_ran < 20) {
			getitem 607,1; //yggdrasil
		}
		else if (.@rhea_ran == 20) {
			getitem 608,1; //yggdrasilseed
		}
		else if (.@rhea_ran == 21) {
			getitem 608,1; //yggdrasilseed
		}
		else if (.@rhea_ran == 22) {
			getitem 12111,1; //Bundle Of Food
		}
		else if (.@rhea_ran == 23) {
			getitem 956,1; //Gill
		}
		else if (.@rhea_ran == 24) {
			getitem 985,1; //Elunium
		}
		else if (.@rhea_ran == 25) {
			getitem 984,1; //Oridecon
		}
		else if (.@rhea_ran == 26) {
			getitem 607,1; //Yggdrasil
		}
		else if (.@rhea_ran == 27) {
			getitem 608,1; //yggdrasil seed
		}
		else if (.@rhea_ran == 28) {
			getitem 984,1; //Oridecon
		}
		else if (.@rhea_ran == 29) {
			mes "A merman pulled you into the water.";
			close2;
				sleep2 2000;
				specialeffect2 611;
				warp "iz_dun05",142,93;
				end;
		}
		else if (.@rhea_ran == 30) {
			mes "A Merman Caught your Lure";
			mes "Lure Is lost";
			delitem 2775, 1;
			close2;
			specialeffect2 611;
			end;
		}
		else if (.@rhea_ran == 31) {
			mes "You managed to catch something, but it was too heavy for your pole";
			mes "to endure. The Pole you were using snapped in half.";
			delitem 2764, 1;
			close2;
			specialeffect2 611;
			end;
		}
		else if ((.@rhea_ran > 31) && (.@rhea_ran < 40)) {
			getitem 607,5; //YggDrasil
		}
		else {
			mes "Nothing was caught.";
			close;
		}
		if (rand(1,400) == 3) {
			getitem 20027,1; //New Red Valkyrie Helm
			mapannounce "sec_in02","" + strcharinfo(0) + " has caught a New Red Valkyrie Helm",bc_map,"0x00ffff";
		}
		if (rand(1,150) == 3) {
			getitem 14232,2; //Yggdrasil Box(10)
			mapannounce "sec_in02","" + strcharinfo(0) + " has caught an Yggdrasil Box(10) 2x!!",bc_map,"0x00ffff";
		}
		if (rand(1,400) == 3) {
			getitem 20048,1; //Red Dark Lord Helm
			mapannounce "sec_in02","" + strcharinfo(0) + " has caught an Red Dark Lord Helm!!",bc_map,"0x44ff44";
		}
		end;
	}
	else {
		mes "Fish are swimming in the water.";
		close;
	}
}

//---------------------
//Edit duplicates here!
//--------------------

sec_in02,151,158,5	duplicate(fish)	School of Fish#h2-1	844
sec_in02,154,156,5	duplicate(fish)	School of Fish#h3-1	844
sec_in02,157,156,5	duplicate(fish)	School of Fish#h4-1	844
sec_in02,161,157,5	duplicate(fish)	School of Fish#h5-1	844
sec_in02,157,159,5	duplicate(fish)	School of Fish#h6-1	844
sec_in02,155,161,5	duplicate(fish)	School of Fish#h7-1	844
sec_in02,154,168,5	duplicate(fish)	School of Fish#h8-1	844
sec_in02,158,167,5	duplicate(fish)	School of Fish#h9-1	844
sec_in02,156,164,5	duplicate(fish)	School of Fish#h10-1	844
sec_in02,152,158,5	duplicate(fish)	School of Fish#h11-1	844
sec_in02,163,155,5	duplicate(fish)	School of Fish#h12-1	844
sec_in02,164,159,5	duplicate(fish)	School of Fish#h13-1	844
sec_in02,151,167,5	duplicate(fish)	School of Fish#h14-1	844


// WARPER

prontera,147,163,4	script	Fishing Warper	899,{

mes "[Fishing Warper]";
mes "Halo,.. Kami akan membawa anda ketempat Pemancingan";
next;
menu "Let's Go",L_TELEPORT,"No thanks",L_Bye;
close;

OnInit:
	waitingroom "[Kolam Pemancingan]",0;
	end;

L_TELEPORT:
mes "Ok... Tunggu sebentar";
next;
warp "sec_in02",132,161;
end;

L_Bye:
mes "Ok... Kami tunggu kedatangannya";
close;
}


// Exit to Prontera
sec_in02,136,152,5	script	Back Maincity	443,{
	warp "prontera.gat" ,155,176;
}	





 

How to Make that Script Auto Open and Close Every Hour

 

When Close All player's on this room will be kick out and warp to Prontera??

 

Please help me :D

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

You just want to clear the map right? Because I could interpret that multiple ways.

 

OnMinute00:
	mapwarp "sec_in02","prontera",156,191;
sec_in02,151,162,0	script	School of Fish#h1-1::fish	844,{
	if (isequipped(2764)) && (isequipped(2775)){
		specialeffect2 EF_BUBBLE;
		set .@fcast,15;
		if (isequipped(2550)) { //Fisher's_Muffler
			set .@fcast,.@fcast - 3;
		}
		if (isequipped(2443)) { //Fish_Shoes
			set .@fcast,.@fcast - 2;
		}
		progressbar "ffffff",.@fcast;
			if (rand(1,70) == 2) {
				getitem 7227,10; //TCG
				specialeffect EF_BUBBLE;
				mapannounce "sec_in02","" + strcharinfo(0) + " has caught a TCG CARD 10X!!!",bc_map,"0xff77ff";
				end;
			}
		set .@rhea_ran,rand(1,70);
		if (.@rhea_ran < 20) {
			getitem 607,1; //yggdrasil
		}
		else if (.@rhea_ran == 20) {
			getitem 608,1; //yggdrasilseed
		}
		else if (.@rhea_ran == 21) {
			getitem 608,1; //yggdrasilseed
		}
		else if (.@rhea_ran == 22) {
			getitem 12111,1; //Bundle Of Food
		}
		else if (.@rhea_ran == 23) {
			getitem 956,1; //Gill
		}
		else if (.@rhea_ran == 24) {
			getitem 985,1; //Elunium
		}
		else if (.@rhea_ran == 25) {
			getitem 984,1; //Oridecon
		}
		else if (.@rhea_ran == 26) {
			getitem 607,1; //Yggdrasil
		}
		else if (.@rhea_ran == 27) {
			getitem 608,1; //yggdrasil seed
		}
		else if (.@rhea_ran == 28) {
			getitem 984,1; //Oridecon
		}
		else if (.@rhea_ran == 29) {
			mes "A merman pulled you into the water.";
			close2;
				sleep2 2000;
				specialeffect2 611;
				warp "iz_dun05",142,93;
				end;
		}
		else if (.@rhea_ran == 30) {
			mes "A Merman Caught your Lure";
			mes "Lure Is lost";
			delitem 2775, 1;
			close2;
			specialeffect2 611;
			end;
		}
		else if (.@rhea_ran == 31) {
			mes "You managed to catch something, but it was too heavy for your pole";
			mes "to endure. The Pole you were using snapped in half.";
			delitem 2764, 1;
			close2;
			specialeffect2 611;
			end;
		}
		else if ((.@rhea_ran > 31) && (.@rhea_ran < 40)) {
			getitem 607,5; //YggDrasil
		}
		else {
			mes "Nothing was caught.";
			close;
		}
		if (rand(1,400) == 3) {
			getitem 20027,1; //New Red Valkyrie Helm
			mapannounce "sec_in02","" + strcharinfo(0) + " has caught a New Red Valkyrie Helm",bc_map,"0x00ffff";
		}
		if (rand(1,150) == 3) {
			getitem 14232,2; //Yggdrasil Box(10)
			mapannounce "sec_in02","" + strcharinfo(0) + " has caught an Yggdrasil Box(10) 2x!!",bc_map,"0x00ffff";
		}
		if (rand(1,400) == 3) {
			getitem 20048,1; //Red Dark Lord Helm
			mapannounce "sec_in02","" + strcharinfo(0) + " has caught an Red Dark Lord Helm!!",bc_map,"0x44ff44";
		}
		end;
	}
	else {
		mes "Fish are swimming in the water.";
		close;
	}
}

//---------------------
//Edit duplicates here!
//--------------------

sec_in02,151,158,5	duplicate(fish)	School of Fish#h2-1	844
sec_in02,154,156,5	duplicate(fish)	School of Fish#h3-1	844
sec_in02,157,156,5	duplicate(fish)	School of Fish#h4-1	844
sec_in02,161,157,5	duplicate(fish)	School of Fish#h5-1	844
sec_in02,157,159,5	duplicate(fish)	School of Fish#h6-1	844
sec_in02,155,161,5	duplicate(fish)	School of Fish#h7-1	844
sec_in02,154,168,5	duplicate(fish)	School of Fish#h8-1	844
sec_in02,158,167,5	duplicate(fish)	School of Fish#h9-1	844
sec_in02,156,164,5	duplicate(fish)	School of Fish#h10-1	844
sec_in02,152,158,5	duplicate(fish)	School of Fish#h11-1	844
sec_in02,163,155,5	duplicate(fish)	School of Fish#h12-1	844
sec_in02,164,159,5	duplicate(fish)	School of Fish#h13-1	844
sec_in02,151,167,5	duplicate(fish)	School of Fish#h14-1	844


// WARPER

prontera,147,163,4	script	Fishing Warper	899,{

mes "[Fishing Warper]";
mes "Halo,.. Kami akan membawa anda ketempat Pemancingan";
next;
menu "Let's Go",L_TELEPORT,"No thanks",L_Bye;
close;

OnInit:
	waitingroom "[Kolam Pemancingan]",0;
	end;

L_TELEPORT:
mes "Ok... Tunggu sebentar";
next;
warp "sec_in02",132,161;
end;

L_Bye:
mes "Ok... Kami tunggu kedatangannya";
close;

OnMinute00:
	mapwarp "sec_in02","prontera",156,191;
}


// Exit to Prontera
sec_in02,136,152,5	script	Back Maincity	443,{
	warp "prontera.gat" ,155,176;
}	
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

Thanks for your feedback, but in details I want to make that like auto mode, example : at 01.00 PM there is an event start, and all players can get in to that room, but when the time show at 01.10 PM, that event will automatically close and all players will warp out from that room and warp to prontera. And I want there are no players could get in into that room before the event is going to start again.

Can you help me? Thanks in advance :)

Link to comment
Share on other sites


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


OnMinute00:

enablenpc "fish";

sleep 600000;

disablenpc "fish";

mapwarp "map","tomap",x,y;

end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  193
  • Reputation:   14
  • Joined:  12/02/11
  • Last Seen:  

make sure you set

mapflag<tab>nosave
mapflag<tab>nomemo

 

If you're about to use sleep function, make sure you separate the NPC
 

so create a new NPC

 

-<tab>script<tab>fishingcontrol<tab>-,{

OnMinute00:
enablenpc "fish";
sleep 600000;
disablenpc "fish";
mapwarp "map","tomap",x,y;
end;

}

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