[Proof of Concept] C# Script Loader: On The Fly Compilation and Execution menu

User Tag List

Results 1 to 1 of 1
  1. #1
    nilum's Avatar Member
    Reputation
    9
    Join Date
    Jun 2009
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Proof of Concept] C# Script Loader: On The Fly Compilation and Execution

    So the purpose of this little exercise was to come up with a way to allow users to create scripts for a bot using c#. This simple (and unfinished) program is a proof of concept of a c# script loader.

    This loader will compile source into an assembly file, instantiate every class within the file and then allow the user to invoke methods within each class on demand.

    As an example, I am working on a semi-bot that will take user input (keystrokes) which can be mapped to a specific class/method in one of these scripts.

    [Proof of Concept] C# Script Loader: On The Fly Compilation and Execution-example-jpg

    LoadScript.zip

    This is the script file I used in the example. It doesn't really do anything, but if you need an example of how it should be formatted, here it is.

    Code:
    using System;
    using System.Windows.Forms;
    
    class NefRaid
    {
    	public void OnyxiaRotation() 
    	{
    		MessageBox.Show("Attacking onyxia");
    	}
    	
    	public void Phase2()
    	{
    		MessageBox.Show("Next phase rotation");
    	}
    	
    	public void Nef()
    	{
    		MessageBox.Show("Main rotation");
    	}
    }
    
    class AoE
    {
    	public void CastOnTarget()
    	{
    		MessageBox.Show("Performing AoE @ Target");
    	}
    	
    	public void CastOnMe()
    	{
    		MessageBox.Show("Performing AoE @ Self");
    	}
    }
    
    class HealingRotation
    {
    	public void TankHeal()
    	{
    		MessageBox.Show("Healing Tank");
    	}
    	
    	public void GroupHeal()
    	{
    		MessageBox.Show("Healing Group");
    	}
    }
    You can save it as .cs, .txt. or .script. Any of those are valid extensions.
    Last edited by nilum; 10-20-2011 at 09:23 PM.

    [Proof of Concept] C# Script Loader: On The Fly Compilation and Execution

Similar Threads

  1. Replies: 4
    Last Post: 10-01-2013, 10:11 AM
  2. Proof of Concept: dwFindPattern TLS [C#]
    By Shynd in forum WoW Memory Editing
    Replies: 14
    Last Post: 05-28-2010, 09:46 AM
  3. Gossip Script is Crashing the Server, what's wrong?
    By guitargod218 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 06-08-2008, 02:24 PM
  4. Replies: 22
    Last Post: 05-29-2008, 03:52 PM
  5. Some Fun I had with the Script Bug in the exploit section.
    By TwistedFerret in forum World of Warcraft Exploration
    Replies: 8
    Last Post: 10-01-2007, 05:56 AM
All times are GMT -5. The time now is 11:11 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search