Thread: Give donator for 30 days.

Results 1 to 4 of 4
  1. #1 Give donator for 30 days. 
    Seven Lions

    Yvne's Avatar
    Join Date
    Sep 2012
    Posts
    1,204
    Thanks given
    164
    Thanks received
    173
    Rep Power
    81
    How can I make it so If a player clicks an item it gives them donator for 30days?

    Code:
    if (itemId == 756) // #### = 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(756)) { // again #### is your item id, it makes sure you have the item to use
    				 c.getItems().deleteItem(756, 1);
    				 c.isDonator = true;
    				 c.playerRights = 4;
    				 c.logout();
    			} else {
    				c.sendMessage("Error - Item Unreachable.");
    				return;
    			}
    			}
    Reply With Quote  
     

  2. #2  
    Donator


    Join Date
    Nov 2008
    Posts
    885
    Thanks given
    13
    Thanks received
    35
    Rep Power
    100
    Various ways, using an event manager to handle what days are what and have it countdown everyday from a value, you can make it check if it has been over 24 hours since the last
    30DaysofMembersleft--;
    if you really aren't so sure, feel free to pm me, i can help further.
    Reply With Quote  
     

  3. #3  
    Registered Member BryceTheCoder's Avatar
    Join Date
    Aug 2008
    Posts
    740
    Thanks given
    21
    Thanks received
    24
    Rep Power
    27
    Well I would suggest using a cycle event so you could count days or maybe even use a long for System.currentTimeMillis();



    Code:
    if (itemId == 756) {
    	if (c.isDonator) {
    		c.sendMessage("You are already a donator?");
    		return;
    	}
    	if (c.getItems().playerHasItem(itemId, 1) {
    		c.getItems().deleteItem(itemId, 1);
    		c.isDonator = true;
    		c.playerRights = 4;
    		//ADD A TIMER OR EVENT TO MAKE IT COUNT DOWN DAYS ON A VARIABLE.
    	}
    }

    Advertise your RSPS cheap on my website: www.BryceBux.com

    ^ PM me and I will give you a few dollars for FREE on my website for advertisements ^
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Mar 2011
    Posts
    4,062
    Thanks given
    194
    Thanks received
    689
    Rep Power
    0
    Using cycle events? Using System.currentTimeMillis()? Just save the current date for the player and check on login...
    Reply With Quote  
     

  5. Thankful user:



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. Selling rs pin 30 days for 5$
    By Mr Sandman in forum Selling
    Replies: 0
    Last Post: 12-18-2011, 03:27 AM
  2. Replies: 13
    Last Post: 07-30-2010, 02:30 AM
  3. I donate for 2 days ago and..
    By 'Exs Faith in forum Complaints
    Replies: 15
    Last Post: 04-18-2010, 05:43 AM
  4. Replies: 10
    Last Post: 12-09-2009, 02:25 AM
  5. willing to donate 50$ a day for 4 days.
    By Snow Cat123 in forum Forum Related Help
    Replies: 6
    Last Post: 10-11-2009, 05:25 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
  •