![]() |
Healing Players
I'm making some type of healing NPC,
and it's suppose to heal the player no matter what AP they might have. Hopefully someone will find this and help me. :grin: NPC Code: |
You would want to set a variable to the current AP, raise their AP to 40 or higher, raise their hearts, then change their AP back to the temporary variable.
|
Re: Healing Players
Quote:
You don't need to use #T since you're using #e. Also it's #e(6,-1,#c), because #e counts white spaces. Quote:
Also you're adding 40 and taking 40 of AP.. lol |
I'm pretty sure that if the player ap is <= 39 graal will not allow players to increase their heart amount. apystem=false serveroption will allow players to heal no matter what ap they have.
|
Re: Re: Healing Players
Quote:
|
Re: Re: Re: Healing Players
Quote:
|
Re: Re: Re: Re: Healing Players
Quote:
Thanks anyways. <3 |
Re: Re: Healing Players
Quote:
#T() is perfectly fine where it is. #T = trim whitespace. Doing it this way means he could do /healaccount or /heal account. |
Well, It should work no matter what AP it is..
here's an example.. if (actionserverside) { if(strequals(#p(0),heal)){ with (getplayer(#t(1))) { playerhearts = playerfullhearts; } } } //#CLIENTSIDE if (playerchats) { tokenize #c; if (startswith(/heal,#c)) { triggeraction 0,0,serverside,tool,heal; } } |
Re: Re: Re: Healing Players
NPC Code: Your code won't work that way, Wan. Quote:
|
Well... will there be any type of way of doing this w/o messing with server options? :confused: :confused: :confused: :confused:
|
increasing their ap, healing, and then decreasing their ap again
|
Quote:
Quote:
|
Well... I'm using:
NPC Code: Shouldn't that work? o_o;; |
Can't you just increase their hearts serverside? If you want to heal clientside then you can raise their ap I suppose. IE, throw a sleep in there and see what it does.
|
Quote:
--Edit-- I just did some testing and discovered that it DOES raise the hearts without needing to raise the AP at all. The problem is that the client won't raise the hearts due to still having low AP. (Oh the wonders of still having clientside-only support!) You'd just need to do something to make the client see that the hearts have gone up. |
This is all so very confusing... mind giving me an example? :(
|
| All times are GMT +2. The time now is 12:51 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.