Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How to get target vitals?


willunited
 Share

Recommended Posts

> re cheak your code or maby its becuse the gui has that.

I appreciate you're trying to be helpful, but: [If You Don't Know the Answer, Don't Reply](http://www.touchofdeathforums.com/community/index.php?/topic/113011-dont-know-the-answer-dont-reply/).
Link to comment
Share on other sites

GetPlayerMaxVital is the maximum of the Vital from an Player

So its getplayervital(Target) for players or mytarget idk now exact

and for NPC's is there NPC(NPCNum).HP if im correct there

artix… i know you want help but please... HP stuff is already coded so please please take a look first in the code befor you write some wrong stuff

(Wrote on my Mobile)
Link to comment
Share on other sites

how are you trying to do this? Are you requesting the vitals from the server and display them in when the server sends them or is your code only client side? Also are you checking to see if the target type is NPC or Player? Post your code here it will be easier for us to help you this way
Link to comment
Share on other sites

If you are using Origins or Mega then here's a thought that may clear things up and make it easier for you.

**(1st)**

When you click to target something, PlayerSearch(CurX, CurY) is called in the HandleMouseDown sub. This sends a packet to the server where the server interprets it in modHandleData - HandleSearch.

**(2nd)**

HandleSearch figures out if you've targeted an npc or a player and then sends back the index and the target type to modHandleData - HandleTarget.

**(3rd)**

Now the client has the target and the type of target.

My recommendation is to simply use the global variable 'MyTargetType' to identify the target and simply get the vitals appropriately.

This can all be done Client-Side.

I know I could have just said that but I feel you should know more about what you're doing to get better at doing it.

**(Side-Note)**

To be clear:

GetPlayerVital(index, HP) Returns the player's current health

GetPlayerMaxVital(index, HP) Returns a player's health when it's full

NPC(npcnum).HP Returns an npc's health when it's full

Correct me if I'm wrong in any way. I'm not a god, I do make mistakes.
Link to comment
Share on other sites

*facepalm*

Meaning you don't have to add anything to the Server..

So to answer your question; Obviously yes because it already does.

Please excuse me for not being more clear. I apologize

Also excuse my attitude, I've been up all night. I'm tired and stressed ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png)
Link to comment
Share on other sites

You make a good point, I'll give you that. You can do it that way. In my opinion, I don't see a point in adding more to the server. It shouldn't cause any issue with hacking anyway so why not use what's already given to you. This doesn't mean you have to, however. I just made a recommendation.
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
 Share

×
×
  • Create New...