Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • ASDss: where do u download source and clients now
      August 18, 2017, 10:39:31 PM
    • ASDss: yo
      August 18, 2017, 10:39:20 PM
    • dan v jad: click me 4 da fun ;)[link]
      August 18, 2017, 04:39:58 PM
    • stCky: Palidinho is your OpenGL (was it OpenGL?) stuff open source anywhere?
      August 16, 2017, 09:07:22 PM
    • Travas:BUILD THE WALL
      August 15, 2017, 09:28:49 PM
    • Travas: i have ass cancer
      August 15, 2017, 09:23:29 PM
    • stCky: what are the fudge are you tryna ask?
      August 15, 2017, 08:21:35 PM
    • bader: what are the rsps community alive ?
      August 15, 2017, 05:46:16 PM
    • bader: yo guys
      August 15, 2017, 05:46:08 PM
    • Spacehost:[link] Updated our thread :)
      August 15, 2017, 09:40:34 AM
    • Adaro: The client is in Download section at Homepage
      August 15, 2017, 01:09:20 AM
    • FaTe_Of_GoDs: where do i get the client?????????????
      August 14, 2017, 05:23:14 PM
    • stCky: can anyone help me? I cant login to the shoutbox
      August 13, 2017, 05:45:15 PM
    • drubrkletern: appeal denied
      August 13, 2017, 02:35:27 PM
    • King_Trout:[link]
      August 13, 2017, 11:17:12 AM
    • Cole1497: no sorry
      August 13, 2017, 10:27:14 AM
    • ayz: yo can anyone explain something to me
      August 13, 2017, 08:08:51 AM
    • coolking12: Hi
      August 13, 2017, 04:16:06 AM
    • stCky: n+1
      August 11, 2017, 06:09:24 PM
    • PalidinoDH: How many more pages are going to show errors before this dude gets on and fixes shit
      August 11, 2017, 04:57:00 PM

    Author Topic: [pi] different experience modes easy,medium,hard and extreme  (Read 9392 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinevoetbal645

    • Member
    • ****
    • Posts: 435
    • Thanks: +0/-0
      • View Profile
    Different modes

    Well what are we exactly adding is Different exp modes.
    - Easy 5K xp rate
    - medium 500xp rate hit higher then easy
    - Hard 50 xp rate, hit higher then easy and medium + infinity prayer
    - Extreme 10 xp rate, hit higher then easy,medium,hard + infinity prayer

    Now let's start.
    First we are going to add that the mode will save if u click it.
    We going to add the save method in playersave.java
    First search for
    Code: [Select]
    p.playerRights = Integer.parseInt(token2);And add this under
    Code: [Select]
    } else if (token.equals("easyMode")) {
    p.easyMode = Boolean.parseBoolean(token2);
    } else if (token.equals("mediumMode")) {
    p.mediumMode = Boolean.parseBoolean(token2);
    } else if (token.equals("hardMode")) {
    p.hardMode = Boolean.parseBoolean(token2);
    } else if (token.equals("extremeMode")) {
    p.extremeMode = Boolean.parseBoolean(token2);
    } else if (token.equals("finishTut")) {
    p.finishedTut = Boolean.parseBoolean(token2);
    Now search for
    Code: [Select]
    characterfile.write("character-rights = ", 0, 19);under the newline add this.
    Code: [Select]
       characterfile.write("easyMode = ", 0, 11);
        characterfile.write(Boolean.toString(p.easyMode), 0, Boolean.toString(p.easyMode).length());
                characterfile.newLine();
                characterfile.write("mediumMode = ", 0, 13);
        characterfile.write(Boolean.toString(p.mediumMode), 0, Boolean.toString(p.mediumMode).length());
                characterfile.newLine();
                characterfile.write("hardMode = ", 0, 11);
        characterfile.write(Boolean.toString(p.hardMode), 0, Boolean.toString(p.hardMode).length());
                characterfile.newLine();
                characterfile.write("extremeMode = ", 0, 14);
        characterfile.write(Boolean.toString(p.extremeMode), 0, Boolean.toString(p.extremeMode).length());
                characterfile.newLine();
        characterfile.write("finishTut = ", 0, 12);
        characterfile.write(Boolean.toString(p.finishedTut), 0, Boolean.toString(p.finishedTut).length());
                characterfile.newLine();
    The Finishedtut will make the player can't walk when selecting you will see it later this code.
    This code will make 4 lines in you're character map like
    Easymode = false
    mediumMode = false
    HardMode = false
    ExtremeMode = False
    When you select a code when u login the false of the mode that u chosed gonna be = true
    Save and close.
    Now we gonna decleare the Finnishtut and the modes in player.java
    If u don't do this u will get errors.
    This part is needed so it can read the codes.
    Go to player.java and add these
    Code: [Select]
    public boolean finishedTut;
    public boolean easyMode, mediumMode, hardMode, extremeMode;
    save and close.
    Now we are going to add that hard mode and extreme mode doesn't lose prayer only by smithing or soulsplit

    ok search in client.java for this.
    This will make it so dialogue 850 ( the dialogue with the options) shows up you can't walk
    And the declaring os easymode || MediumMode above prayerdrain
    Will be that easymode and mediumode prayer goes down like normal and hard and extreme would get infinity prayer.
    search for
    Code: [Select]
    getPA().handleWeaponStyle();
    above it add
    Code: [Select]
    if (!finishedTut) {
    getDH().sendDialogues(850, -1);
    }
    Code: [Select]
    getFishing().FishingProcess();and under that add this
          
    Code: [Select]
    if (easyMode || mediumMode)So it would look like this
    Code: [Select]
    getFishing().FishingProcess();
    if (easyMode || mediumMode)
    getCombat().handlePrayerDrain();
    Save and close
    Now we are adding the dialogue on login so where u can chose you're options
    go to dialoguehandler.java and add this
    Code: [Select]
    case 850:
    sendOption4("Easy Mode 5000 xp rate", "Medium Mode 500 xp rate", "Hard Mode 50 xp rate", "Extreme Mode 10 xp rate");
    c.dialogueAction = 850;
    break;
    save and close
    Now we gonna add so you can click on the rates and it will save.
    go to clickingbuttons.java and search for
    c.finishedTut = true;
    This means that when u click the option it will change in you character map to true so you able to walk.
    Code: [Select]
    case 9178add this under it
    Code: [Select]
    if (c.dialogueAction == 850) {
    if (System.currentTimeMillis() - c.lastButton > 600) {
    c.easyMode = true;
    c.finishedTut = true;
    c.getPA().removeAllWindows();
    c.lastButton = System.currentTimeMillis();
    }
    }
    then search for
    Code: [Select]
    case 9179add this under it
    Code: [Select]
    if (c.dialogueAction == 850) {
    if (System.currentTimeMillis() - c.lastButton > 600) {
    c.mediumMode = true;
    c.finishedTut = true;
    c.getPA().removeAllWindows();
    c.lastButton = System.currentTimeMillis();
    }
    }
    then search for
    Code: [Select]
    case 9180add this under it
    Code: [Select]
    if (c.dialogueAction == 850) {
    if (System.currentTimeMillis() - c.lastButton > 600) {
    c.hardMode = true;
    c.finishedTut = true;
    c.getPA().removeAllWindows();
    c.lastButton = System.currentTimeMillis();
    }
    }
    Then search for
    Code: [Select]
    case 9181under it add this
    Code: [Select]
    if (c.dialogueAction == 850) {
    if (System.currentTimeMillis() - c.lastButton > 600) {
    c.extremeMode = true;
    c.finishedTut = true;
    c.getPA().removeAllWindows();
    c.lastButton = System.currentTimeMillis();
    }
    }
    save and close
    i explain the code.
    (c.dialogueAction == 850) {
    This means what dialogue will come up so it's 850.
    now we gonna add the different experience rate.
    Go to combatassistant.java and add this above
    Code: [Select]
    slayerreq
    Code: [Select]
    private int combatExp() {
    int amount = 0;
    if (c.easyMode) {
    amount = 5000;
    } else if (c.mediumMode) {
    amount = 500;
    } else if (c.hardMode) {
    amount = 50;
    } else if (c.extremeMode) {
    amount = 10;
    }
    return amount;
    }
    The amount is the experience that u will get each hit.
    you can change it if you want.

    Now we gonna add that each mode hit a little bit better.

    Search in combatassistant.java for
    Code: [Select]
    if(c.prayerActive[25]) {
    strength += (int)(lvlForXP * .23);
    }
    add under that add this
    Code: [Select]
    if (c.easyMode) {
    strength += (int) (lvlForXP * .03);
    } else if (c.mediumMode) {
    strength += (int) (lvlForXP * .06);
    } else if (c.hardMode) {
    strength += (int) (lvlForXP * .09);
    } else if (c.extremeMode) {
    strength += (int) (lvlForXP * .12);
    }
    lvlforxp means how much higher you will hit by the mode that you have selected easy to change.
    save and close
    Now for the last part go to walking.java
    This will make so you can't walk when you select the mode.
    Add this in walking.java
    Code: [Select]
    if (!c.finishedTut) {
    c.sendMessage("You must first select a difficulty mode.");
    return;
    }

    credits:
    100% me for adding
    « Last Edit: May 19, 2012, 08:42:50 AM by voetbal645 »
    if u need any help pm or add me

    OfflineRuby

    • Member
    • ****
    • *
    • *
    • Posts: 6,834
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different modes
    « Reply #1 on: May 19, 2012, 05:01:59 AM »
    I take it you're aiming for a SoulSplit experience? If so, good job.

    But explain your code otherwise it's just a whole bunch of snippets.
    Shreddology.

    Toms guilty pleasure: http://i.imgur.com/bmWqw7v.png


    Offlinevoetbal645

    • Member
    • ****
    • Posts: 435
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different modes
    « Reply #2 on: May 19, 2012, 05:03:16 AM »
    Thank's i will edit the codes now and explain
    if u need any help pm or add me


    Offlineliamp

    • Member
    • ****
    • Posts: 1,049
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #3 on: May 20, 2012, 08:54:52 AM »
    nice tutorial may add this into my server when i make one :)
    Respected: RsInFecTion <3 that guy 3lv3n snip3r omarsoliman Loveandpower  OmgItsShane RiiPiiNFtW <3 his sexy work Team_Rocket Wet Dreamss i <3 him :)

    OfflineZymus

    • Member
    • ****
    • *
    • Posts: 7,267
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #4 on: May 20, 2012, 11:56:44 PM »
    You probably shouldn't include multiple variables for the same concept. It wont break functionality because you're using else if, but it's possible that someone has easyMode and hardMode on, which could give them the attributes of easyMode, even if they have hardmode on.

    OfflineTutorial

    • Member
    • ****
    • Posts: 1,530
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #5 on: May 21, 2012, 10:16:25 AM »
    I added this to my server before you released this and I used one variable for the entirety. I don't see why you should give players the choice of experience rates - they should either like the way the experience rate is set by default as a whole, or just not like it at all.
    i was like, whatever bitches, and the bitches whatevered.

    Offlineliamp

    • Member
    • ****
    • Posts: 1,049
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #6 on: May 21, 2012, 02:29:37 PM »
    I added this to my server before you released this and I used one variable for the entirety. I don't see why you should give players the choice of experience rates - they should either like the way the experience rate is set by default as a whole, or just not like it at all.

    it gives it a choice because if u pick hard mode you get better drops ect if you pick the easy one u get worse drops ect
    Respected: RsInFecTion <3 that guy 3lv3n snip3r omarsoliman Loveandpower  OmgItsShane RiiPiiNFtW <3 his sexy work Team_Rocket Wet Dreamss i <3 him :)

    Offlineerror1a

    • Member
    • **
    • Posts: 21
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #7 on: May 21, 2012, 05:29:39 PM »
    I keep getting an 'orphaned case' error when i add it to dialoguehanlder.... suggestions, ideas, reasons?

    OfflineFridder

    • Member
    • ****
    • Posts: 5,107
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #8 on: May 21, 2012, 07:12:55 PM »
    I keep getting an 'orphaned case' error when i add it to dialoguehanlder.... suggestions, ideas, reasons?

    Your missing a break; under a case.

    OP why not have it read it through 1 line with a number? 1 is easy, 2 is medium, 3 is hard, 4 is extreme?

    mode = 3
    « Last Edit: May 21, 2012, 07:14:42 PM by Fridder »
    what the fudge is this shit

    OfflineNikkeboy4

    • Member
    • **
    • Posts: 55
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #9 on: May 22, 2012, 10:30:08 AM »
    I dont Know Why This Aint Work I added All Compiled it No errors But i made new acc and i selected the extreme still getting 100xp per hit Hmmh? any help?
    Looking Rsps Coders [PI] And Web desingers Contact skype:nikkeboy4 or Pm Mopars Forum

    Offlinevoetbal645

    • Member
    • ****
    • Posts: 435
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #10 on: May 22, 2012, 10:31:46 AM »
    change in config.java exp rates to 1
    if u need any help pm or add me

    OfflineNikkeboy4

    • Member
    • **
    • Posts: 55
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #11 on: May 22, 2012, 11:34:09 AM »
    Hmmh Still not Work..
    Looking Rsps Coders [PI] And Web desingers Contact skype:nikkeboy4 or Pm Mopars Forum

    OfflineLoveandpower

    • Member
    • ****
    • Posts: 12,005
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #12 on: May 22, 2012, 01:55:14 PM »
    This probably isn't the  best way of doing this nonetheless thanks for the contrib.
    I just don't care anymore.

    OfflineNikkeboy4

    • Member
    • **
    • Posts: 55
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #13 on: May 23, 2012, 08:17:15 AM »
    Just want Get this Thing work its Very Nice :)
    Looking Rsps Coders [PI] And Web desingers Contact skype:nikkeboy4 or Pm Mopars Forum

    Offline10wjk

    • Member
    • **
    • Posts: 38
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #14 on: June 02, 2012, 07:06:36 AM »
    Well help me? I changed the xp rates for easy medium etc but the rates are the same? How?
    Help me please

    Offlineasshole_rule

    • Member
    • ****
    • Posts: 4,872
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #15 on: June 02, 2012, 07:34:38 AM »
    The effects you're putting on these are just horrible and would be bad for a server. Soulsplit does it perfect, you just fudgeed it up.
    the strongest super saiyan on moparscape

    I'd also like to say that rep abuse is an offense, and one member of this topic has had their rep locked due to it.

    Offline10wjk

    • Member
    • **
    • Posts: 38
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #16 on: June 02, 2012, 08:21:15 AM »
    Well does someone know how to fix this nasty error?

    Offlinebelhelmiel

    • Member
    • ****
    • Posts: 257
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #17 on: July 04, 2012, 11:37:04 PM »
    Sweet. I might use this.

    If you wanted to trim the character files, you could've just made it write a difficulty onto the player file instead of easy = 0 medium = 0 hard = 0 extreme = 0

    Still awesome though.
    ~~~DarkDivinity - 24/7 - Webclient~~~
    http://darkdivinity.webatu.com/
    Awesome server. ^^

    Offlinedefer48

    • Member
    • ****
    • Posts: 275
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #18 on: July 14, 2012, 09:58:10 PM »
    I added this and got no errors but for some reason no dialouge comes up giving me a mode too select? so i can't walk or anything.-
    EDIT - I fixed it :P
    I fixed that error.....but now once i log out of the account it gets nulled.?
    « Last Edit: July 15, 2012, 07:19:00 AM by defer48 »

    OfflineDeathsoulOwner

    • First Time Poster
    • *
    • Posts: 3
    • Thanks: +0/-0
      • View Profile
    Re: [pi] different experience modes easy,medium,hard and extreme
    « Reply #19 on: July 17, 2012, 06:23:27 PM »
    Iv added it and all the modes go up at the same rate still... if u hit a 10 on easy,med,hard or extreme u go to level 10 and that shouldnt level to the same

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal