ItsMods

Full Version: jZm - Black Ops II Manipulation Framework [Teaser]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2


This project is still under active development

What you're looking at here is:
  • Plugin-based system
  • Fully opensource
  • Fully C#
  • Fully .NET 4.0
  • Fully external (no injection etc)
  • Players
  • DVars
  • DVars contents
  • Entities
  • Portals
  • Kick, Ignite, Electrocute, IPrintLn, Tell, SetClientDVar, etc
  • Console & GUI interface (2 executables)
  • Several events
  • Will never need a update based on a new version of the game, It can 'recognize' the addresses

Still planned:
  • More events
  • More events
  • More.... events?
  • Entity adding/spawning
  • Better entity control (move zombies, etc?)
  • Ideas are more than welcome, post as many as you can think of, even if they're really stupid

Docs are available here if you want to have a peek:
http://jariz.github.com/jZmDocs/Index.html (outdated atm, will recompile tomorrow)

Github here:
http://github.com/jariz/jZm/

Contributors:
Plugin example (portal testing plugin)

Portal testing plugin:
CSHARP Code
  1. ;
  2. ZombieAPI API;
  3. public void Init(ZombieAPI API)
  4. {
  5. this.API = API;
  6.  
  7. Portal p = new Portal(-6865.08154f, 5076.141f, 50f);
  8. p.PortalTriggered += new PortalHandler(p_PortalTriggered);
  9. API.Portals.Add(p);
  10. }
  11.  
  12. void p_PortalTriggered(Portal portal, Player player)
  13. {
  14. float[] bus = API.GetBus().Origin;
  15. bus[2] += 200;
  16. player.World.Origin = bus;
  17. player.Ignite();
  18. }


'Mod' featured in gameplay (Sharpshooter):
Just a example, not done yet
CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using ZombieAPI;
  6. using ZombieAPI.GameObjects;
  7.  
  8. namespace Sharpshooter
  9. {
  10. public class Plugin : jZmPlugin
  11. {
  12. public string Name
  13. {
  14. get
  15. {
  16. return "Sharpshooter";
  17. }
  18. }
  19.  
  20. public string Desc
  21. {
  22. get
  23. {
  24. return "Simple sharpshooter mod. Switches the player's weapons every 30 seconds. Very light.";
  25. }
  26. }
  27.  
  28. public string Author
  29. {
  30. get
  31. {
  32. return "JariZ";
  33. }
  34. }
  35.  
  36. string[] Restricted_Weapons = new string[] {
  37. "defaultweapon_mp"
  38. };
  39.  
  40. ZombieAPI.ZombieAPI API;
  41. List<string> Weaps = new List<string>();
  42.  
  43. bool Run = false;
  44.  
  45. public void Init(ZombieAPI.ZombieAPI API)
  46. {
  47. this.API = API;
  48. API.OnFrame += new OnFrameHandler(API_OnFrame);
  49. API.OnMapLoad += new MapHandler(API_OnMapLoad);
  50. API.OnMapDestroy += new MapHandler(API_OnMapDestroy);
  51. }
  52.  
  53. void API_OnMapDestroy()
  54. {
  55. Run = false;
  56. }
  57.  
  58. void API_OnMapLoad()
  59. {
  60. Run = true;
  61. current_weapon_index = 0;
  62. last_tick = -1;
  63. }
  64.  
  65. long last_tick = -1;
  66. int current_weapon_index = 0;
  67. void API_OnFrame()
  68. {
  69. if (!Run)
  70. return;
  71.  
  72. if (Weaps.Count == 0 && API.Weapons.Count != 0)
  73. {
  74. foreach(KeyValuePair<int,string> Wep in API.Weapons)
  75. {
  76. if (!Restricted_Weapons.Contains(Wep.Value))
  77. Weaps.Add(Wep.Value);
  78. }
  79. Randomize();
  80. }
  81.  
  82. if (last_tick == -1)
  83. last_tick = DateTime.Now.Ticks;
  84.  
  85. int seconds = new DateTime(DateTime.Now.Ticks - last_tick).Second;
  86. int ms = new DateTime(DateTime.Now.Ticks - last_tick).Millisecond;
  87.  
  88. bool warned = false;
  89.  
  90. if (seconds >= 30)
  91. {
  92. foreach (Player player in API.GetPlayers())
  93. {
  94. current_weapon_index++;
  95. if (current_weapon_index == Weaps.Count -2)
  96. {
  97. Randomize();
  98. current_weapon_index = 0;
  99. }
  100. player.Electrocute();
  101. player.iPrintBoldLn("^" + (int)ColorCodes.Yellow + "WEAPONS CYCLED");
  102. player.Weapons.PrimaryWeapon = Weaps[current_weapon_index];
  103. player.Weapons.CurrentWeapon = Weaps[current_weapon_index];
  104. player.Weapons.PrimaryAmmoStock = 255;
  105. }
  106.  
  107. warned = false;
  108. last_tick = DateTime.Now.Ticks;
  109. }
  110. else if (seconds <= 20 && warned == false)
  111. {
  112. foreach (Player player in API.GetPlayers())
  113. {
  114. player.iPrintLn("^" + (int)ColorCodes.Green + "10 seconds^" + (int)ColorCodes.White + " until your weapon will be cycled!");
  115. }
  116. warned = true;
  117. }
  118. else
  119. {
  120. foreach (Player player in API.GetPlayers())
  121. {
  122. if (Weaps.Count > 0)
  123. {
  124. player.Weapons.PrimaryWeapon = Weaps[current_weapon_index];
  125. player.Weapons.CurrentWeapon = Weaps[current_weapon_index];
  126. player.Weapons.TacticalWeapon = "";
  127. player.Weapons.SecondaryWeapon = "";
  128. player.Weapons.LethalWeapon = "";
  129. }
  130. }
  131. }
  132. }
  133.  
  134. void Randomize()
  135. {
  136. Weaps = Weaps.OrderBy(wep => new Random().Next()).ToList();
  137. }
  138. }
  139. }
Looks badass, and inb4kb on your accounts :<. Also thought about being able to get players to be able to shoot at each other?
(03-07-2013, 23:58)JariZ Wrote: [ -> ][*]@master131 (I think?)

If you used some of the code or structs from barata's ZM hack, then yes, credits to me, I found the model index field and reversed most of the fields. I looked at the github code and noticed "Nukem.txt". I can't recall if I helped him or not but I'm pretty sure he did it himself.

Quote:newOrigin
Not sure what this is, If you've got any idea, contact me. D:

Pretty sure it's the origin used by the game's prediction functions which guesses what the next position of the entity will be to avoid lag.

Quote:The first ET_VEHICLE it can find. KEEP IN MIND THAT: If none found, It'll return null (this means on all non-transit maps)

You can also find the position of the hatch on top of the bus by iterating through all entities and returning the one with a model index of 44.

Quote:DO NOT CALL FROM A PLUGIN. This function is called from the jZm frontend and you should not call it from a plugin.

Perhaps you should mark it as internal and add the InternalsVisibleTo attribute.

Quote:Kick, Ignite, Electrocute, IPrintLn, Tell, SetClientDVar, etc

Lies, those don't exist yet >:[

Also, inb4TACban.
1. That's why I added you, I was quite sure you helped barata.
2. Interesting, Thanks.
3. I know, But this is made to return the bus entity, not the hatch.
4. Thing is, The jZm 'frontend' programs (console and GUI) aren't part of the library, so I believe this isn't possible
5. Oh, but I do think so
6. TAC seems to be mostly report based, I've done all sorts of shit but it hasn't picked up a single thing so far so I highly doubt that.
This is not designed to be used on public lobby's so if you actually do get banned, you deserve it.
7. (Irrelevant)If you could help out with some of the issues barata is having with chat hooking, that'd be absolutely sweet (perhaps even create a pull request if you can just add it yourself)
(03-08-2013, 10:13)JariZ Wrote: [ -> ]5. Oh, but I do think so

I couldn't find it. Tongue

(03-08-2013, 10:13)JariZ Wrote: [ -> ]7. (Irrelevant)If you could help out with some of the issues barata is having with chat hooking, that'd be absolutely sweet (perhaps even create a pull request if you can just add it yourself)

I remember him asking me about it a while ago, I'll see what you guys did. Also, the remote code execution I see in ServerCommand I assume was added by barata. I helped him with that code so yeah.
It seems connect command is still working.
You should make some party manager( rcon, some kind of that ) and connect to ip by program... Would be supercool.
@master131 That'd be absolutely great. Barata seems to be quite busy last few weeks and I have absolutely no clue on how to do this myself.
Please ask him for the code if you spot him on steam/itsmods because I don't have it.
@sailormoon That is a great idea! I'll check out if something like this is possible.

Documentation updated
so this would aloow people to use the console, devmap ect?
Yes. I hope.
oh my jesus,would love the ability to use console on bo2 for movie making purposes
Big Grin gonn bookmark this thread anyhow! would donate if i could
Pages: 1 2