I can ask the same question to the OP of that source as to why he didn't use IronPython.
Why use ProjectX's scripting engine?
1. You can script in C#/VB
2. The scripts are compiled to IL and loaded only once (although, by the looks of it, Super Aids has implemented, but does not use [might use a command or something for that too], something that reloads the scripts)
3. The scope of the script is handled by .net (that is if the script is loaded in the same AppDomain)
4. Once a script is compiled and the method info is kept in a dictionary using it would be like invoking any function using Delegate.Invoke.
Why not to use it as is:
1. Reloading one script would require copying the contents of all the existing scripts into one file, then compile it, to update all preloaded scripts.
2. When you write a script, the method name will have to follow C#'s/VB's guidelines regarding the method name, so you can't use something like script_1-100,200-400(...) to avoid making 299 files for the same function.
Why use IronPython?
1. If you love/want to learn Python, you will obviously want to use IronPython.
2. It's an easy scripting language which provides lots of features
Why not use IronPython?
1. The scope is handled by you by setting variables.
2. Writing scripts with IronPython can be tricky if you want to use .net libraries or w/e without auto completition (although it is possible with Wing [maybe with others too?], as I was just reading).
I don't use Python much so I couldn't find more reason as to why to use or why not to use it. Although if you're interested into performance, using compiled C#/VB scripts is faster.
Why use ProjectX's scripting engine?
1. You can script in C#/VB
2. The scripts are compiled to IL and loaded only once (although, by the looks of it, Super Aids has implemented, but does not use [might use a command or something for that too], something that reloads the scripts)
3. The scope of the script is handled by .net (that is if the script is loaded in the same AppDomain)
4. Once a script is compiled and the method info is kept in a dictionary using it would be like invoking any function using Delegate.Invoke.
Why not to use it as is:
1. Reloading one script would require copying the contents of all the existing scripts into one file, then compile it, to update all preloaded scripts.
2. When you write a script, the method name will have to follow C#'s/VB's guidelines regarding the method name, so you can't use something like script_1-100,200-400(...) to avoid making 299 files for the same function.
Why use IronPython?
1. If you love/want to learn Python, you will obviously want to use IronPython.
2. It's an easy scripting language which provides lots of features
Why not use IronPython?
1. The scope is handled by you by setting variables.
2. Writing scripts with IronPython can be tricky if you want to use .net libraries or w/e without auto completition (although it is possible with Wing [maybe with others too?], as I was just reading).
I don't use Python much so I couldn't find more reason as to why to use or why not to use it. Although if you're interested into performance, using compiled C#/VB scripts is faster.
Well, after reading this, and doing my own personal research ofc, I guess I will go along the lines of what Jacob made and do all that. Keeping C# syntax is a big deal to me, so thanks Alex.
Why use ProjectX's scripting engine?
1. You can script in C#/VB
2. The scripts are compiled to IL and loaded only once (although, by the looks of it, Super Aids has implemented, but does not use [might use a command or something for that too], something that reloads the scripts)
3. The scope of the script is handled by .net (that is if the script is loaded in the same AppDomain)
4. Once a script is compiled and the method info is kept in a dictionary using it would be like invoking any function using Delegate.Invoke.
Why not to use it as is:
1. Reloading one script would require copying the contents of all the existing scripts into one file, then compile it, to update all preloaded scripts.
2. When you write a script, the method name will have to follow C#'s/VB's guidelines regarding the method name, so you can't use something like script_1-100,200-400(...) to avoid making 299 files for the same function.
Why use IronPython?
1. If you love/want to learn Python, you will obviously want to use IronPython.
2. It's an easy scripting language which provides lots of features
Why not use IronPython?
1. The scope is handled by you by setting variables.
2. Writing scripts with IronPython can be tricky if you want to use .net libraries or w/e without auto completition (although it is possible with Wing [maybe with others too?], as I was just reading).
I don't use Python much so I couldn't find more reason as to why to use or why not to use it. Although if you're interested into performance, using compiled C#/VB scripts is faster.
What I did for the reload was using FileSystemWatcher.
I did some heavy optimization and changes to it when I worked on coding for Insomnius. Since I used it to implement dynamic events so lots of features could be edited/added at runtime like tournaments, commands, playerdebugging, time specific actions etc.
Imma see if I can find it, in case it would be necessary else I might just rewrite the engine from that source.
Why use ProjectX's scripting engine?
I don't use Python much so I couldn't find more reason as to why to use or why not to use it. Although if you're interested into performance, using compiled C#/VB scripts is faster.
Nope. IronPython can be compiled as well, and stored into the memory. It`s not a matter of performance, it`s a matter of preference (and maybe compile speed as well. I personally would suggest to everyone who wants to implement a scripting engine to go with what he/she or the other devs are more confortable with, the minimal performance differences(that is, if you handle everything correctly in the parser/whatever) don`t count as much here as the productivity rate.
On the other side, wb bro, haven`t seem you for some time now.
Nope. IronPython can be compiled as well, and stored into the memory. It`s not a matter of performance, it`s a matter of preference (and maybe compile speed as well. I personally would suggest to everyone who wants to implement a scripting engine to go with what he/she or the other devs are more confortable with, the minimal performance differences(that is, if you handle everything correctly in the parser/whatever) don`t count as much here as the productivity rate.
On the other side, wb bro, haven`t seem you for some time now.
Uhm, no. Because even if python is compiled, it is still is interpreted 2 times. First from the pyc and then as IL compared to C#/VB where it's only IL.
There's a lot of threads on this topic, one of which is:
The opinions vary, but at balance C# > IronPython.
Anyway, I am not sure how debugging would go... With C# I can generate a pdb in memory and have a full stacktrace whenever an exception appears. With IronPython the errors look weird...
I've been around. I am always skulking in the shadows.
Uhm, no. Because even if python is compiled, it is still is interpreted 2 times. First from the pyc and then as IL compared to C#/VB where it's only IL.
There's a lot of threads on this topic, one of which is:
The opinions vary, but at balance C# > IronPython.
Anyway, I am not sure how debugging would go... With C# I can generate a pdb in memory and have a full stacktrace whenever an exception appears. With IronPython the errors look weird...
I've been around. I am always skulking in the shadows.
2 times for this amount of scripts is still not a problem, not even with 2k+ players, the same method is used with LUA in commercial games and it works wonders.
Anyhow, debugging is easy, with PTVS it gets really easy (also, you can debug standard python as well).
To be able to compile in parallel you have to use a different object of CompilerParameters (because the compiler parameters generates only one random temp file name, when it's constructed, not when you do the actual compiling).
My scripts look something like:
PHP Code:
using System; using CoEmuLibrary; using CoEmuLibrary.Packets;
class Main { public static unsafe void Execute(Item item, IGameClient client) //public static unsafe void Execute(IntPtr ptr, IGameClient client) // for handling pointers to packets or w/e { } }
NPC scripting 09/22/2011 - Ragnarok Online - 1 Replies Hey Leute/ Gamer und eventuell Scripter :)
Ich bin seit einiger Zeit dabei mir npc scripting für RO beizubringen, ich habe auch nen wunderbaren Guide dazu gefunden und zwar :
eAthena Support Board > Npc Scripting Tutorial
mein Problem:
Die Links sind down, nun weiß ich nicht wie ich z.B (siehe Kapitel 12) die Befehle umsetzen kann.
SCRIPTING HELP 06/08/2009 - Lineage 2 - 0 Replies this is my 1st time at scripting so please help me out. Simple OOG Walker Chant of Life DOT heal for warcrier for group member with delay and loops
LABEL(DOT)
DELAY(15000)
MemberStatus(MyBD,HP,<=,65)
UseSkill(Chant of Life)
CALL(DOT)
any of my syntax is wrong? the probleem is it does not check the member hp condition.
L2 scripting 07/19/2007 - Lineage 2 - 1 Replies hey ya guys, i would like to ask you, if there is any possibility how to make a script, that would report about your char, for eg.
i will pm on my spoil from another char with any security asnwer, like
howmanyitems? - and my spoil should asnwer, how many items does it have....idk -> im away from home and left my spoiler spoiling some materials or enchants, log anywhere on another char, then PM my spoil, how many items or enchants does it have....i tried something about AI answer, but i...
LUA Scripting 06/23/2006 - World of Warcraft - 2 Replies Moin,
Suche einen LUA Scripter der mir folgendes AddOn machen könnte:
Mein Bankchar steht z.B. in Ironforge rum. Wenn mich nun z.B. ein Gildenspieler mit dem Text "Bankinhalt" anwhispert, soll das AddOn automatisch checken was in der Bank ist und ihm anschliessend sofort zurücksenden was in der Bank vorhanden ist und in welcher Menge.
Wenn sowas möglich ist, wäre es echt cool wenn mir jemand helfen könnte.
Bin gerne für ander Vorschläge offen, wenn meiner nicht geht!
Schonmal Danke...