Thread: Double Experience Scroll

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 Double Experience Scroll 
    Open For Services

    Join Date
    Jun 2019
    Posts
    82
    Thanks given
    5
    Thanks received
    25
    Discord
    View profile
    Rep Power
    45
    Just a little snippet, thought it be useful to somebody eventually.

    ok so first go to player.java and add your boolean
    Spoiler for player.java:
    public boolean doubleScroll ;


    then go to playersave.java and add
    Spoiler for playersave.java:
    } else if (token.equals("doubleXpScroll")) {
    p.doubleScroll = Boolean.parseBoolean(token2);

    and
    characterfile.write("doubleXpScroll = ", 0, 17);
    characterfile.write(Boolean.toString(p.doubleScrol l ), 0, Boolean.toString(p.doubleScroll ).length());
    characterfile.newLine();


    then go make the actual class called DoubleExpScroll and add this
    Spoiler for DoubleExpScroll.java:
    package ethos.model.content;

    import java.util.concurrent.TimeUnit;

    import ethos.Config;
    import ethos.model.players.Player;


    /**
    * @author Aaron Whittle
    * @date Sep 22th 2019
    */

    public class DoubleExpScroll {
    public static long EXPERIENCE_TIMER = 0;
    public static void OpenScroll (Player player) {
    EXPERIENCE_TIMER = TimeUnit.HOURS.toMillis(1) / 600;
    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;
    }
    }
    }
    }



    Then lastly just go to where you handle your item options, in this case it is Itemoptionone.java and add
    Spoiler for ItemOptionOne.java:
    case 2841:
    if (c.doubleScroll == false && c.getItems().playerHasItem(2841)) {
    c.getItems().deleteItem(2841, 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;


    Feel free to change the id of the scroll, it isnt the best one.
    Last edited by Aaron W; 09-23-2019 at 05:08 PM.
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    what the dog doin

    mikan's Avatar
    Join Date
    Aug 2017
    Posts
    917
    Thanks given
    698
    Thanks received
    731
    Discord
    View profile
    Rep Power
    4898
    whats with the capitals?
    Reply With Quote  
     

  4. #3  
    touched like seafood
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    23
    Posts
    4,837
    Thanks given
    1,676
    Thanks received
    1,566
    Discord
    View profile
    Rep Power
    1390
    Quote Originally Posted by Aaron W View Post
    Just a little snippet, thought it be useful to somebody eventually.

    ok so first go to player.java and add your boolean
    Spoiler for player.java:
    public boolean DOUBLE_SCROLL;


    then go to playersave.java and add
    Spoiler for playersave.java:
    } else if (token.equals("doubleXpScroll")) {
    p.DOUBLE_SCROLL = Boolean.parseBoolean(token2);

    and
    characterfile.write("doubleXpScroll = ", 0, 17);
    characterfile.write(Boolean.toString(p.DOUBLE_SCRO LL), 0, Boolean.toString(p.DOUBLE_SCROLL).length());
    characterfile.newLine();


    then go make the actual class called DoubleExpScroll and add this
    Spoiler for DoubleExpScroll.java:
    package ethos.model.content;

    import java.util.concurrent.TimeUnit;

    import ethos.Config;
    import ethos.model.players.Player;


    /**
    * @author Aaron Whittle
    * @date Sep 22th 2019
    */

    public class DoubleExpScroll {
    public static long EXPERIENCE_TIMER = 0;
    public static void OpenScroll (Player player) {
    EXPERIENCE_TIMER = TimeUnit.HOURS.toMillis(1) / 600;
    player.DOUBLE_SCROLL = 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.DOUBLE_SCROLL = false;
    }
    }
    }
    }



    Then lastly just go to where you handle your item options, in this case it is Itemoptionone.java and add
    Spoiler for ItemOptionOne.java:
    case 2841:
    if (c.DOUBLE_SCROLL == false && c.getItems().playerHasItem(2841)) {
    c.getItems().deleteItem(2841, 1);
    DoubleExpScroll.OpenScroll(c);
    c.sendMessage("@[email protected] have activated 1 hour of double experience.");
    } else if (c.DOUBLE_SCROLL == true) {
    c.sendMessage("@[email protected] already activated this.");
    }
    break;


    Feel free to change the id of the scroll, it isnt the best one.
    check this

    [Only registered and activated users can see links. ]

    section 4
    [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] (official dog of rune-server)
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Reply With Quote  
     

  5. #4  
    WhiteDownMb | HYBRID JEFE
    Brett the Don's Avatar
    Join Date
    Dec 2009
    Posts
    2,064
    Thanks given
    303
    Thanks received
    507
    Rep Power
    2191
    what tyluur said

    OT: someone might use ! good job

    All of humanity's problems stem from man's
    inability to sit quietly in a room by himself

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. #5  
    Registered Member FreeX's Avatar
    Join Date
    May 2019
    Posts
    74
    Thanks given
    6
    Thanks received
    8
    Rep Power
    25
    nice. someone will find use for this
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #6  
    Open For Services

    Join Date
    Jun 2019
    Posts
    82
    Thanks given
    5
    Thanks received
    25
    Discord
    View profile
    Rep Power
    45
    Quote Originally Posted by Tyluur View Post
    check this

    [Only registered and activated users can see links. ]

    section 4
    Yeah i know man, im not even sure why i did it in capitals if im honest, i wasnt really thinking when making it, ive updated it tho.
    Reply With Quote  
     

  8. #7  
    Registered Member Transcending's Avatar
    Join Date
    Apr 2015
    Posts
    61
    Thanks given
    18
    Thanks received
    2
    Discord
    View profile
    Rep Power
    11
    Thanks man, works great except it doesn't show double exp drops for the counter. anyone know how to do this?
    Reply With Quote  
     

  9. #8  
    Registered Member
    Optimum's Avatar
    Join Date
    Apr 2012
    Posts
    3,517
    Thanks given
    830
    Thanks received
    1,580
    Discord
    View profile
    Rep Power
    5000
    been waiting for this thanks mate

    Quote Originally Posted by DownGrade View Post
    Don't let these no life creeps get to you, its always the same on here. They'd rather spend hours upon hours in the rune-server spam section then getting laid! ha ha!Its honestly pathetic i haven't seen so many lowlifes in my life its actually insane i wish that this section would just vanish its probably the only way to get these people out of the community...
    PLEASE BE AWARE OF IMPOSTERS MY DISCORD ID: 362240000760348683
    Reply With Quote  
     

  10. #9  
    Open For Services

    Join Date
    Jun 2019
    Posts
    82
    Thanks given
    5
    Thanks received
    25
    Discord
    View profile
    Rep Power
    45
    Quote Originally Posted by Transcending View Post
    Thanks man, works great except it doesn't show double exp drops for the counter. anyone know how to do this?
    Ive known people have experience counter issues with ascend back in the day, so if thats the source your using, its not the scroll itself, its the game.
    Reply With Quote  
     

  11. #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 Aaron W View Post
    Ive known people have experience counter issues with ascend back in the day, so if thats the source your using, its not the scroll itself, its the game.
    Okay, that explains why lol that’s for the info!
    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. Double experiance ring - 718
    By Xe q in forum Requests
    Replies: 9
    Last Post: 12-20-2012, 11:58 PM
  2. Replies: 4
    Last Post: 12-03-2012, 12:30 AM
  3. Replies: 33
    Last Post: 08-11-2012, 11:08 AM
  4. Runescape double experience.
    By 01053 in forum Chat
    Replies: 7
    Last Post: 03-23-2012, 06:55 PM
  5. [562]Double Experience Ring
    By xJames in forum Snippets
    Replies: 5
    Last Post: 01-22-2011, 07:58 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
  •