Results 1 to 4 of 4
  1. #1
    Transferred's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    766
    Reputation
    31
    Thanks
    447
    My Mood
    Buzzed

    Thumbs up [TUTORIAL] Consumable Skins

     



    Follow this tutorial for the core code: https://www.mpgh.net/forum/showthread.php?t=907879

    and to make skins actually consumable you need to do this.

    in db>descriptors.cs

    add "UnlockSkin" under ClearConditionEffectSelf,
    like this:


    Wserver>Realm>Entities>Player>

    and open player.useitem.cs
    find case activate.unlockportals
    add this under break;

    Code:
                        case ActivateEffects.UnlockSkin:
                            if (item.SkinType != 0 || item.SkinType != Skins)
                            {
                                if (item.PlayerClassType == client.Character.ObjectType)
                                {
                                    Skins = item.SkinType;
                                    SendInfo("Successfully changed skin!");
                                    SaveToCharacter();
                                }
                                else
                                {
                                    SendError("Wrong Class!");
                                    success = false;
                                }
                                SaveToCharacter();
                            }
                            else
                            {
                                success = false;
                                SendError("Invalid skin type.");
                                SaveToCharacter();
                            }
                            break;
    Next go to your xml's (preferably dat20.xml because it contains the xmls that are "core")

    add this example skin

    Code:
      <Object id="Gentleman Skin" ext="true">
        <Class>Equipment</Class>
        <Item/>
        <AnimatedTexture>
          <File>playerskins</File>
          <Index>28</Index>
        </AnimatedTexture>
        <SlotType>10</SlotType>
        <Description>Gentleman Skin.</Description>
        <SkinType>0x035c</SkinType>
        <Activate>UnlockSkin</Activate>
        <Consumable />
        <PlayerClassType>782</PlayerClassType>
        <BagType>1</BagType>
        <DisplayId>Gentleman</DisplayId>
      </Object>
    Ok lets break it down

    Code:
        <AnimatedTexture>
          <File>playerskins</File>
          <Index>28</Index>
        </AnimatedTexture>
    Open dat36.xml and look for the skin you wish to use and find the code that looks like that ^^
    so for example in dat36.xml Gentleman skin looks like this

    Code:
      <Object type="0x035c" id="Gentleman">
        <Skin/>
        <Class>Skin</Class>
        <AnimatedTexture>
          <File>playerskins</File>
          <Index>28</Index>
        </AnimatedTexture>
        <PlayerClassType>782</PlayerClassType>
        <UnlockLevel>0</UnlockLevel>
        <DisplayId>Gentleman</DisplayId>
      </Object>
    Next

    Code:
    <PlayerClassType>782</PlayerClassType>
    that is just simply the class that the skin is used for.

    Any questions post them

     
    Snuffleupagus for the core skin code (client + server)

    Transferred for making them work

    Travoos for showing me the cool gif program
    Last edited by Transferred; 04-07-2016 at 03:03 PM.

  2. The Following User Says Thank You to Transferred For This Useful Post:

    ImNotMakdoon (04-07-2016)

  3. #2
    Riigged's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    no
    Posts
    3,846
    Reputation
    401
    Thanks
    10,254
    My Mood
    Devilish
    U forgot about adding "UnlockSkin" in descriptors.cs

     








  4. The Following User Says Thank You to Riigged For This Useful Post:

    Transferred (04-07-2016)

  5. #3
    Transferred's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    766
    Reputation
    31
    Thanks
    447
    My Mood
    Buzzed
    Quote Originally Posted by Riigged View Post
    U forgot about adding "UnlockSkin" in descriptors.cs
    lol sure they will figure that out themselves

  6. #4
    Chiroy's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    127.0.0.1:80
    Posts
    1,500
    Reputation
    28
    Thanks
    2,295
    Quote Originally Posted by Transferred View Post


    lol sure they will figure that out themselves
    they won't m8, trust me.

  7. The Following User Says Thank You to Chiroy For This Useful Post:

    BlackRayquaza (04-07-2016)

Similar Threads

  1. Does the Firefly skin Suck?
    By Dave84311 in forum General
    Replies: 11
    Last Post: 02-10-2007, 06:49 AM
  2. New Forum Skin?
    By Dave84311 in forum General
    Replies: 0
    Last Post: 03-18-2006, 10:17 AM
  3. New Warrock Skin Stuff
    By Kyojiro in forum WarRock - International Hacks
    Replies: 17
    Last Post: 02-20-2006, 09:55 AM
  4. warrock weapon skin hack
    By slash83 in forum WarRock - International Hacks
    Replies: 45
    Last Post: 02-10-2006, 04:43 PM
  5. New Skin
    By arunforce in forum Suggestions, Requests & General Help
    Replies: 8
    Last Post: 01-23-2006, 06:21 AM