Thread: Arcane & Dexterous prayer scrolls (WORKING)

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Arcane & Dexterous prayer scrolls (WORKING) 
    Banned Arcane & Dexterous prayer scrolls (WORKING) Market Banned

    Join Date
    Jun 2019
    Posts
    90
    Thanks given
    5
    Thanks received
    28
    Rep Power
    0
    Now before i get any feedback id just like to say, this isnt my final product and there are always ways you can improve it, but its a good start.

    First you want to go to player.java and have your booleans identified.
    Spoiler for Player.java:
    public boolean augury;
    public boolean rigour;


    After you have done that go to playersave.java and save the booleans to the players character files.

    Spoiler for Playersave.java:
    } else if (token.equals("rigour")) {
    p.rigour = Boolean.parseBoolean(token2);
    } else if (token.equals("augury")) {
    p.augury = Boolean.parseBoolean(token2);

    characterfile.write("rigour = ", 0, 9);
    characterfile.write(Boolean.toString(p.rigour), 0, Boolean.toString(p.rigour).length());
    characterfile.newLine();
    characterfile.write("augury = ", 0, 9);
    characterfile.write(Boolean.toString(p.augury), 0, Boolean.toString(p.augury).length());
    characterfile.newLine();


    Now i made a file for my prayer scrolls purely because i wanted to do a custom thing with it but it still works for normal and you can always just change it from being in a file to just being on that item option,
    so make a file called DexScroll and ArcaneScroll under model.players
    and add these

    Spoiler for PrayerScrolls:
    package ethos.model.players;


    import ethos.model.players.PlayerSave;

    package ethos.model.players;


    import ethos.model.players.PlayerSave;

    public class PrayerScrolls {


    public Player c;

    public PrayerScrolls(Player c) {
    this.c = c;
    }

    public static void giveRigourPrayer(Player c) {
    c.rigour = true;
    c.sendMessage("You have unlocked the secrets of the Dexterous Prayer scroll.");
    c.sendMessage("You can now use the prayer (rigour) on your spellbook.");
    PlayerSave.saveGame(c);
    }
    public static void giveAuguryPrayer(Player c) {
    c.augury = true;
    c.sendMessage("You have unlocked the secrets of the Arcane Prayer scroll.");
    c.sendMessage("You can now use the prayer (augury) on your spellbook.");
    PlayerSave.saveGame(c);
    }
    }


    Then you want to go to your itemoptionone.java and add the cases, bare in mind these may not be the correct item ids for your game.
    Spoiler for Itemoptionone.java:
    case 21034:
    if (c.rigour = false && c.getItems().playerHasItem(21034)) {
    c.getItems().deleteItem(21034, 1);
    PrayerScrolls.giveRigourPrayer(c);
    } else if (c.rigour = true) {
    c.sendMessage("You already have member benefits.");
    }
    break;
    case 21079:
    if (c.augury = false && c.getItems().playerHasItem(21079)) {
    c.getItems().deleteItem(21034, 1);
    PrayerScrolls.giveAuguryPrayer(c);
    } else if (c.augury = true) {
    c.sendMessage("You already have member benefits.");
    }
    break;


    Lastly you want to go to your clickingbuttons.java and adjust your clicking button for the prayer icons.
    Spoiler for ClickingButton.java:
    case 153236: // rigour
    if (!c.rigour == true) {
    c.getDH().sendStatement("You have not unlocked the Dexterous prayer scroll");
    c.prayerId = -1;
    return;
    }
    c.getCombat().activatePrayer(27);
    break;

    case 153239: // augury
    if (!c.augury == true) {
    c.getDH().sendStatement("You have not unlocked the Arcane prayer scroll");
    c.prayerId = -1;
    return;
    }
    c.getCombat().activatePrayer(28);
    break;


    Hope this helped someone or atleast helped them create the version and perfect it a little bit faster. Have a good day .
    Last edited by Aaron W; 09-23-2019 at 09:38 PM.
    Reply With Quote  
     

  2. #2  
    WhiteDownMb | HYBRID JEFE
    Brett the Don's Avatar
    Join Date
    Dec 2009
    Posts
    2,117
    Thanks given
    349
    Thanks received
    556
    Rep Power
    2540
    In my opinion I would have used 1 class for all both scrolls, and the item clicking (maybe not the prayer since you have a file for that) but good job none the less id say

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




    Reply With Quote  
     

  3. #3  
    Banned Arcane & Dexterous prayer scrolls (WORKING) Market Banned

    Join Date
    Jun 2019
    Posts
    90
    Thanks given
    5
    Thanks received
    28
    Rep Power
    0
    Quote Originally Posted by Brett the Don View Post
    In my opinion I would have used 1 class for all both scrolls, and the item clicking (maybe not the prayer since you have a file for that) but good job none the less id say
    Your totally right mate, that is actually a good idea, none the less people can easily create that haha.

    if anyone sees this and wants the all in 1 file, just forget dexscroll and arcanescroll and have a file called PrayerScroll and use this code https://pastebin.com/i82QVJWf
    Last edited by Aaron W; 09-20-2019 at 12:53 AM.
    Reply With Quote  
     

  4. Thankful user:


  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
    Quote Originally Posted by Aaron W View Post
    Your totally right mate, that is actually a good idea, none the less people can easily create that haha.
    Just a tip for you

    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

    Join Date
    Nov 2015
    Age
    24
    Posts
    1,980
    Thanks given
    334
    Thanks received
    1,051
    Rep Power
    5000
    thx will use!!
    Reply With Quote  
     

  7. #6  
    'Slutty McFur'

    Owain's Avatar
    Join Date
    Sep 2014
    Age
    26
    Posts
    2,894
    Thanks given
    2,360
    Thanks received
    2,200
    Rep Power
    5000
    Just a thought:

    Code:
    if (!c.augury == false) {
    if false = false?


    Spoiler for wat:
    Attached image
    Attached image

    Attached image


    Reply With Quote  
     

  8. #7  
    Banned Arcane & Dexterous prayer scrolls (WORKING) Market Banned

    Join Date
    Jun 2019
    Posts
    90
    Thanks given
    5
    Thanks received
    28
    Rep Power
    0
    Quote Originally Posted by A Mage View Post
    Just a thought:

    Code:
    if (!c.augury == false) {
    if false = false?
    hmm, yeah im not sure what im doing there, good spot tho, either way it would of worked tho haha.
    Reply With Quote  
     

  9. #8  
    Registered Member x's Avatar
    Join Date
    May 2019
    Posts
    195
    Thanks given
    61
    Thanks received
    54
    Rep Power
    63
    Quote Originally Posted by A Mage View Post
    Just a thought:

    Code:
    if (!c.augury == false) {
    if false = false?
    lold, but gj on this.
    ▼▼▼ Click to checkout DarkScape a World PvP server in the works! ▼▼▼
    Attached image
    Reply With Quote  
     

  10. #9  
    Donator

    Join Date
    Jan 2014
    Posts
    87
    Thanks given
    22
    Thanks received
    11
    Rep Power
    51
    Why are you making a seperate class for this if it can be done within itemoptionone

    Genuinly curious, is this personal preference or am I missing something?

    (Not trying to bash you )

    EDIT: nvm, Just saw your comment above it. GJ anyway
    Last edited by toMeisteR; 09-23-2019 at 07:34 PM.
    Reply With Quote  
     

  11. #10  
    Registered Member

    Join Date
    May 2013
    Age
    27
    Posts
    414
    Thanks given
    215
    Thanks received
    200
    Rep Power
    137
    if (c.augury = false)
    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. [REQ] Dexterous Prayer Scroll
    By Delta in forum Models
    Replies: 1
    Last Post: 10-16-2017, 09:10 PM
  2. ItemID for Arcane Prayer Scroll
    By Leviticus in forum Requests
    Replies: 4
    Last Post: 02-26-2017, 09:47 PM
  3. Making quick prayer interface work
    By Raverz in forum Snippets
    Replies: 4
    Last Post: 09-01-2012, 12:23 PM
  4. prayer wont work?
    By kiwikillu in forum Help
    Replies: 0
    Last Post: 03-07-2010, 05:28 AM
  5. Help me get Emulous prayers to work
    By philby93 in forum Help
    Replies: 0
    Last Post: 02-18-2010, 01:28 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
  •