Jump to content
  • 0
Catalyst

Fishing Area - Auto kick players every 3 hours to map

Question

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 [email protected],xxxx;
//Fishing Lure
set [email protected],xxxx;
//Auto-Fish
set [email protected],1;
//Auto-Fish on Fail
set [email protected],1;
Fish:
 [email protected] = 100 * Weight / MaxWeight;

    if (90 <= [email protected]) {

        mes "^FA2103You are currently at " + [email protected] + " percent of your maximum weight.^000000";

        end;

    }
	if (isequipped([email protected])) && (isequipped([email protected])){
		specialeffect EF_BUBBLE,"Fishing Hole";
		//soundeffect "fishingrod.wav",0;
		dispbottom "[Fishing] Casting...";
		set [email protected],15;
			if (isequipped(2550)) { //Fisher's Muffler
				set [email protected],[email protected] - 1;
			}
			if (isequipped(2443)) { //Fisher's Boots
				set [email protected],[email protected] - 1;
			}
			if (isequipped(2764)) { //Fishing Pole
				set [email protected],[email protected] - 3;
			}
			if (isequipped(2775)) { //Fishing Lure
				set [email protected],[email protected] - 2;
			}
			if (isequipped(5317)) { //head
				set [email protected],[email protected] - 2;
			}
			if (isequipped(5403)) { //mouth
				set [email protected],[email protected] - 2;
			}
		progressbar "ffffff",[email protected];
	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([email protected]==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([email protected]==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([email protected]==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([email protected]==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([email protected]==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([email protected]==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([email protected]==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([email protected]==1){
		goto Fish;}else{
		end;}
		}


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


	if (rand(1,100) == 1){	// 1%
		setarray [email protected][0],7179;
		set [email protected], [email protected][rand(getarraysize([email protected]))];
		getitem [email protected],1; //Reward
		set #FISHINGPOINTS,#FISHINGPOINTS+1;
		announce "[Fishing System]: "+strcharinfo(0)+" Got 1 "+getitemname([email protected])+".",0,0x33CC00;
		}
		if([email protected] == 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
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 [email protected],xxxx;
//Fishing Lure
set [email protected],xxxx;
//Auto-Fish
set [email protected],1;
//Auto-Fish on Fail
set [email protected],1;
Fish:
 [email protected] = 100 * Weight / MaxWeight;

    if (90 <= [email protected]) {

        mes "^FA2103You are currently at " + [email protected] + " percent of your maximum weight.^000000";

        end;

    }
	if (isequipped([email protected])) && (isequipped([email protected])){
		specialeffect EF_BUBBLE,"Fishing Hole";
		//soundeffect "fishingrod.wav",0;
		dispbottom "[Fishing] Casting...";
		set [email protected],15;
			if (isequipped(2550)) { //Fisher's Muffler
				set [email protected],[email protected] - 1;
			}
			if (isequipped(2443)) { //Fisher's Boots
				set [email protected],[email protected] - 1;
			}
			if (isequipped(2764)) { //Fishing Pole
				set [email protected],[email protected] - 3;
			}
			if (isequipped(2775)) { //Fishing Lure
				set [email protected],[email protected] - 2;
			}
			if (isequipped(5317)) { //head
				set [email protected],[email protected] - 2;
			}
			if (isequipped(5403)) { //mouth
				set [email protected],[email protected] - 2;
			}
		progressbar "ffffff",[email protected];
	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([email protected]==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([email protected]==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([email protected]==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([email protected]==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([email protected]==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([email protected]==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([email protected]==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([email protected]==1){
		goto Fish;}else{
		end;}
		}


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


	if (rand(1,100) == 1){	// 1%
		setarray [email protected][0],7179;
		set [email protected], [email protected][rand(getarraysize([email protected]))];
		getitem [email protected],1; //Reward
		set #FISHINGPOINTS,#FISHINGPOINTS+1;
		announce "[Fishing System]: "+strcharinfo(0)+" Got 1 "+getitemname([email protected])+".",0,0x33CC00;
		}
		if([email protected] == 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

  • 0
-	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

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

Important Information

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