Results 1 to 6 of 6
  1. #1
    dewewe's Avatar
    Join Date
    Feb 2017
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    3

    RotMG [NR-Core] Vault Slot Unlocker + Character Slot Unlocker

    I my self wanted this in my game for a very long time, so here it is!

    You must add this into dat1 or whatever you use.
    -----------------------------------------------------------------------------------
    <Object type="0x32a" id="Character Slot Unlocker">
    <Class>Equipment</Class>
    <Item/>
    <Texture>
    <File>lofiObj3</File>
    <Index>0x5a0</Index>
    </Texture>
    <SlotType>10</SlotType>
    <Description>Unlocks a character slot! Once activated, do not change maps before the confirmation message appears or the item might disappear!</Description>
    <Sound>use_potion</Sound>
    <Activate>UnlockCharacter</Activate>
    <Consumable/>
    <!--<Soulbound/>-->
    <BagType>4</BagType>
    </Object>
    <Object type="0x32b" id="Vault Chest Unlocker">
    <Class>Equipment</Class>
    <Item/>
    <Texture>
    <File>lofiObj3</File>
    <Index>0x5a1</Index>
    </Texture>
    <SlotType>10</SlotType>
    <Description>Unlocks a vault chest! Once activated, do not change maps before the confirmation message appears or the item might disappear!</Description>
    <Sound>use_potion</Sound>
    <Activate>UnlockVault</Activate>
    <Consumable/>
    <!--<Soulbound/>-->
    <BagType>4</BagType>
    </Object>
    -----------------------------------------------------------------------------------

    go to xmldescriptors.cs and search for public enum ActivateEffects

    -----------------------------------------------------------------------------------------

    add this

    UnlockVault,
    UnlockCharacter,


    ------------------------------------------------------------------------------------


    Go to player.useitem.cs and search for private void Activate(RealmTime time, Item item, Position target)

    ------------------------------------------------------------------------------------

    add this under Activate

    case ActivateEffects.UnlockVault:
    AEUnlockVault(time, item, target, eff);
    break;
    case ActivateEffects.UnlockCharacter:
    AEUnlockCharacter(time, item, target, eff);
    break;


    ---------------------------------------------------------------------------------

    now go below and add this

    private void AEUnlockVault(RealmTime time, Item item, Position target, ActivateEffect eff)
    {
    var db = Manager.Database;
    var acc = Client.Account;
    var availableSlot = Inventory.GetAvailableInventorySlot(item);

    if (!(Owner is Vault))
    {
    SendInfo("Vault Slot Unlocked!");
    Manager.Database.CreateChest(acc);
    return;
    }
    SendError("You cannot use a vault unlocker in vault!");
    Inventory[availableSlot] = item;
    return;
    }

    private void AEUnlockCharacter(RealmTime time, Item item, Position target, ActivateEffect eff)
    {
    var db = Manager.Database;
    var acc = Client.Account;

    Manager.Database.CreateCharacterSlot(acc);
    SendInfo("Character Slot Unlocked!");
    return;
    }


    hopefully this should work. bye
    Last edited by dewewe; 01-09-2020 at 07:07 PM.

  2. The Following 2 Users Say Thank You to dewewe For This Useful Post:

    Daemonmann (01-21-2020),mmmm22 (05-31-2022)

  3. #2
    reynkkko's Avatar
    Join Date
    Dec 2016
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    What does this do and how do I use it?

  4. #3
    Riigged's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Location
    no
    Posts
    3,846
    Reputation
    401
    Thanks
    10,254
    My Mood
    Devilish
    Quote Originally Posted by reynkkko View Post
    What does this do and how do I use it?
    its for adding 2 items; a Character Slot Unlocker and Vault Chest Unlocker, char slot unlocker will grant you +1 char slot when consuming, and vault chest unlocker grants +1 vault chest when consuming...

    9999% pointless if you don't host a public server though, its really good thing to have if you run a server though as u can use it for giveaways or just simply add it to the loot tables for realm events or something

     








  5. #4
    dewewe's Avatar
    Join Date
    Feb 2017
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    3
    Quote Originally Posted by Riigged View Post
    its for adding 2 items; a Character Slot Unlocker and Vault Chest Unlocker, char slot unlocker will grant you +1 char slot when consuming, and vault chest unlocker grants +1 vault chest when consuming...

    9999% pointless if you don't host a public server though, its really good thing to have if you run a server though as u can use it for giveaways or just simply add it to the loot tables for realm events or something
    it is pointless if your not hosting it publicly, but i wanted people to use this on their servers :P

  6. #5
    IceCubeHCC's Avatar
    Join Date
    Jun 2020
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    yeah but where do i add it,cuz im confused

  7. #6
    Invader_Zim's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    Atlas 2
    Posts
    546
    Reputation
    10
    Thanks
    300
    My Mood
    Tired
    Quote Originally Posted by IceCubeHCC View Post
    yeah but where do i add it,cuz im confused
    It states where to add everything in the post. The XML objects are self explanatory, add descriptors for the new active effects, then the code for those effects.

    My weapon is a backpack.