Jump to content
  • 0
Eross

Dispel Buffs on entering portal or warp by priest but not on teleport

Question

Hi guys ! Ive created a simple script that will dispel a player on map load. But the problem is my only plan is to dispel players who enter the portal or who uses warps (priest), so inshort it has to be a different map to trigger the dispel and not by Teleport skill.. How to make teleport skip the dispel ?? thankyou ..

OnPCLoadMapEvent:
//for( set .i,0; .i < getarraysize( .Maps$ ); set .i,.i + 1 )
	//if( strcharinfo(3) == .Maps$[.i] )
		//sc_end sc_spirit;
		sc_end sc_gospel;
		sc_end SC_POEMBRAGI;
		sc_end SC_APPLEIDUN;
		sc_end SC_ASSNCROS;
		sc_end SC_WHISTLE;
		//sc_end 37; // holy weapon
		//sc_end 38; // holy armor
		sc_end 187; // increase all stat
		sc_end 194; // increase hit
		sc_end 196; // increase flee
		sc_end 198; // max hp increase
		sc_end 199; // max sp increase
		sc_end 200; // attach strength
		sc_end 202; // increase def	
		sc_end 214; // SC_SCRESIST
		sc_end 175; // POEMBRAGI
		sc_end 181; // SERVICE4U
		//specialeffect2 235;
		end;

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
9 hours ago, Eross said:

Hi guys ! Ive created a simple script that will dispel a player on map load. But the problem is my only plan is to dispel players who enter the portal or who uses warps (priest), so inshort it has to be a different map to trigger the dispel and not by Teleport skill.. How to make teleport skip the dispel ?? thankyou ..

OnPCLoadMapEvent:
//for( set .i,0; .i < getarraysize( .Maps$ ); set .i,.i + 1 )
	//if( strcharinfo(3) == .Maps$[.i] )
		//sc_end sc_spirit;
		sc_end sc_gospel;
		sc_end SC_POEMBRAGI;
		sc_end SC_APPLEIDUN;
		sc_end SC_ASSNCROS;
		sc_end SC_WHISTLE;
		//sc_end 37; // holy weapon
		//sc_end 38; // holy armor
		sc_end 187; // increase all stat
		sc_end 194; // increase hit
		sc_end 196; // increase flee
		sc_end 198; // max hp increase
		sc_end 199; // max sp increase
		sc_end 200; // attach strength
		sc_end 202; // increase def	
		sc_end 214; // SC_SCRESIST
		sc_end 175; // POEMBRAGI
		sc_end 181; // SERVICE4U
		//specialeffect2 235;
		end;

 

try to indicate inside the txt file of the the script the loadevent mapflag. You have to put it after the script just like how we do on the other mapflags or try to set an array to blocklist some maps to your list. 
ex.
prontera mapflag loadevent

Link to comment
Share on other sites

  • 0
11 minutes ago, Forshaken said:

try to indicate inside the txt file of the the script the loadevent mapflag. You have to put it after the script just like how we do on the other mapflags or try to set an array to blocklist some maps to your list. 
ex.
prontera mapflag loadevent

Yes I tried sir .. But every time I use fly wing in prontera the dispel still triggers .. It should be on warp only not on teleport

 

Link to comment
Share on other sites

  • 0
7 minutes ago, Eross said:

Yes I tried sir .. But every time I use fly wing in prontera the dispel still triggers .. It should be on warp only not on teleport

 

For portals you have to do what the first guy who replied to your question about "OnTouch" Event but for priest warp you have to edit src codes as far as i know.

Link to comment
Share on other sites

  • 0

you can try something like this.

OnPCLoadMapEvent:
	if (inarray(.Maps$, strcharinfo(3)) != -1 && @current_map$ != strcharinfo(3)) {
		//sc_end sc_spirit;
		sc_end sc_gospel;
		sc_end SC_POEMBRAGI;
		sc_end SC_APPLEIDUN;
		sc_end SC_ASSNCROS;
		sc_end SC_WHISTLE;
		//sc_end 37; // holy weapon
		//sc_end 38; // holy armor
		sc_end 187; // increase all stat
		sc_end 194; // increase hit
		sc_end 196; // increase flee
		sc_end 198; // max hp increase
		sc_end 199; // max sp increase
		sc_end 200; // attach strength
		sc_end 202; // increase def	
		sc_end 214; // SC_SCRESIST
		sc_end 175; // POEMBRAGI
		sc_end 181; // SERVICE4U
		//specialeffect2 235;
		
		@current_map$ = strcharinfo(3);
		addtimer 3000, strnpcinfo(3)+"::OnCheck";
	}
	end;
	
OnCheck:
	if (@current_map$ != "") {
		if (@current_map$ == strcharinfo(3))
			addtimer 3000, strnpcinfo(3)+"::OnCheck";
		else 
			@current_map$ = "";
	}
	end;
	

 

  • Upvote 1
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.