Jump to content
  • 0

NPC with Time Settings


Linkin Park

Question


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   11
  • Joined:  11/16/11
  • Last Seen:  

Hi,

I want to make a Gold room where players are allowed only for a specific time per day. Let's say PlayerA used the gold room for 1hour on Monday, after the 1hr has passed, he will be warped back to his savepoint and then won't be able to use the gold room until Tuesday 12:01am..

How to make this?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   52
  • Joined:  11/15/11
  • Last Seen:  

my suggestion is using

setquest, <id>;

and giving the quest 24 hour delay, that way it'll be easier script wise.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   6
  • Joined:  01/25/12
  • Last Seen:  

prontera,156,182,4 script gold room 100,{
mes "[gold room]";
if(#timer == gettime(4)) {
 switch(#timer) {
case 0: mes "You wont be able to use the gold room until monday 12:01am"; break;
case 1: mes "You wont be able to use the gold room until tuesday 12:01am"; break;
case 2: mes "You wont be able to use the gold room until wednesday  12:01am"; break;
case 3: mes "You wont be able to use the gold room until thursday 12:01am"; break;
case 4: mes "You wont be able to use the gold room until friday 12:01am"; break;
case 5: mes "You wont be able to use the gold room until saturday 12:01am"; break;
case 6: mes "You wont be able to use the gold room until sunday 12:01am"; break;
 }
close;
}
mes "Ok i will warp you now to the gold room";
next;
warp "prontera",0,0;
attachnpctimer strcharinfo(0);
initnpctimer;
set #timer, gettime(4);
close;

OnTimer3600000: //1hour
warp "prontera",0,0;
dispbottom "time is up you are now warped!";
stopnpctimer;
end;
}

Edited by deathscythe13
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...