Thread: Martin's Auto-Donation Server Sided

Results 1 to 5 of 5
  1. #1 Martin's Auto-Donation Server Sided 
    Registered Member
    Join Date
    May 2012
    Posts
    518
    Thanks given
    43
    Thanks received
    13
    Rep Power
    14
    So I'm going to add martins auto donation. In my server I do points instead of items, and I know how to change it to give points instead of items but what I'm confused about is how the server will know how to handle the ranks. For my server $10 = Donator $30 = Super donator and $50 = Elite donator. But what if a person donates $20 at some point, and then donates $30. That means they should receive Elite donator status for donating a total of 50, but since their second donation was $30 it would set their rank to Super donator instead of Elite. Basically how would I edit the system to make it work with ranks. And giving the correct rank for the added amount donated. All help would be great
    OFFERING GOOD SERVICES!
    http://www.rune-server.org/market/vi...aces-more.html
    Spoiler for My Vouches:
    Quote Originally Posted by Collin2234 View Post
    Vouch! He did my webclient, great work and a nice guy! Thanks.
    Quote Originally Posted by Clevv View Post
    Vouch for this guy. He went first. Well trusted and a nice guy.
    Quote Originally Posted by x25xquinton View Post
    VOUCH- He basically made my summoning interface for me, summoning tab witchever. Payed and went smooth.
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    have a variable in Player.java that tracks the total amount donated, this value is never deducted from. So every donation increase this variable, and if this variable if over, 10, 20 or 50, give that donator rank on login.
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2012
    Posts
    518
    Thanks given
    43
    Thanks received
    13
    Rep Power
    14
    Quote Originally Posted by Martin View Post
    have a variable in Player.java that tracks the total amount donated, this value is never deducted from. So every donation increase this variable, and if this variable if over, 10, 20 or 50, give that donator rank on login.
    Okay that makes sense. But where would i put the totalDonated variable? Like where in the donation system code. Or should i put it in process() so that it is always checking and always updating?

    Like in process() i could maybe do this?

    if (c.totalDonated > 10 && c.totalDonated < 30) { //Donator Rank
    c.playerRights = 4;
    }

    if (c.totalDonated > 30 && c.totalDonated < 50) { //Super Donator Rank
    c.playerRights = 5;
    }

    if (c.totalDonated >= 50) { //Elite Donator Rank
    c.playerRights = 6;
    }


    **or i could create an event of course.
    OFFERING GOOD SERVICES!
    http://www.rune-server.org/market/vi...aces-more.html
    Spoiler for My Vouches:
    Quote Originally Posted by Collin2234 View Post
    Vouch! He did my webclient, great work and a nice guy! Thanks.
    Quote Originally Posted by Clevv View Post
    Vouch for this guy. He went first. Well trusted and a nice guy.
    Quote Originally Posted by x25xquinton View Post
    VOUCH- He basically made my summoning interface for me, summoning tab witchever. Payed and went smooth.
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    DO NOT PUT IT IN PROCESS, why would you check every second, it ONLY updates when they donate, so where should you put it....

    increase the totalDonated, when they donate... Where is that code? put it there.

    Try it yourself...

    as for the if statements, ever hear of if else?

    start with the highest amount:

    Code:
    if(am >= 50){
    
    } else if(am >= 30){
    
    } else if(am >= 10){
    
    }
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    Registered Member
    Join Date
    May 2012
    Posts
    518
    Thanks given
    43
    Thanks received
    13
    Rep Power
    14
    Quote Originally Posted by Martin View Post
    DO NOT PUT IT IN PROCESS, why would you check every second, it ONLY updates when they donate, so where should you put it....

    increase the totalDonated, when they donate... Where is that code? put it there.

    Try it yourself...

    as for the if statements, ever hear of if else?

    start with the highest amount:

    Code:
    if(am >= 50){
    
    } else if(am >= 30){
    
    } else if(am >= 10){
    
    }
    Thank you, wasn't thinking straight.
    OFFERING GOOD SERVICES!
    http://www.rune-server.org/market/vi...aces-more.html
    Spoiler for My Vouches:
    Quote Originally Posted by Collin2234 View Post
    Vouch! He did my webclient, great work and a nice guy! Thanks.
    Quote Originally Posted by Clevv View Post
    Vouch for this guy. He went first. Well trusted and a nice guy.
    Quote Originally Posted by x25xquinton View Post
    VOUCH- He basically made my summoning interface for me, summoning tab witchever. Payed and went smooth.
    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. Martin's Auto Donation System
    By Martin in forum Tutorials
    Replies: 312
    Last Post: 07-06-2017, 08:01 PM
  2. auto donation (server side)
    By Delincidityexp in forum Help
    Replies: 29
    Last Post: 03-24-2014, 09:54 PM
  3. Replies: 7
    Last Post: 03-27-2013, 02:30 AM
  4. Replies: 0
    Last Post: 03-20-2013, 05:57 PM
  5. [pi] Auto Donation [Server Side]
    By Rockstar Jax in forum Help
    Replies: 0
    Last Post: 06-12-2011, 01:39 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
  •