Getting started with writing InfinityScript plugins

InfinityScript plugins for dedicated servers.
User avatar
szczurcio
TeknoHorse
TeknoHorse
Posts: 568
Joined: Sun Nov 17, 2013 8:31 am
Location: iw5mp.exe

Getting started with writing InfinityScript plugins

Postby szczurcio » Sun May 25, 2014 2:27 pm

Seeing the endless stream of questions on this topic I thought I'd make a little tutorial.

Requirements:
1) Brain
2) Desire to learn something
3) Windows w/ .NET (lol, Mono & Linux would also work I guess, I don't know about that though)

Some little intro:
What's IS?
InfinityScript is a MW3 modding library originally written by NTAuthority from 4D1, then stolen by other projects like this, Rekt or Plusmaster. In short, it makes it possible for you to call functions that would otherwise be only available to the game engine (unless you're a 1337 h@x0r, in which case you should've stopped reading by now)
Where's some documentation for IS?
Guess what - there isn't any. The best way to learn is to inspect source code. I've attached some good examples (I learned from them).

What you have to do:
1) Get a C# IDE - I recommend Visual Studio 2013 - free and easy to use
2) A little primer on the aforementioned topic: http://89.70.149.19:8080/viewtopic.php?f=9&t=183 , credits to the mighty yet mysterious BlakMaster. (Admins: I know this is auto-promotion, but oh well. If you want, you can copy that tutorial here if you keep proper credits for the author). (If the link above is dead, it means the BlackPulse clan decided it would be a good idea to perform a DoS attack on me. Just wait a couple hours and it should work again. You may also want to save this tutorial to your HDD)
3) Well, one thing that you certainly have to do is learn the language. C# is pretty easy for beginners to use. Search for some examples on the Web and definitely pay a visit to http://msdn.com before asking any questions.
4) Write plugins. Practice makes master. In the beginnnig it'll probably be hard to figure it all out, but don't worry, just read the provided source code examples and try to replicate what's done there.

Note for the smart: Humanity has invented something called "decompiler". I personally recommend jetBrains DotPeek which is free and may be obtained at http://google.com. Just open a DLL and peek at the source code.
Note for the dumb: Do not expect demopiled source code to compile back. If the author hasn't shared the source with you they probably don't want you to modify the program. If you aren't smart to bypass that "restriction", well, don't expect success.


DON'T EXPECT THESE TO COMPILE AND WORK NICELY. This is a loose collection of random mods, some not tested. They may not work, they may require some additional files. The goal of this is to teach you something, not to give you ready scripts.


DA EXAMPLES:
* ADMIN CONTROL - an old admin script back from 4D1. This is the original source as the author - bingo007 - was kind enough to share it. Terrible coding style but A LOT of IS reference.
* AntiPlaneCamp - back when my Terminal Infected server was popular people would usually disobey the rule that you have to get down from the plane after getting a MOAB. This script made sure they didn't.
* AntiRQ - a plugin to prevent the common phenomenon of rage quitting in infected. If a player leaves before dying 10 times or infecting someone, they are temp IP-banned for 5 hours
* AutoBalance - recently posted, self explanatory. TMK Rebman hates this script :(
* BanIP - an old script I used to ban players by IPs, uses a password to identify admins. (no, if you go into any server I host it won't work)
* GiveAmmo - my old Infected GiveAmmo script
* IAM - decompiled IAM. EXTREMELY BAD CODING, but again, some IS reference.
* MapEdit - the original MapEdit script from QCZM, available on GitHub.
* WelcomeBanner - a simple script to greet connecting players I used a while ago.
* GunRotation - source for my newest GunRotation script, version 2.1.


Some good resources that you may find useful:
http://www.itsmods.com/forum/Thread-Tut ... ments.html
http://community.callofduty.com/thread/ ... 4H9Hvl_t8E

If you have any problems, you can PM me. I reserve the right to ignore the inquiry if I find it particularly dumb/already answered.

Wmonte, please stickie if you think it's worth it.

Cheers.
You do not have the required permissions to view the files attached to this post.
Last edited by szczurcio on Mon May 26, 2014 7:32 am, edited 7 times in total.
hungrytv17
TeknoWoman
TeknoWoman
Posts: 117
Joined: Mon May 12, 2014 4:12 pm

Re: Getting started with writing InfinityScript plugins

Postby hungrytv17 » Sun May 25, 2014 3:17 pm

szczurcio wrote:Seeing the endless stream of questions on this topic I thought I'd make a little tutorial.

Requirements:
1) Brain
2) Desire to learn something
3) Windows w/ .NET (lol, Mono & Linux would also work I guess, I don't know about that though)

Some little intro:
What's IS?
InfinityScript is a MW3 modding library originally written by NTAuthority from 4D1, then stolen by other projects like this, Rekt or Plusmaster. In short, it makes it possible for you to call functions that would otherwise be only available to the game engine (unless you're a 1337 h@x0r, in which case you should've stopped reading by now)
Where's some documentation for IS?
Guess what - there isn't any. The best way to learn is to inspect source code. I've attached some good examples (I learned from them).

What you have to do:
1) Get a C# IDE - I recommend Visual Studio 2013 - free and easy to use
2) A little primer on the aforementioned topic: http://89.70.149.19:8080/viewtopic.php?f=9&t=95 , credits to the mighty yet mysterious BlakMaster. (Admins: I know this is auto-promotion, but oh well. If you want, you can copy that tutorial here if you keep proper credits for the author). (If the link above is dead, it means the BlackPulse clan decided it would be a good idea to perform a DoS attack on me. Just wait a couple hours and it should work again. You may also want to save this tutorial to your HDD)
3) Well, one thing that you certainly have to do is learn the language. C# is pretty easy for beginners to use. Search for some examples on the Web and definitely pay a visit to http://msdn.com before asking any questions.
4) Write plugins. Practice makes master. In the beginnnig it'll probably be hard to figure it all out, but don't worry, just read the provided source code examples and try to replicate what's done there.

Note for the smart: Humanity has invented something called "decompiler". I personally recommend jetBrains DotPeek which is free and may be obtained at http://google.com. Just open a DLL and peek at the source code.
Note for the dumb: Do not expect demopiled source code to compile back. If the author hasn't shared the source with you they probably don't want you to modify the program. If you aren't smart to bypass that "restriction", well, don't expect success.


DA EXAMPLES:
* ADMIN CONTROL - an old admin script back from 4D1. This is the original source as the author - bingo007 - was kind enough to share it. Terrible coding style but A LOT of IS reference.
* AntiPlaneCamp - back when my Terminal Infected server was popular people would usually disobey the rule that you have to get down from the plane after getting a MOAB. This script made sure they didn't.
* AutoBalance - recently posted, self explanatory. TMK Rebman hates this script :(
* BanIP - an old script I used to ban players by IPs, uses a password to identify admins. (no, if you go into any server I host it won't work)
* GiveAmmo - my old Infected GiveAmmo script
* IAM - decompiled IAM. EXTREMELY BAD CODING, but again, some IS reference.
* MapEdit - the original MapEdit script from QCZM, available on GitHub.
* WelcomeBanner - a simple script to greet connecting players I used a while ago.
* GunRotation - source for my newest GunRotation script, version 2.1.


Some good resources if you may find useful:
http://www.itsmods.com/forum/Thread-Tut ... ments.html
http://community.callofduty.com/thread/ ... 4H9Hvl_t8E

If you have any problems, you can PM me. I reserve the right to ignore the inquiry if I find it particularly dumb/already answered.

Cheers.



thank you.
Image
User avatar
[XtrM] xilonor
TeknoHorse
TeknoHorse
Posts: 909
Joined: Mon Oct 28, 2013 6:08 am
Location: France, Lyon, Rhône-Alpes
Contact:

Re: Getting started with writing InfinityScript plugins

Postby [XtrM] xilonor » Sun May 25, 2014 3:45 pm

Thanks <3 :bravo: i have 4 error for compil IAM and i have compile Anti-RQ and when i finish Round and server start new map, serve crash :|
[XtrM] Xiloиoя™|╭☛ Team [XtrM] SkillZz ||Leader|
Crack GTA V Solo/Online + DLC: ╭☛ Here
User avatar
BlaxxMaster
TeknoRat
TeknoRat
Posts: 16
Joined: Sun May 25, 2014 5:05 pm
Location: Fuck You.
Contact:

Re: Getting started with writing InfinityScript plugins

Postby BlaxxMaster » Sun May 25, 2014 5:34 pm

[XtrM] xilonor wrote:Thanks <3 :bravo: i have 4 error for compil IAM and i have compile Anti-RQ and when i finish Round and server start new map, serve crash :|


Posting the error messages that were displaying when building the program would really help. :-P
Image
User avatar
[XtrM] xilonor
TeknoHorse
TeknoHorse
Posts: 909
Joined: Mon Oct 28, 2013 6:08 am
Location: France, Lyon, Rhône-Alpes
Contact:

Re: Getting started with writing InfinityScript plugins

Postby [XtrM] xilonor » Sun May 25, 2014 5:48 pm

My errors it's French Language xD
I Have Fix 34 errors :P

Image
[XtrM] Xiloиoя™|╭☛ Team [XtrM] SkillZz ||Leader|
Crack GTA V Solo/Online + DLC: ╭☛ Here
User avatar
szczurcio
TeknoHorse
TeknoHorse
Posts: 568
Joined: Sun Nov 17, 2013 8:31 am
Location: iw5mp.exe

Re: Getting started with writing InfinityScript plugins

Postby szczurcio » Sun May 25, 2014 5:52 pm

Let's see...
szczurcio wrote:Note for the dumb: Do not expect demopiled source code to compile back. If the author hasn't shared the source with you they probably don't want you to modify the program. If you aren't smart to bypass that "restriction", well, don't expect success.

Hmm....
User avatar
[XtrM] xilonor
TeknoHorse
TeknoHorse
Posts: 909
Joined: Mon Oct 28, 2013 6:08 am
Location: France, Lyon, Rhône-Alpes
Contact:

Re: Getting started with writing InfinityScript plugins

Postby [XtrM] xilonor » Sun May 25, 2014 5:55 pm

szczurcio wrote:Let's see...
szczurcio wrote:Note for the dumb: Do not expect demopiled source code to compile back. If the author hasn't shared the source with you they probably don't want you to modify the program. If you aren't smart to bypass that "restriction", well, don't expect success.

Hmm....


I have use IAM in your folder :p
[XtrM] Xiloиoя™|╭☛ Team [XtrM] SkillZz ||Leader|
Crack GTA V Solo/Online + DLC: ╭☛ Here
User avatar
szczurcio
TeknoHorse
TeknoHorse
Posts: 568
Joined: Sun Nov 17, 2013 8:31 am
Location: iw5mp.exe

Re: Getting started with writing InfinityScript plugins

Postby szczurcio » Sun May 25, 2014 6:28 pm

szczurcio wrote: IAM - decompiled IAM.
User avatar
[XtrM] xilonor
TeknoHorse
TeknoHorse
Posts: 909
Joined: Mon Oct 28, 2013 6:08 am
Location: France, Lyon, Rhône-Alpes
Contact:

Re: Getting started with writing InfinityScript plugins

Postby [XtrM] xilonor » Sun May 25, 2014 6:29 pm

Oh :/ and for Anti-RQ it's just for infected mod ?
[XtrM] Xiloиoя™|╭☛ Team [XtrM] SkillZz ||Leader|
Crack GTA V Solo/Online + DLC: ╭☛ Here
User avatar
szczurcio
TeknoHorse
TeknoHorse
Posts: 568
Joined: Sun Nov 17, 2013 8:31 am
Location: iw5mp.exe

Re: Getting started with writing InfinityScript plugins

Postby szczurcio » Sun May 25, 2014 6:35 pm

[XtrM] xilonor wrote:Oh :/ and for Anti-RQ it's just for infected mod ?



szczurcio wrote:DON'T EXPECT THESE TO COMPILE AND WORK NICELY. This is a loose collection of random mods, some not tested. They may not work, they may require some additional files. The goal of this is to teach you something, not to give you ready scripts.

Return to “InfinityScript”

Who is online

Users browsing this forum: No registered users and 3 guests