Jump to content
  • 0

auto kick players when the event is closed


rickzera

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  51
  • Reputation:   3
  • Joined:  08/01/12
  • Last Seen:  

So guys, the players on my server are "bugging" an event, whenever it takes a few seconds to close, they click and enter and get stuck there, getting items. I would like a way to "auto kick" the map whenever the event is closing. It is possible? (srry bad english x.x)

 

(// === Don't mess around here please == //) <- this is the part of the script that I expected to automatically kick all players after the end of the event, even if there were 1s left to close the arena.

 

// === Don't mess around here please == //
OnClock1011: mapwarp "que_qaru01","prontera",160,184; mapwarp "que_qaru02","prontera",160,184; mapwarp "job_monk","prontera",160,184; end;

//<!-----------------------------Opening the Arena------------------------------------>
	OnClock1000: set $arenac_gate, 1; announce "The Crystal Room is open!",0; end;
	
//<!-----------------------------Closing the Arena------------------------------------>
	OnClock1010: set $arenac_gate, 0; announce "The Crystal Room is closed!",0; mapwarp "que_qaru01","prontera",153,173; mapwarp "que_qaru02","prontera",153,173; mapwarp "job_monk","prontera",153,173; removemapflag "prontera",mf_noskill; end;

 

Edited by rickyzinhx
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  215
  • Reputation:   45
  • Joined:  05/03/13
  • Last Seen:  

Hello,

Hard to help without seeing the global script but a common mistake is to evaluating if they can access the event, then printing a next/select/close2 THEN warp.

Maybe add a check on the "$arenac_gate" just before warping them (and let the one before the next/select/close2).

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  661
  • Reputation:   670
  • Joined:  11/12/12
  • Last Seen:  

What Kreustoo said will fix most of your issues. For example:

prontera,156,174,3	script	Event Warper	77,{
	if (!$arenac_gate) {
		mes "The event is closed.";
		end;
	}
	
	mes "Do you want to go in?";
	next;
	
	switch(select("Yes.:No.:")) {
		case 1:
			// This is where you need to add your checks
			if (!$arenac_gate) {
				mes "The event is closed.";
				end;
			}
			
			warp "que_qaru01", 0, 0;
			end;
	}
	
	end;
}

However this is not perfect either. A player could still enter after the event is closed because there is a delay between warping a player on the map and the player landing on the map. That delay is the time the player takes to load the map (which can vary greatly  depending of the player).

What you could do is add an "OnTouch" area where players are warped. For instance:

que_qaru01,155,155,3	script	#event_check	-1,2,2,{
	end;
OnTouch:
	if (!$arenac_gate) {
		dispbottom "You've entered the event too late, sorry!";
		warp "prontera", 160, 184;
		end;
	}
	
	end;
}

 

Another approach is to disable the entrance warper NPC a good minute prior to your event starting. Then you start your event with some dialogues, for a good minute as well. Then you start your actual event. This ensures that players who are loading slowly get on the map in time for the main event. The previous solution is safer, though.

As for players getting items that they shouldn't, you could add checks there as well. Not sure how your script works though, hard to say if that's feasible or not in your case.

	if (!$arenac_gate) {
		dispbottom "The event ended, you can't get rewards!";
		warp "prontera", 160, 184;
		end;
	}
	
	getitem 501, 10;
	...

 

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