Jump to content

Need help with decompiler


ThyHolyNoodle

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();
        BP:RestoreToFullHealth();
    end
end
end

 

Events.OnFillInventoryObjectContextMenu.Add(Itemcool);

 

--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.

2019-06-19.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...