Jump to content
  • 0

Kick a player from a map after 30 seconds?


Mistique

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  09/15/12
  • Last Seen:  

What I want I think is simple, but I've no idea how to script it...

 

When a player enters this map (job3_arch01), I want them to only be able to be there for 30 seconds unless he parties up with the others.

I want him to be kicked out if he isn't willing to co-operate/join.

 

It's kinda a violation thing so a specific player won't hold up the other players by just standing there and keeping them from playing the event...

 

Does anyone know how I can make this work?

 

-    script    mapwarp1    -1,{
OnPCLoadMapEvent:
    getmapxy @map$,@x,@y,0;
    if (@map$ == "job3_arch01"){
        sleep2 10;
        dispbottom "Please prepare your party in the coming 30 seconds. Those who don't join will automatically be warped out.";
        sleep 30000;
        getpartymember getcharid(1);
        if($@partymembercount < 4) { 
        warp "SavePoint",0,0;
        end;
}
}
}
job3_arch01    mapflag    loadevent

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

When a player enters this map (job3_arch01), I want them to only be able to be there for 30 seconds unless he parties up with the others.

I want him to be kicked out if he isn't willing to co-operate/join.

 

 

-    script    Kick    -1,{
    if ( strcharinfo(3) == "job3_arch01" && getcharid(1) ) end;

    sleep 30000;
    warp "SavePoint",0,0;
    end;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  09/15/12
  • Last Seen:  

It says player not attached.

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:  

-	script	Sample	-1,{
OnInit:
set .map$,"job_arch01";
set .min_party,4;
set .delay_second,30;
setmapflag .map$,mf_loadevent;
end;

OnPCLoadMapEvent:
if( strcharinfo(3) == .map$ ){
	if( getcharid( 1 ) ){
		getpartymember getcharid(1);
		if( $@partymembercount >= 4 ) end;
	}
	sleep2 ( .delay_second * 1000 );
	warp "SavePoint",0,0;
}
end;
}

try~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

It says player not attached.

try changing sleep from sleep2

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  53
  • Reputation:   0
  • Joined:  09/15/12
  • Last Seen:  

Thanks guys, it works now! :)

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