Jump to content
  • 0
Sign in to follow this  
glemor123

goldroom delay help

Question

My goldroom delay works. But if the players gets disconnected or leaved the gold room area he/she will need to wait 24 hours even though the player haven't finished the 1 hour.

 

I want that eventhough the player gets disconnected or leaved the gold room. the player can still go back inside the room if the player didn't finish the 1 hour yet

// monster spawn for gold droppingordeal_3-2,0,0,0,0	monster	Dokebi	1110,700,0,0,"Gold Room::OnGetGold"invek,161,154,3	script	Gold Room	745,{function Generatetor;mes "Do you want to go to Gold room ?";mes "It Will Cost You 1,000,000 Zeny";next;mes "If you get Disconnected While Inside the Gold ROOM you can't return to the gold room anymore.";mes "You have to wait for 24 hours to be able to enter the GOLD ROOM again";next;if( Zeny < .zeny_cost ){mes "You Don't have 1 million zeny come back next time";end;}if( select( "Yes","No" ) == 1 ){	next;	mes "Bot Checking...";	mes "Enter the ^FF0000RED COLOR^000000 Code..";	.@string$ = Generatetor( 15,rand(5,10) );	mes " ";	mes "^0055FF"+Generatetor( 15,rand(2,6) )+" ^FF0000"+.@string$+"^0055FF "+Generatetor( 15,rand(2,6) )+"^000000";	input .@input$;	next;	if( .@input$ != .@string$ ){		mes "You entered Wrong code.";		mes "^777777You will be kicked out from game^000000";		sleep2 3000;		atcommand "@kick "+strcharinfo(0);			}else{		mes "Done,..you may proceed into Gold Room by paying ^FF0000"+.zeny_cost+" zeny.";		if( Zeny >= .zeny_cost ){			if( select( "Pay and Enter Gold Room","Cancel" ) == 1 ){				Zeny -= .zeny_cost;				function t;function s;	if ( #cooldown_warp > gettimetick(2) ) {		mes "you must wait "+ t( #cooldown_warp - gettimetick(2) );		close;	}	warp .map$,0,0;	#cooldown_warp = gettimetick(2) + 86400;// 86400 secs = 1h	addtimer ( 3 *60 *40000 ), strnpcinfo(3) +"::OnEvent";// 3 hours	end;OnEvent:	dispbottom "Gold Hunt is Over";	warp "invek",146,173;	end;function t {	if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0);	.@week = .@left / ( 86400 * 7 );	.@day = .@left / 86400;	.@hour = .@left % 86400 / 3600;	.@min = .@left % 3600 / 60;	.@sec = .@left % 60;	return ( ( .@week ? .@week +" week"+ s( .@week ) : "" ) + ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" min"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" sec"+ s( .@sec,1 ) : "" ) );function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); }}							}		}	}}close;OnGetGold:	getitem 969,1;	dispbottom "Gained a Gold.";	end;OnInit:// map used for gold room.map$ = "ordeal_3-2";// entrance fee.zeny_cost = 1000000;// mapflag listsetarray .mapflag,	mf_nomemo,	mf_noteleport,	mf_nosave,	mf_nobranch,	mf_notrade,	mf_nowarp,	mf_nomobloot,	mf_nomvploot,	mf_noreturn,	mf_nowarpto,	mf_nocommand,	mf_nodrop,	mf_novending,	mf_nochat,	mf_noskill,	mf_monster_noteleport;.mapflag_size = getarraysize( .mapflag );for( .@i = 0; .@i < .mapflag_size; .@i++ )	setmapflag .map$,.mapflag[.@i];end;// Generatetor( <mode>,<length> );function	Generatetor	{	.@mode = getarg(0);	.@length = getarg(1);	if( .@mode & 1 ) setarray .@word$[ getarraysize( .@word$ ) ],"1","2","3","4","5","6","7","8","9","0";	if( .@mode & 2 ) setarray .@word$[ getarraysize( .@word$ ) ],"A","B","C","D","E","F","G","H","J","K","L","M","N","O","P","Q","R","S","T","U","X","Y","Z";	if( .@mode & 4 ) setarray .@word$[ getarraysize( .@word$ ) ],"a","b","c","d","e","f","g","h","j","k","m","n","o","p","q","r","s","t","u","x","y","z";	if( .@mode & 8 ) setarray .@word$[ getarraysize( .@word$ ) ],"!","@","#","$","%","^","&","*","(",")","-","=","/","+";	.@word_size = getarraysize( .@word$ );		while( getstrlen( .@string$ ) < .@length )		.@string$ = .@string$ + .@word$[ rand( .@word_size ) ];		return .@string$;}waitingroom "Gold Room",0;}// Warpsordeal_3-2.gat,130,193,0	warp	testwrp#1	3,3,ordeal_3-2.gat,154,154ordeal_3-2.gat,106,154,0	warp	testwrp#2	3,3,ordeal_3-2.gat,154,154ordeal_3-2.gat,201,129,0	warp	testwrp#3	3,3,ordeal_3-2.gat,154,154ordeal_3-2.gat,177,193,0	warp	testwrp#4	3,3,ordeal_3-2.gat,154,154ordeal_3-2.gat,289,129,0	warp	testwrp#5	3,3,ordeal_3-2.gat,154,154

 

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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