Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:32 AM
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:28 AM
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:23 AM
    • marquise:[link]
      October 11, 2019, 12:24:21 PM
    • marquise: hey guys try autoscape.org [link]
      October 11, 2019, 12:19:08 PM
    • Rash: is this site still ded
      October 08, 2019, 07:54:22 PM
    • The Meek: Just Uploaded New Server ~Phusion~
      October 01, 2019, 03:30:31 AM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:43 PM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:40 PM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:33 PM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 26, 2019, 09:02:13 AM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 26, 2019, 08:52:25 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:33 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:24 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:15 AM
    • PavSwag: bopalini
      September 23, 2019, 10:08:02 PM
    • PavSwag: Join autoscape,0rg fun events daily for infernal mystery boxes only server with Infernal Twisted Bow
      September 23, 2019, 03:05:33 PM
    • Frostydapure: Upcoming dmm/open pvp world server, 2006 style (different and fun trus me) [link] join join!
      September 23, 2019, 08:05:52 AM
    • Frostydapure: Upcoming dmm/open pvp world server, 2006 style (different and fun trus me) [link] join join!
      September 23, 2019, 08:05:45 AM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 22, 2019, 02:55:32 PM

    Author Topic: 718 Adding Item Level Requirements.  (Read 1752 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineGromic

    • Member
    • **
    • Posts: 15
    • Thanks: +0/-0
      • View Profile
      • Short Grind
    718 Adding Item Level Requirements.
    « on: June 01, 2016, 09:44:09 AM »
    Anyone know how to add level requirements to items? Not sure where to add or find the code. I've check in ItemDefinitions.java & ItemConstants.java tried adding a few different methods in but never got it to compile and then work. Any suggestions or help is appreciated, unfortunately google has been extremely limited on information about this... and so have most websites.

    It's the Rune Evo V3 server base...

    Tried this in ItemConstants.java only

    if ((item.getId() == #####)) {
             if (player.getSkills().getLevel(Skills.ATTACK) < 99) {
                player.getPackets().sendGameMessage(
                      "You don't have the requeriments to equip this item.");
                return false;

    Looking to add 2 skill reqs per item for a couple weapons and then attempt to do reqs for armor sets.
    « Last Edit: June 01, 2016, 01:06:22 PM by Gromic »
    Runescape Gambling

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: Adding Item Level Requirements.
    « Reply #1 on: June 01, 2016, 11:34:28 AM »
    Anyone know how to add level requirements to items? Not sure where to add or find the code. I've check in ItemDefinitions.java & ItemConstants.java tried adding a few different methods in but never got it to compile and then work. Any suggestions or help is appreciated, unfortunately google has been extremely limited on information about this... and so have most websites.

    Tried this in ItemConstants.java only

    if ((item.getId() == #####)) {
             if (player.getSkills().getLevel(Skills.ATTACK) < 99) {
                player.getPackets().sendGameMessage(
                      "You don't have the requeriments to equip this item.");
                return false;

    Looking to add 2 skill reqs per item for a couple weapons and then attempt to do reqs for armor sets.

    Depends on your server base. But typically in a PI it'd be in ItemAssistant, under the wearItem method.

    To find out what method it is for you specifically, you'd check the wear item packet (packet 41) in your code.

    OfflineGromic

    • Member
    • **
    • Posts: 15
    • Thanks: +0/-0
      • View Profile
      • Short Grind
    Re: Adding Item Level Requirements.
    « Reply #2 on: June 01, 2016, 12:51:00 PM »
    Updated the post with the based used.

    Is that the packet 41, on the client?

    Sorry to ask more nub questions still mid learning process.
    « Last Edit: June 01, 2016, 05:17:43 PM by Gromic »

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: 718 Adding Item Level Requirements.
    « Reply #3 on: June 01, 2016, 08:41:46 PM »
    Updated the post with the based used.

    Is that the packet 41, on the client?

    Sorry to ask more nub questions still mid learning process.
    It's set from the client to the server.

    As you say it's a 718, there should be a method in an item class named "canWear" or similar. Should be in ItemConstants or ItemDefinitions or similar.
    That's where you'd add the code you have above

    OfflinexXSh0ckXx

    • Member
    • ****
    • Posts: 642
    • Thanks: +0/-0
      • View Profile
    Re: 718 Adding Item Level Requirements.
    « Reply #4 on: June 02, 2016, 03:04:12 AM »
    Highly preferred

    ItemDefinitions class, method getWearingSkillRequiriments()
    Code: [Select]
    if(getId() == ####) {
    itemRequiriments.put(Skills.ATTACK, 99);
    }

    Most level requirements are loaded within the cache, so, at its best you'd modify the level requirements in the cache.

    « Last Edit: June 02, 2016, 03:05:55 AM by xXSh0ckXx »
    Drop me a pm.

    They got money for wars, but can't feed the poors. - Tupac Shakur
    Old, but Gold.

    Offline[Owner] Tyler

    • Member
    • **
    • Posts: 5
    • Thanks: +0/-0
      • View Profile
    Re: 718 Adding Item Level Requirements.
    « Reply #5 on: June 08, 2016, 05:13:32 PM »
    Its easy, I can help you, add me on Skype: [HIDDEN]
    « Last Edit: June 09, 2016, 04:52:10 PM by [Owner] Tyler »

     

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