Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • hardcore22: are there any kind of silabsoft servers like back in the days i miss that
      May 25, 2020, 05:44:08 AM
    • Amcora: @ dr house contact me; greetings celien :)
      May 24, 2020, 03:16:21 PM
    • Amcora: Stop shouting around please
      May 24, 2020, 03:13:26 PM
    • iddsyou: PkOwnage OSRSPS [link]  Join us on Discord! [link]  Download: [link]
      May 17, 2020, 11:44:17 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:48:19 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:48:12 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:56 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:49 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:42 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:29 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:18:03 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:17:53 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:17:50 AM
    • Decimate Returns: Project Decimate 474 OSRS ; [link]
      May 13, 2020, 07:27:00 PM
    • hardcore22: are there any silabsoft servers left? of the good old days like hackscape
      May 12, 2020, 07:53:18 AM
    • iddsyou: yo guys check out this instagram post #pkownage  [link]
      May 06, 2020, 02:35:58 PM
    • fishingsheep: any servers like project catasrophe or frugoo scape been remade ?
      May 04, 2020, 05:01:00 PM
    • asshole_rule: relmitos the legend
      May 04, 2020, 04:28:54 PM
    • iddsyou: PkOwnage 317 OSRS, Vote4donor, [link] Download now: [link] Discord: [link]
      May 04, 2020, 11:15:11 AM
    • relmitos: is anyone familiar with 317 packet opcodes? Im confused about opcode 3 (wich appears to send wether or not the client window is currently focused). is it safe to ignore?
      May 03, 2020, 08:47:40 AM

    Author Topic: 718 Adding Item Level Requirements.  (Read 1889 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