Official Community Forums
 
HomeHome  SearchSearch  RegisterRegister  Log in  The Wiki  Website  github Project  

Share
 

 Mars.jar confusion

Go down 
AuthorMessage
AthlonJedi
Administrator
Administrator
AthlonJedi

Posts : 213
Join date : 2012-07-19
Location : Walkerton, Indiana

Mars.jar confusion Empty
PostSubject: Mars.jar confusion   Mars.jar confusion EmptyWed 29 May - 8:35

I have some confusion as I am not that good with java yet. In this tutorial :

http://www.multiversemmo.com/site/w/index.php/Add_in_a_Release_box_in_the_UI_that_shows_up_upon_Death

There is a section that says:

Quote :

The final thing you will want to add is the setting of health upon releasing. By default when you release you come back with only 1hp. The best way to fix this is to go into the CombatPlugin.java file, located in MARS, and edit the ReleaseObjectHook code.

We want to replace this line here:
Code:

info.statSetBaseValue("health", 1);
with:
Code:

int currentmaxhp = info.statGetCurrentValue("health-max");
int currenthp =  = currentmaxhp / 2;
info.statSetBaseValue("health", currenthp);


but when I look in Mars.jar in the CombatPlugin.class file with netbeans all I see is this:

Code:

class ReleaseObjectHook implements multiverse.server.engine.Hook {

        ReleaseObjectHook() {
            //compiled code
            throw new RuntimeException("Compiled Code");
        }


I am thinking I am looking in the wrong place but, I dont know where to find the accual code I am supposed to change.

any pointers would be appreciated!
Back to top Go down
AthlonJedi
Administrator
Administrator
AthlonJedi

Posts : 213
Join date : 2012-07-19
Location : Walkerton, Indiana

Mars.jar confusion Empty
PostSubject: Re: Mars.jar confusion   Mars.jar confusion EmptyWed 29 May - 11:07

Nevermind, I found it,

It is in src folder lol
Back to top Go down
 
Mars.jar confusion
Back to top 
Page 1 of 1
 Similar topics
-
» Mars
» Pets- confusion
» Mars tests
» New update June 18 v1.22
» Drafts of moonrover

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Getting Started-
Jump to: