Thread: Update Equipment Tab on Project Insanity ?

Results 1 to 7 of 7
  1. #1 Update Equipment Tab on Project Insanity ? 
    Registered Member
    Join Date
    Jul 2008
    Posts
    69
    Thanks given
    32
    Thanks received
    10
    Rep Power
    6
    I'm trying to finish off a command but I'm having the issue of my equipment tab not updating basically.

    What my command does is give you an armor set but when it equips the items, they don't show up on my equipment tab until I relog.

    Any ideas?

    Code:
    			if(playerCommand.startsWith("ranarmor")) {
    			c.playerEquipment[c.playerHat] = Config.RandomHelm[Misc.random(Config.RandomHelm.length)];
    			c.playerEquipment[c.playerCape] = Config.RandomCape[Misc.random(Config.RandomCape.length)];
    			c.playerEquipment[c.playerChest] = Config.RandomChest[Misc.random(Config.RandomChest.length)];
    			c.playerEquipment[c.playerLegs] = Config.RandomLegs[Misc.random(Config.RandomLegs.length)];
    			c.playerEquipment[c.playerShield] = Config.RandomShield[Misc.random(Config.RandomShield.length)];
    			c.sendMessage("You received a random armour set!");		
    			c.updateRequired = true;
    			c.setAppearanceUpdateRequired(true);		
    			}
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Dec 2011
    Posts
    201
    Thanks given
    3
    Thanks received
    7
    Rep Power
    11
    this should work and base it off the equipt method, therefore it should not allow the player to wield items they cannot.

    if(playerCommand.startsWith("ranarmor")) {
    c.getItems().wearItem(Config.RandomHelm[Misc.random(Config.RandomHelm.length)], 0);
    c.getItems().wearItem(Config.RandomCape[Misc.random(Config.RandomCape.length)], 1);
    c.getItems().wearItem(Config.RandomChest[Misc.random(Config.RandomChest.length)], 4);
    c.getItems().wearItem(Config.RandomLegs[Misc.random(Config.RandomLegs.length)], 7);
    c.getItems().wearItem(Config.RandomShield[Misc.random(Config.RandomShield.length)], 5)
    c.sendMessage("You received a random armour set!");
    c.updateRequired = true;
    c.setAppearanceUpdateRequired(true);
    }
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Check your login codes and see what you are missing as an update.
    Also check your wearItem method.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  5. Thankful user:


  6. #4  
    Registered Member
    Join Date
    Jul 2008
    Posts
    69
    Thanks given
    32
    Thanks received
    10
    Rep Power
    6
    Quote Originally Posted by bthy50 View Post
    this should work and base it off the equipt method, therefore it should not allow the player to wield items they cannot.
    I'm going to give this bit a run, I like how you used getItems instead of what I had going on .

    Quote Originally Posted by arch337 View Post
    Check your login codes and see what you are missing as an update.
    Also check your wearItem method.
    Will do, also if I'm not mistaken I was using the cleaned PI source that needed the getItem fix (obviously fixed it, but before i did everything was dwarf remains and now its just shields)

    Also, thanks for the help guys.
    Reply With Quote  
     

  7. #5  
    Registered Member
    Join Date
    Dec 2011
    Posts
    201
    Thanks given
    3
    Thanks received
    7
    Rep Power
    11
    Let me know how it turns out and if i can help you with anything else.

    Quote Originally Posted by Rian View Post
    I'm going to give this bit a run, I like how you used getItems instead of what I had going on .



    Will do, also if I'm not mistaken I was using the cleaned PI source that needed the getItem fix (obviously fixed it, but before i did everything was dwarf remains and now its just shields)

    Also, thanks for the help guys.
    Reply With Quote  
     

  8. #6  
    Registered Member
    Join Date
    Jul 2008
    Posts
    69
    Thanks given
    32
    Thanks received
    10
    Rep Power
    6
    Quote Originally Posted by bthy50 View Post
    Let me know how it turns out and if i can help you with anything else.
    I appreciate the help but I ended up scraping the source and moved onto Vencillio last night which I find a lot easier to work with, once I figure out how to I'm going to convert this command into vencillios Lang
    Message me for novice help. Will give a hand to all newbies who want to learn the basic ropes.
    Reply With Quote  
     

  9. #7  
    Owner of Dawntained

    Mgt Madness's Avatar
    Join Date
    Oct 2011
    Age
    28
    Posts
    3,380
    Thanks given
    1,429
    Thanks received
    958
    Rep Power
    2168
    Go to the itemassistant class and use the proper replaceEquipment method or something similair
    Attached image
    Reply With Quote  
     

  10. Thankful user:



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. Replies: 0
    Last Post: 05-08-2010, 06:55 PM
  2. Any Dupes You Know On Project Insanity? ++REP
    By Affliction in forum Requests
    Replies: 11
    Last Post: 05-07-2010, 01:27 AM
  3. question on project insanity
    By rcscape in forum Help
    Replies: 0
    Last Post: 05-02-2010, 07:22 PM
  4. Adding Lunar spellbook on project insanity
    By pineapple pie in forum Requests
    Replies: 0
    Last Post: 05-02-2010, 05:46 PM
  5. RuneScape new Equipment tab on delta
    By atrix676 in forum Help
    Replies: 1
    Last Post: 06-12-2009, 03:24 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •