|
|
I haven't seen this released yet, but probably has, though I haven't seen many RSPS with this. I've been running through enum params list for Matrix 592, and added this into my server. Thought I'd share with you guys, if anyone is interested.
Appearence.java
Add the following:
Code:public static final int HAIR_WITH_HAT_PARAM = 790; public static final int HAIR_WITH_FACE_MASK_PARAM = 791; public static final int MALE_HAIR_STRUCT_LOOKUP = 2338; public static final int MALE_HAIR_SLOT_LOOKUP = 2339; public static final int FEMALE_HAIR_STRUCT_LOOKUP = 2341; public static final int FEMALE_HAIR_SLOT_LOOKUP = 2342;Under generateAppearenceData() {Code:public int getHairParam(int baseStyle) { int hairLookup = ClientScriptMap.getMap(male ? MALE_HAIR_SLOT_LOOKUP : FEMALE_HAIR_SLOT_LOOKUP).getIntValue(baseStyle); return GeneralRequirementMap.getMap(ClientScriptMap.getMap(male ? MALE_HAIR_STRUCT_LOOKUP : FEMALE_HAIR_STRUCT_LOOKUP).getIntValue(hairLookup)).getIntValue(HAIR_WITH_HAT_PARAM); }
You need to replace the entire code for item = player.getEquipment().getItems().get(Equipment.SLO T_HAT);
Code:item = player.getEquipment().getItems().get(Equipment.SLOT_HAT); if (styles[0] != -1 && (item == null || !Equipment.hideHair(item))) { if(item == null) { stream.writeShort(0x100 + styles[0]); } else { int hatHairStyle = getHairParam(styles[0]); if(hatHairStyle != -1) { stream.writeShort(0x100 + hatHairStyle); } else { stream.writeByte(0); } } } else { stream.writeByte(0); }
![]()
Last edited by Natalynn; Yesterday at 08:35 PM.

At least use all the variables you're creating properly if you're going to copy paste them from somewhere (Yes I know they are copy pasted from somewhere since I have identical variable names in my project):
Code:private int getHatHairStyle(int baseStyle, boolean isFaceMask) { EnumDefinitions lookup = EnumDefinitions.getEnum(male ? MALE_HAIR_SLOT_LOOKUP : FEMALE_HAIR_SLOT_LOOKUP); int slot = lookup.getIntValue(baseStyle); EnumDefinitions structLookup = EnumDefinitions.getEnum(male ? MALE_HAIR_STRUCT_LOOKUP : FEMALE_HAIR_STRUCT_LOOKUP); int structID = structLookup.getIntValue(slot); return StructDefinitions.getStruct(structID).getIntValue(isFaceMask ? HAIR_WITH_FACE_MASK_PARAM : HAIR_WITH_HAT_PARAM, -1); }Code:item = player.getEquipment().get(Equipment.HEAD); if (lookI[0] != -1 && (item == null || !Equipment.hideHair(item))) { if (item == null) stream.writeShort(0x100 + lookI[0]); else { int hatHairStyle = getHatHairStyle(lookI[0], item.getDefinitions().faceMask()); if (hatHairStyle != -1) stream.writeShort(0x100 + hatHairStyle); else stream.writeByte(0); } } else stream.writeByte(0);Code:public boolean faceMask() { return getParamVal(625) == 1; }

| « Low-Effort Wiki Table Scraping W/ Sublime Text & Regex Replacement | - » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |
| Tags for this Thread |