Thread: [PI] Casket Problems

Results 1 to 7 of 7
  1. #1 [PI] Casket Problems 
    Registered Member
    Join Date
    Jul 2009
    Posts
    15
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Basically, i want it so if you use a Casket you have a random chance of items.

    I've tried loads of tutorials and i always get the same error in ClickItem.java about it not being able to find Casket() in playerassitant.java

    Any help would be appreciated.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    May 2008
    Age
    30
    Posts
    538
    Thanks given
    117
    Thanks received
    42
    Rep Power
    12
    Then add public int Casket() to playerassistant.java
    Or if i'm wrong with that than add the method in playerassistant

    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2009
    Posts
    15
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    I added both of these to PlayerAssistant.java

    Code:
    public static int Casket[] = {4151};
    and

    Code:
    public int randomCasket() {
    return Casket[(int) (Math.random()*Casket.length)];
    }
    Still, same error. :[
    Reply With Quote  
     

  4. #4  
    V.C.C.

    Abnant's Avatar
    Join Date
    Nov 2010
    Posts
    2,291
    Thanks given
    393
    Thanks received
    796
    Rep Power
    1777
    Quote Originally Posted by TGWCam View Post
    I added both of these to PlayerAssistant.java

    Code:
    public static int Casket[] = {4151};
    and

    Code:
    public int randomCasket() {
    return Casket[(int) (Math.random()*Casket.length)];
    }
    Still, same error. :[
    You don't have to add anything to ClickItem.java.

    Did you add it in the correct place?

    Search for:
    public static int Runes[]

    And add it under that along with the other itemcodes. Below that you should have the second ints.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Dec 2010
    Posts
    536
    Thanks given
    61
    Thanks received
    25
    Rep Power
    4
    You do have to add something to clickitem.java
    Else how are you gonna click on the item called 'casket' and receive the reward.
    Reply With Quote  
     

  6. #6  
    V.C.C.

    Abnant's Avatar
    Join Date
    Nov 2010
    Posts
    2,291
    Thanks given
    393
    Thanks received
    796
    Rep Power
    1777
    Quote Originally Posted by Say Wut? View Post
    You do have to add something to clickitem.java
    Else how are you gonna click on the item called 'casket' and receive the reward.
    Oh, yes, but I didn't mean that. I meant that he doesn't have to add the actual int that gives you the item to clickitem.java
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jul 2009
    Posts
    15
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    I added the code to playerassistant.java

    Then when i did the ClickItem part, it was along the lines of.

    Case XXXX:
    c.getItems().addItem(c.getPA().randomClue1(), 1);
    break;

    And it refused to work
    Reply With Quote  
     


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. Casket - What?
    By Casket in forum Showcase
    Replies: 2
    Last Post: 03-27-2009, 07:03 PM
  2. Casket - Avatar.
    By Casket in forum Showcase
    Replies: 0
    Last Post: 03-22-2009, 09:42 AM
  3. Smoke - Casket
    By Casket in forum Showcase
    Replies: 7
    Last Post: 03-21-2009, 10:23 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
  •