Jump to content
  • 0

Make timer run on specific map


mofo

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   4
  • Joined:  07/02/12
  • Last Seen:  

been trying to work on this but not getting any luck. so i decided to ask for help here. basically i want the timer to run/re-initialize when inside guild_vs2 and stop when the player changes maps. i tried several configurations but the timer keeps running after changing maps. help

OnPCLoadMapEvent:
if ( strcharinfo(3) == "guild_vs2" ) {
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
message strcharinfo(0), "Timer Start!";
end;
}
else {
stopnpctimer;
message strcharinfo(0), "Go back to PvP to re-initialize timer!"; }
end;

Edited by mofo
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

how about something like this ?

OnPCLoadMapEvent:
while( strcharinfo(3) == "mapname" ){
    // do whatever you want here...
   sleep2 3000; // or any time delay you want.
}
end;

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   4
  • Joined:  07/02/12
  • Last Seen:  

LOL i'm so noob at scripting i didn't know i could use "while". Thanks so much emistry, i'll test it later!

edit: still doesn't work. when i enter guild_vs2 the timer starts. when i change maps, it still keeps counting. argh

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