Results 1 to 14 of 14
  1. #1
    KieronZeCoder69's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    On my computer
    Posts
    439
    Reputation
    20
    Thanks
    219
    My Mood
    Aggressive

    How to patch Duping and weapon slot glitch on your private server!

    this is already patched on doomed realms (i think)
    but if your server hasn't patched it yet your in for luck

    Step 1.
    Locate to /SOURCE\wServer\realm\entities\Player
    and edit player.trade.cs with notepad++ (or whatever you use)

    Step 2.
    Ctrl + F
    private void DoTrade()

    Step 3.
    replace everything under that with this
     
    private void DoTrade()
    {
    string msg = "Trade Successful!";
    string failmsg = "An error occured while trading!";
    var thisItems = new List<Item>();
    var targetItems = new List<Item>();

    // make sure trade targets are valid
    if (tradeTarget == null || Owner == null || tradeTarget.Owner == null || Owner != tradeTarget.Owner)
    {
    if (this != null)
    psr.SendPacket(new TradeDonePacket
    {
    Result = 1,
    Message = failmsg
    });

    if (tradeTarget != null)
    tradeTarget.psr.SendPacket(new TradeDonePacket
    {
    Result = 1,
    Message = failmsg
    });

    //TODO - logThis
    return;
    }

    // get trade items
    for (int i = 4; i < Inventory.Length; i++)
    {
    if (trade[i] && !Inventory[i].Soulbound)
    {
    thisItems.Add(Inventory[i]);
    Inventory[i] = null;
    UpdateCount++;

    // save this trade info
    if (itemnumber1 == 0)
    {
    items1 = items1 + " " + thisItems[itemnumber1].ObjectId;
    }
    else if (itemnumber1 > 0)
    {
    items1 = items1 + ", " + thisItems[itemnumber1].ObjectId;
    }
    itemnumber1++;
    }


    if (tradeTarget.trade[i] && !tradeTarget.Inventory[i].Soulbound)
    {
    targetItems.Add(tradeTarget.Inventory[i]);
    tradeTarget.Inventory[i] = null;
    tradeTarget.UpdateCount++;

    // save target trade info
    if (itemnumber2 == 0)
    {
    items2 = items2 + " " + targetItems[itemnumber2].ObjectId;
    }
    else if (itemnumber2 > 0)
    {
    items2 = items2 + ", " + targetItems[itemnumber2].ObjectId;
    }
    itemnumber2++;
    }
    }

    // move thisItems -> tradeTarget
    for (int j = thisItems.Count - 1; j >= 0; j--)
    for (int i = 0; i < tradeTarget.Inventory.Length; i++)
    {
    if ((tradeTarget.SlotTypes[i] == 0 &&
    tradeTarget.Inventory[i] == null) ||
    (thisItems[j] != null &&
    tradeTarget.SlotTypes[i] == thisItems[j].SlotType &&
    tradeTarget.Inventory[i] == null))
    {
    tradeTarget.Inventory[i] = thisItems[j];
    thisItems.RemoveAt(j);
    break;
    }
    }

    // move tradeItems -> this
    for (int j = targetItems.Count - 1; j >= 0; j--)
    for (int i = 0; i < Inventory.Length; i++)
    {
    if ((SlotTypes[i] == 0 &&
    Inventory[i] == null) ||
    (targetItems[j] != null &&
    SlotTypes[i] == targetItems[j].SlotType &&
    Inventory[i] == null))
    {
    Inventory[i] = targetItems[j];
    targetItems.RemoveAt(j);
    break;
    }
    }

    // check for lingering items
    if (thisItems.Count > 0 ||
    targetItems.Count > 0)
    {
    msg = "An error occured while trading!";
    }

    // trade successful, notify and save
    psr.SendPacket(new TradeDonePacket
    {
    Result = 1,
    Message = msg
    });
    tradeTarget.psr.SendPacket(new TradeDonePacket
    {
    Result = 1,
    Message = msg
    });
    SaveToCharacter();
    psr.Save();
    tradeTarget.SaveToCharacter();
    tradeTarget.psr.Save();

    // clean up
    items1 = "";
    items2 = "";
    itemnumber1 = 0;
    itemnumber2 = 0;
    UpdateCount++;
    tradeTarget.UpdateCount++;
    tradeTarget.tradeTarget = null;
    tradeTarget.trade = null;
    tradeTarget.tradeAccepted = false;
    tradeTarget = null;
    trade = null;
    tradeAccepted = false;
    }
    }
    }


    Step 4.
    Scroll all the way back to the top
    untill you see something like this:
    bool[] trade;
    bool tradeAccepted;

    Step 5.
    under bool tradeAccepted;
    paste this in
     
    private int itemnumber1;
    private int itemnumber2;
    public static string items1 { get; set; }
    public static string items2 { get; set; }


    it should now look like this


    @Dragonlord3344 for doomed realm source
    @me for being botherd to post this
    @BlackRayquaza for annoying me on skype <3

    edit
    post any errors, i can help

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

    Dragonlord3344 (10-17-2014),Mitcheel (10-19-2014),Omniraptor (10-18-2014),sgrawsreghawrhgwrhgr (10-18-2014),The Real DethStrike (12-07-2014)

  3. #2
    BlackRayquaza's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    574
    Reputation
    10
    Thanks
    186
    My Mood
    In Love
    Quote Originally Posted by KieronZeCoder69 View Post
    Ctrl + F
    @C453 don't rage plez
    YEP cock

  4. #3
    KieronZeCoder69's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    On my computer
    Posts
    439
    Reputation
    20
    Thanks
    219
    My Mood
    Aggressive
    Quote Originally Posted by BlackRayquaza View Post
    @C453 don't rage plez
    forgot credits for CTRL + F

  5. The Following User Says Thank You to KieronZeCoder69 For This Useful Post:

    SaltyButSpeedy (10-20-2014)

  6. #4
    Stellar Spark's Avatar
    Join Date
    Jun 2013
    Gender
    female
    Posts
    724
    Reputation
    35
    Thanks
    799
    For every patch to duping there are 5 other methods that can still dupe...

    While I can't deny that this could be legitimately fixing the weapon slot glitch, the only way to patch duping is to redo the whole source, and even then there needs to be some checks to make sure it doesn't happen.

  7. The Following 3 Users Say Thank You to Stellar Spark For This Useful Post:

    filenub (10-22-2014),lkdjnfoskjednfblksjdfn (03-23-2017),SaltyButSpeedy (10-20-2014)

  8. #5
    KieronZeCoder69's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    On my computer
    Posts
    439
    Reputation
    20
    Thanks
    219
    My Mood
    Aggressive
    Quote Originally Posted by ProHackBot999 View Post
    For every patch to duping there are 5 other methods that can still dupe...

    While I can't deny that this could be legitimately fixing the weapon slot glitch, the only way to patch duping is to redo the whole source, and even then there needs to be some checks to make sure it doesn't happen.
    yeah, no doubt there is duping methods.
    but they are harder, so i am just releasing it so people won't dupe like crazy
    considering this one is so easy to do

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

    Mitcheel (10-19-2014),SaltyButSpeedy (10-20-2014)

  10. #6
    sgrawsreghawrhgwrhgr's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    UK
    Posts
    516
    Reputation
    10
    Thanks
    727
    My Mood
    Angelic
    This did indeed fix the slot glitch for me, nothing better to say then a thanks.

  11. The Following User Says Thank You to sgrawsreghawrhgwrhgr For This Useful Post:

    SaltyButSpeedy (10-20-2014)

  12. #7
    KieronZeCoder69's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    On my computer
    Posts
    439
    Reputation
    20
    Thanks
    219
    My Mood
    Aggressive
    Quote Originally Posted by Nobody77 View Post
    This did indeed fix the slot glitch for me, nothing better to say then a thanks.
    your welcome

  13. The Following User Says Thank You to KieronZeCoder69 For This Useful Post:

    SaltyButSpeedy (10-20-2014)

  14. #8
    Omniraptor's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Posts
    278
    Reputation
    13
    Thanks
    431
    My Mood
    Inspired
    This is good tutorial, thanks man.
    any news on dj manual knees?

  15. The Following User Says Thank You to Omniraptor For This Useful Post:

    SaltyButSpeedy (10-20-2014)

  16. #9
    KieronZeCoder69's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    On my computer
    Posts
    439
    Reputation
    20
    Thanks
    219
    My Mood
    Aggressive
    Quote Originally Posted by Darkfark View Post
    This is good tutorial, thanks man.
    no problem dude

  17. The Following User Says Thank You to KieronZeCoder69 For This Useful Post:

    SaltyButSpeedy (10-20-2014)

  18. #10
    Mitcheel's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    Rotterdam
    Posts
    338
    Reputation
    10
    Thanks
    139
    My Mood
    Goofy
    Great tut, thanks alot Kieron

  19. The Following User Says Thank You to Mitcheel For This Useful Post:

    SaltyButSpeedy (10-20-2014)

  20. #11
    Dragonlord3344's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Posts
    211
    Reputation
    10
    Thanks
    29
    I hope to never see the item weapon glitch again.

  21. #12
    KieronZeCoder69's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    On my computer
    Posts
    439
    Reputation
    20
    Thanks
    219
    My Mood
    Aggressive
    Quote Originally Posted by Dragonlord3344 View Post
    I hope to never see the item weapon glitch again.
    you won't now from this sweet ass tutorial

  22. #13
    filenub's Avatar
    Join Date
    May 2014
    Gender
    female
    Location
    ---
    Posts
    405
    Reputation
    10
    Thanks
    525
    Quote Originally Posted by KieronZeCoder69 View Post
    yeah, no doubt there is duping methods.
    but they are harder, so i am just releasing it so people won't dupe like crazy
    considering this one is so easy to do
    Ironically you released a duping method that you could do on the MMOE source. I guess you had a change of heart.

  23. #14
    KieronZeCoder69's Avatar
    Join Date
    Jun 2014
    Gender
    male
    Location
    On my computer
    Posts
    439
    Reputation
    20
    Thanks
    219
    My Mood
    Aggressive
    Quote Originally Posted by filenub View Post
    Ironically you released a duping method that you could do on the MMOE source. I guess you had a change of heart.
    yes <3 XD gotta release it then patch it

Similar Threads

  1. How to make and edit your private server [BASIC & NOOB FRIENDLY]
    By Trollaux in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 24
    Last Post: 07-19-2016, 10:17 PM
  2. How to add enemy behaviors (make them attack and move) into your private server AUDIO
    By dthnider in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 6
    Last Post: 01-19-2015, 01:31 AM
  3. How to money hack and weapon hack on Cod5 LSCnR Server
    By Beskie in forum Grand Theft Auto San Andreas Multi Player (SAMP) Hacks
    Replies: 1
    Last Post: 07-01-2013, 07:03 AM
  4. HOW TO EXCHANGE ITEMS AND WEAPONS FROM ACC TO OTHER ONE
    By Ahmed1030 in forum CrossFire Discussions
    Replies: 9
    Last Post: 06-25-2012, 03:24 PM
  5. [Help Request] |HOTD VIP V1| please how to use explosives and weapon
    By william huard in forum Combat Arms Help
    Replies: 1
    Last Post: 04-08-2012, 07:33 PM