Thread: Logout 5 seconds

Results 1 to 7 of 7
  1. #1 Logout 5 seconds 
    Seven Lions

    Yvne's Avatar
    Join Date
    Sep 2012
    Posts
    1,204
    Thanks given
    164
    Thanks received
    173
    Rep Power
    81
    FIXED

    how can I make it so it logs me out after 5 seconds?


    Code:
    if (itemId == 18344) // #### = itemID
    			if (c.isDonator == true) { // checks if your a donator
    				 c.sendMessage("You are already a donator!"); // sends them a message if they are
    				 return; //stops the statement if they are a donator
    			} else {
    			if (c.getItems().playerHasItem(18344)) { // again #### is your item id, it makes sure you have the item to use
    				 c.getItems().deleteItem(18344, 1);
    				 c.isDonator = true;
    				 c.logout();
    			}
    				return;
    			}

    Thanks!
    Reply With Quote  
     

  2. #2  
    Registered Member walid's Avatar
    Join Date
    Nov 2008
    Posts
    379
    Thanks given
    6
    Thanks received
    8
    Rep Power
    3
    Try this.

    Code:
    EventManager.getSingleton().addEvent(new Event() {
    				public void execute(EventContainer c) {
    					c.logout;
    				}
    			}, 5000);
    Reply With Quote  
     

  3. #3  
    Seven Lions

    Yvne's Avatar
    Join Date
    Sep 2012
    Posts
    1,204
    Thanks given
    164
    Thanks received
    173
    Rep Power
    81
    can't find the symbol for logout, it wont let you put client c and EventContainer c in the same void :[
    Reply With Quote  
     

  4. #4  
    Registered Member walid's Avatar
    Join Date
    Nov 2008
    Posts
    379
    Thanks given
    6
    Thanks received
    8
    Rep Power
    3
    should be logout(); sorry.

    do Client client = new Client();
    then client.logout();
    Reply With Quote  
     

  5. #5  
    Seven Lions

    Yvne's Avatar
    Join Date
    Sep 2012
    Posts
    1,204
    Thanks given
    164
    Thanks received
    173
    Rep Power
    81
    Quote Originally Posted by walid View Post
    should be logout(); sorry.

    do Client client = new Client();
    then client.logout();
    I literally cant figure this out lol
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Mar 2009
    Age
    30
    Posts
    76
    Thanks given
    5
    Thanks received
    9
    Rep Power
    1
    Code:
    if (itemId == 18344) {
    	if (c.isDonator == true) { // checks if your a donator
    		 c.sendMessage("You are already a donator!"); // sends them a message if they are
    		 return; //stops the statement if they are a donator
    	} else {
    		if (c.getItems().playerHasItem(18344)) { // again #### is your item id, it makes sure you have the item to use
    			 c.getItems().deleteItem(18344, 1);
    			 c.isDonator = true;
    			 EventManager.getSingleton().addEvent(new Event() {
    				public void execute(EventContainer container) {
    					c.logout();
    					container.stop();
    				}
    			}, 5000);
    		}
    		return;
    	}
    }
    Reply With Quote  
     

  7. Thankful user:


  8. #7  
    Seven Lions

    Yvne's Avatar
    Join Date
    Sep 2012
    Posts
    1,204
    Thanks given
    164
    Thanks received
    173
    Rep Power
    81
    Quote Originally Posted by R&R' View Post
    Code:
    if (itemId == 18344) {
    	if (c.isDonator == true) { // checks if your a donator
    		 c.sendMessage("You are already a donator!"); // sends them a message if they are
    		 return; //stops the statement if they are a donator
    	} else {
    		if (c.getItems().playerHasItem(18344)) { // again #### is your item id, it makes sure you have the item to use
    			 c.getItems().deleteItem(18344, 1);
    			 c.isDonator = true;
    			 EventManager.getSingleton().addEvent(new Event() {
    				public void execute(EventContainer container) {
    					c.logout();
    					container.stop();
    				}
    			}, 5000);
    		}
    		return;
    	}
    }
    Thanks! :]
    Reply With Quote  
     


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] - 10 Second logout
    By NewCoding in forum Help
    Replies: 9
    Last Post: 10-09-2010, 02:12 AM
  2. Replies: 6
    Last Post: 03-22-2010, 03:09 AM
  3. Replies: 4
    Last Post: 05-03-2007, 03:57 AM
  4. second sig ever
    By Scaar in forum Showcase
    Replies: 3
    Last Post: 04-30-2007, 03:10 PM
  5. Second Sprite (SEX)
    By DrDiablo in forum Showcase
    Replies: 7
    Last Post: 04-02-2007, 03:13 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •