Thread: donated total!

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 donated total! 
    Registered Member
    Join Date
    Aug 2014
    Posts
    259
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    Someone have the command ''donated total:'' command for quest tab?

    Post below please!
    Reply With Quote  
     

  2. #2  
    Enum_ Services
    Enum_'s Avatar
    Join Date
    May 2016
    Posts
    109
    Thanks given
    5
    Thanks received
    26
    Rep Power
    33
    Ok what are you even asking for? a command or do you want it to show up in the quest tab? Because it is probably as simple as


    if (playerCommand.startsWith("totaldonated")) {
    c.sendMessage("You have donated a total of "+c.totalDonated+"");
    }
    BTW thats just to show you. Your code is probably different.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Aug 2014
    Posts
    259
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by Enum_ View Post
    Ok what are you even asking for? a command or do you want it to show up in the quest tab? Because it is probably as simple as



    BTW thats just to show you. Your code is probably different.
    I want to use a clue scroll system, so if you opened a 10$ scroll, it will show in quest tab yea, that you donated 10$
    Reply With Quote  
     

  4. #4  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Quote Originally Posted by blaxe View Post
    I want to use a clue scroll system, so if you opened a 10$ scroll, it will show in quest tab yea, that you donated 10$
    So what is it that you're struggling with? Creating the variable? Incrementing the variable values by the amounts of donations? Displaying the donated amounts? How to java 101?
    Reply With Quote  
     

  5. #5  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Just have a variable like he said that stores total donated and when you open scroll make it add onto the donated amount. Adding the variable into the quest tab is easy like guy did above.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Aug 2014
    Posts
    259
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by Zivik View Post
    Just have a variable like he said that stores total donated and when you open scroll make it add onto the donated amount. Adding the variable into the quest tab is easy like guy did above.
    You dont even have to add strings or ints for it?

    Quote Originally Posted by Kris View Post
    So what is it that you're struggling with? Creating the variable? Incrementing the variable values by the amounts of donations? Displaying the donated amounts? How to java 101?
    You absolute right, i'm not that good at java programming, so you can explain, how to fix the donation total?

    Quote Originally Posted by Enum_ View Post
    Ok what are you even asking for? a command or do you want it to show up in the quest tab? Because it is probably as simple as



    BTW thats just to show you. Your code is probably different.
    Btw, can you send me a private message?
    Reply With Quote  
     

  7. #7  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Quote Originally Posted by blaxe View Post
    You dont even have to add strings or ints for it?



    You absolute right, i'm not that good at java programming, so you can explain, how to fix the donation total?
    I'm not familiar with the source so I'm not the best teacher at this point, I can tell you basically how this is done but I cannot give you content which you can just copy-paste into direct files.
    Basically, create a player-based variable (I'm guessing in Player class), for example..
    public int donatedAmount;

    This integer would be the donated amount, unique to all players.
    Go to the spot which you want to give the donated amount and increment the value there, for example.. You stated the clue thing. Find the spot where you open the clue and give the rewards and simply add something in the lines of player.donatedAmount += 10; Or create setters and getters for the variable in Player class in the lines of:
    public int getDonatedAmount() {
    return donatedAmount;
    }

    public void setDonatedAmount(int amount) {
    donatedAmount += amount;
    }

    Doesn't matter at this point which method you use, second one is aesthetically more appealing but it doesn't matter really.

    And basically.. Wherever you're displaying the donated amount you'd just show it as..
    Well, I'll put it in a simple send-message method..
    player.sendMessage("You have donated: $" + player.donatedAmount + "."); //Or whatever the method's called.. I never worked with lower revisions so I'm not the best at spoonfeeding here.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Aug 2014
    Posts
    259
    Thanks given
    2
    Thanks received
    6
    Rep Power
    11
    Quote Originally Posted by Kris View Post
    I'm not familiar with the source so I'm not the best teacher at this point, I can tell you basically how this is done but I cannot give you content which you can just copy-paste into direct files.
    Basically, create a player-based variable (I'm guessing in Player class), for example..
    public int donatedAmount;

    This integer would be the donated amount, unique to all players.
    Go to the spot which you want to give the donated amount and increment the value there, for example.. You stated the clue thing. Find the spot where you open the clue and give the rewards and simply add something in the lines of player.donatedAmount += 10; Or create setters and getters for the variable in Player class in the lines of:
    public int getDonatedAmount() {
    return donatedAmount;
    }

    public void setDonatedAmount(int amount) {
    donatedAmount += amount;
    }

    Doesn't matter at this point which method you use, second one is aesthetically more appealing but it doesn't matter really.

    And basically.. Wherever you're displaying the donated amount you'd just show it as..
    Well, I'll put it in a simple send-message method..
    player.sendMessage("You have donated: $" + player.donatedAmount + "."); //Or whatever the method's called.. I never worked with lower revisions so I'm not the best at spoonfeeding here.
    uhm, ( public int donatedAmount; ) << Player.java
    ( player.donatedAmount += 10; ) << Command quest tab
    ( public int getDonatedAmount() {
    return donatedAmount;
    }
    ) << Player.java
    ( public void setDonatedAmount(int amount) {
    donatedAmount += amount;
    } ) << player.java??

    If i understand it?
    Reply With Quote  
     

  9. #9  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Quote Originally Posted by blaxe View Post
    uhm, ( public int donatedAmount; ) << Player.java
    ( player.donatedAmount += 10; ) << Command quest tab
    ( public int getDonatedAmount() {
    return donatedAmount;
    }
    ) << Player.java
    ( public void setDonatedAmount(int amount) {
    donatedAmount += amount;
    } ) << player.java??

    If i understand it?
    I'll just make it simple. Forget the getDonatedAmount and setDonatedAmount. At this point I can't be bothered explaining why you should use these and as I can tell it doesn't even matter lol.

    Just add the public int donatedAmount; Player.java
    @Quest tab sendFrame126 - write text as you want and just include + player.donatedAmount +
    @Spot at which you give the reward for the clue add player.donatedAmount += 10. Simple.
    Reply With Quote  
     

  10. #10  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    If you still don't get those crisp clear instructions Kris gave, private message me your skype and I'll personally walk you through it step by step over teamviewer.
    Reply With Quote  
     

  11. Thankful user:


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. Donation total disappears on logout?
    By Chris14987 in forum Help
    Replies: 2
    Last Post: 07-12-2015, 07:27 PM
  2. Total donation amount with rspay?
    By novadude in forum Help
    Replies: 12
    Last Post: 06-23-2015, 08:27 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
  •