Thread: [PI]Method Calls

Results 1 to 3 of 3
  1. #1 [PI]Method Calls 
    Registered Member
    Join Date
    Nov 2012
    Posts
    64
    Thanks given
    4
    Thanks received
    1
    Rep Power
    11
    Im trying to integrate code into my server, but it was a bit different when it started out. You see it had many class calls that weren't like my own server, while I was able to resolve most of these, when it came down to methods I sort of crumbled.

    Constants.CAPE
    Constants.Hat

    These originally were calling on a method that acted in the (Constants) or config.java for my pi server. But the problem is that these methods weren't located in the config.java but the ItemAssistant.java and unlike the calls above, the items that are identified are strings but they aren't seperate. There in one large method called itemtype, and Im confused as how to integrate this into the calls above. Heres the code.

    public String itemType(int item) {
    if(Item.playerCape(item)) {
    return "cape";
    }
    if(Item.playerBoots(item)) {
    return "boots";
    }
    if(Item.playerGloves(item)) {
    return "gloves";
    }
    if(Item.playerShield(item)) {
    return "shield";
    }
    if(Item.playerAmulet(item)) {
    return "amulet";
    }
    if(Item.playerArrows(item)) {
    return "arrows";
    }
    if(Item.playerRings(item)) {
    return "ring";
    }
    if(Item.playerHats(item)) {
    return "hat";
    }
    if(Item.playerLegs(item)) {
    return "legs";
    }
    if(Item.playerBody(item)) {
    return "body";
    }

    Unless Im wrong and its wearitem, but it could also be c.playerEquipment.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Nov 2012
    Posts
    64
    Thanks given
    4
    Thanks received
    1
    Rep Power
    11
    Bump
    Reply With Quote  
     

  3. #3  
    MOD DESIGNER RM MORE COMING


    TheeRash's Avatar
    Join Date
    Dec 2010
    Age
    30
    Posts
    5,128
    Thanks given
    639
    Thanks received
    2,123
    Rep Power
    5000
    Itemassistant.


    Feel free to message me with any questions you may have - any offers of work will not be considered unless details are in the subject.
    Attached imageAttached imageAttached image
    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. Threat Calls.
    By Delifed in forum Forum Related Help
    Replies: 23
    Last Post: 05-04-2010, 01:45 AM
  2. Stoned Cop Calls 911
    By Shobaky in forum Videos
    Replies: 2
    Last Post: 06-16-2008, 11:11 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
  •