VladimirCastro Posted June 30, 2013 Group: Members Topic Count: 114 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 03/13/12 Last Seen: September 18, 2016 Share Posted June 30, 2013 hi can i request that players can enter gold room for 30mins and can enter 1 a week Quote Link to comment Share on other sites More sharing options...
1 Skorm Posted July 5, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted July 5, 2013 (edited) Like this?I was looking at this topic and I think the script would work better like this so the player can enter multiple times throughout the week if he didn't use his 30 minutes up.prontera,150,150,5 script gold room 456,{ function t { function s; set .@left, getarg(0); if ( .@left <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; return ( ( .@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) ? "" : " " ) ); } } if ( gltimer <= 0 && enter_gold_room < gettimetick(2) ) { set gltimer, .glt; enter_gold_room = gettimetick(2) + 86400 * .dly; } else if ( enter_gold_room > gettimetick(2) && gltimer <= 0 ) { mes "I'm sorry you can't enter in the gold room. You must wait "+ t( enter_gold_room - gettimetick(2) )+"."; close; } mes "You have "+t( gltimer )+" remaining."; select( "enter in the gold room" ); warp .map$,0,0; end; OnPCLoadMapEvent: if(strcharinfo(3)==.map$) { attachnpctimer; initnpctimer; } end; OnTimer1000: if( playerattached() ){ if(strcharinfo(3)!=.map$) { stopnpctimer; end; } set gltimer, gltimer-1; attachnpctimer; initnpctimer; if( gltimer <= 0 ) { stopnpctimer; warp "prontera",0,0; message strcharinfo(0), "end of time for the gold room"; end; } } end; OnInit: set .dly , 7 ; //Delay in days. set .glt , 1800 ; //Gold Room Timer in seconds. set .map$, "geffen" ; //Gold Room map. setmapflag .map$, mf_loadevent; end; }I was also thinking about doing this with a rental item like a pass but I'm not sure if the time is consumed while the player is offline. Edited July 5, 2013 by Skorm 1 Quote Link to comment Share on other sites More sharing options...
Capuche Posted July 4, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted July 4, 2013 Like this? prontera,150,150,5 script gold room 456,{ function t { function s; set .@left, getarg(0); if ( .@left <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; return ( ( .@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) ? "" : " " ) ); } } if ( enter_gold_room > gettimetick(2) ) { mes "I'm sorry you can't enter in the gold room. you must wait "+ t( enter_gold_room - gettimetick(2) ); close; } select( "enter in the gold room" ); warp "geffen",0,0; // your gold room map attachnpctimer; initnpctimer; enter_gold_room = gettimetick(2) + 86400 * 7; // 1 week of delay end; OnTimer1800000: // 30 mins stopnpctimer; warp "prontera",0,0; message strcharinfo(0), "end of time for the gold room"; end; } Read the comment in the script Quote Link to comment Share on other sites More sharing options...
Question
VladimirCastro
hi can i request that
players can enter gold room for 30mins and can enter 1 a week
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.