Jump to content
  • 0

MVP room timer...


chromus28

Question


  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  263
  • Reputation:   1
  • Joined:  04/25/13
  • Last Seen:  

guys can anyone help me on how can i reduce the time limit of my mvp room? 

 

			mes " ";
			mes "Currently there are "+ getmapusers("06guild_0"+ .@room) +" players";
			mes "in that room.";
			set .@remaintime, getvariableofnpc(.remaintime[.@room],"MVP Summoner");
			mes "It still has "+( .@remaintime /10 )+"mn "+( .@remaintime %10 )+"s left.";
			set .@nobodycounter, getvariableofnpc(.nobodycounter[.@room],"MVP Summoner");
			if ( .@nobodycounter )
				mes "And have left empty for "+( .@nobodycounter /10 )+"mn "+( .@nobodycounter %10 )+"s.";
			mes "Kick them ?";
			next;
			if ( select ( "No:Yes" ) == 1 ) close;
			set getvariableofnpc(.remaintime[.@room],"MVP Summoner"), -1;
			mes "[Private MVP Room]";
			mes "Room#"+ .@room +" is empty now.";
			close;

i tried to make it 10mins only but it get worse default is 1 hour then it went to 2hours wew

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

First thing is to make a backup of your npc then. Try replacing this in your post:

mes " ";
			mes "Currently there are "+ getmapusers("06guild_0"+ .@room) +" players";
			mes "in that room.";
			set .@remaintime, getvariableofnpc(.remaintime[.@room],"MVP Summoner");
			mes "It still has "+( .@remaintime /60 )+"mn "+( .@remaintime %60 )+"s left.";
			set .@nobodycounter, getvariableofnpc(.nobodycounter[.@room],"MVP Summoner");
			if ( .@nobodycounter )
				mes "And have left empty for "+( .@nobodycounter /60 )+"mn "+( .@nobodycounter %60 )+"s.";
			mes "Kick them ?";
			next;
			if ( select ( "No:Yes" ) == 1 ) close;
			set getvariableofnpc(.remaintime[.@room],"MVP Summoner"), -1;
			mes "[Private MVP Room]";
			mes "Room#"+ .@room +" is empty now.";
			close;

on Entermap:

OnEnterMap:
	set .@dif, strnpcinfo(2);
	set .remind[.@dif], 0;
	for ( set .@i, 1; .@i <= 9; set .@i, .@i +1 )
		deletearray getd(".group"+ .@i +"limit"+ .@dif), getd(".group"+ .@i +"idsize");
	set .nobodycounter[.@dif], 0;
	getmapxy .@map$, .@x, .@y ,1;
	set .starttime[.@dif], gettimetick(2);
	do {
		set .remaintime[.@dif], .timeout * 60 + .starttime[.@dif] - gettimetick(2);
		set .@hour[.@dif], .remainTime[.@dif] / 3600 ;
		set .@min[.@dif], .remainTime[.@dif] % 3600 / 60 ;
		set .@sec[.@dif], .remainTime[.@dif] % 3600 % 60 ;
		delwaitingroom strnpcinfo(0);
		waitingroom "Time Left = "+( ( .@hour[.@dif] )?( .@hour[.@dif] +":"):"" )+( ( .@min[.@dif] < 10 )?"0"+ .@min[.@dif]: .@min[.@dif] )+":"+( ( .@sec[.@dif] < 10 )?"0"+ .@sec[.@dif]: .@sec[.@dif] ), 0;
		if ( getmapusers(.@map$) )
			set .nobodycounter[.@dif], 0;
		else {
			set .nobodycounter[.@dif], .nobodycounter[.@dif] +1 ;
			if ( .nobodycounter[.@dif] > .nobodygiveup * 60 ) break;
		}
		sleep 995;
	} while ( .remaintime[.@dif] > 1 );
	set .remaintime[.@dif], 0;
	delwaitingroom "MVP Summoner#"+ .@dif;
	mapwarp .@map$, .respawnmap$, .respawnx, .respawny;
	end;

If not working tell me. :D

Edited by Lil Troll
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...