Jump to content

Need help with decompiler

Recommended Posts

I am trying to make a zombie virus cure that requires rare ingredients and a large amount of first aid skill.


Here's my current code:




function Itemcool()
local inv = getPlayer():getInventory();
local player = getPlayer();

it = inv:FindAndReturn("MC.myfoods");

if it then
        getPlayer():Say("I have the cure");
        local BP;
        BP = player:getBodyDamage();




--the line above is what I want to know more about because it makes it so the player's health is restored if you right click on anything as long as you have "MC.myfoods" in your inventory.




I am using jd-gui to decompiled the most recent files and it would be of great help if someone could either tell me what functions to use or how to find them in the decompiler. The attached picture is basically what I want help navigating.




Concept: I'm not going to leave it at fully restoring health. The effects of the cure will depend on the first-aid skill of the player who makes the concoction, and whether they have the doctor profession. The effects will range from death and permanent negative traits such as deafness to severe injuries that may or may not kill you outright but can at least be healed.


Onto how the concoction is made, I want it to include rare ingredients like antibiotics (and maybe Spiffo lol) and a bunch of other randomly selected ingredients that change with every new world. And the only way to find what random ingredients they are is to sample infected blood with a disinfected syringe from a bitten player and, it into a centrifuge, use a microscope and Petri dish and do trial and error. Clues are given while you do the trial and error, and the higher your first aid-skill the better the clues are.


About the centrifuge, I was thinking about copying the microwave files and changing the model, sounds, etc. In real life, it basically spins blood vials at a constant frequency so that the density of whatever is in the blood is clearly separated and then can be analyzed better.


The same goes for the microscope, but maybe with a UI that let's you test how the infected player's blood reacts to different ingredients. And the aforementioned clues will be spoken by whoever is analyzing the blood at the moment.


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...