Thread: Timer Problem {PI}

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1 Timer Problem {PI} 
    Registered Member
    Join Date
    Feb 2011
    Posts
    19
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Ok so I made a timer and it works and all but when that timer reaches "0" it teleports you to specific X and Y coords. Now The Problem is, is that when you get teleported to those X and Y coords you cannot move, and if you try to teleport it teleports you back to those specific coords. So here is the code that I came up with...

    clana is the timer and clanb is the character token that gets reset.


    if (clana > 0) {
    clanb = 1;

    clana -= 1;
    } else {
    clana = 5;
    getPA().movePlayer(3211, 3420, 0);
    clanb = 0;
    clana = 0;

    }
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    what do you want to do with the timer and the tokens?tell me and ill write something up for you
    Reply With Quote  
     

  3. #3  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    Perhaps something like

    Code:
    if (clana > 0) {
    			clanb = 1;
    			clana--;
    			if (clana == 0) {
    				getPA().movePlayer(3211, 3420, 0);
    				clanb = -1;
    				clana = -1;
    			}
    		}
    Not sure what ur trying to do though
    Reply With Quote  
     

  4. #4 reply 
    Registered Member
    Join Date
    Feb 2011
    Posts
    19
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    clana is the timer and when the clana timer starts the character token clanb is set to one. Then the timer (clana) counts down to 1 and the player gets teleported to certain coords. Also When the player is teleported the timer (clana) and the token (clanb) get reset to "0". I am trying to make something like a castle wars timer but not entirely.
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    if this is going to ActionHandler for a portal or something then do this

    Code:
    case ####:
    		clana = ##; //put the number the timer starts with here
    		clanb = 1;
    		clana--;
    		if (clana == 1) {
    			getPA().movePlayer(3211, 3420, 0);
    			clanb = 0;
    			}
    		}
    correct me if thats wrong
    Reply With Quote  
     

  6. #6 reply 
    Registered Member
    Join Date
    Feb 2011
    Posts
    19
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    I am trying to put this in client.java, Kind of like how the skulltimer is for PI.
    Reply With Quote  
     

  7. #7  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    is this process? If so it's because when clana is at 0 it'll move the player to those coords and since you've clana at 0 all the time it'll always move it to that x and y coord every 600ms.

    Do you want it to be like a minigame or how do you want the timer to be for?


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  8. #8  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    oh then try something like

    Code:
    if(clana > 0) {
    			clanb = 1;
    			clana--;
    			if(clana == 1) {
    				getPA().movePlayer(3211, 3420, 0);
    				clanb = 0;
    			}	
    		}
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Feb 2011
    Posts
    19
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    i would like it to be a minigame timer.
    Reply With Quote  
     

  10. #10  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by jester2290 View Post
    i would like it to be a minigame timer.
    then do like relax lawl told you but you got to trigger the tmer somehow.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [PI] Pk Timer - Safe Timer [PI]
    By Trivzor in forum Tutorials
    Replies: 43
    Last Post: 06-24-2014, 07:49 AM
  2. [PI] Pk Timer Problem
    By ItsGoml in forum Help
    Replies: 0
    Last Post: 07-19-2011, 04:38 PM
  3. Replies: 6
    Last Post: 06-07-2011, 02:10 PM
  4. A problem with this Pk Timer
    By Varun in forum Help
    Replies: 12
    Last Post: 04-27-2011, 05:17 PM
  5. Paradox magic timer problem [Emulous]
    By philby93 in forum Help
    Replies: 1
    Last Post: 03-05-2010, 02:23 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •