Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Scenic.'s Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Wales, UK
    Posts
    589
    Reputation
    149
    Thanks
    209

    Mega-Thread - All Tutorials In One Thread

    I'll be personally adding ALL tutorials to this thread within the next 24hrs, I'll also add a list of current releases if you'd like!


    Firstly it's important to understand that for most of the things on this thread you're going to need the following tools:
    Net Reflector: Download Here - or you can just find a "Free" version on google!
    Reflexil: Download Here 100% free to download and use!
    Now that you have those two you could also get Visual basic's to help you read the code but it's not NEEDED.

    Repetitive tasks
     

    When compiling you're going to need to select compiler version "Unity/Silverlight" or you'll get errors!


     

    To save your assembly you'll need to right click on "Assemblycsharp.dll" in reflector, now down to reflexil, save as and save it.




    Tutorials

     
    Backup AssemblyCsharp.dll and then open it in reflector
    Open tools and click reflexil (if not already open)
    Find "CodeHatch.Thrones.Stamina"

    Inside that find "StaminaManager"

    Inside that find "Update()"

    Right click in instructions on the right and click "Replace all with code"

    Replace this selection

    with this code
    Code:
    public void Update()
    {
        this._stamina += this.StaminaRecovery;
    }
    So now you have this

    Open Field stubs and comment out StaminaTimer Timer; with two / (//) like so

    Compile, Save the Assembly and test in-game.

     

    Backup AssemblyCsharp.dll and then open it in reflector
    Open tools and click reflexil (if not already open)
    Find "CodeHatch.Thrones.Tax"

    Find "TaxCollector"

    Find "IsTaxed(Player)"

    Right click in instructions on the right and click "Replace all with code"

    Replace this selection

    with this code
    Code:
            static bool IsTaxed(CodeHatch.Engine.Networking.Player player)
            {
                return false;
            }
    So now you have this

    Open Method stubs and comment out the following area's with two / (//)

    Now you should have this

    Next open "Field stubs" and comment out

    Like so

    Compile, Save the Assembly and test in-game.

     

    Backup AssemblyCsharp.dll and then open it in reflector
    Open tools and click reflexil (if not already open)
    Open "-"

    Find "Resource Handler"

    Find "AddPending(ResourceAmount)"

    Right click in instructions on the right and click "Replace all with code"

    SELECT ALL THE CODE

    Replace all the code with the following code
     
    Code:
    #region " Imports "
    using System;
    using System.Collections.Generic;
    using System.Text;
    using CodeHatch;
    using CodeHatch.Engine.Core.Cache;
    using CodeHatch.Inventory.Blueprints;
    using CodeHatch.Networking.Events;
    using CodeHatch.Networking.Events.Item;
    using System.Linq;
    using System.Runtime.CompilerServices;
    using UnityEngine;
    #endregion 
    
    #region " Referenced assemblies "
    // - UnityEngine v0.0.0.0
    // - mscorlib v2.0.0.0
    // - uLink v0.0.0.0
    // - System.Core v3.5.0.0
    // - System v2.0.0.0
    // - Newtonsoft.Json v4.5.0.0
    // - SteamworksManaged v1.0.0.0
    // - ICSharpCode.SharpZipLib v0.86.0.518
    // - JsonFx.Json v1.4.1003.3008
    // - Ionic.Zip.Reduced v1.9.1.9000
    // - protobuf-net v2.0.0.668
    // - POpusCodec v1.0.0.0
    // - NSpeex v1.1.3.0
    // - KGFUtils.Settings v1.0.4512.18287
    // - SmartAssembly.Attributes v6.0.0.0
    // - mscorlib v2.0.5.0
    // - Assembly-CSharp v0.0.0.0
    // - Assembly-CSharp v0.0.0.0
    #endregion 
    
    class ResourceHandler
    {
        // Limited support!
        // You can only reference methods or fields defined in the class (not in ancestors classes)
        // Fields and methods stubs are needed for compilation purposes only.
        // Reflexil will automaticaly map current type, fields or methods to original references.
        public void AddPending(ResourceAmount resource)
        {
            if (resource.Amount != 0f)
            {
                if (this.BeforeResourceAdded != null)
                {
                    this.BeforeResourceAdded(resource);
                }
                if (this._pendingResourceChanges.ContainsKey(resource.resourceType))
                {
                Dictionary<ResourceType, float> dictionary = null;
                ResourceType resourceType = resource.resourceType;
                float num = dictionary[resourceType];
                (dictionary = this._pendingResourceChanges)[resourceType = resource.resourceType] = num + (resource.Amount);
                  }
                  else if (resource.resourceType == ResourceType.Stone)
                  {
                  this._pendingResourceChanges.Add(resource.resourceType, 10000f);
                  }
                  else
                  {
                  this._pendingResourceChanges.Add(resource.resourceType, 1000f);
                  }
            }
        }
    
        
        #region " Fields stubs "
        // Do not add or update any field. If compilation fails because of a field declaration, comment it
        System.Action<ResourceAmount> BeforeResourceAdded;
        float UpdateRate;
        float updateTimer;
        System.Collections.Generic.Dictionary<CodeHatch.ResourceType, float> _pendingResourceChanges;
        #endregion 
    }

    Compile, Save the Assembly and test in-game.
     

    Within this code the section here
    Code:
                  else if (resource.resourceType == ResourceType.Stone)
                  {
                  this._pendingResourceChanges.Add(resource.resourceType, 10000f);
                  }
                  else
                  {
                  this._pendingResourceChanges.Add(resource.resourceType, 1000f);
    You can change the receive resources amount for specific items, for example 10000 wood from one hit could be done like so
    Code:
                  else if (resource.resourceType == ResourceType.Wood)
                  {
                  this._pendingResourceChanges.Add(resource.resourceType, 10000f);
                  }
                  else
                  {
                  this._pendingResourceChanges.Add(resource.resourceType, 1000f);
    You could also set values for mutliple resource types like so
    Code:
                  else if (resource.resourceType == ResourceType.Stone)
                  {
                  this._pendingResourceChanges.Add(resource.resourceType, 10000f);
                  }
                  else if (resource.resourceType == ResourceType.Stick)
                  {
                  this._pendingResourceChanges.Add(resource.resourceType, 5000f);
                  }
                  else
                  {
                  this._pendingResourceChanges.Add(resource.resourceType, 1000f);
    Here is a list of other resource types that you could edit
    Code:
            Wood,
            Stone,
            Metal,
            Granite,
            Marble,
            Oil,
            Plastic,
            Glass,
            Aluminum,
            Titanium,
            Sand,
            Dirt,
            IronOre,
            OilShale,
            Clay,
            Gravel,
            SandStone,
            TitaniumOre,
            ObsidianOre,
            Sulphur,
            VoltronicOre,
            SaltexOre,
            GarrisonOre,
            CrystalisOre,
            DarkMatterShale,
            IronIngot,
            SteelIngot,
            TitaniumIngot,
            GrapheneIngot,
            MonolithiumIngot,
            SaltexPowder,
            ObsidianPowder,
            DarkPowder,
            Steel,
            Graphene,
            Monolithium,
            DarkSulphur,
            Antimatter,
            Water,
            Fiber,
            RawMeat,
            Grass,
            Grain,
            Charcoal,
            Wool,
            Fat,
            Bone,
            Heart,
            Blood,
            BearHide,
            LeatherHide,
            RawBird,
            Flowers,
            Roses,
            Stick,
            Bread,
            CookedMeat,
            CookedBird,
            Apple,
            Berry,
            Cabbage,
            Carrot,
            PlayerHead,
            BrownBeans,
            BatWing,
            DeerSkin,
            DuckFeet,
            Fang,
            Feather,
            Flax,
            Fuse,
            Liver,
            RabbitPelt,
            Diamond,
            GodTears,
            WolfPelt,
            StoneBlock,
            BakedClay,
            FireWater,
            BurntMeat,
            BurntBird,
            Count
        }
    }
    namespace CodeHatch
    {
        using System;
    
        public enum ResourceType
        {
            Wood,
            Stone,
            Metal,
            Granite,
            Marble,
            Oil,
            Plastic,
            Glass,
            Aluminum,
            Titanium,
            Sand,
            Dirt,
            IronOre,
            OilShale,
            Clay,
            Gravel,
            SandStone,
            TitaniumOre,
            ObsidianOre,
            Sulphur,
            VoltronicOre,
            SaltexOre,
            GarrisonOre,
            CrystalisOre,
            DarkMatterShale,
            IronIngot,
            SteelIngot,
            TitaniumIngot,
            GrapheneIngot,
            MonolithiumIngot,
            SaltexPowder,
            ObsidianPowder,
            DarkPowder,
            Steel,
            Graphene,
            Monolithium,
            DarkSulphur,
            Antimatter,
            Water,
            Fiber,
            RawMeat,
            Grass,
            Grain,
            Charcoal,
            Wool,
            Fat,
            Bone,
            Heart,
            Blood,
            BearHide,
            LeatherHide,
            RawBird,
            Flowers,
            Roses,
            Stick,
            Bread,
            CookedMeat,
            CookedBird,
            Apple,
            Berry,
            Cabbage,
            Carrot,
            PlayerHead,
            BrownBeans,
            BatWing,
            DeerSkin,
            DuckFeet,
            Fang,
            Feather,
            Flax,
            Fuse,
            Liver,
            RabbitPelt,
            Diamond,
            GodTears,
            WolfPelt,
            StoneBlock,
            BakedClay,
            FireWater,
            BurntMeat,
            BurntBird,
    NOTE: Some of these have not been tested and may have bad effects on the server/client, use at own risk





    More tutorials will be added tomorrow, PM me any guides you'd like me to add that you've written, add my skype for any help!
    Last edited by Hunter; 01-26-2016 at 09:56 AM.

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

    devprogrammer112 (03-25-2015),goldenstyle (03-25-2015),ImperatorX (03-25-2015),Khyy (03-25-2015),kosleada22 (03-25-2015),Njowils (06-15-2015),Salads47 (03-28-2015),TheBossOfMC (06-08-2015),Z-Nation (09-13-2015)

  3. #2
    goldenstyle's Avatar
    Join Date
    Mar 2015
    Gender
    male
    Location
    Germany
    Posts
    37
    Reputation
    10
    Thanks
    2
    My Mood
    Amazed
    Nice man! Gonna figure out how to do some things that i want

    VOTE FOR STICKY!

  4. #3
    Scenic.'s Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Wales, UK
    Posts
    589
    Reputation
    149
    Thanks
    209
    Quote Originally Posted by goldenstyle View Post
    Nice man! Gonna figure out how to do some things that i want

    VOTE FOR STICKY!
    Haha! Thanks man!, Hopefully this does get a sticky so that people can find it easily when this section gets busier!
    If ANYONE needs anything you can contact me on Skype and I'll receive your message in college!

  5. #4
    Khyy's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,320
    Reputation
    107
    Thanks
    1,493
    Great to see you giving back what you learned around the forums, on your own and with golden boy. Hope this gets stickied to help newcomers!

  6. #5
    robme's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    m
    Posts
    70
    Reputation
    10
    Thanks
    3
    My Mood
    Amazed
    Ty soo much !!!!! i prefer tutorial with pics than the freaking hack it self.. gotta work for it ya know what i mean? ty soo much brah

  7. #6
    LegendZero88's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    3
    when i compile stamine i get a error. it want a class a reference or something.

  8. #7
    kkmzzang89's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    dddddddddddd
    Posts
    13
    Reputation
    10
    Thanks
    0
    when i compile stamine i get a error. < yeah me too stamina can't compile 'EntityRigidbodyManager get_Manager()' get_manager this error 61line

  9. #8
    devprogrammer112's Avatar
    Join Date
    Mar 2015
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    354
    I vote for sticky too, but could you please add credits to their respectful authors?

  10. #9
    Scenic.'s Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Wales, UK
    Posts
    589
    Reputation
    149
    Thanks
    209
    Quote Originally Posted by devprogrammer112 View Post
    I vote for sticky too, but could you please add credits to their respectful authors?
    I would gladly provide credits to the respective coders, except technically speaking I'm not releasing anything and the tutorial is in my own words.
    If you'd like to be credited for the resource section then just say so and I'll do it.

    - - - Updated - - -

    Quote Originally Posted by kkmzzang89 View Post
    when i compile stamine i get a error. < yeah me too stamina can't compile 'EntityRigidbodyManager get_Manager()' get_manager this error 61line
    Check back and make sure you've not made any mistakes.
    Last edited by Hunter; 05-28-2016 at 02:37 PM.

  11. #10
    BadgerOnViagra's Avatar
    Join Date
    Dec 2014
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    Why does my code always reset even after I compile it? Please help!

  12. #11
    Salads47's Avatar
    Join Date
    Mar 2015
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    My Mood
    Drunk
    First of all thank you for the tutorials!

    I'm wondering the in-depth of why some variables aren't able to be used anymore?

    In this case, the
    Code:
    StaminaTimer Timer;
    and
    Code:
    this.Stamina
    aren't able to be used anymore... why is this?

    imgur.com/NdwNLkG.png

  13. #12
    Scenic.'s Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Wales, UK
    Posts
    589
    Reputation
    149
    Thanks
    209
    Quote Originally Posted by Salads47 View Post
    First of all thank you for the tutorials!

    I'm wondering the in-depth of why some variables aren't able to be used anymore?

    In this case, the
    Code:
    StaminaTimer Timer;
    and
    Code:
    this.Stamina
    aren't able to be used anymore... why is this?

    imgur.com/NdwNLkG.png
    I think it's because of a missing method or namespace because of the IL Editor.

    - - - Updated - - -

    Quote Originally Posted by BadgerOnViagra View Post
    Why does my code always reset even after I compile it? Please help!
    You need to compile it then save the dll and reopen it

  14. The Following User Says Thank You to Scenic. For This Useful Post:

    Salads47 (03-28-2015)

  15. #13
    KOAish's Avatar
    Join Date
    Mar 2014
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    0
    Anyone got an idea of where the damage modifier is in the Assembly, I have found a bunch of coding about "Damage" but it all leads to no good, at least of what ive tested?

  16. #14
    acedeh's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    1
    Sorry for gravedigging but will this still work after the updates?

  17. #15
    davidp234's Avatar
    Join Date
    Jun 2009
    Gender
    male
    Posts
    60
    Reputation
    10
    Thanks
    7
    My Mood
    Sleepy
    when useing the moded file it just loads up to a black screen and stays there so its not working any more
    Last edited by davidp234; 06-08-2015 at 01:52 PM.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Request] One thread with all ( WORKING ) hacks in:
    By blu0emonk3y in forum Battlefield Play4Free Hacks
    Replies: 2
    Last Post: 03-29-2012, 08:18 PM
  2. Replies: 18
    Last Post: 08-22-2011, 03:59 PM
  3. thread locking spree in one section?
    By MacTrainerGuy in forum Suggestions, Requests & General Help
    Replies: 1
    Last Post: 07-31-2011, 07:09 PM
  4. [Release] [Tutorial][SourceCode] SEH/thread hooking
    By .::SCHiM::. in forum C++/C Programming
    Replies: 10
    Last Post: 05-17-2011, 09:26 AM
  5. all of the cs threads
    By Ghost in forum General
    Replies: 17
    Last Post: 08-23-2010, 12:33 AM