[C#] CustomClass menu

User Tag List

Results 1 to 4 of 4
  1. #1
    pabloxxx's Avatar Member
    Reputation
    1
    Join Date
    Apr 2015
    Posts
    2
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C#] CustomClass

    Hi,

    some months ago, i found a half working source code of a bot, here somewhere.
    I decided to take some code pieces as base for my bot (my first big project) and everything went fine.
    One of the last things I have to implement now is the possibility to let the user create his own fighting routines and to save, load and modify them. And after some more days of searching for a entry point to this topic i found some "golden threads" but no point where i can say: thats my beginning.

    with other words: i have some questions
    1.
    now i solved the routines in a fighting class. It looks something like this:
    Code:
    		internal static void FightMode(UnitObject pullMob)
    		{
    			if (Program.runMainTread2)
    			{
    				PrePull();
    				Pull(pullMob);
    				Fight(pullMob);
    				LootClosest();
    	                        Rest();
    			}
    		}
    
    		internal static void Pull(UnitObject mob)
    		{
    			ranged.Cast(mob);
    		}
    		internal static void Fight(UnitObject mob)
    		{
    			
    			while (Internal.timeToFight)
    			{
    				
    				if (Internal.playerIsCritLow)
    				{
    					critLowHealthAction.Cast(mob);
    				}
    				if (Internal.playerIsLowHP)
    				{
    					lowHealthAction.CastBuff();
    				}
    				if (Internal.playerIsDead) return;
    				if (Internal.playerHaveAdds) {
    					HandleAdds(mob);
    				}
    				
    				if (Internal.isInMeleeRange)
    				{
    					if (ObjectManager.GetComboPoints() >= 2 && mob.health > 60) {
    						Spell3.Cast(mob);
    					}
    					if (ObjectManager.GetComboPoints() >= 3) {
    						Eviscerate.Cast(mob);
    					}
    					SinisterStrike.Cast(mob);
    				} 
    			}
    			
    		}
    		internal static void Rest()
    		{
    			EatAndDrink();
    			
    		}
    Now my Question: is there a possibility in c# to generate and compile dynamically code in runtime or do i have to learn skripting languages?
    If I have to learn skripting languages, can you give me a entry point for my terms?
    If it is possible to solve this in c#, i would prefer that. At least in theory I know how to use XML in C#. So the "save and load"-part can be done...but the rest stays a big questionmark for me and i dont know where i should start my learning process. Even some key words would be enough i think

    Greetings,

    Your wood and grassland programmer,

    pabloxxx

    [C#] CustomClass
  2. #2
    Corthezz's Avatar Elite User Authenticator enabled
    Reputation
    386
    Join Date
    Nov 2011
    Posts
    325
    Thanks G/R
    191/98
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey mate,
    what you are looking for is called CodeDom. I utilised this in an old bot project I released a while ago:
    http://www.ownedcore.com/forums/worl...ml#post3271873 (/ [Bot] 1.12.1 WoW Bot Source Code)
    Check my blog: https://zzuks.blogspot.com

  3. Thanks pabloxxx (1 members gave Thanks to Corthezz for this useful post)
  4. #3
    lolp1's Avatar Site Donator CoreCoins Purchaser
    Reputation
    190
    Join Date
    Feb 2013
    Posts
    210
    Thanks G/R
    43/77
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now my Question: is there a possibility in c# to generate and compile dynamically code in runtime or do i have to learn skripting languages?
    Yes you can generate and compile code dynamically with C# and it's surprisingly simple. My best suggestion to keep it clean though is to use interfaces for this.

    Check out this for an example - https://github.com/unknowndev/CoolFi...h/PluginSystem

    In the manager, it loads all assemblies with in the app folder or domain that implement the IPlugin interface.

    You can also look at a fully working example of dynamically running new code on the fly at any point, here:
    https://github.com/aganonki/Internal...er/Compiler.cs

  5. Thanks pabloxxx (1 members gave Thanks to lolp1 for this useful post)
  6. #4
    pabloxxx's Avatar Member
    Reputation
    1
    Join Date
    Apr 2015
    Posts
    2
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow cool!
    great thanks mates! this helps a lot

    @corthezz:
    yah...this is the code i used and got my injection parts. Now your CC-Part is making sence :]
    thanks for your code!

    @lolp1:
    good complement! Thanks

    cheers :]

Similar Threads

  1. [LazyBot] Rogue CustomClass
    By goldio in forum WoW Bot Maps And Profiles
    Replies: 0
    Last Post: 01-04-2012, 06:12 PM
  2. [Bot] DaevaTool the Aion Bot - level, farm, gather, flying, customclasses
    By PiroX in forum Aion Exploits|Hacks
    Replies: 19
    Last Post: 07-18-2011, 11:19 AM
  3. [Request] - humanmage customclass
    By amunro in forum WoW Bot Maps And Profiles
    Replies: 9
    Last Post: 02-13-2009, 02:11 PM
All times are GMT -5. The time now is 12:05 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search