Results 1 to 6 of 6
  1. #1
    Spectre11's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    203
    My Mood
    Blah

    [Fabs] XMLData.cs Soulbound Property

    I was wondering if someone had a XMLData.cs property that would suit the needs for this.
    Code:
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                if (args.Length == 0)
                {
                    player.SendHelp("Usage: /give <Itemname>");
                    return false;
                }
                string name = string.Join(" ", args.ToArray()).Trim();
                ushort objType;
                //creates a new case insensitive dictionary based on the XmlDatas
                Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(player.Manager.GameData.IdToObjectType,
                    StringComparer.OrdinalIgnoreCase);
                if (!icdatas.TryGetValue(name, out objType))
                {
                    player.SendError("Unknown type!");
                    return false;
                }
                if (!player.Manager.GameData.Items[objType].Secret || player.Client.Account.Rank >= 4)
                {
                    for (int i = 4; i < player.Inventory.Length; i++)
                        if (player.Inventory[i] == null)
                        {
                            player.Manager.GameData.Soulbound = true;
                            player.Inventory[i] = player.Manager.GameData.Items[objType];
                            player.UpdateCount++;
                            player.SaveToCharacter();
                            player.SendInfo("Success!");
                            break;
                        }
                }
                else
                {
                    player.SendError("Item cannot be given!");
                    return false;
                }
                return true;
            }
        }


    Thanks in advanced

  2. #2
    Slendergo's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Posts
    382
    Reputation
    17
    Thanks
    250
    My Mood
    Inspired
    Quote Originally Posted by Spectre11 View Post
    I was wondering if someone had a XMLData.cs property that would suit the needs for this.
    Code:
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                if (args.Length == 0)
                {
                    player.SendHelp("Usage: /give <Itemname>");
                    return false;
                }
                string name = string.Join(" ", args.ToArray()).Trim();
                ushort objType;
                //creates a new case insensitive dictionary based on the XmlDatas
                Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(player.Manager.GameData.IdToObjectType,
                    StringComparer.OrdinalIgnoreCase);
                if (!icdatas.TryGetValue(name, out objType))
                {
                    player.SendError("Unknown type!");
                    return false;
                }
                if (!player.Manager.GameData.Items[objType].Secret || player.Client.Account.Rank >= 4)
                {
                    for (int i = 4; i < player.Inventory.Length; i++)
                        if (player.Inventory[i] == null)
                        {
                            player.Manager.GameData.Soulbound = true;
                            player.Inventory[i] = player.Manager.GameData.Items[objType];
                            player.UpdateCount++;
                            player.SaveToCharacter();
                            player.SendInfo("Success!");
                            break;
                        }
                }
                else
                {
                    player.SendError("Item cannot be given!");
                    return false;
                }
                return true;
            }
        }


    Thanks in advanced
    this wont work, if u making ur object soulbound if given when some 1 reloads it will be unsoulbound

  3. #3
    Spectre11's Avatar
    Join Date
    May 2016
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    203
    My Mood
    Blah
    Quote Originally Posted by Slendergo View Post
    this wont work, if u making ur object soulbound if given when some 1 reloads it will be unsoulbound
    okay, thanks for telling me

  4. #4
    AzzyG's Avatar
    Join Date
    Aug 2016
    Gender
    male
    Location
    I Think The Worst Thing You Can Do About a Situation Is Nothing
    Posts
    1,732
    Reputation
    261
    Thanks
    476
    Guess that its solved. Spectre tell Joe or Luis

  5. #5
    MikeRaarupBirk's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    1,583
    Reputation
    38
    Thanks
    3,775
    My Mood
    Stressed
    @Joe @Luis /10 char

  6. #6
    Danny's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    9,617
    Reputation
    2835
    Thanks
    3,002
    My Mood
    Aggressive
    Quote Originally Posted by MikeRaarupBirk View Post
    @Joe @Luis /10 char
    Racking up the post count with your help :3

    /closed solved

    I am not a middleman nor do I buy/sell anything. If you are being contacted by someone off-site from MPGH then it's not me! Please report these to me via PM. Don't be stupid, think first.

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

    MikeRaarupBirk (08-08-2016)

Similar Threads

  1. Network adapter Properties.
    By Angelina in forum Hardware & Software Support
    Replies: 2
    Last Post: 09-18-2010, 07:58 PM
  2. All m9's Property of Mpgh [Leech Proof]
    By wescooldude3 in forum Combat Arms Mods & Rez Modding
    Replies: 17
    Last Post: 08-19-2010, 09:40 PM
  3. change xp system properties ?
    By CodeHPro in forum General Game Hacking
    Replies: 1
    Last Post: 02-16-2010, 07:49 PM
  4. My cock is Community Property
    By Gourav2122 in forum Entertainment
    Replies: 9
    Last Post: 07-27-2009, 11:11 PM
  5. Gourav's cock is Community Property
    By supernova2131 in forum General
    Replies: 17
    Last Post: 07-27-2009, 10:36 PM