Jump to content
  • 0

Fishing Area - Auto kick players every 3 hours to map


Catalyst

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  09/15/13
  • Last Seen:  

Hello,

I need help to add "Once player enters the fishing map, they will be kicked out every three hours".

 

map,xxx,xxx,0	script	Fishing Hole	844,{
	
//Fishing rod
set .@Rod,xxxx;
//Fishing Lure
set .@Lure,xxxx;
//Auto-Fish
set .@Auto,1;
//Auto-Fish on Fail
set .@AutoFail,1;
Fish:
 .@weight = 100 * Weight / MaxWeight;

    if (90 <= .@weight) {

        mes "^FA2103You are currently at " + .@weight + " percent of your maximum weight.^000000";

        end;

    }
	if (isequipped(.@Rod)) && (isequipped(.@Lure)){
		specialeffect EF_BUBBLE,"Fishing Hole";
		//soundeffect "fishingrod.wav",0;
		dispbottom "[Fishing] Casting...";
		set .@fcast,15;
			if (isequipped(2550)) { //Fisher's Muffler
				set .@fcast,.@fcast - 1;
			}
			if (isequipped(2443)) { //Fisher's Boots
				set .@fcast,.@fcast - 1;
			}
			if (isequipped(2764)) { //Fishing Pole
				set .@fcast,.@fcast - 3;
			}
			if (isequipped(2775)) { //Fishing Lure
				set .@fcast,.@fcast - 2;
			}
			if (isequipped(5317)) { //head
				set .@fcast,.@fcast - 2;
			}
			if (isequipped(5403)) { //mouth
				set .@fcast,.@fcast - 2;
			}
		progressbar "ffffff",.@fcast;
	if (rand(1,100) == 3){	// 3%
		getitem 7227,5; // TCG 3% chance
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got x5 TCG",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12210,1; //  BBG
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Bubble Gum",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12203,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Steamed Scorpion",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12202,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Steamed Tongue",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}
	else if (rand(1,100) == 3){	// 3%
		getitem 12204,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Dragon Breath Cocktail",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12205,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Hwergelmir's Tonic",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12206,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Cooked Nine Tail's Tails",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12207,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Stew Of Immortality",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}


			if (rand(1,6) == 1) ||(rand(1,6) == 3) || (rand(1,6) == 6){
			setarray .@Catch[0],1010,1011,984,985;// List of Junk/Other
			set .@CatchRand,.@Catch[rand(getarraysize(.@Catch))];
			getitem .@CatchRand,1;
			}
			else {
			dispbottom "[Fishing] Nothing was caught...";
			if(.@AutoFail == 1){
			goto Fish;} else{
			end;}
			}


	if (rand(1,100) == 1){	// 1%
		setarray .@Rare[0],7179;
		set .@RareCatch, .@Rare[rand(getarraysize(.@Rare))];
		getitem .@RareCatch,1; //Reward
		set #FISHINGPOINTS,#FISHINGPOINTS+1;
		announce "[Fishing System]: "+strcharinfo(0)+" Got 1 "+getitemname(.@RareCatch)+".",0,0x33CC00;
		}
		if(.@Auto == 1){
		goto Fish;} else{
		end;}

				
		}
	else {
	dispbottom "[Fishing] You need a Rod and Lure.";
	end;
	}
}

map,xxx,xxx,0	duplicate(Fishing Hole)	Fishing Hole#fish2-1	844
//map,xxx,xxx,0	duplicate(Fishing Hole)	Fishing Hole#fish2-2	844
//map,xxx,xxx,0	duplicate(Fishing Hole)	Fishing Hole#fish2-3	844

// Dealer

map,xxx,xxx,6	shop	Fish Dealer	958,xxx:xxxx,2775:xxxx,2443:xxxx,2550:xxxx

 

Many thanks.

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:   2348
  • Joined:  10/28/11
  • Last Seen:  

-	script	sample	-1,{
	OnInit:
		.map$ = "prontera";
		setmapflag(.map$, mf_loadevent);
		end;
		
	OnPCLoadMapEvent:
		if (strcharinfo(3) == .map$) {
			deltimer strnpcinfo(3)+"::OnExpire";
			addtimer (3 * 60 * 60000), strnpcinfo(3)+"::OnExpire";
		}
		end;
		
	OnExpire:
		warp "prontera", 155, 181;
		end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  241
  • Reputation:   18
  • Joined:  06/04/14
  • Last Seen:  

On 8/7/2021 at 12:10 PM, Catalyst said:

Hello,

I need help to add "Once player enters the fishing map, they will be kicked out every three hours".

 

map,xxx,xxx,0	script	Fishing Hole	844,{
	
//Fishing rod
set .@Rod,xxxx;
//Fishing Lure
set .@Lure,xxxx;
//Auto-Fish
set .@Auto,1;
//Auto-Fish on Fail
set .@AutoFail,1;
Fish:
 .@weight = 100 * Weight / MaxWeight;

    if (90 <= .@weight) {

        mes "^FA2103You are currently at " + .@weight + " percent of your maximum weight.^000000";

        end;

    }
	if (isequipped(.@Rod)) && (isequipped(.@Lure)){
		specialeffect EF_BUBBLE,"Fishing Hole";
		//soundeffect "fishingrod.wav",0;
		dispbottom "[Fishing] Casting...";
		set .@fcast,15;
			if (isequipped(2550)) { //Fisher's Muffler
				set .@fcast,.@fcast - 1;
			}
			if (isequipped(2443)) { //Fisher's Boots
				set .@fcast,.@fcast - 1;
			}
			if (isequipped(2764)) { //Fishing Pole
				set .@fcast,.@fcast - 3;
			}
			if (isequipped(2775)) { //Fishing Lure
				set .@fcast,.@fcast - 2;
			}
			if (isequipped(5317)) { //head
				set .@fcast,.@fcast - 2;
			}
			if (isequipped(5403)) { //mouth
				set .@fcast,.@fcast - 2;
			}
		progressbar "ffffff",.@fcast;
	if (rand(1,100) == 3){	// 3%
		getitem 7227,5; // TCG 3% chance
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got x5 TCG",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12210,1; //  BBG
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Bubble Gum",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12203,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Steamed Scorpion",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12202,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Steamed Tongue",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}
	else if (rand(1,100) == 3){	// 3%
		getitem 12204,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Dragon Breath Cocktail",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12205,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Hwergelmir's Tonic",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12206,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Cooked Nine Tail's Tails",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}

	else if (rand(1,100) == 3){	// 3%
		getitem 12207,1; //
		specialeffect2 EF_TEMP_OK;
		//soundeffectall "success.wav",0,strcharinfo(3);
		mapannounce strcharinfo(3),strcharinfo(0)+" Got 1x Stew Of Immortality",bc_map,"0xff77ff";
		if(.@Auto==1){
		goto Fish;}else{
		end;}
		}


			if (rand(1,6) == 1) ||(rand(1,6) == 3) || (rand(1,6) == 6){
			setarray .@Catch[0],1010,1011,984,985;// List of Junk/Other
			set .@CatchRand,.@Catch[rand(getarraysize(.@Catch))];
			getitem .@CatchRand,1;
			}
			else {
			dispbottom "[Fishing] Nothing was caught...";
			if(.@AutoFail == 1){
			goto Fish;} else{
			end;}
			}


	if (rand(1,100) == 1){	// 1%
		setarray .@Rare[0],7179;
		set .@RareCatch, .@Rare[rand(getarraysize(.@Rare))];
		getitem .@RareCatch,1; //Reward
		set #FISHINGPOINTS,#FISHINGPOINTS+1;
		announce "[Fishing System]: "+strcharinfo(0)+" Got 1 "+getitemname(.@RareCatch)+".",0,0x33CC00;
		}
		if(.@Auto == 1){
		goto Fish;} else{
		end;}

				
		}
	else {
	dispbottom "[Fishing] You need a Rod and Lure.";
	end;
	}
}

map,xxx,xxx,0	duplicate(Fishing Hole)	Fishing Hole#fish2-1	844
//map,xxx,xxx,0	duplicate(Fishing Hole)	Fishing Hole#fish2-2	844
//map,xxx,xxx,0	duplicate(Fishing Hole)	Fishing Hole#fish2-3	844

// Dealer

map,xxx,xxx,6	shop	Fish Dealer	958,xxx:xxxx,2775:xxxx,2443:xxxx,2550:xxxx

 

Many thanks.

This might help you.

 

 

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