Thread: Double Experience Scroll

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 Double Experience Scroll 
    Banned Double Experience Scroll Market Banned

    Join Date
    Jun 2019
    Posts
    90
    Thanks given
    5
    Thanks received
    28
    Rep Power
    0
    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("@red@You 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("@red@You have activated 1 hour of double experience.");
    } else if (c.doubleScroll == true) {
    c.sendMessage("@red@You 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  
    Registered Member
    rebecca's Avatar
    Join Date
    Aug 2017
    Posts
    1,071
    Thanks given
    862
    Thanks received
    915
    Rep Power
    5000
    whats with the capitals?
    Reply With Quote  
     

  4. #3  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,819
    Thanks received
    1,767
    Rep Power
    2438
    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("@red@You 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("@red@You have activated 1 hour of double experience.");
    } else if (c.DOUBLE_SCROLL == true) {
    c.sendMessage("@red@You already activated this.");
    }
    break;


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

    https://www.geeksforgeeks.org/java-naming-conventions/

    section 4
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  5. #4  
    WhiteDownMb | HYBRID JEFE
    Brett the Don's Avatar
    Join Date
    Dec 2009
    Posts
    2,117
    Thanks given
    349
    Thanks received
    556
    Rep Power
    2540
    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




    Reply With Quote  
     

  6. #5  
    Registered Member x's Avatar
    Join Date
    May 2019
    Posts
    195
    Thanks given
    61
    Thanks received
    54
    Rep Power
    63
    nice. someone will find use for this
    ▼▼▼ Click to checkout DarkScape a World PvP server in the works! ▼▼▼
    Attached image
    Reply With Quote  
     

  7. #6  
    Banned Double Experience Scroll Market Banned

    Join Date
    Jun 2019
    Posts
    90
    Thanks given
    5
    Thanks received
    28
    Rep Power
    0
    Quote Originally Posted by Tyluur View Post
    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 Wintersoul's Avatar
    Join Date
    Apr 2015
    Posts
    72
    Thanks given
    23
    Thanks received
    5
    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,570
    Thanks given
    871
    Thanks received
    1,745
    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  
    Banned Double Experience Scroll Market Banned

    Join Date
    Jun 2019
    Posts
    90
    Thanks given
    5
    Thanks received
    28
    Rep Power
    0
    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 Wintersoul's Avatar
    Join Date
    Apr 2015
    Posts
    72
    Thanks given
    23
    Thanks received
    5
    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
  •