Thread: Experience Scroll

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Experience Scroll 
    Registered Member Transcending's Avatar
    Join Date
    Apr 2015
    Posts
    61
    Thanks given
    18
    Thanks received
    2
    Discord
    View profile
    Rep Power
    11
    scroll doesn't seem to deactive... wondering if someone knows how to fix it

    itemsoptionone.java
    Code:
    		case 19668:
    			if (c.doubleScroll == false && c.getItems().playerHasItem(19668)) {
    			c.getItems().deleteItem(19668, 1);
    			DoubleExpScroll.OpenScroll(c);
    			c.sendMessage("@[email protected] have activated 1 hour of double experience.");
    			} else if (c.doubleScroll == true) {
    			c.sendMessage("@[email protected] already activated this.");
    			}
    			break;
    DoubleExpScroll
    Code:
    package ethos.model.content;
    
    import java.util.concurrent.TimeUnit;
    
    import ethos.Config;
    import ethos.model.players.Player;
    
    /**
     * @author Aaron Whittle
     * @[Only registered and activated users can see links. ] Sep 22th 2019
     */
    
    public class DoubleExpScroll {
    	public static long EXPERIENCE_TIMER = 0;
    
    	public static void OpenScroll(Player player) {
    		EXPERIENCE_TIMER = TimeUnit.SECONDS.toMillis(10);
    		player.doubleScroll = true;
    	}
    
    	public void EndExp(Player player) {
    		if (DoubleExpScroll.EXPERIENCE_TIMER > 0) {
    			DoubleExpScroll.EXPERIENCE_TIMER--;
    			if (DoubleExpScroll.EXPERIENCE_TIMER == 1) {
    				player.sendMessage("@[email protected] are no longer on double experience.");
    				player.doubleScroll = false;
    			}
    		}
    	}
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2017
    Posts
    119
    Thanks given
    7
    Thanks received
    19
    Discord
    View profile
    Rep Power
    9
    just add

    Code:
     DoubleExpScroll.EndExp(this):
    under process () { in player.java
    Reply With Quote  
     

  3. #3  
    Extreme Donator


    Rythe's Avatar
    Join Date
    Dec 2019
    Age
    28
    Posts
    345
    Thanks given
    276
    Thanks received
    158
    Discord
    View profile
    Rep Power
    530
    Trying adding a return statement, see if that works.

    Code:
    case 19668:
    			if (c.doubleScroll == false && c.getItems().playerHasItem(19668)) {
    			         c.getItems().deleteItem(19668, 1);
    			         DoubleExpScroll.OpenScroll(c);
    			         c.sendMessage("@[email protected] have activated 1 hour of double experience.");
    			} else if (c.doubleScroll == true) {
    			         c.sendMessage("@[email protected] already activated this.");
                                     return;
    			}
    			break;
    Quote Originally Posted by Rythe View Post
    smoke cigarettes' even if u dont want 2
    Reply With Quote  
     

  4. #4  
    Registered Member
    hc747's Avatar
    Join Date
    Dec 2013
    Age
    23
    Posts
    1,448
    Thanks given
    3,135
    Thanks received
    672
    Discord
    View profile
    Rep Power
    1029
    Quote Originally Posted by Shadowpker View Post
    Trying adding a return statement, see if that works.

    Code:
    case 19668:
                if (c.doubleScroll == false && c.getItems().playerHasItem(19668)) {
                         c.getItems().deleteItem(19668, 1);
                         DoubleExpScroll.OpenScroll(c);
                         c.sendMessage("@[email protected] have activated 1 hour of double experience.");
                } else if (c.doubleScroll == true) {
                         c.sendMessage("@[email protected] already activated this.");
                                     return;
                }
                break;
    Please think before posting.
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  5. Thankful users:


  6. #5  
    Extreme Donator


    Rythe's Avatar
    Join Date
    Dec 2019
    Age
    28
    Posts
    345
    Thanks given
    276
    Thanks received
    158
    Discord
    View profile
    Rep Power
    530
    Quote Originally Posted by hc747 View Post
    Please think before posting.
    so you chose to be center of attention ?
    not everyone spends every minute they have of life on nanas computer like you mr fancy programmer, you couldve corrected me rather be useless .

    you on google
    Quote Originally Posted by Rythe View Post
    smoke cigarettes' even if u dont want 2
    Reply With Quote  
     

  7. Thankful user:


  8. #6  
    Registered Member
    hc747's Avatar
    Join Date
    Dec 2013
    Age
    23
    Posts
    1,448
    Thanks given
    3,135
    Thanks received
    672
    Discord
    View profile
    Rep Power
    1029
    Quote Originally Posted by Shadowpker View Post
    so you chose to be center of attention ?
    not everyone spends every minute they have of life on nanas computer like you mr fancy programmer, you couldve corrected me rather be useless .

    How'd you get that pic of me? Also once again, please refer to my previous post.
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #7  
    Extreme Donator


    Rythe's Avatar
    Join Date
    Dec 2019
    Age
    28
    Posts
    345
    Thanks given
    276
    Thanks received
    158
    Discord
    View profile
    Rep Power
    530
    Quote Originally Posted by hc747 View Post
    How'd you get that pic of me? Also once again, please refer to my previous post.
    I just told you, google. Did you read my previous post Harrison? Please refer to it.
    Quote Originally Posted by Rythe View Post
    smoke cigarettes' even if u dont want 2
    Reply With Quote  
     

  10. #8  
    Community Veteran


    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,833
    Thanks given
    187
    Thanks received
    306
    Discord
    View profile
    Rep Power
    770
    Quote Originally Posted by Shadowpker View Post
    so you chose to be center of attention ?
    not everyone spends every minute they have of life on nanas computer like you mr fancy programmer, you couldve corrected me rather be useless .

    The return will just stop the method all together aka not solve the problem.

    Quote Originally Posted by Transcending View Post
    scroll doesn't seem to deactive... wondering if someone knows how to fix it

    itemsoptionone.java
    Code:
    		case 19668:
    			if (c.doubleScroll == false && c.getItems().playerHasItem(19668)) {
    			c.getItems().deleteItem(19668, 1);
    			DoubleExpScroll.OpenScroll(c);
    			c.sendMessage("@[email protected] have activated 1 hour of double experience.");
    			} else if (c.doubleScroll == true) {
    			c.sendMessage("@[email protected] already activated this.");
    			}
    			break;
    DoubleExpScroll
    Code:
    package ethos.model.content;
    
    import java.util.concurrent.TimeUnit;
    
    import ethos.Config;
    import ethos.model.players.Player;
    
    /**
     * @author Aaron Whittle
     * @[Only registered and activated users can see links. ] Sep 22th 2019
     */
    
    public class DoubleExpScroll {
    	public static long EXPERIENCE_TIMER = 0;
    
    	public static void OpenScroll(Player player) {
    		EXPERIENCE_TIMER = TimeUnit.SECONDS.toMillis(10);
    		player.doubleScroll = true;
    	}
    
    	public void EndExp(Player player) {
    		if (DoubleExpScroll.EXPERIENCE_TIMER > 0) {
    			DoubleExpScroll.EXPERIENCE_TIMER--;
    			if (DoubleExpScroll.EXPERIENCE_TIMER == 1) {
    				player.sendMessage("@[email protected] are no longer on double experience.");
    				player.doubleScroll = false;
    			}
    		}
    	}
    }
    Make sure that you have a process for your timer.


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

  11. #9  
    Extreme Donator


    Rythe's Avatar
    Join Date
    Dec 2019
    Age
    28
    Posts
    345
    Thanks given
    276
    Thanks received
    158
    Discord
    View profile
    Rep Power
    530
    Quote Originally Posted by arch337 View Post
    The return will just stop the method all together aka not solve the problem.
    I havent worked with rsps in over a year and just getting back into it so ill have my ups and downs as I jog my memory. However, i've been around the rsps scene for quite some time this isn't all new to me either, I used to have these silly little issues with shit pi. Im trying to refresh my knowledge but also help anyone as I go lol. We all make our mistakes! =P
    Quote Originally Posted by Rythe View Post
    smoke cigarettes' even if u dont want 2
    Reply With Quote  
     

  12. #10  
    Registered Member Transcending's Avatar
    Join Date
    Apr 2015
    Posts
    61
    Thanks given
    18
    Thanks received
    2
    Discord
    View profile
    Rep Power
    11
    Quote Originally Posted by socklol View Post
    just add

    Code:
     DoubleExpScroll.EndExp(this):
    under process () { in player.java
    I tried this but no luck

    Quote Originally Posted by arch337 View Post
    Make sure that you have a process for your timer.
    how could i do that? I'm still learning java lol but i really appreciate your help
    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. [317] Double Experience Scroll
    By Aaron W in forum Snippets
    Replies: 14
    Last Post: 04-30-2020, 06:36 PM
  2. [RJ] Experience Rates.
    By Inside Sin in forum Tutorials
    Replies: 12
    Last Post: 10-28-2008, 07:20 PM
  3. Clue scroll - with item on it.
    By ViperSniper in forum Configuration
    Replies: 20
    Last Post: 06-29-2008, 02:47 AM
  4. An experiement
    By sanga282 in forum Downloads
    Replies: 5
    Last Post: 12-05-2007, 03:17 PM
  5. Replies: 2
    Last Post: 11-30-2007, 05:03 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
  •